Euler’s method 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
ti=a+ih,i=0,1,…,N
with t0=a, tN=b, and ti+1−ti=h.
Approximations are produced only at the mesh points. Values between them come from interpolation.
Difference Equation
First-order Taylor expansion of y about ti, assuming y is twice differentiable
y(ti+1)=y(ti)+hf(ti,y(ti))+2h2y′′(ξi),ξi∈(ti,ti+1)
Dropping the second-order term and writing wi≈y(ti)
w0wi+1=α=wi+hf(ti,wi),i=0,1,…,N−1
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
∣y(ti)−wi∣≤2LhM(eL(ti−a)−1)
- M: bound on ∣y′′∣ over [a,b]
- L: Lipschitz constant of f
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
u0ui+1=α+δ0=ui+hf(ti,ui)+δi+1,∣δi∣<δ
Then for each i=0,1,…,N
∣y(ti)−ui∣≤L1(2hM+hδ)(eL(ti−a)−1)+∣δ0∣eL(ti−a)
As h→0 the factor 2hM+hδ→∞. Error grows with decreasing h once h is small enough. The minimizing step size is
h=M2δ
Worked Example
IVP y′(t)=y−t2+1, 0≤t≤2, y(0)=0.5, with N=4, so 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.4375
Hence y(2)≈w4=4.4375. The exact solution is y(t)=(t+1)2−0.5et, giving y(2)≈5.3055.