Archived

This topic is now archived and is closed to further replies.

QBomb

Polynomial Coefficients

Recommended Posts

I have n=3 arbitrary points in the X-Y plane. There is a way to find a polynomial of degree n - 1 that passes through these three points, right? f(x) = a0 + a1(x) + a2(x^2) w/ these points: (3,1) (5,3) (7,1) Am I setting up this augmented matrix right?

 a2  a1  a0    y
[ 9   3   0  | 1]
[ 25  5   0  | 3]
[ 49  7   0  | 1]

 
Should I have some other value in for a0?

Share this post


Link to post
Share on other sites
Yes, you should set the matrix to

a2 a1 a0 y
[ 9 3 1 | 1]
[ 25 5 1 | 3]
[ 49 7 1 | 1]

So you want to solve the linear system:

[ 9 3 1 ] [ a2 ] [ 1 ]
[ 25 5 1 ] * [ a1 ] = [ 3 ]
[ 49 7 1 ] [ a0 ] [ 1 ]

- Mikko Kauppila

Share this post


Link to post
Share on other sites