Approximates the solution of a well-posed IVP at equally spaced mesh points, using the first-order Taylor expansion.
Mesh Points
Choose a positive integer N. The step size is h=Nb−a. The mesh points are
with t0=a, tN=b, and ti+1−ti=h.
Difference Equation
First-order Taylor expansion of y about ti, assuming y is twice differentiable
Dropping the second-order term and writing wi≈y(ti)
Theoretical Error Bound
If f satisfies a Lipschitz condition with constant L>0 and ∣y′′(t)∣≤M for some M>0, then for each i=0,1,…,N
The bound is proportional to h. Euler’s method has order 1.
Computational Error Bound
With round-off, each step carries an error bounded by δ. The computed values ui satisfy
Then for each i=0,1,…,N
As h→0 the factor 2hM+hδ→∞. Error grows with decreasing h once h is small enough. The minimizing step size is
Worked Examples
Example 1
Apply Euler’s method to y′(t)=y−t2+1, 0≤t≤2, y(0)=0.5, with N=4.
Solution Reveal Hide
h=0.5 and f(t,y)=y−t2+1.
w0w1w2w3w4=0.5=w0+0.5(w0−0.02+1)=1.25=w1+0.5(w1−0.52+1)=2.25=w2+0.5(w2−1.02+1)=3.375=w3+0.5(w3−1.52+1)=4.4375Hence y(2)≈w4=4.4375. The exact solution is y(t)=(t+1)2−0.5et, giving y(2)≈5.3055.
Example 2
Apply Euler’s method to y′(t)=y, 0≤t≤0.3, y(0)=1, with h=0.1. Compare with the exact solution y=et.
Solution Reveal Hide
w0w1w2w3=1=1+0.1(1)=1.1=1.1+0.1(1.1)=1.21=1.21+0.1(1.21)=1.331
The error grows with i.