Namespaces
Variants
Actions

Difference between revisions of "Euler method"

From Encyclopedia of Mathematics
Jump to: navigation, search
(Importing text file)
 
m (tex encoded by computer)
 
Line 1: Line 1:
 +
<!--
 +
e0365301.png
 +
$#A+1 = 34 n = 0
 +
$#C+1 = 34 : ~/encyclopedia/old_files/data/E036/E.0306530 Euler method
 +
Automatically converted into TeX, above some diagnostics.
 +
Please remove this comment and the {{TEX|auto}} line below,
 +
if TeX found to be correct.
 +
-->
 +
 +
{{TEX|auto}}
 +
{{TEX|done}}
 +
 
A very simple finite-difference method for the numerical solution of an ordinary differential equation. Let a differential equation
 
A very simple finite-difference method for the numerical solution of an ordinary differential equation. Let a differential equation
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365301.png" /></td> <td valign="top" style="width:5%;text-align:right;">(1)</td></tr></table>
+
$$ \tag{1 }
 +
y  ^  \prime  = f ( x , y )
 +
$$
  
 
with initial condition
 
with initial condition
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365302.png" /></td> </tr></table>
+
$$
 +
y ( x _ {0} )  = y _ {0}  $$
  
be given. A sufficiently small step <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365303.png" /> on the <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365304.png" />-axis is chosen and points <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365305.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365306.png" /> are constructed. One then replaces the desired integral curve <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365307.png" /> by a polygonal line (Euler's polygonal line) whose segments are rectilinear on the intervals <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365308.png" />; and the ordinates of the end points of these segments are determined from the formulas
+
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
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e0365309.png" /></td> <td valign="top" style="width:5%;text-align:right;">(2)</td></tr></table>
+
$$ \tag{2 }
 +
y _ {i+} 1  = y _ {i} + h f ( x _ {i} , y _ {i} ) ,\ \
 +
i = 0 , 1 ,\dots .
 +
$$
  
If the right-hand side <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653010.png" /> of (1) is continuous, then the sequence of Euler polygonal lines converges uniformly, as <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653011.png" />, to the unknown curve <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653012.png" /> on a sufficiently small interval <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653013.png" />.
+
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 <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653014.png" /> by the first two terms of its Taylor series:
+
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:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653015.png" /></td> </tr></table>
+
$$
 +
y ( x _ {i} + h )  = y ( x _ {i} ) + h y  ^  \prime  ( x _ {i} ) ,\ \
 +
i = 0 , 1 ,\dots .
 +
$$
  
The error of this method is of order <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653016.png" /> for every step.
+
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
 
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
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653017.png" /></td> <td valign="top" style="width:5%;text-align:right;">(3)</td></tr></table>
+
$$ \tag{3 }
 +
y _ {i+} 1  = y _ {i} + h f ( x _ {i+} 1/2 , y _ {i+} 1/2 ) ,\ \
 +
i = 0 , 1 \dots
 +
$$
  
 
where
 
where
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653018.png" /></td> <td valign="top" style="width:5%;text-align:right;">(4)</td></tr></table>
+
$$ \tag{4 }
 +
x _ {i+} 1/2  = x _ {i} +
 +
\frac{h}{2}
 +
,\ \
 +
y _ {i+} 1/= 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.
 
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.
Line 31: Line 73:
 
Another modification leads to the improved Euler–Cauchy method:
 
Another modification leads to the improved Euler–Cauchy method:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653019.png" /></td> <td valign="top" style="width:5%;text-align:right;">(5)</td></tr></table>
+
$$ \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
 
where
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653020.png" /></td> </tr></table>
+
$$
 +
\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 <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653021.png" />:
+
The last method can be refined even further by using an iterative scheme to improve the value $  \overline{y}\; _ {i+} 1 $:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653022.png" /></td> <td valign="top" style="width:5%;text-align:right;">(6)</td></tr></table>
+
$$ \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-<img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653023.png" /> approximation is
+
where the zero- $  th $
 +
approximation is
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653024.png" /></td> </tr></table>
+
$$
 +
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 <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653025.png" /> and <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653026.png" /> coincide in a prescribed number of decimal places. If after three or four iterations this does not happen, the step <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653027.png" /> should be made smaller. The error of the Euler method with iterative computation of the ordinates is of order <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653028.png" /> for every step.
+
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 <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653029.png" /> ordinary differential equations
+
Euler's method and its modifications carry over to the more general case of solving a system of $  n $
 +
ordinary differential equations
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653030.png" /></td> </tr></table>
+
$$
 +
y _ {k}  ^  \prime  = f _ {k} ( x , y _ {1} \dots y _ {n} ) ,\ \
 +
k = 1 \dots n ,
 +
$$
  
 
with given initial conditions
 
with given initial conditions
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653031.png" /></td> </tr></table>
+
$$
 +
y _ {k} ( x _ {0} )  = y _ {k _ {0}  } .
 +
$$
  
 
The numerical algorithm of the Euler method can easily be programmed on a computer.
 
The numerical algorithm of the Euler method can easily be programmed on a computer.
Line 61: Line 130:
 
====References====
 
====References====
 
<table><TR><TD valign="top">[1]</TD> <TD valign="top">  B.P. Demidovich,  I.A. Maron,  "Foundations of computational mathematics" , Moscow  (1960)  (In Russian)</TD></TR></table>
 
<table><TR><TD valign="top">[1]</TD> <TD valign="top">  B.P. Demidovich,  I.A. Maron,  "Foundations of computational mathematics" , Moscow  (1960)  (In Russian)</TD></TR></table>
 
 
  
 
====Comments====
 
====Comments====
 
In the West, only the method defined by (2) is called the Euler method, more precisely, Euler's forward method. The implicit analogue
 
In the West, only the method defined by (2) is called the Euler method, more precisely, Euler's forward method. The implicit analogue
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653032.png" /></td> </tr></table>
+
$$
 +
y _ {i+} 1  = y _ {i} + h f ( x _ {i+} 1 , y _ {i+} 1 )
 +
$$
  
is called Euler's backward method. The method defined by (3) is usually called the midpoint method, while (3) and (4) together are known as the Runge method [[#References|[a4]]], or modified Euler method, which is considered as the oldest method of Runge–Kutta type (Runge–Kutta methods are characterized by the property that each step involves a multiplicity of evaluations of the right-hand side function <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653033.png" />, cf. [[Runge–Kutta method|Runge–Kutta method]]). Method (5) is sometimes called Heun's second-order method if <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/e/e036/e036530/e03653034.png" /> is predicted by Euler's forward method, and it is called the trapezoidal rule otherwise.
+
is called Euler's backward method. The method defined by (3) is usually called the midpoint method, while (3) and (4) together are known as the Runge method [[#References|[a4]]], or modified Euler method, which is considered as the oldest method of Runge–Kutta type (Runge–Kutta methods are characterized by the property that each step involves a multiplicity of evaluations of the right-hand side function $  f $,  
 +
cf. [[Runge–Kutta method|Runge–Kutta method]]). Method (5) is sometimes called Heun's second-order method if $  y _ {i+} 1 $
 +
is predicted by Euler's forward method, and it is called the trapezoidal rule otherwise.
  
 
Method (6) may be considered as the iterative solution of the trapeziodal rule.
 
Method (6) may be considered as the iterative solution of the trapeziodal rule.

Latest revision as of 19:38, 5 June 2020


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).

References

[1] B.P. Demidovich, I.A. Maron, "Foundations of computational mathematics" , Moscow (1960) (In Russian)

Comments

In the West, only the method defined by (2) is called the Euler method, more precisely, Euler's forward method. The implicit analogue

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

is called Euler's backward method. The method defined by (3) is usually called the midpoint method, while (3) and (4) together are known as the Runge method [a4], or modified Euler method, which is considered as the oldest method of Runge–Kutta type (Runge–Kutta methods are characterized by the property that each step involves a multiplicity of evaluations of the right-hand side function $ f $, cf. Runge–Kutta method). Method (5) is sometimes called Heun's second-order method if $ y _ {i+} 1 $ is predicted by Euler's forward method, and it is called the trapezoidal rule otherwise.

Method (6) may be considered as the iterative solution of the trapeziodal rule.

Although the Euler method (2) is not recommended in actual computation, it serves as a model for theoretical considerations and facilitates comparison with more complicated methods (cf. [a1], [a2]).

References

[a1] J.C. Butcher, "The numerical analysis of ordinary differential equations. Runge–Kutta and general linear methods" , Wiley (1987)
[a2] L. Euler, "Institutionum calculi integralis Vol. Primum (1768)" , Opera Omnia Series Prima , 11 , Teubner (1913)
[a3] P. Henrici, "Discrete variable methods in ordinary differential equations" , Wiley (1962)
[a4] C. Runge, "Ueber die numerische Auflösung von Differentialgleichungen" Math. Ann. , 46 (1895) pp. 167–178
[a5] J.M. Watt (ed.) , Modern numerical methods for ordinary differential equations , Clarendon Press (1976)
How to Cite This Entry:
Euler method. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Euler_method&oldid=16352
This article was adapted from an original article by I.B. Vapnyarskii (originator), which appeared in Encyclopedia of Mathematics - ISBN 1402006098. See original article