Skip to content
Oakfield Operator Calculus Function Reference Site

Euler Method

For an ODE ut=F(u,t)u_t = F(u,t) with timestep Δt\Delta t, the forward Euler update advances the state by evaluating the drift at the current time level:

un+1=un+ΔtF(un,tn)u^{n+1} = u^{n} + \Delta t\,F(u^{n}, t_n)

The method applies to states unu^n in Rm\mathbb{R}^m (or a function space) with locally Lipschitz FF. The update returns un+1u^{n+1} in the same space.


Forward Euler is first-order accurate in time, with local truncation error O(Δt2)\mathcal{O}(\Delta t^2).

For the linear test equation ut=λuu_t = \lambda u, the update is

un+1=(1+z)un,z=λΔtu^{n+1} = (1 + z)u^n, \qquad z = \lambda \Delta t

Stability requires 1+z<1|1+z| < 1, which yields a CFL-type timestep restriction for many PDE semi-discretizations.

One drift evaluation F(un,tn)F(u^n,t_n) per step; no linear or nonlinear solves.


For linear drift with forcing F(u,t)=Au+g(t)F(u,t) = Au + g(t),

un+1=(I+ΔtA)un+Δtg(tn)u^{n+1} = (I + \Delta t\,A)u^{n} + \Delta t\,g(t_n)

As Δt0\Delta t \to 0, the method converges to the exact flow under standard smoothness assumptions.


Heun’s method improves accuracy by averaging drift estimates; backward Euler trades explicitness for strong stability on stiff problems.


Oakfield provides Euler stepping as a built-in context integrator:

  • Integrator names: euler and euler_deterministic (Lua: sim.sim_create_context_integrator(ctx, "euler", {...})).
  • Optional adaptivity: the Euler integrator can run in adaptive mode using a full-step vs two half-step estimate (step rejection up to a small fixed attempt count).
  • Stochastic increments: when enabled, Oakfield applies stochastic updates after the deterministic step using the integrator’s noise hook.
  • Scope: integrators advance the context by evolving the primary field state (field index 0) while drift evaluation executes the operator graph.

Euler’s method is one of the earliest systematic numerical schemes for integrating differential equations, arising from 18th-century work on differential calculus and approximation.

Today it serves as a canonical explicit first-order method: simple, interpretable, and a building block for stability and error analysis of more sophisticated integrators.


  • Hairer, Nørsett, Wanner, Solving Ordinary Differential Equations I
  • Butcher, Numerical Methods for Ordinary Differential Equations