Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Find Euler's stability threshold for a stiff equation

Use when: the equation locally reduces to y'=-k(y-g(x)) (or exactly y'=-ky) near an equilibrium, with k large and g(x) slowly varying, and you need the largest Euler step size that stays stable

Goal: the stability bound h<2/k, plus a way to check whether a specific candidate h satisfies it

Taught in Stiffness, informally

  1. 1

    Write the equation in (or linearize it near an equilibrium into) the form y'=-k(y-g(x)), treating g(x) as roughly constant over one step; k is the coefficient multiplying (y-g(x)).

    Example

    For y'=-50(y-\cos x), k=50 directly — no linearization needed since the equation is already in this form.

    Why: Euler's stability behavior near an equilibrium of this kind depends only on k, not on the slowly varying g(x) term riding along with it.

  2. 2

    Substituting the local form into y_{n+1}=y_n+hf(y_n) gives y_{n+1}=(1-hk)y_n, measuring y relative to the (locally frozen) equilibrium.

    Example

    With k=50: y_{n+1}=(1-50h)y_n.

    Why: this is Euler's own update rule, applied to the simplest equation that captures the fast-decaying component's behavior in isolation.

  3. 3

    The iteration stays bounded exactly when |1-hk|<1, i.e. 0<h<2/k.

    Example

    k=50: h<2/50=0.04.

    ⚡ Shortcut

    For any equation that locally reduces to y'=-ky, the bound is always exactly h<2/k — there's no need to redo the algebra above each time. A larger k (a faster-decaying component) always forces a smaller stable step, in exact inverse proportion.

    Why: |1-hk|>1 makes each step multiply the error by something bigger than 1 in magnitude, so the numerical solution grows — and since 1-hk can be negative, oscillates in sign — without bound.

  4. 4

    Compute |1-hk| for the proposed h directly; it's stable exactly when that number is under 1.

    Example

    k=50, h=0.03: |1-0.03(50)|=|1-1.5|=0.5<1 — stable. k=50, h=0.045: |1-0.045(50)|=|1-2.25|=1.25>1 — unstable.

    • |1-hk|<1 — stable, safe to use.
    • |1-hk|\ge1 — unstable; the step must be shrunk below 2/k.

    Why: this is the same stability condition from Step 3, just evaluated numerically instead of solved symbolically — useful when you're handed a candidate h rather than asked to find the threshold from scratch.

Common mistakes

  • Using the equation's overall behavior (how g(x) varies) to judge the step size, instead of the fast local rate k that actually governs stability.
  • Computing h<2/k but then picking h equal to (rather than strictly below) the threshold and calling it safe — h=2/k sits exactly on the boundary, where |1-hk|=1 oscillates without decaying.
  • Confusing accuracy with stability — a step size can satisfy h<2/k (stable, not blowing up) while still being far too large to track the solution's shape accurately.
  • Forgetting the absolute value in |1-hk|<1 and checking only 1-hk<1, which holds for every positive h and misses the actual constraint entirely.