Numerical Analysis Lecture 38
Chapter 7 Ordinary Differential Equations
Introduction Taylor Series Euler Method Runge-Kutta Method Predictor Corrector Method
TAYLOR’S SERIES METHOD
We considered an initial value problem described by
We expanded y (t ) by Taylor’s series about the point t = t0 and obtain
Noting that f is an implicit function of y, we have
Similarly
EULER METHOD
Consider the differential equation of first order with the initial condition y(t0) = y0.
The value of y corresponding to t = t1
Similarly
Then, we obtained the solution in the form of a recurrence relation
MODIFIED EULER’S METHOD
The recurrence relation is the modified Euler’s method.
RUNGE – KUTTA METHODS
We considered the IVP We also defined and took the weighted average of k1 and k2 and added to yn to get yn+1
We obtained Implying
We considered two cases, Case I We choose W2 = 1/3, then W1 = 2/3 and
Case II: We considered W2 = ½, then W1 = ½ and Then
Finally, we obtain The expression can further be simplified to
Therefore, the expression for local truncation error is given by
The fourth-order R-K method was described as
where
Example Use the following second order Runge-Kutta method described by
where and and find the numerical solution of the initial value problem described as at x = 0.4 and taking h = 0.2.
Solution Here We calculate
Now, using the given R-K method, we get Now, taking x1 = 0.2, y1 = 1.24, we calculate
Again using the given R-K method, we obtain
Example Solve the following differential equation with the initial condition y(0) = 1, using fourth- order Runge-Kutta method from t = 0 to t = 0.4 taking h = 0.1
Solution The fourth-order Runge-Kutta method is described as (1) where
In this problem, As a first step, we calculate
Now, we compute from Therefore y(0.1) = y1=1.1103 In the second step, we have to find y2 = y(0.2)
We compute
From Equation (1), we see that Similarly we calculate,
Using equation (1), we compute Finally, we calculate
Using them in equation (1), we get which is the required result.
RUNGE – KUTTA METHOD FOR SOLVING A SYSTEM OF EQUATIONS
The fourth-order Runge-Kutta method can be extended to numerically solve the higher-order ordinary differential equations- linear or non-linear
For illustration, let us consider a second order ordinary differential equation of the form
Using the substitution this equation can be reduced to two first-order simultaneous differential equations, as given by
Now, we can directly write down the Runge-Kutta fourth-order formulae for solving the system. Let the initial conditions of the above system be given by
Then, we define
Now, using the initial conditions yn, pn and 4th -order R-K formula, we compute
This method can be extended on similar lines to solve system of n first order differential equations.
Example Solve the following equation Using 4th order Runge-Kutta method for x = 0.2, with the initial values y(0) = 1, y’(0)=0
Solution Let Then Thus, the given equation reduced to two first-order equations.
In the present problem, we are given x0 = 0, y0 = 1, p0 =yo’ =0 Taking h = 0.2, we compute
Now, y (0.2) = y1 is given by
Therefore, the required solution is
Numerical Analysis Lecture 38