Friday, July 11, 2014

Translating Large x-Values Before Curve Fitting

Find a polynomial that fits the points

                       (2005, 1)    (2006, 2)   (2007,3)   (2009,4)   (2010,10)

Because the given x-values are large, use the translation z = x - 2007 to obtain
   
                                 (-2, 1)   (-1, 2)   (0, 3)   (2, 4)   (3, 10)

This makes the polynomial functions as
p(-2) = a0 + a1(-2) + a2(-2)2 + a3(-2)3 + a4(-2)4 = a0 - 2a1 + 4a2 – 8a3 + 16a4 = 1
p(-1) = a0 + a1(-1) + a2(-1)2 + a3(-1)3 + a4(-1)4 = a0 - a1 + a2 –  a3 + a4 = 2
p(0) = a+ a1(0) + a2(0)+ a3(0)3 + a4(0)4 = a0 = 3
p(2) = a+ a1(2) + a2(2)+ a3(2)3 + a4(2)4 = a0 + 2a+ 4a2 + 8a3 + 16a4 = 4
p(3) = a+ a1(3) + a2(3)+ a3(3)3 + a4(3)4 = a0 + 3a+ 9a2 + 27a3 + 81a4 = 10

Then use the Gauss-Jordan Elimination. At the end, the solution is a0=3, a1=29/60, a2=-67/120, a3=1/15. and a4=13/120. This means that p(x) = 3 + 29/60x - 67/120x+ 1/15x3 + 13/120x4. But because we used z to translate the x-value, the p(x) is now written as 3 + 29/60(x-2007) - 67/120(x-2007)+ 1/15(x-2007)3 + 13/120(x-2007)4

  
                                                                              
                                                           
1-24-8161
1-11-112
100003
1248164
139278110
    
                       
-1(R1) + R2 ---> R2

1-24-8161
01-37-151
100003
1248164
139278110

-1(R1) + R3 ---> R3

1-24-8161
01-37-151
02-48-162
1248164
139278110

-1(R1) + R4 ---> R4

1-24-8161
01-37-151
02-48-162
0401603
139278110

-1(R1) + R5 ---> R5

1-24-8161
01-37-151
02-48-162
0401603
05535659

-2(R2) + R3 ---> R3

1-24-8161
01-37-151
002-6140
0401603
05535659

-4(R2) + R4 ---> R4

1-24-8161
01-37-151
002-6140
0012-1260-1
05535659

-5(R2) + R5 ---> R5

1-24-8161
01-37-151
002-6140
0012-1260-1
002001404

1/2(R3) ---> R3

1-24-8161
01-37-151
001-370
0012-1260-1
002001404

-12(R3) + R4 ---> R4

1-24-8161
01-37-151
001-370
00024-24-1
002001404

-20(R3) + R5 ---> R5

1-24-8161
01-37-151
001-370
00024-24-1
0006004

1/24(R4)

1-24-8161
01-37-151
001-370
0001-1-1/24
0006004

-60(R4) + R5 ---> R5

1-24-8161
01-37-151
001-370
0001-1-1/24
00006013/2

1/60(R5) ---> R5

1-24-8161
01-37-151
001-370
0001-1-1/24
0000113/120

1(R5) + R4 ---> R4

1-24-8161
01-37-151
001-370
000101/15
0000113/120

-7(R5) + R3 ---> R3

1-24-8161
01-37-151
001-30-91/120
000101/15
0000113/120

15(R5) + R2 ---> R2

1-24-8161
01-37021/8
001-30-91/120
000101/15
0000113/120

-16(R5) + R1 ---> R1

1-24-80-11/15
01-37021/8
001-30-91/120
000101/15
0000113/120

3(R4) + R3 ---> R3

1-24-80-11/15
01-37021/8
00100-67/120
000101/15
0000113/120

-7(R4) + R2 ---> R2

1-24-80-11/15
01-300259/120
00100-67/120
000101/15
0000113/120

8(R4) + R1 ---> R1

1-2400-1/5
01-300259/120
00100-67/120
000101/15
0000113/120

3(R3) + R2 ---> R2

1-2400-1/5
0100029/60
00100-67/120
000101/15
0000113/120

-4(R3) + R1 ---> R1

1-200061/30
0100029/60
00100-67/120
000101/15
0000113/120

-2(R2) + R1 
---> R1
100003
0100029/60
00100-67/120
000101/15
0000113/120



No comments:

Post a Comment