Question:
Polynomial Curve Fitting problem?
Need Math Help
2010-02-21 00:31:15 UTC
Determine the polynomial whose graph passes through these points:

(2,5), (3,2), (4,5)

I used the formula to get:

a0 + 2a1 + 4a2 = 5
a0 + 3a + 9a2 = 2
a0 + 4a1 + 16a2 = 5

How do I solve this using Gauss-Jordan Elimination?

I'm only in elementary linear algebra so Gauss methods are the only ones we've learned
Five answers:
Dr W
2010-02-21 12:58:37 UTC
you have three data points right? so the equation that would pass through these three points would be of the form..



y = ax² + bx + c.. right? n points can be fit to an n-1 order polynomial? think about a line. 2 points. y = mx + b.. ok?



*************

so substitute in the points to get these equations...



5 = a x (2)² + b x (2) + c

2 = a x (3)² + b x (3) + c

5 = a x (4)² + b x (4) + c



or...

4a + 2b + 1c = 5

9a + 3b + 1c = 2

16a + 4b + 1c = 5



you got this far right?

****************

****************

in matrix form...



4...2...1...|...5

9...3...1...|...2

16..4..1...|...5



pivot on 4..

new row 1 = old row 1/4



1...1/2...1/4...|...5/4

9....3......1....|...2

16...4.....1....|...5



new row 2 = -9xrow1 + old row2

new row 3 = -16xrow1 + old row2



1...1/2...1/4...|...5/4

0...-3/2..-5/4..|...-37/4

0....-4....-3....|...-15



pivot on -3/2

new row 2 = -2/3 x old row2



1...1/2...1/4...|...5/4

0....1......5/6..|...37/6

0....-4....-3....|...-15



new row1 = -1/2xrow2 + old row1

new row3 = 4xrow2 + old row 3



1...0...-1/6...|...-11/6

0...1....5/6...|...37/6

0...0....1/3...|...29/3



pivot on 1/3

new row 3 = 3 x old row3



1...0...-1/6...|...-11/6

0...1....5/6...|...37/6

0...0....1......|...29



new row1 = 1/6xrow3 + oldrow1

new row2 = -5/6xrow3 + oldrow2



1...0...0...|...3

0...1...0...|...-18

0...0...1...|...29



so your equation is..

y = 3 x² - 18 x + 29



******

questions?
Diane
2010-02-21 01:30:21 UTC
I will assume you used your formula correctly to get the equations. I will simply show you how to use Gauss-Jordan Elimination to find a0, a1 and a2. But before I start, there are a few terms I need to define:



R1 = row 1, R2 = row 2, R3 = row 3

C1 = column1, C2 = column 2, C3 = column 3



R1 + R2 => R2 [add R1 to R2 to get a new R2]

R1 / -2 => R1 [multiply R1 by (-2) to get a new R1]

R2 x 3 + R1 => R1 [multiply R2 by 3, then add R1 get a new R1]



This will make more sense when I actually do the steps. Now let's begin..



First, put the equations in augmented matrix form (3 rows, 4 columns):



1 2 4 5

1 3 9 2

1 4 16 5



That's the easy part, unless you have a graphing calculator that has the RREF function (Reduced Row Echelon Form) under the MATRIX category. Assuming you don't...



1. Use row ops to get the first element (R1C1) to be = 1. Lucky for us it already is.



2. Use row ops to make all of the numbers underneath the 1 in R1 = 0:



1 2 4 5

1 3 9 2 (R1 - R2 => R2)

1 4 16 5 (R1 - R3 => R3)



1 2 4 5

0 -1 -5 3

0 -2 -12 0



3. Make the R2C2 element = 1, then make all other elements in C2 =0:



1 2 4 5

0 -1 -5 3 (R2 x -1 => R2)

0 -2 -12 0



1 2 4 5 (R2 x -2 + R1 => R1)

0 1 5 -3

0 -2 -12 0 (R2 x 2 + R3 => R3)



1 0 -6 11

0 1 5 -3

0 0 -2 -6



4. You're almost done. Make the R3C3 element = 1, and the rest of the elements in C2 = 0:



1 0 -6 11

0 1 5 -3

0 0 -2 -6 (R3 / -2 => R3)



1 0 -6 11 (R3 x 6 + R1 => R1)

0 1 5 -3 (R3 x -5 + R1 => R1)

0 0 1 3



1 0 0 29

0 1 0 -18

0 0 1 3



This yields an answer of:



a0 = 29

a1 = -18

a2 = 3



Check these numbers in all three of your equations to verify there weren't any oops-es along the way (there aren't, I already checked using RREF on my graphing calculator).



Now that you have your a's, you are on your own!
MathPhD
2010-02-21 00:55:26 UTC
It is important to know what is going on in an algorithm such as Gauss-Jordan Elimination, but the tedium of performing such calculations needs to be kept to a minimum. So after practicing some, it is important that you know tools that can be used to ease your work.



I went to link below and entered "quadratic fit (2,5), (3,2), (4,5)" and got the answer: 3 x^2-18 x+29
Black Knight
2010-02-21 00:56:48 UTC
Form the matrix



[1, 2, 4

1, 3, 9

1, 4, 16]



and reduce into echelon form if you MUST use G-J or premult both sides by inverse to isolate

column vector

[a0

a1

a3]
?
2016-10-28 22:49:14 UTC
The horizontal tangent at (one million/2, one million/2) shows that the vertex is here. consequently, we've y = a*(x - one million/2)^2 + one million/2. Plug interior the element (0, one million): one million = a*(-one million/2)^2 + one million/2 one million/2 = (one million/4)a a = 2 y = 2(x - one million/2)^2 + one million/2


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...