Sunteți pe pagina 1din 6

Based on the data in Table 1:

The cubic equation is deriving: y = a0 + ax +a2x2 + a3x3


Firstly, find the value of a0, a1, a2, a3

n x x2 x3 a0 y
x x2 x3 x4 a1 = xy
x2 x3 x4 x5 a2 x2y
x3 x4 x5 x6 a3 x3y

Formula:

a0 n + a1 x + a2 x2 + a3 x3 = y

a0 x + a1 x2 + a2 x3 + a3 x4 = xy

a0 x2 + a1 x3 + a2 x4 + a3 x5 = x2y

a0 x3 + a1 x4 + a2 x5 + a3 x6 = x3y

m = 3, n = 8;

i x y X2 X3 X4 X5 X6 xy x2y x3y

1 3 1.6 9 27 81 243 729 4.8 14.4 43.2

2 4 3.6 16 64 256 1024 4096 14.4 57.6 230.4

3 5 4.4 25 125 625 3125 15625 22 110 550

4 7 3.4 49 343 2401 16807 117649 23.8 166.6 1166.2

5 8 2.2 64 512 4096 32768 262144 17.6 140.8 1126.4

6 9 2.8 81 729 6561 59049 531441 25.2 226.8 2041.2

7 11 3.8 121 1331 14641 161051 1771561 41.8 459.8 5057.8

8 12 4.6 144 1728 20736 248832 2985984 55.2 662.4 7948.8

59 26.4 509 4859 49397 522899 5689229 204.8 1838.4 18164


From the table, substitute all value in the formula;
a0 (8) + a1 (59) + a2 (509) + a3 (4859) = 26.4

a0 (59) + a1 (509) + a2 (4859) + a3 (49397) = 204.8

a0 (509) + a1 (4859) + a2 (49397) + a3 (522899) = 1838.4

a0 (4859) + a1 (49397) + a2 (522899) + a3 (5689229) = 18164

Form into matrices;

8 59 509 4859 a0 26.4


59 509 4859 49397 a1 = 204.8
509 4859 49397 522899 a2 1838.4
4859 49397 522899 5689229 a3 18164

Solve the matrices by using naive gauss elimination;


1st row 8,

1 7.375 63.635 607.375 a0 3.3


59 509 4859 49397 a1 = 204.8
509 4859 49397 522899 a2 1838.4
4859 49397 522899 5689229 a3 18164

Then, make the value of 59 in the 2nd row = 0;


(-59) 1 + 59 = 0
(-59) 7.375 + 509 = 73.875
(-59) 63.625 + 4859 = 1105.125
(-59) 607.375 + 49397 = 13561.875
(-59) 3.3 + 204.8 = 10.1
1 7.375 63.635 607.375 a0 3.3
0 73.875 1105.125 13561.875 a1 = 10.1
509 4859 49397 522899 a2 1838.4
4859 49397 522899 5689229 a3 18164

Make the value of 509 in the 3rd row = 0;


(-509) 1 + 509 = 0
(-509) 7.375 + 4859 = 1105.125
(-509) 63.625 + 4859 = 17011.875
(-509) 607.375 + 49397 = 213745.125
(-509) 3.3 + 204.8 = 158.7

1 7.375 63.635 607.375 a0 3.3


0 73.875 1105.125 13561.875 a1 = 10.1
0 1105.125 17011.875 213745.125 a2 158.7
4859 49397 522899 5689229 a3 18164

Get the value of 1105.125 in the 3rd row = 0;


(-14.959) 73.875 + 1105.125 = 0
(-14.959) 1105.125 + 17011.875 = 480.310
(-14.959) 13561.875 + 213745.125 = 10873.037
(-14.959) 10.1 + 158.7 = 7.614

1 7.375 63.635 607.375 a0 3.3


0 73.875 1105.125 13561.875 a1 = 10.1
0 0 480.310 10873.037 a2 7.614
4859 49397 522899 5689229 a3 18164
Make the value of 4859 in the 4th row = 0;
(-4859) 1 + 4859 = 0
(-4859) 7.375 + 49397 = 13561.875
(-4859) 63.625 + 522899 = 213745.125
(-4859) 607.375 + 5689229 = 2737993.875
(-4859) 3.3 + 18164 = 2129.3

1 7.375 63.635 607.375 a0 3.3


0 73.875 1105.125 13561.875 a1 = 10.1
0 0 480.310 10873.037 a2 7.614
0 13561.875 213745.125 2737993.875 a3 2129.3

Make the value of 13561.875 in the 4th row = 0;


(-183.579) 73.875 + 13561.875 = 0
(-183.579) 1105.125 + 213745.125 = 10867.383
(-183.579) 13561.875 + 2737993.875 = 248318.424
(-183.579) 10.1 + 2129.3 = 275.152

1 7.375 63.635 607.375 a0 3.3


0 73.875 1105.125 13561.875 a1 = 10.1
0 0 480.310 10873.037 a2 7.614
0 0 10867.383 248318.424 a3 275.152

Get the value of 10867.383 in the 4th row = 0;


(-22.626) 480.310 + 10867.383 = 0
(-22.626) 10873.037 + 248318.424 = 2305.089
(-22.626) 7.614 + 275.152 = 102.878
1 7.375 63.635 607.375 a0 3.3
0 73.875 1105.125 13561.875 a1 = 10.1
0 0 480.310 10873.037 a2 7.614
0 0 0 2305.089 a3 102.878

Backward substitution:
2305.089 a3 = 102.878
a3 = 0.0446
480.310 a2 + 10873.037 a3 = 7.614
480.310 a2 + 10873.037 (0.0446) = 7.614
a2 = -0.9938
73.875 a1 + 1105.125 a2 + 13561.875 a3 = 10.1
73.875 a1 + 1105.125 (-0.9938) + 13561.875 (0.0446) = 10.1
a1 = 6.8156
a0 + 7.375 a1 + 63.635 a2 + 607.375 a3 = 3.3
a0 + 7.375 (6.8156) + 63.635 (-0.9938) + 607.375 (0.0446) = 3.3
a0 = -10.823
substitute all the value in the equation;
Therefore, y = -10.823 + 6.8156x + -0.9938x2 + 0.0446x3
Formula for r2;

r2 =

where;
Sr = (y a0 a1x -a2x2 + a3x3 )2
St = (y )2

x y (y )2 (y a0 a1x -a2x2 + a3x3 )2

3 1.6 2.89 0.08054244

4 3.6 0.09 0.042849

5 4.4 1.21 0.172225

7 3.4 0.01 0.00770884

8 2.2 1.21 0.53846244

9 2.8 0.25 0.071289

11 3.8 0.25 0.29008996

12 4.6 1.69 0.10614564

7.6 1.30931232

7.6 1.30931232
r2 = 7.6

= 0.8277

= 82.77 %


Sy/x = 2

1.30931232
= 82

= 0.4671

S-ar putea să vă placă și