Professor Christopher Chukwutoo Ihueze
(B.Eng,M.Eng,Ph.D.)
Department of industrial and production engineering,
Nnamdi Azikiwe University,Awka
Faculty of Engineering,
Nnamdi Azikiwe University,Awka
This chapter involves Numerical methods are usually applied
where close form or exact solution is not possible for linear and
nonlinear functions. Numerical differentiation is therefore an
approximate and simplest method for approximating solution for
differential equation.
Lecture Note: this lecture note is available for download in pdf
format at www.ccihueze.com.
Recommended Textbooks:
Zill, D. G., Cullen, M. R. (1989) Advanced Engineering Mathematics, Jones and
Bart lett Publishers Sadbury Massachusetts Boston.
Chapara, S. C. and Canale, R. P. (1998) Numerical Methods for Engineers, 3rd ed.
WCB/McGraw-Hill Boston.
Ike, C. C. and Mughal, M. I. (1997) Differential equations, Immaculate Publications
Enugu-Nigeria.
Grading:
Attendance (10%)
Bi-Weekly homework (12%)
Midterm (28%)
Final Exam (50%)
Introduction
Numerical differentiation is an approximate and simplest method for
approximating solution for differential equation. This is an approximate
method
in this lecture, we shall deal with four methods,
Euler-Cauchys method,
4th order Runge Kutta method and
Three-term Taylor method,
the finite difference method (FDM).
Figure 1: Numerical Differentiation
A.1.1Euler-Cauchys method
This an approximate method developed from Taylor series expansion of the
function y(x+h) for the solution of the initial value problem expressed as:
It is difficult to obtain an exact solution for the nonlinear form of (1) that
an approximate solution is usually applied. A solution of (1) in the interval
It is difficult to obtain an exact solution for the nonlinear form of (1) that
an approximate solution is usually applied. A solution of (1) in the interval
xo, h, x1, x2,.xn ie y(xo), y(x1), y(x2),.y(xn) where xn = xo + nh, n =
0,1,2,.n, which satisfies the differential equation in (1) together with the
initial conditions.
The Euler-Cauchys formula for the initial value problem
for x, h, xn where h = xn xn-1 can be derived from the Taylor series
expansion y(x+h), expressed as
A.1.1Euler-Cauchys method CONTINUES
From this we develop the following iterations
So that from (5) the Euler-Cauchys formula Becomes
Example A.1:
Solve the initial value problem using the Eulers formula
Solution: But the Euler iteration formula is
so that
The calculations with equation (7) are tabulated in table 1
Table A.1: Calculations with equation (7)
n
0
1
2
3
4
5
6
xn
0
0.1
0.2
0.3
0.4
0.5
0.6
yn
f(xn, yn)=(1+yn2 ) hf(xn, yn)=0.1(1+yn2 )
0
1
0.1
0.1
1.01
0.101
0.201
1.0404
1.10404
0.30504
1.09305
0.109305
0.41434
1-17168
0.117168
0.53151
1.2825
0.12825
0.6598
yn+1
0.1
0.201
0.30504
0.41434
0.53151
0.6598
Example A.2:
Apply the Eulers-Cauchys formula to solve the differential equation
Solution:
Calculations with this equation are tabulated in table 2.
Table A.2: Computations for example
n
0
1
2
3
4
5
6
7
8
9
10
11
12
13
xn
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
yn
0
0.1
0.202
0.3101
0.4287
0.5630
0.7193
0.9056
1.1324
1.4136
1.7680
2.2216
2.8104
3.5848
f(xn,yn)
1
1.02
1.0808
1.1861
1.3438
1.560
1.8632
2.2679
2.8118
3.5444
4.5361
5.8875
7.7448
h f(xn,yn)
0.1
0.102
0.1081
0.1186
0.1343
0.1563
0.1863
0.2268
0.2812
0.3544
0.4536
0.5888
0.7745
yn+1
0.1
0.202
0.3101
0.4287
0.5630
0.7193
0.9056
1.1324
1.4136
1.7680
2.2216
2.8104
3.5848
Example A.3:
Solve the initial value problem expressed as
Solution: The differential equation is transformed as
The Eulers formula for the function then becomes
The result of calculation with this equation becomes as in table A.3.
Table A.3: Computations for example A.3
n
0
1
2
3
4
5
6
7
1.20
1.22
1.24
1.26
1.28
1.30
1.32
1.34
4.0
4.1556
4.3195
4.4925
4.6754
4.8692
5.0748
8
9
10
11
1.36
1.38
1.40
1.42
5.5266
5.7756
6.0422
6.3284
5.2935
f()
7.7778
8.1959
8.6511
9.1473
9.6895
10.2785
10.9358
11.6550
f()
0.1556
0.1639
0.1730
0.1829
0.1938
0.2056
0.2187
0.2331
4.1556
4.3195
4.4925
4.6754
4.8692
5.0748
5.2935
12.4497
13.3307
14.3107
15.4049
0.2490
0.2666
0.2862
0.3081
5.5266
5.7756
6.0422
6.3284
A.1.2 TAYLORS METHOD
Example A.4:
Example A.4: Continues
Table A.4a: Computations for example A.4 (Three term Taylor Method with h = 0.1)
n
0
1
2
3
4
5
1
1.1
1.2
1.3
1.4
1.5
1
1.2337
1.5527
1.9937
1.26117
3.4904
Table A.4b: Computations for example A.4 (Three term Taylor Method with h = 0.05)
n
0
1
2
3
4
5
6
7
8
1
1.05
1.10
1.15
1.20
1.25
1.30
1.35
1.40
1.0000
1.1075
1.2327
1.3788
1.5499
1.7509
1.9879
2.2681
2.6006
Example A.4: Continues
Higher order derivatives become increasingly more complicated.
Consequently alternative one step methods have been developed. These
schemes are comparable in performance to the higher-order Taylor-series
approaches but require only the calculation of the first derivatives.
Example A.5
Table
n
0
1
2
3
4
5
A.5a: Three term Taylor Method with h = 0.1
0.00
0.10
0.20
0.30
0.40
0.50
n
0
1
2
3
4
5
6
7
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
2.0000
2.1200
2.2992
2.5726
3.0077
3.7511
2.0000
2.0550
2.1222
2.2045
2.3058
2.4315
2.5890
2.7889
A.1.3 FOURTH ORDER RUNGE-KUTTA METHOD
Example A.6:
Use the 4th Order Runge-Kutta method with h = 0.1 to obtain an approximate
solution at y(1.5) for the boundary value problem
Solution: The 4th Order Runge-Kutta formula is expressed as
Example A.6: Continues
Example A.6: Continues
A.2
A.2.1
HIGHER ORDER EQUATIONS AND SYSTEMS
EULERS METHOD FOR HIGHER ORDER INITIAL VALUE PROBLEMS
Example A9:
Example A9: Continues
A.3
4TH ORDER RUNGE KUTTA METHOD FOR HIGHER ORDER BOUNDARY
VALUE SYSTEMS
An initial value problem for a second order system-that is a system of two first
order differential equation is expresses as
The fourth order Runge-Kutta model for the system
looks like
ERRORS OF NUMERICAL DIFFERENTIATION
ERRORS OF NUMERICAL DIFFERENTIATION: Continues
Error of Euler method
The Euler method is derived by truncating from the third term of the Taylor
series expressed as
Or
Error of Runge-Kutta methods
RK methods achieve the accuracy of a Taylor series approach without
requiring the calculation of higher derivatives. Many variations exists with the
most popular being the 4th order Runge-Kutta method. Where more accurate
results are needed, Butchers (1964) 5th order Runge-Kutta method is
recommended:
Where
GOODLUCK