Professional Documents
Culture Documents
Let xj, j = 0,1,2,…,n be the equal spaced arguments with step length ‘h’.
Let f(xj) = fj, j = 0,1,2,…,n
df d 2 f
Aim : To find the approximate values of , ,... at a tabular point xi without
dx dx 2
finding the expression for f(x) or f(x) ≈ p(x) where p(x) is the interpolating polynomial
for the given data.
Derivatives in terms of forward differences :
We have ∆f ( x) = f ( x + h) − f ( x) … (1)
By Taylor series expansion, we have
h2
f ( x + h) = f ( x) + hf ′( x) + f ′′( x ) + ...
2!
d
If D ≡ , then
dx
h2 2
f ( x + h) = f ( x ) + hDf ( x) + D f ( x ) + ...
2!
h2 D2
= 1 + hD + + ... f ( x)
2!
∴ f ( x + h) = e hD f ( x )
Now (1) ( )
∆f ( x) = e hD f ( x ) − f ( x) = e hD − 1 f ( x)
∴ ∆ ≡ e hD − 1 or e hD = 1 + ∆
∆2 ∆3 ∆4
hD ≡ log e (1 + ∆ ) ≡ ∆ − + − + ...
2 3 4
1 ∆ 2 ∆3 ∆ 4
D ≡ ∆ − + − + ...
h 2 3 4
If we want to find the derivative of f(x) at xi , then f ′( xi ) = Df ( x) x = x
i
1 ∆ 2 ∆3 ∆ 4
i.e., f ′ ( xi ) = ∆ − + − + ... f ( xi )
h 2 3 4
1 ∆ 2 ∆3 ∆ 4
Dfi = ∆ − + − + ... fi ... (2)
h 2 3 4
∆ 2 ∆3 ∆ 4
hD ≡ ∆ − + − + ...
2 3 4
2
2 2∆ 2 ∆3 ∆ 4
∴ h D ≡ ∆ − + − + ...
2 3 4
1 2 1 1
≡ ∆ 2 − ∆ 3 + + ∆ 4 + − − ∆5 + ...
4 3 2 3
1 2 11 5
D2 ≡ 2
∆ − ∆ 3 + ∆ 4 − ∆5 + ...
h 12 6
1 11 5
∴ D 2 f i = 2 ∆ 2 − ∆ 3 + ∆ 4 − ∆5 + ... f i ... (3)
h 12 6
Similarly higher order derivatives can be obtained at any tabular point xi.
hD h 2 D 2 h3 D 3
We have ∆≡e − 1 = hD + + + ...
2 6
2
2 h 2 D 2 h3 D 3 1 1
∆ ≡ hD + + + ... = h 2 D 2 + h3 D3 + + h 4 D 4 + ...
2 6 4 3
7
∆ 2 ≡ h 2 D 2 + h3 D3 + h 4 D 4 + ...
12
Similarly we can find
3
∆3 ≡ h3 D3 + h 4 D 4 + ...
2
4 4 4
∆ ≡ h D + ...
If we ignore the terms after the first term in (2), we get
1
Dfi ≈ ∆fi
h
The error associated with this formula is given by
1 ∆2 ∆3 ∆ 4
− + − + ... fi
h 2 3 4
1 1 2 2 1
=
h 2
( 3
) (
− h D + ... + h3 D 3 + ... + ... fi )
1 1
= − h 2 D 2 fi + ... = − hD 2 f i + ... = O( h)
2h 2
∴ By retaining only one term in the forward difference expansion of Dfi , we get the
1
approximation for Dfi as Dfi ≈ ∆fi with an error of O(h).
h
If we ignore the terms after the first two terms in (2), we get
1 ∆2
Df i ≈ ∆ − fi
h 2
1 ∆3 ∆ 4
with error = − + ... fi
h 3 4
1 1 3 3 1 4 4
=
h 3
h( D + ) (
... −
4
)
h D + ... ... fi
1
= h 2 D3 f i + ... = O( h 2 )
3
∴ By retaining two terms in the forward difference expansion of Dfi , we get the
1 ∆2
approximation for Dfi as Df i ≈ ∆ − fi with an error of O(h2).
h 2
Continuing in this manner, finally we get if m terms are retained in the forward
difference expansion of Dfi , we get the approximation for Dfi as
1 ∆ 2 ∆3 ∆ 4 m ∆
m
m
Df i ≈ ∆ − + − + ... + ( −1) fi with an error O(h ).
h 2 3 4 m
Approximations for the second derivative in terms of forward differences :
We have
1 2 11 5
D 2 fi = 2
∆ − ∆3 + ∆ 4 − ∆5 + ... fi … (3)
h 12 6
If we retain only the first term in the r.h.s. of the above equation, we get
1 2
D 2 fi ≈ ∆ fi
h2
1 3 11 4 5 5
with error = 2
−∆ + ∆ − ∆ + ... fi
h 12 6
1 11 4 4
=
h2
( 3 3
) ( )
− h D + ... + 12 h D + ... − ... f i
= − hD 3 fi + ... = O(h)
∴ By retaining only one term in the forward difference expansion of D2fi , we get the
1 2
approximation for D2fi as D 2 f i ≈ ∆ fi with an error of O(h).
h2
If we retain only the first two terms in the r.h.s. of the equation (3), we get
1 2
D 2 fi ≈
h
(
2
∆ − ∆3 fi )
1 11 4 5 5
with error = 2
∆ − ∆ + ... fi
h 12 6
1 11 4 4 5
= 2
h 12
( 6
) (
)
h D + ... − h5 D5 + ... + ... fi
11
= h 2 D 4 f i + ... = O(h 2 )
12
Continuing in this manner, finally we get if m terms are retained in the forward
difference expansion of D2fi , we get the approximation with O(hm).
Note : In general if we retain m terms in the forward difference expansion of
derivatives, we get an approximation with an error O(hm).
Derivatives in terms of backward differences :
We have ∇f ( x) = f ( x) − f ( x − h) … (1)
By Taylor series expansion, we have
h2 h3
f ( x − h) = f ( x ) − hf ′( x) + f ′′( x) − f ′′′( x )...
2! 3!
d
If D ≡ , then
dx
h2 2 h3 3
f ( x − h) = f ( x ) − hDf ( x) + D f ( x ) − D f ( x)...
2! 3!
h 2 D 2 h3 D 3
= 1 − hD + − ... f ( x)
2! 3!
∴ f ( x − h) = e − hD f ( x )
Now (1) ( )
∇f ( x ) = f ( x) − e − hD f ( x ) = 1 − e − hD f ( x )
∴ ∇ ≡ 1 − e − hD or e − hD = 1 − ∇
∇ 2 ∇3 ∇ 4
− hD ≡ log e (1 − ∇ ) ≡ − ∇ + + + + ...
2 3 4
1 ∇ 2 ∇3 ∇ 4
D ≡ ∇ + + + + ...
h 2 3 4
1 ∇ 2 ∇3 ∇ 4
Dfi = ∇ + + + + ... fi … (2)
h 2 3 4
∇ 2 ∇3 ∇ 4
We have hD ≡ ∇ + + + + ... , then we have
2 3 4
11 4
h 2 D 2 ≡ ∇ 2 + ∇3 + ∇ + ...
12
3
h3 D3 ≡ ∇3 + ∇ 4 + ...
2
4 4 4
h D ≡ ∇ + ...
Also we have
− hD h 2 D 2 h3 D 3 h 4 D 4
∇ ≡1− e = hD − + − + ...
2 6 24
∇ 2 ≡ h 2 D 2 − h3 D3 + ...
∇3 ≡ h3 D3 + ...
∇ 4 ≡ h 4 D 4 + ...
If we retain only first term in the r.h.s. of the equation (2), we get
1
Df i ≈ ∇fi
h
1 ∇ 2 ∇3 ∇ 4
with error = + + + ... fi
h 2 3 4
1 1 2 2 1 3 3
=
h 2
h (
D − h 3 3
D + ... ) (
+
3
)
h D + ... + ... fi
1 2 2 1
= h D fi + ... = hD 2 fi + ... = O( h)
2h 2
If we retain only first two terms in the r.h.s. of the equation (2), we get
1 ∇2
Df i ≈ ∇ + fi
h 2
1 ∇3 ∇ 4
with an error = + + ... fi
h 3 4
1 1 3 3 1
=
h 3
( ) 4
( )
h D + ... + h 4 D 4 + ... + ... fi
1
= h 2 D3 fi + ... = O(h 2 )
3
Continuing in this manner, finally we get if m terms are retained in the backward
difference expansion of Dfi , we get the approximation for Dfi as
1 ∇ 2 ∇3 ∇m m
Dfi = ∇ + + + ... + f i with an error O(h ).
h 2 3 m
Approximations for the second derivative in terms of backward differences :
We have seen that
11 4
h 2 D 2 ≡ ∇ 2 + ∇3 + ∇ + ...
12
1 2 11
D 2 fi ≡ 2
∇ + ∇3 + ∇ 4 + ... f i … (3)
h 12
Proceeding as in the case of approximations for the first derivative in terms of
backward differences, if m terms are retained in the backward difference expansion of
D2fi in (3), we get the approximation for D2fi with an error O(hm).
1 1/2 1
Consider µδ ≡
2
(
E + E −1/ 2 )( E 1/ 2
− E −1/2 = ) 2
(E − E −1 ) ... (4)
d
We have Ef(x) = f(x+h) = ehD f(x) where D ≡
dx
∴ E ≡ e hD … (5)
Substituting (5) in (4), we get
e hD − e − hD
µδ ≡ = sinh ( hD ) ... (6)
2
h3 D 3 h5 D 5
µδ ≡ hD + + + ... ... (7)
3! 5!
2
δ 2 ≡ ( E1/ 2 − E −1/2 ) ≡ E + E −1 − 2 ≡ ehD + e− hD − 2
h 4 D 4 h6 D 6
2
δ ≡h D + 2 2
+ + ... ... (8)
12 360
Using (7) and (8), we get
h3 D 3 h5 D 5 h 4 D 4 h6 D 6
µδ 3 = ( µδ )(δ 2 ) = hD + + + ... h 2 D 2 + + + ...
6 120 12 360
1 1
= h3 D 3 + + h5 D 5 + ...
12 6
1
µδ 3 = h3 D3 + h5 D 5 + ...
4
2
2 2 h 4 D 4 h6 D 6 h6 D 6
δ = (δ
4
) = h2 D 2 + + + ... = h 4 D 4 + + ...
12 360 6
µδ 5 = h5 D5 + ...
δ 6 = h6 D 6 + ...
x3 3 5
By Maclaurin series expansion, we have sinh −1 x = x − + x + ...
6 40
∴ From (6), we have
1 3
hD = sinh −1 ( µδ ) = µδ − µ 3δ 3 + µ 5δ 5 − ...
6 40
1 3 2
= µδ − µµ 2δ 3 + µ µ 2 δ 5 − ...
6 40
( )
2
1 δ2 3 3 δ2 5
= µδ − µ 1 + δ + µ 1 + δ − ... (by using (3) )
6 4 40 4
1 δ2 3 3 δ4 δ2 5
= µδ − µ 1 + δ + µ 1 + + δ − ...
6 4 40 16 2
1 1 3
= µδ − µδ 3 + − + µδ 5 + ...
6 24 40
1 1
hD = µδ − µδ 3 + µδ 5 + ... ... (9)
6 30
1 1
or hD = µ δ − δ 3 + δ 5 + ...
6 30
δ 2 1 4 17 6
2 2
1 1
∴ h 2 D 2 = µ 2 δ − δ 3 + δ 5 + ... = 1 + δ − δ + δ + ...
6 30 4 3 180
1 1
h 2 D 2 = δ 2 − δ 4 + δ 6 + ... ... (10)
12 90
Approximations for the first derivative in terms of central differences :
We have seen that
1 1
hD = µδ − µδ 3 + µδ 5 + ...
6 30
1 1 1
D = µδ − µδ 3 + µδ 5 + ...
h 6 30
1 1 1
Dfi = µδ − µδ 3 + µδ 5 + ... fi ... (11)
h 6 30
If we retain only the first term on the r.h.s. of the above equation, we have
1
Df i ≈ µδ fi
h
1 1 3 1 3 3 2
with error = − µδ f i + ... = − h D f i + ... = O( h )
h 6 6h
If we retain only the first two terms on the r.h.s. of the equation (11), we have
1 1
Df i ≈ µδ f i − µδ 3 f i
h 6
1 1 5 1 1 5 5 4
with error = µδ f i + ... = h D fi + ... =O(h )
h 30 h 30
Proceeding in this manner, finally we get that in general if we retain m terms in the
central difference expansion of first order derivative, we get an approximation with an
error O(h2m).
Approximations for the second derivative in terms of central differences :
We have seen that
1 4 1 6
h2 D 2 = δ 2 − δ + δ + ...
12 90
1 2 1 4 1 6
D2 = 2
δ − δ + δ + ...
h 12 90
1 1 1
D 2 fi = 2 δ 2 − δ 4 + δ 6 + ... f i … (12 )
h 12 90
If we retain only the first term on the r.h.s. of the above equation, we have
1 2
D 2 fi ≈ δ fi
h2
with error
1 1 4 1 1 4 4 1 2 4 2
= − δ f i + ... = 2 − (h D f i + ...) + ... = − h D fi + ... = O(h )
h 2 12 h 12 12
If we retain only the first two terms on the r.h.s. of the equation (12), we have
1 2
δ fi − δ 4 f i
1
D 2 fi ≈ 2
h 12
1 1 6
δ fi + ... = 2 (h6 D 6 fi + ... )+... = O( h 4 )
1 1
with error = 2
h 90 h 90
Proceeding in this manner, finally we get that in general if we retain m terms in the
central difference expansion of second order derivative, we get an approximation with
an error O(h2m).
dy 1 1 1 1 1 1
= ∇yi + ∇ 2 yi + ∇3 yi + ∇ 4 yi + ∇5 yi + ∇6 yi + ...
dx x = xi h 2 3 4 5 6
d2y 1 2 3 11 4 5 5 137 6
2 = 2 ∆ yi − ∆ yi + 12 ∆ yi − 6 ∆ yi + 180 ∆ yi + ...
dx x = xi h
d2y 1 2 3 11 4 5 5 137 6
2 = 2 ∇ yi + ∇ yi + ∇ yi + ∇ yi + ∇ yi + ...
dx x = xi h 12 6 180
In the given data, x1 = 1.1 and x6 = 1.6
dy 1 1 1 1 1
≈ ∆y1 − ∆ 2 y1 + ∆3 y1 − ∆ 4 y1 + ∆5 y1 = ... = 3.9518
dx x = x1 h 2 3 4 5
dy 1 1 1 1 1 1
≈ ∇y6 + ∇ 2 y6 + ∇3 y6 + ∇ 4 y6 + ∇5 y6 + ∇6 y6 = ... = 2.751
dx x = x6 h 2 3 4 5 6
d2y 1 2 3 11 4 5 5
2 ≈ 2 ∆ y1 − ∆ y1 + ∆ y1 − ∆ y1 = ... = -3.7416
dx x = x1 h 12 6
d2y 1 2 3 11 4 5 5 137 6
2 ≈ 2 ∇ y 6 + ∇ y6 + ∇ y 6 + ∇ y6 + ∇ y6 = ... = -0.7144
dx x = x6 h 12 6 180
Ex : If x represents the speed of the vehicle, then find the velocity and acceleration of
the vehicle at time t = 0.1, 0.3, 0.5 for the following data.
t (in sec.) 0 0.1 0.2 0.3 0.4 0.5 0.6
x (in meters) 30.13 31.62 32.87 33.64 33.95 33.81 33.24
Solution :
t x 1st order differences 2nd order differences
0 (t0) 30.13
∆x0 = ∇x1 = δ x1/ 2 = 1.49
0.1 (t1) 31.62 ∆ 2 x0 = ∇ 2 x2 = δ 2 x1 = −0.24
∆x1 = ∇x2 = δ x3/ 2 = 1.25
0.2 (t2) 32.87 ∆ 2 x1 = ∇ 2 x3 = δ 2 x2 = −0.48
∆x2 = ∇x3 = δ x5/ 2 = 0.77
0.3 (t3) 33.64
∆ 2 x2 = ∇ 2 x4 = δ 2 x3 = −0.46
∆x3 = ∇x4 = δ x7/ 2 = 0.31
0.4 (t4) 33.95 ∆ 2 x3 = ∇ 2 x5 = δ 2 x4 = −0.45
∆x4 = ∇x5 = δ x9/2 = −0.14
0.5 (t5) 33.81
∆ 2 x4 = ∇ 2 x6 = δ 2 x5 = −0.43
∆x5 = ∇x6 = δ x11/ 2 = −0.57
0.6 (t6) 33.24
3rd order differences 4th order differences
∆ 3 x0 = ∇3 x3 = δ 3 x3/2 = −0.24
∆ 4 x0 = ∇ 4 x4 = δ 4 x2 = 0.26
∆3 x1 = ∇3 x4 = δ 3 x5/ 2 = 0.02
∆ 4 x1 = ∇ 4 x5 = δ 4 x3 = −0.01
∆ 3 x2 = ∇3 x5 = δ 3 x7/ 2 = 0.01
∆ 4 x2 = ∇ 4 x6 = δ 4 x4 = 0.01
∆ 3 x3 = ∇3 x6 = δ 3 x9/2 = 0.02
dx 1 1 2 1 3 1 4 1 5 1 6
= ∇xi + ∇ xi + ∇ xi + ∇ xi + ∇ xi + ∇ xi + ...
dt t =ti h 2 3 4 5 6
dx 1 1 3 1 5
= µδ xi − µδ xi + µδ xi + ...
dt t =ti h 6 30
1 δ xi +1/ 2 + δ xi −1/ 2 1 δ 3 xi +1/2 + δ 3 xi −1/ 2 1 δ 5 xi +1/ 2 + δ 5 xi −1/2
= − + + ...
h 2 6 2 30 2
d2x 1 2 3 11 4 5 5 137 6
2 = 2 ∆ xi − ∆ xi + ∆ xi − ∆ xi + ∆ xi + ...
dt t =ti h 12 6 180
d2x 1 2 3 11 4 5 5 137 6
2 = 2 ∇ xi + ∇ xi + 12 ∇ xi + 6 ∇ xi + 180 ∇ xi + ...
dt t =t h
i
d2x 1 2 1 4 1 6
2 = 2 δ xi − 12 δ xi + 90 δ xi + ...
dt t =t h
i
dx 1 1 2 1 3 1 4 1 5
≈ ∇x5 + ∇ x5 + ∇ x5 + ∇ x5 + ∇ x5 = ... =
dt t =t5 h 2 3 4 5
d2x 1 2 3 11 4 5 5
2 ≈ 2 ∆ x1 − ∆ x1 + 12 ∆ x1 − 6 ∆ x1 = ... =
dt t =t h
1
d2x 1 2 1 4 1 6
2 ≈ 2 δ x3 − δ x3 + δ x3 = ... =
dt t =t3 h 12 90
d2x 1 2 3 11 4 5 5
2 ≈ 2 ∇ x5 + ∇ x5 + ∇ x5 + ∇ x5 = ... =
dt t =t5 h 12 6
f [ x2 , x3 , x4 ] − f [ x1 , x2 , x3 ]
f [ x1 , x2 , x3 , x4 ] = =1
x4 − x1
Given arguments are 5 and 4th order divided differences are zero.
∴ The interpolating polynomial is an exact polynomial.
The interpolating polynomial is given by
f ( x) = f 0 + ( x − x0 ) f [ x0 , x1 ] + ( x − x0 ) ( x − x1 ) f [ x0 , x1 , x2 ]
+ ( x − x0 )( x − x1 )( x − x2 ) f [ x0 , x1 , x2 , x3 ]
( )
=f 0 + ( x − x0 ) f [ x0 , x1 ] + x 2 − ( x0 + x1 ) x + x0 x1 f [ x0 , x1 , x2 ]
( )
+ x 3 − ( x0 + x1 + x2 ) x 2 + ( x0 x1 + x0 x2 + x1 x2 ) x − x0 x1 x2 f [ x0 , x1 , x2 , x3 ]
f ′( x)=f [ x0 , x1 ] + ( 2 x − ( x0 + x1 ) ) f [ x0 , x1 , x2 ]
( )
+ 3 x 2 − 2 ( x0 + x1 + x2 ) x + ( x0 x1 + x0 x2 + x1 x2 ) f [ x0 , x1 , x2 , x3 ]
δ 2 f0 δ 3 f1/ 2
f ( x) ≈ p ( x)=f 0 + sδ f1/2 + s ( s − 1)
2!
(
+ s s −12
) 3!
4
δ f0
( )
+s s 2 − 1 ( s − 2 )
4!
+ ...