Fit a second degree polynomial to the ordered pairs in the table below:
Hence, find a, b and c for the polynomial: axi 2 + bxi + c
Solution:
We use functional form and choose a, b, c to minimize the functional, so that:
F(a,b,c) = å 4 n =1 (axi 2 + bxi + c - yi) 2
This can be done by solving the linear system of equations:
¶f/¶a = 0, ¶f/¶b = 0, ¶f/¶c = 0
Compute using functionals below by inserting respective values for (xi, yi) from the table:
Start with:
¶f/¶a
= 2
(axi 2 + bxi + c
-yi)xi 2 = 0
Then:
(-1,0): 2a - 2b + 2c = 0
(0, -2): 0
(1, -2): 2a + 2b + 2c -
4 = 0
(2, 0): 32a + 16b + 8c = 0
------------------------
Summing: 36a +16b +12c - 4 = 0
¶f/¶b = 2 (axi 2 + bxi + c
-yi)xi = 0
(-2,1 ): - 16a + 8b - 4c + 4 = 0
(-1, -1): -2a + 2b - 2c
-2 = 0
(0, 2): 0
(1, 1): 2a +
2b + 2c - 2 = 0
---------------------------------
Sum: -16a
+ 12b - 4c = -4
¶f/¶c = 2 (axi 2 + bxi + c
-yi) = 0
(-2, 1): 8a - 4b + 2c - 2 = 0
(-1, -1): 2a - 2b + 2c + 2 = 0
(0, 2): 2c - 4 = 0
(1, 1): 2a +2b + 2c - 2 = 0
-----------------------------
Sum: 12a - 4b + 8c - 2 = 0
From the 3 sums we arrive at a 3 x 3
system given by:
36a - 16b +12c = 4
-16a + 12b - 4c = -4
12a - 4b + 8c = 2
Or, written in matrix form:
Make a check:
36·(-0.25) - 16·(-0.55) + 12·0.35 = -9 + 8.8 + 4.2 = 4
-16·(-0.25) + 12·(-0.55) - 4·0.35 = 4 - 6.6 - 1.4 = -4
12·(-0.25) - 4·(-0.55) + 8·0.35 = -3 + 2.2 + 2.8 = 2
No comments:
Post a Comment