Análisis NuméricoDifferential Equations

Backward Euler and Stiff Equations

Backward Euler uses the slope at the new point, so each step means solving for yₙ₊₁; for y′ = λy with λ < 0 it is stable for every step size.

Sin empezar Ir a la práctica

Esta lección aún no está traducida. Por ahora se muestra en inglés; la versión en español está en camino.

The stability limit of explicit methods is a disaster for stiff problems. The fix is to use the slope at the new point: $$y_{n+1} = y_n + hf(t_{n+1}, y_{n+1}).$$ This is backward Euler. The unknown $y_{n+1}$ appears on both sides, so each step means solving an equation: an implicit method.

Idea clave

For $y' = \lambda y$, backward Euler gives $y_{n+1} = \frac{y_n}{1 - h\lambda}$. When $\text{Re}\,\lambda < 0$, $\left|\frac{1}{1 - h\lambda}\right| < 1$ for every $h > 0$: no step-size limit from stability. The price is solving for $y_{n+1}$ each step (a division, a linear system, or Newton's method), and the accuracy is still only first order.

Por qué funciona

From $y_{n+1} = y_n + h\lambda y_{n+1}$ we get $(1 - h\lambda)y_{n+1} = y_n$. If $\text{Re}\,\lambda < 0$ and $h > 0$, then $\text{Re}(1 - h\lambda) > 1$, so $|1 - h\lambda| > 1$ and the factor is smaller than 1 in size: the computed solution decays, as the true one does. Geometrically, backward Euler's stability region is everything outside the disk of radius 1 centered at $+1$, which contains the whole left half-plane. A method stable on the whole left half-plane is called A-stable.
A stiff problem: after a quick start, y follows a slow curve near cos t. Forward Euler (orange) needs h ≤ 0.04 for stability; backward Euler (green) is stable for every h.

Ejemplo resuelto: Forward versus backward

For $y' = -20y$, $y(0) = 2$, take one step with $h = 0.2$ by each method.
  1. Forward: $y_1 = (1 + 0.2(-20)) \cdot 2 = (-3)(2) = -6$: wrong sign, growing.
  2. Backward: $y_1 = \frac{2}{1 + 0.2 \cdot 20} = \frac{2}{5} = 0.4$: positive and smaller.
  3. The exact value is $2e^{-4} \approx 0.037$. Backward Euler is not accurate at this step either, but it decays like the solution, and with more steps it heads to 0 instead of exploding.

Respuesta: $-6$ versus $0.4$

Ejemplo resuelto: A forced problem

Take one backward Euler step with $h = 0.5$ for $y' = -5y + 10$, $y(0) = 0$.
  1. $y_1 = 0 + 0.5(-5y_1 + 10)$, so $y_1 + 2.5y_1 = 5$.
  2. $y_1 = \frac{5}{3.5} = \frac{10}{7} \approx 1.43$, on its way to the steady state $2$ without overshooting.
  3. Forward Euler would give $0 + 0.5(10) = 5$, overshooting the steady state, since $h|\lambda| = 2.5 > 2$.

Respuesta: $\frac{10}{7}$

Ejemplo resuelto: A nonlinear step

Take one backward Euler step with $h = 0.5$ for $y' = -y^{2}$, $y(0) = 4$.
  1. $y_1 = 4 - 0.5y_1^{2}$, that is, $y_1^{2} + 2y_1 - 8 = 0$.
  2. $(y_1 + 4)(y_1 - 2) = 0$; the positive root is $y_1 = 2$.
  3. The exact solution $y = \frac{4}{1 + 4t}$ gives $y(0.5) = \frac{4}{3}$. In general each step needs Newton's method, started from $y_n$.

Respuesta: $y_1 = 2$

A problem is stiff when it has components that decay much faster than the solution you want to follow. Explicit methods must use steps small enough for the fastest component; implicit methods may use steps chosen for accuracy alone. That trade (more work per step, far fewer steps) is why stiff solvers are implicit.

Error común

Taking the backward Euler step with the slope at the old point. $y_{n+1} = y_n + hf(t_n, y_n)$ is forward Euler again, with all its stability limits, whatever it is called. Check: the unknown $y_{n+1}$ must appear inside $f$, and you must solve for it.

Práctica

Apruebas con 3 respuestas correctas, las 2 últimas seguidas. Cada respuesta correcta da 3 XP.

Cargando la práctica…

Se apoya en

Lleva a

Este es uno de los peldaños más altos de Análisis Numérico.

Fuentes y lecturas

  • Tobin A. Driscoll and Richard J. Braun, Fundamentals of Numerical Computation (University of Delaware, free online edition): chapter "Diffusion equations", section "Stiffness"
  • MIT OpenCourseWare 18.330, Introduction to Numerical Analysis: lecture notes on implicit methods and stiff equations