fhat. GitHub Workspace

Explicit Euler

The simplest way to step an ODE forward in time.

errorO(h)cost1 f / stepexplicit

Also known as forward Euler

Placeholderv0.1.3Example

Use with your agent

Use the fhat method "explicit-euler" (https://fhat.dev/methods/explicit-euler/SKILL.md) for this problem. Check first whether it applies.

Placeholder (demo). Description only: there is no reference implementation or verification for this entry yet. It belongs to a demonstration set of textbook methods.

What it does

Takes the slope at the start of the step and follows it: yn+1=yn+h f(tn,yn)y_{n+1} = y_n + h\, f(t_n, y_n). Each step costs one evaluation of ff. The global error is proportional to hh (first order), so halving the step only halves the error.

When to use

  • Teaching, debugging a right-hand side, or a quick look at the qualitative behaviour of a smooth, non-stiff system.
  • As a building block inside other schemes, where its simplicity matters more than accuracy.

When not to use (and what to use instead)

Situation Use instead
A little more accuracy for one extra evaluation per step explicit-midpoint (second order)
You need accuracy at reasonable cost rk4 (fixed step) or dormand-prince-rk45 (error control)
Conservative mechanical system or long runs: energy grows steadily stormer-verlet or symplectic-euler
Stiff problem: the step must be tiny to stay stable backward-euler or implicit-midpoint

Key facts

Order 1, explicit, not symplectic, not time-reversible, conditionally stable (for y′=λyy' = \lambda y it needs ∣1+hλ∣≤1|1 + h\lambda| \le 1).

Sources

The methods shown are examples. More research methods are coming.