Euler Method
The Euler method is a first-order numerical integration procedure that approximates solutions to initial value problems for ordinary differential equations by advancing the state along the local tangent slope at each discrete timestep.
The Euler method (specifically the forward Euler method or explicit Euler method) is the foundational first-order numerical procedure in computation and algorithms for approximating trajectories of initial value problems (IVPs) governed by ordinary differential equations (ODEs). Published by Swiss mathematician and physicist Leonhard Euler in Institutionum calculi integralis (1768–1770), the method replaces the continuous derivative dy/dt with a first-order forward finite difference over a discrete timestep h = Δt, stepping along the local tangent line of the vector field at (tn, yn). As the single-stage (s = 1, p = 1) prototype of explicit Runge–Kutta Methods and linear multistep schemes, the Euler method and its implicit and symplectic counterparts provide the mathematical framework for analyzing local and global truncation error, Dahlquist stiffness stability, and geometric phase-space conservation across chaos theory, chemical kinetics, and orbital mechanics.
Mathematical Formulation and Geometric Interpretation
Initial Value Problems and Tangent-Line Extrapolation
Consider a first-order system of ordinary differential equations defined over [t0, T]:
dy(t) / dt = f(t, y(t)), with initial condition y(t0) = y0
where y(t) ∈ Rd is the state vector and f: [t0, T] × Rd → Rd is a Lipschitz-continuous vector field satisfying ‖f(t, u) − f(t, v)‖ ≤ L‖u − v‖. Partitioning [t0, T] into N uniform subintervals of step size h = (T − t0)/N defines the discrete grid tn = t0 + nh. Approximating the integral of f(τ, y(τ)) over [tn, tn+1] by the left-endpoint rectangle rule yields the forward Euler recurrence:
yn+1 = yn + h f(tn, yn)
Geometrically, at each point (tn, yn), the algorithm evaluates the instantaneous slope f(tn, yn) and projects a tangent segment of width h, forming an Euler polygon that converges uniformly to y(t) as h → 0.
Truncation Error Analysis: Local O(h2) vs. Global O(h)
Taylor Expansion and Local Truncation Error (LTE)
Suppose the analytic solution y(t) ∈ C2([t0, T]) has bounded second derivative ‖y''(t)‖ ≤ M. Expanding y(tn + h) around tn by Taylor's theorem gives:
y(tn + h) = y(tn) + h f(tn, y(tn)) + (h2 / 2) y''(ξn), for ξn ∈ (tn, tn+1)
Subtracting one forward Euler step starting from y(tn) shows that the one-step local truncation error (LTE) τn+1 scales with the square of the step size:
‖τn+1‖ = (h2 / 2) ‖y''(ξn)‖ ≤ (M / 2) h2 = O(h2)
Because τn+1 is proportional to the trajectory curvature y''(t), the Euler method integrates linear functions of time (y'' = 0) with zero truncation error but undershoots convex trajectories (y'' > 0) and overshoots concave trajectories (y'' < 0).
Error Propagation and Global Truncation Error (GTE)
Let en = ‖y(tn) − yn‖ denote the accumulated global error at step n. Applying the triangle inequality and Lipschitz bound ‖f(tn, y(tn)) − f(tn, yn)‖ ≤ L en gives:
en+1 ≤ (1 + hL) en + (M / 2) h2
Unrolling this recurrence from e0 = 0 across N = (T − t0)/h steps and using 1 + hL ≤ ehL = exp(hL) yields the discrete Grönwall global error bound:
en ≤ [ (M h) / (2 L) ] ( eL(tn − t0) − 1 ) = O(h)
Thus, the Euler method has first-order global accuracy (p = 1): halving h → h/2 cuts the global error at time T by a factor of 2.
Dahlquist Stability Analysis and Stiff Systems
The Stability Disk |1 + hλ| ≤ 1 of Forward Euler
Applying forward Euler to Germund Dahlquist's linear scalar test equation dy/dt = λy (Re(λ) < 0), whose analytic solution y(t) = y0 eλt = y0 exp(λt) decays to zero, produces the geometric progression:
yn+1 = (1 + hλ) yn = (1 + z)n+1 y0, where z = hλ ∈ C
For the numerical sequence to remain bounded (|yn+1| ≤ |yn|), the amplification factor R(z) = 1 + z must lie inside the unit disk |1 + hλ| ≤ 1 centered at z = −1 (−2 ≤ hλ ≤ 0 for real λ < 0, or h ≤ 2/|λ|). When h > 2/|λ|, the numerical solution oscillates in sign with growing amplitude |1 + hλ|n → ∞. On stiff systems with fast decaying modes (|λfast| ≫ 105), this stability barrier forces forward Euler to take tiny steps long after the fast transient has died out.
| Euler Variant | Update Equation | Order (p) | Stability Function R(z) | Stability & Geometric Properties |
|---|---|---|---|---|
| Forward (Explicit) Euler | yn+1 = yn + h f(tn, yn) | 1 | 1 + z | Stable inside disk |1 + z| ≤ 1; adds energy to oscillators |
| Backward (Implicit) Euler | yn+1 = yn + h f(tn+1, yn+1) | 1 | 1 / (1 − z) | A-stable and L-stable (R(−∞) = 0); damps oscillators |
| Trapezoidal (Crank–Nicolson) | yn+1 = yn + (h/2)[fn + fn+1] | 2 | (1 + z/2) / (1 − z/2) | A-stable; preserves imaginary-axis norm |R(iωh)| = 1 |
| Heun's Method (Improved Euler) | Predictor ỹn+1 = yn + hfn; average-slope corrector | 2 | 1 + z + z2/2 | Explicit 2-stage Runge–Kutta (RK2) |
| Symplectic (Semi-Implicit) Euler | vn+1 = vn + h a(xn); xn+1 = xn + h vn+1 | 1 | Area-preserving map (det J = 1) | Conserves phase-space area and bounded shadow Hamiltonian |
Implicit and Symplectic Euler Variants
Backward (Implicit) Euler and Symplectic Euler
Evaluating the slope at the right endpoint (tn+1, yn+1) defines the backward Euler method:
yn+1 = yn + h f(tn+1, yn+1)
Solved at each step via Newton–Raphson iteration, backward Euler has amplification factor R(z) = 1/(1 − z), whose stability region {|1 − z| ≥ 1} covers the entire left half-plane Re(z) ≤ 0 (A-stable) and satisfies limRe(z)→−∞ |R(z)| = 0 (L-stable).
For conservative Hamiltonian oscillators (dx/dt = v, dv/dt = a(x)), where forward Euler spirals outward (|1 + iωh| > 1) and backward Euler spirals inward, the symplectic Euler method (Euler–Cromer method) updates velocity first and uses the updated velocity vn+1 to advance position:
vn+1 = vn + h a(xn), and xn+1 = xn + h vn+1
Because its Jacobian determinant equals 1, symplectic Euler preserves phase-space area and bounded energy oscillations in molecular dynamics and orbital simulations.
Frequently Asked Questions
Why does Forward Euler spiral outward when simulating an undamped oscillator or orbit?
In an undamped oscillator, the linearized eigenvalues are imaginary (λ = ±iω), so forward Euler multiplies the amplitude each step by |1 + iωh| = √(1 + ω2h2) > 1, injecting artificial mechanical energy at every step.
Why is global error O(h) when the single-step error is O(h2)?
Reaching a fixed final time T requires N = T/h = O(h−1) steps. Accumulating O(h−1) local errors of size O(h2) produces O(h−1) × O(h2) = O(h) global error.
Where are Euler schemes still used in modern scientific computing?
Backward Euler is widely used for stiff PDE time-stepping, symplectic Euler for real-time mechanics, and the Euler–Maruyama method for stochastic differential equations driven by Brownian motion.
References
- Euler, L. (1768). Institutionum calculi integralis (Vol. 1, Sectio Secunda, Caput VII). Imperial Academy of Sciences, St. Petersburg. https://doi.org/10.5479/sil.318525.39088000877480
- Dahlquist, G. G. (1963). A special stability problem for linear multistep methods. BIT Numerical Mathematics, 3(1), 27–43. https://doi.org/10.1007/BF01963532
- Cromer, A. (1981). Stable solutions using the Euler approximation. American Journal of Physics, 49(5), 455–459. https://doi.org/10.1119/1.12478
- Hairer, E., Nørsett, S. P., & Wanner, G. (1993). Solving Ordinary Differential Equations I: Nonstiff Problems (2nd ed.). Springer. https://doi.org/10.1007/978-3-540-78862-1
- Hairer, E., Lubich, C., & Wanner, G. (2006). Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations (2nd ed.). Springer. https://doi.org/10.1007/3-540-30666-8