# Euler method

A very simple finite-difference method for the numerical solution of an ordinary differential equation. Let a differential equation

$$\tag{1 } y ^ \prime = f ( x , y )$$

with initial condition

$$y ( x _ {0} ) = y _ {0}$$

be given. A sufficiently small step $h$ on the $x$- axis is chosen and points $x _ {i} = x _ {0} + ih$, $i= 0 , 1 \dots$ are constructed. One then replaces the desired integral curve $y ( x)$ by a polygonal line (Euler's polygonal line) whose segments are rectilinear on the intervals $[ x _ {i} , x _ {i+} 1 ]$; and the ordinates of the end points of these segments are determined from the formulas

$$\tag{2 } y _ {i+} 1 = y _ {i} + h f ( x _ {i} , y _ {i} ) ,\ \ i = 0 , 1 ,\dots .$$

If the right-hand side $f ( x , y )$ of (1) is continuous, then the sequence of Euler polygonal lines converges uniformly, as $h \rightarrow 0$, to the unknown curve $y ( x)$ on a sufficiently small interval $[ x _ {0} , x _ {0} + H ]$.

The Euler method consists in representing the integral of the differential equation (1) on every interval $[ x _ {i} , x _ {i+} 1 ]$ by the first two terms of its Taylor series:

$$y ( x _ {i} + h ) = y ( x _ {i} ) + h y ^ \prime ( x _ {i} ) ,\ \ i = 0 , 1 ,\dots .$$

The error of this method is of order $h ^ {2}$ for every step.

The Euler method can be refined by means of various modifications. For example, an improved method of polygonal lines is obtained by replacing the formula (2) for the computation of the ordinates by the relation

$$\tag{3 } y _ {i+} 1 = y _ {i} + h f ( x _ {i+} 1/2 , y _ {i+} 1/2 ) ,\ \ i = 0 , 1 \dots$$

where

$$\tag{4 } x _ {i+} 1/2 = x _ {i} + \frac{h}{2} ,\ \ y _ {i+} 1/2 = y _ {i} + \frac{h}{2} f ( x _ {i} , y _ {i} ) ,$$

that is, by taking into account the direction of the field of integral curves at the midpoints (4) of the segments of the polygonal line.

Another modification leads to the improved Euler–Cauchy method:

$$\tag{5 } y _ {i+} 1 = y _ {i} + h \frac{f ( x _ {i} , y _ {i} ) + f ( x _ {i+} 1 , \overline{y}\; _ {i+} 1 ) }{2} ,\ \ i = 0 , 1 \dots$$

where

$$\overline{y}\; _ {i+} 1 = y _ {i} + h f ( x _ {i} , y _ {i} ) .$$

The last method can be refined even further by using an iterative scheme to improve the value $\overline{y}\; _ {i+} 1$:

$$\tag{6 } y _ {i+} 1 ^ {(} k) = y _ {i} + \frac{h}{2} [ f ( x _ {i} , y _ {i} ) + f ( x _ {i+} 1 , y _ {i+} 1 ^ {(} k- 1) ) ] ,\ \ k = 1 , 2 \dots$$

where the zero- $th$ approximation is

$$y _ {i+} 1 ^ {(} 0) = y _ {i} + h f ( x _ {i} , y _ {i} ) .$$

The iterative computation by means of (6) is continued until two consecutive approximations $y _ {i+} 1 ^ {(} k)$ and $y _ {i+} 1 ^ {(} k+ 1)$ coincide in a prescribed number of decimal places. If after three or four iterations this does not happen, the step $h$ should be made smaller. The error of the Euler method with iterative computation of the ordinates is of order $h ^ {3}$ for every step.

Euler's method and its modifications carry over to the more general case of solving a system of $n$ ordinary differential equations

$$y _ {k} ^ \prime = f _ {k} ( x , y _ {1} \dots y _ {n} ) ,\ \ k = 1 \dots n ,$$

with given initial conditions

$$y _ {k} ( x _ {0} ) = y _ {k _ {0} } .$$

The numerical algorithm of the Euler method can easily be programmed on a computer.

This method was proposed by L. Euler (1768).

How to Cite This Entry:
Euler method. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Euler_method&oldid=46859
This article was adapted from an original article by I.B. Vapnyarskii (originator), which appeared in Encyclopedia of Mathematics - ISBN 1402006098. See original article