8.4 Section 2 Background .1 Cosmology .11 Math Section 8.6

Book 9 Computational Mathematics Chapter 8 Ordinary Differential Equation Initial Value Problems

Section 5 Euler's Method

The preceding sections have dealt with approximate analytic methods of solution of Cauchy's Problem. Euler's Method is one of the numerical methods which present solutions in the form of tables of approximate values.

Consider the differential equation


for the initial condition


Having chosen a sufficiently small interval h, construct a system of equally spaced points xi = x0 + ih, i =0, 1, 2, . ..Euler's method computes approximate values of y(xi) ? yi, one after another, by means of the formula


The required integral curve y = y(x) which passes through the point M0 is replaced by the polygonal line M0M1M2 ??? with the vertices Mi(xi,yi), i = 0, 1, 2, . . .. Each segment MiMi+1 of this line has the direction of the integral curve of Equation (5.1) which passes through the point Mi.

If the right-hand side of Equation (5.1) satisfies in some rectangle R{|x - x0| ? a, |y - y0| ? b,} the conditions


then one has the error estimate:


where y(xn) is the value of the exact solution of the equation at x = x0 and yn is the approximate value obtained at the n-th step.

Formula (5.5) has only theoretical significance. For practical purposes, it turns out at times to be more convenient to use two steps, i.e., to repeat the calculation with spacings h/2, when the error estimate at h has the more accurate value


where y*n is the value obtained with two steps of length h/2.

Euler's Method is readily applied to systems of differential equations as well as to differential equations of higher order, which, however, must first be reduced to systems of first order differential equations (cf. Example 2).

Consider the system of the two first order equations


for the initial conditions y(x0) = y0 and z(x0) = z0. The approximate values y(xi) ~ yi and z(xi) ~ zi are computed successively using the formulae



Example 1: Use Euler's method with h = 0.2 to construct for the interval [0, 1] a table of values of the solution of the equation

for the initial condition y(0) =1.

Solution: The results of the computations are given in the following table:

The initial values x0 = 0, y0 = 1.0000 for i = 0 in the first row yield f(x0,y0) = 1, and then hf(x0,y0) = 0.2. Next, (4.4) yields for i = 0

Using these values, the second row yields f(x1,y1) =0.8667 and hf(x1,y1) = 0.1733. Thus

The computations for i = 2,3,4,5 are carried out in the same manner. In order to allow a comparison, the last column of the table presents the values of the exact solution y = (2x + 1)? and hence shows that the absolute error is 0.0917, i.e. the relative error is 5% per cent.

Example 2: Compute with h = 0.1 for the interval [1,1.5] by Euler's method a table of approximate values of the solution of the equation


for the initial conditions y1(1) = 0.77, y1'(1) = -0.44.

Solution: With the aid of the substitutions y' = z, y" = z' transform the second order equation into the system of first order equations

with the initial conditions y(1) = 0.77, z(1) = -0.44, so that fl(x,y,z) = z, f2(x,y,z) = -y - z/y. The results of the computations using (5.9) are given in the next table in which one additional digit has been retained:

Here, in the first row i = 0, x0 = 1.0, y0 = 0.77, z0 = -0.44, whence

Equations (5.9) now yield

Hence follow the entries in the second row i =1, x1 = 1.1, y1 = 0.726, z1 = -0.473 with


The entries for i=2, 3, 4, 5 are obtained in the same manner.


Use Euler's Method to obtain approximate solutions of the following differential equations and systems of differential equations for the given initial conditions on the interval [a,b] with the step length h =0.1 for the given parameters.