Vous êtes sur la page 1sur 5

Using 2nd order, Quadratic function

y(x) = a1x2 + b1x + c1

0 x 0.3

y(x) = a2x2 + b2x + c2

0.3 x 0.6

y(x) = a3x2 + b3x + c3

0.6 x 0.9

y(x) = a4x2 + b4x + c4

0.9 x 1.2

y(x) = a5x2 + b5x + c5

1.2 x 1.5

y(x) = a6x2 + b6x + c6

1.5 x 1.8

y(x) = a7x2 + b7x + c7

1.8 x 2.1

y(x) = a8x2 + b8x + c8

2.1 x 2.4

y(x) = a9x2 + b9x + c9

2.4 x 2.7

y(x) = a10x2 + b10x + c10

2.7 x 3.0

30 unknown, which required 30 equation to solve

y(x) = a1x2 + b1x + c1


a1(0)2 + b1(0) + c1 = 0
a1(0.3)2 + b1(0.3) + c1 = 0.3

0 x 0.3

y(x) = a2x2 + b2x + c2


a2(0.3)2 + b2(0.3) + c2 = 0.3
a2(0.6)2 + b2(0.6) + c2 = 0.56

0.3 x 0.6

y(x) = a3x2 + b3x + c3


a3(0.6)2 + b3(0.6) + c3 = 0.56
a3(0.9)2 + b3(0.9) + c3 = 0.78

0.6 x 0.9

y(x) = a4x2 + b4x + c4


a4(0.9)2 + b4(0.9) + c4 = 0.78
a4(1.2)2 + b4(1.2) + c4 = 0.93

0.9 x 1.2

y(x) = a5x2 + b5x + c5


a5(1.2)2 + b5(1.2) + c5 = 0.93
a5(1.5)2 + b5(1.5) + c5 = 1

1.2 x 1.5

y(x) = a6x2 + b6x + c6


a6(1.5)2 + b6(1.5) + c6 = 1
a6(1.8)2 + b6(1.8) + c6 = 0.97

1.5 x 1.8

y(x) = a7x2 + b7x + c7


a7(1.8)2 + b7(1.8) + c7 = 0.97
a7(2.1)2 + b7(2.1) + c7 = 0.86

1.8 x 2.1

y(x) = a8x2 + b8x + c8


a8(2.1)2 + b8(2.1) + c8 = 0.86
a8(2.4)2 + b8(2.4) + c8 = 0.68

2.1 x 2.4

y(x) = a9x2 + b9x + c9


a9(2.4)2 + b9(2.4) + c9 = 0.68
a9(2.7)2 + b9(2.7) + c9 = 0.43

2.4 x 2.7

y(x) = a10x2 + b10x + c10


2.7 x 3.0
2
a10(2.7) + b10(2.7) + c10 = 0.43
a10(3.0)2 + b10(3.0) + c10 = 0.14

Total: 20 equation

At x = 0.3
y(x) = a1x2 + b1x + c1
y(x) = a2x2 + b2x + c2
(a1x2 + b1x + c1 )|x=0.3 =

0 x 0.3
0.3 x 0.6
(a2x2 + b2x + c2)|x=0.3

(2a1x + b1)|x=0.3 = (2a2x + b2)|x=0.3


2(a1)(0.3) + b1 = 2(a2)(0.3) + b2
2(a1)(0.3) + b1 - 2(a2)(0.3) - b2 = 0
At x = 0.6
2(a2)(0.6) + b2 2(a3)(0.6) - b3 = 0
At x = 0.9
2(a3)(0.9) + b3 2(a4)(0.9) - b4 = 0
At x = 1.2
2(a4)(1.2) + b4 2(a5)(0.9) - b5 = 0
At x = 1.5
2(a5)(1.5) + b5 2(a6)(1.5) - b6 = 0
At x = 1.8
2(a6)(1.8) + b6 2(a7)(1.8) - b7 = 0
At x = 2.1
2(a7)(2.1) + b7 2 (a8)(2.1) - b8 = 0
At x = 2.4
2(a8)(2.4) + b8 2(a9)(2.4) - b9 = 0
At x = 2.7
2(a9)(2.7) + b9 2(a10)(2.7) - b10 = 0
Total : 9 equation

Last equation:
Assuming a1=0
Which mean assuming first spline is linear,
a1x2 + b1x + c1
= b1x + c1

Trough Matlab..
i
1
2
3
4
5
6
7
8
9
10

ai

bi

ci

0
-0.8889
-0.7778
-1.2222
-0.3333
1.5556

1.0000
1.5333
1.4000
2.2000
0.0667
-5.6000

0
0.1800
0.3700
-0.0200

0
0
0
0

0
0
0
0

0
0
0
0

1.0800
5.0400

1) y(x) = x
0 x 0.3
2
2) y(x) = -0.8889 x + 1.5333x + 0.18
3) y(x) = -0.7778 + 1.4x + 0.37
4) y(x) = -1.2222x2 + 2.2x -0.02
5) y(x) = -0.3333x2 + 0.0667x + 1.08
6) y(x) = 1.5556x2 -5.6x + 5.04
7) .
8) .
9) .
10) .

Equation:
y(x) = -0.8888 x2 + 0.6x + 6.65

0.3 x 0.6
0.6 x 0.9
0.9 x 1.2
1.2 x 1.5
1.5 x 1.8

Using 4th order, Quadratic function


y(x) = a1x4 + b1x3 + c1x2 + d1x + c1

0 x 0.3

y(x) = a2x4 + b2x3 + c2x2 + d2x + c2

0.3 x 0.6

y(x) = a3x4 + b3x3 + c3x2 + d3x + c3

0.6 x 0.9

y(x) = a4x4 + b4x3 + c4x2 + d4x + c4

0.9 x 1.2

y(x) = a5x4 + b5x3 + c5x2 + d5x + c5

1.2 x 1.5

y(x) = a6x4 + b6x3 + c6x2 + d6x + c6

1.5 x 1.8

y(x) = a7x4 + b7x3 + c7x2 + d7x + c7

1.8 x 2.1

y(x) = a8x4 + b8x3 + c8x2 + d8x + c8

2.1 x 2.4

y(x) = a9x4 + b9x3 + c9x2 + d9x + c9

2.4 x 2.7

y(x) = a10x4 + b10x3 + c10x2 + d10x + c10


50 unknown, which required 50 equation to solve

2.7 x 3.0