SOLUTION: How do you find the polynomial whose graph goes through these points? (2,10), (-1,-4), (0,2), and (1,-2). Thanks

Algebra ->  College  -> Linear Algebra -> SOLUTION: How do you find the polynomial whose graph goes through these points? (2,10), (-1,-4), (0,2), and (1,-2). Thanks      Log On


   



Question 1102896: How do you find the polynomial whose graph goes through these points?
(2,10), (-1,-4), (0,2), and (1,-2).
Thanks

Found 2 solutions by greenestamps, Fombitz:
Answer by greenestamps(13200) About Me  (Show Source):
You can put this solution on YOUR website!


n points can be fitted with a polynomial of degree (n-1). With 4 given points, you need a polynomial of degree 3:
P%28x%29+=+ax%5E3%2Bbx%5E2%2Bcx%2Bd

Simply make 4 equations in the unknown coefficients a, b, c, and d using the coordinates of the given points.
(2,10) --> 8a%2B4b%2B2c%2Bd+=+10 [1]
(-1,-4) --> -a%2Bb-c%2Bd+=+-4 [2]
(0,2) --> d+=+2 [3]
(1,-2) --> a%2Bb%2Bc%2Bd+=+-2 [4]

Use [3] to simplify the others:
8a%2B4b%2B2c+=+8 [5]
-a%2Bb-c+=+-6 [6]
a%2Bb%2Bc+=+-4 [7]

Add [6] and [7] to solve for b:
2b+=+-10
b+=+-5 [8]

Use [8] to simplify [5] and [7]:
8a-20%2B2c+=+8
8a%2B2c+=+28
4a%2Bc+=+14 [9]
a-5%2Bc+=+-4
a%2Bc+=+1 [10]

Solve [9] and [10] by elimination to solve for a and c:
3a+=+13
a+=+13%2F3
c+=+-10%2F3

The polynomial is
p%28x%29+=+%2813%2F3%29x%5E3-5x%5E2-%2810%2F3%29x%2B2

Here is the graph... graph%28200%2C400%2C-3%2C3%2C-5%2C11%2C%2813%2F3%29x%5E3-5x%5E2-%2810%2F3%29x%2B2%29

Answer by Fombitz(32388) About Me  (Show Source):
You can put this solution on YOUR website!
You can use EXCEL to do a curve fit.
.
.
.
.
.
.
.
You can use linear algebra to solve a system of equations using a general form of the polynomial.
y=Ax%5E3%2BBx%5E2%2BCx%2BD
So then,
(2,10):
10=A%282%29%5E3%2BB%282%29%5E2%2BC%282%29%2BD
1.8A%2B4B%2B2C%2BD=10
(-1,-4):
-4=A%28-1%29%5E3%2BB%28-1%29%5E2%2BC%28-1%29%2BD
2.-A%2BB-C%2BD=-4
(0,2):
2=A%280%29%5E3%2BB%280%29%5E2%2BC%280%29%2BD
3.D=2
(1,-2):
-2=A%281%29%5E3%2BB%281%29%5E2%2BC%281%29%2BD
4.A%2BB%2BC%2BD=-2
Then substitute eq. 3 into the others,
8A%2B4B%2B2C%2B2=10
8A%2B4B%2B2C=8
5.4A%2B2B%2BC=4
and
-A%2BB-C%2B2=-4
6.-A%2BB-C=-6
and
A%2BB%2BC%2B2=-2
7.A%2BB%2BC=-4
Continuing, add eq. 5 and eq. 7 to eq. 6 to eliminate C.
4A%2B2B%2BC-A%2BB-C=4-6
8.3A%2B3B=-2
and
A%2BB%2BC-A%2BB-C=-4-6
2B=-10
9.B=-5
So then working backwards,
from eq. 8,
3A%2B3%28-5%29=-2
3A=-2%2B15
A=13%2F3
and from eq. 7,
13%2F3-5%2BC=-4
13%2F3-15%2F3%2BC=-12%2F3
C=-12%2F3%2B2%2F3
C=-10%2F3
.
.
.
y=%2813%2F3%29x%5E3-5x%5E2-%2810%2F3%29x%2B2
.
.
.
Of course, it matches the EXCEL curve fit.