Skip to main content

Euler's method explain

Short answer

Euler's method is derived from Taylor series by neglecting O(h²) terms: y_{n+1}=y_n+h f(x_n,y_n). It has local error O(h²) and global O(h).

Derive Euler's formula for solving an initial value problem (explain the technique of solving an initial value problem using Euler's method).

Euler's method is the simplest one-step method for the initial value problem dy/dx = f(x, y), y(x₀) = y₀. It advances the solution along the tangent line at each point.

Derivation (Taylor series)

Divide the range into steps of width h, so xₙ₊₁ = xₙ + h. Expand y(xₙ + h) by Taylor's series about xₙ:

y(xₙ + h) = y(xₙ) + h·y'(xₙ) + (h²/2!)·y''(xₙ) + …

Neglect terms of order h² and higher. Since y'(xₙ) = f(xₙ, yₙ):

yₙ₊₁ = yₙ + h·f(xₙ, yₙ)        ← Euler's formula

Geometrically: the curve between xₙ and xₙ₊₁ is replaced by its tangent at (xₙ, yₙ), whose slope is f(xₙ, yₙ).

   y
   |         .  true curve
   |      .  _/ yₙ₊₁ (Euler)
   |   . _/
   | yₙ/
   +-----|--------|------ x
        xₙ      xₙ₊₁

Procedure

  1. Given f(x, y), x₀, y₀, step h and the target x.
  2. Compute the slope f(xₙ, yₙ) at the present point.
  3. Compute yₙ₊₁ = yₙ + h·f(xₙ, yₙ) and set xₙ₊₁ = xₙ + h.
  4. Repeat steps 2–3 until x is reached.

Example

dy/dx = x + y, y(0) = 0, h = 0.1: y₁ = 0 + 0.1(0 + 0) = 0.0000; y₂ = 0 + 0.1(0.1 + 0) = 0.0100.

Error

The local truncation error is O(h²) and the global error is O(h), so the method is first-order accurate. Small h is needed for good accuracy; the method may be unstable for stiff equations. Using the average of two slopes gives the improved (Heun) and Runge–Kutta methods.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Numerical Method chapter 6 questions →