Numerical Analysis Lecture 36
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
Euler method is one of the oldest numerical methods used for integrating the ordinary differential equations. Though this method is not used in practice, its understanding will help us to gain insight into nature of predictor-corrector method
Consider the differential equation of first order with the initial condition y(t0) = y0.
The integral of this equation is a curve in, ty-plane. Here, we find successively y1, y2, …, ym; where ym is the value of y at t =tm = t0 +mh, m =1, 2,… and h being small.
Here we use a property that in a small interval, a curve is nearly a straight line. Thus at (t0, y0), we approximate the curve by a tangent at that point. Therefore, That is,
Hence, the value of y corresponding to t = t1 is given by
Similarly approximating the solution curve in the next interval (t1, t2) by a line through (t1, y1) having its slope f(t1, y1), we obtain
Thus, we obtain in general, the solution of the given differential equation in the form of a recurrence relation
Geometrically, this method has a very simple meaning Geometrically, this method has a very simple meaning. The desired function curve is approximated by a polygon train, where the direction of each part is determined by the value of the function f (t, y) at its starting point.
Example Given with the initial condition y = 1 at t = 0. Using Euler method, find y approximately at x = 0.1, in five steps.
Solution Since the number of steps are five, we shall proceed in steps of (0.1)/5 = 0.02. Therefore, taking step size h = 0.02, we shall compute the value of y at t = 0.02, 0.04, 0.06, 0.08 and 0.1
Thus where Therefore, Similarly,
Hence the value of y corresponding to t = 0.1 is 1.091
MODIFIED EULER’S METHOD
The modified Euler’s method gives greater improvement in accuracy over the original Euler’s method. Here, the core idea is that we use a line through (t0, y0) whose slope is the average of the slopes at (t0 ,y0 ) and (t1, y1(1))
Where y1(1)= y0 + hf (t0, y0) is the value of y at t = t1 as obtained in Euler’s method, which approximates the curve in the interval (t0 , t1)
Figure
Geometrically, from Figure, if L1 is the tangent at (t0, y0), L2 is the line through (t1, y1(1)) of slope f(t1, y1(1)) and L- is the line through (t1, y1(1)) but with a slope equal to the average of f(t0,y0) and f(t1, y1(1)),….
the line L through (t0, y0) and parallel to is used to approximate the curve in the interval (t0, t1). Thus, the ordinate of the point B will give the value of y1.
Now, the equation of the line AL is given by
Similarly proceeding, we arrive at the recurrence relation This is the modified Euler’s method.
Example Using modified Euler’s method, obtain the solution of the differential equation with the initial condition y0 = 1 at t0 = 0 for the range in steps of 0.2
Solution At first, we use Euler’s method to get
Then, we use modified Euler’s method to find
Similarly proceeding, we have from Euler’s method
Using modified Euler’s method, we get
Finally
Modified Euler’s method gives
Hence, the solution to the given problem is given by 0.2 0.4 0.6 y 1.2295 1.5225 1.8819
Numerical Analysis Lecture 36