Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.


Derivation

Integrate u=f(t,u)u' = f(t,u) over one time step:

u(tn+1)=u(tn)+tntn+1f(s,u(s))dsu(t_{n+1}) = u(t_n) + \int_{t_n}^{t_{n+1}} f(s, u(s))\,ds

Forward Euler (Definition 1) approximates this integral by freezing the integrand at the left endpoint tnt_n (a left rectangle rule). Backward Euler freezes it at the right endpoint tn+1t_{n+1} instead:

tntn+1f(s,u(s))dshf(tn+1,u(tn+1))\int_{t_n}^{t_{n+1}} f(s, u(s))\,ds \approx h\,f(t_{n+1}, u(t_{n+1}))

This gives the backward Euler (or implicit Euler) method:


The Cost of Implicitness

Each step of backward Euler requires solving an equation for un+1u_{n+1}.

Linear problems. For f(t,u)=λu+g(t)f(t, u) = \lambda u + g(t), we can solve algebraically:

un+1=un+h(λun+1+g(tn+1))    un+1=un+hg(tn+1)1hλu_{n+1} = u_n + h(\lambda u_{n+1} + g(t_{n+1})) \quad\implies\quad u_{n+1} = \frac{u_n + hg(t_{n+1})}{1 - h\lambda}

No iteration needed.

Nonlinear problems. For general ff, we must solve the nonlinear equation

G(un+1)=un+1unhf(tn+1,un+1)=0G(u_{n+1}) = u_{n+1} - u_n - hf(t_{n+1}, u_{n+1}) = 0

at every time step, using any of the root-finding methods from the nonlinear equations chapter (e.g., Newton’s method or a fixed-point iteration). The previous time step unu_n provides a natural initial guess, and for small hh convergence is typically rapid (1--2 iterations).

See the Euler’s method notebook for an interactive implementation.


Error Analysis and Convergence

Following the same analysis as for forward Euler, we obtain the same accuracy order.


Stability Analysis

Apply backward Euler to the test equation u=λuu' = \lambda u:

un+1=un+hλun+1    un+1=11hλunu_{n+1} = u_n + h\lambda\,u_{n+1} \quad\implies\quad u_{n+1} = \frac{1}{1 - h\lambda}\,u_n

The stability function is R(z)=11zR(z) = \frac{1}{1-z} where z=hλz = h\lambda. Compare forward Euler’s R(z)=1+zR(z) = 1 + z (Definition 6).

For Re(λ)<0\operatorname{Re}(\lambda) < 0, backward Euler is stable for all h>0h > 0: unconditionally stable.

Compare forward Euler: 1+z1|1+z| \leq 1 restricts hh to a small disk around (1,0)(-1,0). Backward Euler: 1z1|1-z| \geq 1 includes the entire left half-plane. No matter how large λ|\lambda| is, we can choose hh based on accuracy alone.


Stiffness

Stiff problems (Definition 7) arise whenever the ODE has widely separated time scales. The fast components demand small steps for explicit stability, even after those components have decayed to negligible levels. This is where backward Euler’s unconditional stability pays off.

Example 1 (The Prothero--Robinson Equation)

Consider u(t)=λ(ucost)sintu'(t) = \lambda(u - \cos t) - \sin t with u(0)=1u(0) = 1.

The exact solution is u(t)=costu(t) = \cos t, independent of λ\lambda.

With λ=1000\lambda = -1000, forward Euler requires h<0.002h < 0.002 for stability, but the solution varies on a scale of O(1)O(1). The method is forced to take thousands of tiny steps tracking a transient that has already decayed.

Backward Euler with h=0.1h = 0.1 gives R(z)=1/(1hλ)=1/1011|R(z)| = |1/(1 - h\lambda)| = 1/101 \ll 1: stable and accurate with 100x fewer steps.

Example 2 (Heat Equation Semi-Discretization)

Discretize ut=uxxu_t = u_{xx} on [0,1][0,1] with spacing Δx\Delta x:

dujdt=uj+12uj+uj1(Δx)2\frac{du_j}{dt} = \frac{u_{j+1} - 2u_j + u_{j-1}}{(\Delta x)^2}

This is a system u=Au\mathbf{u}' = A\mathbf{u} where AA is tridiagonal with eigenvalues

λk=4(Δx)2sin2 ⁣(kπ2(N+1))\lambda_k = -\frac{4}{(\Delta x)^2}\sin^2\!\left(\frac{k\pi}{2(N+1)}\right)

The smallest eigenvalue is λ1π2\lambda_1 \approx -\pi^2 (slow modes) and the largest is λN4/(Δx)2\lambda_N \approx -4/(\Delta x)^2 (fast modes). The ratio λN/λ1|\lambda_N|/|\lambda_1| \to \infty as Δx0\Delta x \to 0.

Forward Euler requires h(Δx)2/2h \leq (\Delta x)^2/2. With Δx=0.01\Delta x = 0.01: h5×105h \leq 5 \times 10^{-5}, requiring 20,000 time steps to reach T=1T = 1.

Backward Euler has no stability restriction. Choose hh based on accuracy alone; perhaps 100 steps suffice.