Computing Library › Numerical Methods
Numerical Methods

The Forward Euler Method

Forward Euler takes a single step along the current slope; it is the simplest ODE solver, first-order accurate and only conditionally stable.

The simplest possible step

Forward (explicit) Euler advances the solution by following the slope at the current point: y_{n+1} = y_n + h f(t_n, y_n). It is the most basic ODE method and the conceptual foundation for all the others, obtained by replacing the derivative with a forward difference.

python
def forward_euler(f, y0, t0, h, steps):
    t, y = t0, y0
    out = [(t, y)]
    for _ in range(steps):
        y = y + h*f(t, y)
        t = t + h
        out.append((t, y))
    return out
Kronos motion — materials first

First-order accuracy

Forward Euler has local truncation error proportional to h^2 and global error proportional to h: it is a first-order method. Halving the step only halves the error, so it needs very small steps for high accuracy. Higher-order methods reach the same accuracy with far fewer, larger steps.

Conditional stability

Applied to the test equation y' = lambda y with negative lambda, forward Euler is stable only if the step satisfies |1 + h lambda| < 1. For rapidly decaying (stiff) components this forces impractically small steps, since a large negative lambda demands h below 2/|lambda| even after the transient has died. This is the central weakness that motivates implicit methods.

When it is enough

Despite its limitations, forward Euler is valuable for teaching, for quick prototypes, and for nonstiff problems where its simplicity and low per-step cost outweigh the small step size. It is also the base case for understanding stability regions and truncation error.

Explicit stepping like Euler is used for nonstiff, well-resolved parts of physics models, while stiff components in breeder Hyperion transport calculations require the implicit methods it motivates.