` and ends with ``. THE FORWARD EULER · WORLD II — THE FOLD · THE OCHO
◄ WORLD II · THE FOLDTHE OCHO · blue builds │ the machine │ red breaks

THE FORWARD EULER

The simplest way to push an ODE forward in time — and the price you pay for it. Stand on the solution, read the slope f(t,y), walk a straight step h along the tangent, repeat. It is runnable, and its virtues and its sins are both provable: the global error is O(h), an undamped oscillator's energy grows without bound, and past the stability limit the whole thing oscillates and blows up. The blue team builds and defends it; the red team tries to break it.

source · AMBER Leonhard Euler, Institutionum calculi integralis, vol. I (1768) — Euler Archive E342 · scholarlycommons.pacific.edu/euler-works/342. Period source, no modern DOI — AMBER. Rendered, not quoted.

◧ blue team · builds & defends
3

THE MODEL — the tangent step

One rule, applied over and over. Given y′ = f(t,y) and the state (tn, yn), the explicit step is:

yn+1 = yn + h · f(tn, yn)
tn+1 = tn + h

Taylor says the true step is y(t+h) = y + h y′ + ½h²y″ + …. Euler keeps the first two terms and throws away the rest, so one step is wrong by ½h²y″ — the local error is O(h²). Take T/h steps to reach a fixed time and those errors accumulate to a global error of O(h): first order. Halve h, halve the error.

5

THE LINEAGE — the baseline FOLD

This is the first-order tangent step, written down in Euler's 1768 integral calculus. Everything after is a repair of one of its two sins.

Its energy leak is fixed by the the-symplectic-integrator (leapfrog keeps a bounded shadow energy). Its low order is refined by the-runge-kutta (four slope samples buy O(h⁴)). Forward Euler is the premise both of them answer.

7

THE WITNESS live

The blue team's live check: re-derive the four invariants from the pure engine on every render — the O(h) rate, the O(h²) local rate, the oscillator's energy growth, and boundedness at a stable step. If red pushes the step past the stability limit, this badge is where it shows.

▼ the machine ▼
4

DATA IN — the problem in ↓

Forward Euler eats three things and nothing else:

inputmeaning
f(t,y)the slope field — the ODE y′=f(t,y)
y₀the initial condition at t₀
hthe step size — the one knob that decides accuracy and stability

Choose the problem and the step below. The verdict — error, energy, stability — is computed live from the tangent step, never looked up.

▼   feed the problem into the engine   ▼
0

▣ THE PANEL — the engine LIT

The step is the whole story: too big and the tangent overshoots; too big for a stiff problem and it detonates.

green = the exact solution / conserved orbit  ·  blue = what forward Euler actually does.

▼   the engine emits the proven behaviour   ▼
8

DATA OUT — the verdict out ↓

What the machine proves, from the pure step, at boot:

• global error O(h) — halving h halves it (rate → 2)   • local error O(h²) — halving h quarters it (rate → 4)   • undamped oscillator energy grows by exactly (1+h²ω²) every step   • stiff decay is bounded only when h < 2/|λ|.

The blue team's witness (left) confirms these live; the red team (right) tries to make them false.

red team · attacks & breaks ◨
1

THE ADVERSARY

WALL Nobody integrates a real problem with forward Euler. It is first order (RK4 gets four digits for the same work), it is not symplectic (it pumps energy into every oscillation), and it is only conditionally stable — a stiff system forces a step so tiny the run never finishes, or you cross h = 2/|λ| and it explodes.

Its whole value is pedagogical: it is the shortest true statement of what "integrate an ODE" means. The moment accuracy or stiffness matters, you reach for implicit (backward Euler, BDF), symplectic (leapfrog), or higher-order (Runge–Kutta) methods — the neighbours this sphere points to.

2

THE GRAVEYARD

"A smaller step always gives a better answer." Cut. Below the stability limit, yes — but round-off eventually dominates truncation, and no step ever makes Euler symplectic. Small h buys accuracy, never conservation.

"Euler conserves energy for an oscillator." Cut. It injects it: energy multiplies by (1+h²ω²) > 1 every step, so the amplitude spirals out forever. Verified in the engine.

"Forward and backward Euler are basically the same." Cut. Backward (implicit) Euler is unconditionally stable and damps energy; forward is conditionally stable and pumps it. Same order, opposite failure.

6

THE TAMPER — break it

The red team's move: on the stiff decay y′ = −50 y (stability limit h < 2/50 = 0.04), push the step to h = 0.05. Now |1−hλ| = 1.5 > 1, so the numerical solution flips sign and grows without bound — while the true solution decays to zero. The witness (window 7) is watching.

Cross the stability limit and forward Euler's amplification factor exceeds 1 in magnitude — the witness recomputes, finds the stiff run unbounded, and turns red. Nothing is faked; the instability is real and it is caught.