(Numerical differentiation and solution of ODE )
Dr. L. Govindarao
Department of Mathematics
Amrita Vishwa Vidyapeetham, Coimbatore, India
,Outline
1 Numerical differentiation
2 Numerical solution of ODE
3 Initial value problems
1 Single step methods
Euler method
Trapezoidal method
Implicit Euler method
Midpoint method
Runge-Kutta methods
2 Multi step methods
Adams-Bashforth methods (Predictor)
Adams-Moulton methods (Corrector)
Predictor-Corrector methods
4 Boundary value problems
1 Finite difference method
2 Shooting method
,Numerical Differentiation
Let f (x) be a continuous function defined on [a, b]. The
Numerical differentiation is a numerical process to find the
numerical values of the derivative of the given function f (x)
at a given point xi = ih, i = 0, 1, · · · , n, where h is the step
length and x0 = a, xn = b.
Finite difference approximation:
f (xi+1 ) − f (xi )
Forward Difference: f 0 (xi ) = + O(h).
h
f (xi ) − f (xi−1 )
Backward Difference: f 0 (xi ) = + O(h).
h
f (xi+1 ) − f (xi−1 )
Centered Difference: f 0 (xi ) = + O(h2 ).
2h
, Examples
Example
Find the derivative of the following function at t = 0.5 by using
forward difference, backward difference and centered difference
scheme, taking the step length h = 0.5 and compare the results
with the exact derivatives.
f (t) = −0.1t 4 − 0.15t 3 − 0.5t 2 − 0.25t + 1.2.
Solution:
Exact value: f 0 (0.5) = −0.9125
f (1) − f (0.5)
Forward Difference: f 0 (0.5) ≈ = −1.45, EA = 0.5375
0.5
f (0.5) − f (0)
Backward Difference: f 0 (0.5) ≈ = −0.55, EA = 0.3625
0.5
f (1) − f (0)
Centered Difference: f 0 (0.5) ≈ = −1.0, EA = 0.0875
1