Sunteți pe pagina 1din 14

Differential Numeric Methode

That is determining the derivative of a function at a certain value


x of the data table.

A. Determination of First Derivatives


If a function can be approximated by an interpolating polynomial,
it can be expected that the slope of that function can also be
approximated by the polynomial slope.
For example use Newton forward Polynomial:
𝑓 𝑥 ≅ 𝑃𝑛 𝑥
𝑖 𝑖−1 2 𝑖 𝑖−1 𝑖−2 3
= 𝑓0 + 𝑖 ∆𝑓0 + ∆ 𝑓0 + ∆ 𝑓0
2! 3!
𝑖 𝑖 − 1 𝑖 −2 …… 𝑖 − 𝑛 + 1 𝑛
+ ⋯…….+ ∆ 𝑓0
𝑛!
Polinomial Approximation
1 d [Pn (xi)] = 1 [Δfo + ½ (i– 1 + i)Δ2fo +
f ' (xi) = Pn' (xi) = h
h di
1 {(i – 1)(i – 2) + i(i – 2) + i(i –1)}Δ3fo + ……..]
6

There are two approximations: Forward Difference


Approximation and Central Difference Approximation

Forward Difference Aprroximation: the value of x to be


approximated for its derivatives is chosen as the starting
point of the points for its polynomial approximation.

1 1 1
f (xi) = [Δfo - ½ Δ2fo + 3 Δ3fo – 1
4 Δ fo + …….+
4
n Δ fo ]
n
h
(i=0 )

(1) n
Error Pn'(x0) = hn f(n+1)(ξ)
(n  1)
Central Difference Aprroximation: The value of X to be
approximated for its derivatives is chosen as the midpoint
of the point chosen for its polynomial approximation.

For 2nd order polynomial:


Requires three points, The selected points are xo, x1, and
x2
The midpoint is X1.

1
f ' (x) : f ' x1) = [Δfo + ½Δ2fo]
h
f2  fo
 [f1 – fo + ½ (f2 – 2 f1 + fo )] 
1
h 2h

1 2
Error P2' (x1) =  h f iii
(ξ )
6
For 4th order polynomial:

Requires five points, The selected points are xo, x1, x2,
x3, and x4.
The middle point is X2.

1 f 0  8 f1  8 f 3  f 4
f ' (x2) =
h 12
1
Error = 30 h4 f v(ξ), x 0 ≤ ξ ≤ x4
Example 4-4
The following data table is known :
Table 4-4
Estimate the first derivative y at x = 1.7 to use one, two,three and four
terms of the formula used

x f(x) ∆y ∆2 y ∆3 y ∆4 y
1,3 3,669
0,813
1,5 4,482 0,179
0,992 0,041
1,7 5,474 0,220 0,007
1,212 0,048
1,9 6,686 0,268 0,012
1,480 0,060
2,1 8,166 0,328 0,012
1,808 0,072
2,3 9,974 0,400
2,208
2,5 12,182
Solution:
In this case for x = 1.7 used index i = 0 (eq. 4.12)

1
y ' (xo) = Pn' (xo) = [Δyo – ½ Δ2 yo + 1/3 ∆3 y0 - ¼ ∆4y0 + …….+ 1/n ∆ny0 ]
h

Satu suku:
1
y ' (1,7) = (1,212) = 6,060
0,2
Dua suku:
1
y ' (1,7) = (1,212 – ½ (0,268)) = 5,390
0,2
Tiga suku:
1
y ' (1,7) = 0,2 (1,212 – ½ (0,268) + 1/3 (0,060)) = 5,490
Empat suku:
1
y ' (1,7) = (1,212 – ½ (0,268) + 1/3 (0,060) - ¼ (0,012) ) = 5,475
0,2
Use three terms, error = (1) 3 (0,2)3 f iv(ξ), 1,7 ≤ ξ ≤ 2,3
4
0,008  e1,7 (min)    0,011(min) 
=   2,3(max)  =  
4 e   0,020(max)
(the real error = – 0,016)

Use four terms, error = (1) 4 (0,2)4 f v(ξ), 1,7 ≤ ξ ≤ 2,3


5
 e1,7 (min) 
= 0,006
  =  0,002(min) 
5 e 2,5(max)   
0,004(max) 

(the real error = – 0,001)


Use one term, error = (1)1 (0,2) f"(ξ), 1,7 ≤ ξ ≤ 1,9
2

0,2 e1,7 (min)     0,547(min) 


  1,9(max)   
2 e   0,669(max)
(the real error = 0,586)

Use two term, error = ( 1) 2 (0,2)2 f '''(ξ), 1,7 ≤ ξ ≤ 2,1

3
0,04  e1, 7 (min)  0,073(min) 
=   =  
3 e 2,1(max)  0,109(max) 

(the real error = 0,084)


“Central Difference Approximation”

𝑓2 −𝑓0
𝑓 ′ 𝑥1 = + 𝑒𝑟𝑟𝑜𝑟....
2ℎ

The value of X to be approximated for its derivatives is chosen as the


midpoint of the range.
And the error :
1 2 𝑖𝑖𝑖
𝑃2′
𝑥1 = − ℎ 𝑓 𝜀 , 𝑥0 ≤ 𝜀 ≤ 𝑥2
6
If we used equation 4-17 we can get
6,686 − 4,482
𝑓 ′ 1,7 = = 5,510
2(0,2)
Estimates error : -0,03 (min)
-0,046 (max)
Real error = -0,036
Central Difference Approximation using higher order polynomial. For
example 4th orde polynomial:
1 𝑓−2 − 8𝑓−1 + 8𝑓1 − 𝑓2
𝑓′ 𝑥0 =
ℎ 12
1 4 𝑣
Error = ℎ 𝑓 𝜀 , 𝑥−2 ≤ 𝜖 ≤ 𝑥2
30
THANK
YOU
Formula for higher order differential
equations
For the first order could be explained using:
𝑒 =1+∆

𝑦𝑖 = 𝐸 𝑖 𝑦𝑜

𝑑 𝑖
1𝑑 𝑖 1
𝑦𝑖 ′ = (𝐸 𝑦𝑜 ) = (𝐸 𝑦𝑜 ) = (ln 𝐸) 𝐸 𝑖 𝑦𝑜
𝑑𝑦 ℎ 𝑑𝑖 ℎ
Using i = 0
1 1
𝑦𝑜 ′ = (ln 𝐸) 𝑦𝑜 = ln(1 + ∆)𝑦𝑜
ℎ ℎ

1 1 2 1 3 1 4
𝑦𝑜 = ∆𝑦𝑜 − ∆ 𝑦𝑜 + ∆ − ∆ 𝑦𝑜 + ⋯
ℎ 2 3 4
D is defined as derivative operator, so
1
𝐷 𝑦𝑜 = ln 1 + ∆ 𝑦𝑜

Or
1
𝐷 = ln 1 + ∆

For higher order differential can be obtained through:


1 2
𝐷2 = ln (1 + ∆)

1 3
𝐷3 = ln (1 + ∆)

1 𝑛
𝐷𝑛 = ln (1 + ∆)

As example for second order derivative
2
2
1 1 2 1 3 1 4
𝐷 = 2 ∆− ∆ + ∆ − ∆ +⋯ 𝑦𝑜
ℎ 2 3 4

1 11 4 5 5
𝐷2 2 3
= 2 ∆ − ∆ + ∆ − ∆ + ⋯ 𝑦𝑜
ℎ 12 6

1 11 4 5 5
𝐷2 = 2
∆2 𝑦 − ∆3 𝑦 +
𝑜 𝑜 ∆ 𝑦𝑜 − ∆ 𝑦𝑜 + ⋯
ℎ 12 6

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