Euler’s Method

Most differential equations that arise in real-world science and engineering cannot be solved by finding a neat, closed-form formula. Instead, mathematicians and engineers rely on numerical methods — systematic procedures that use arithmetic to build approximate solutions step by step. Euler's Method is the simplest and most foundational of these techniques, and understanding it unlocks the ideas behind far more powerful algorithms used in everything from weather forecasting to rocket trajectory calculations. Named after the prolific Swiss mathematician Leonhard Euler, the method works by starting at a known point on a solution curve and repeatedly taking small steps in the direction the differential equation specifies. At each step, we use the derivative (the slope given by the equation) to predict where the solution goes next. The smaller the steps, the closer our approximation hugs the true solution curve — but the more calculations are required. Euler's Method is studied in high school and university calculus courses because it makes the concept of a differential equation concrete and visual. Rather than solving abstract symbols, you literally walk along the solution, one tiny straight-line segment at a time. This article explains the algorithm, works through a detailed numerical example, and discusses the trade-off between step size and accuracy.

Key takeaways
  • Set Up the Problem
  • Choose a Step Size h
  • Apply the Euler Update Formula
  • Repeat Until the Target x-Value is Reached
  • Understand the Error

Set Up the Problem

You are given a first-order differential equation of the form dy/dx = f(x, y), together with an initial condition y(x₀) = y₀. This tells you the slope of the solution at any point (x, y), and it tells you exactly one point on the solution curve to start from.

Choose a Step Size h

The step size h is a small positive number representing how far you move along the x-axis with each iteration. A smaller h gives a more accurate approximation but requires more steps. Common choices for textbook problems are h = 0.1 or h = 0.25.

Apply the Euler Update Formula

From your current point (xₙ, yₙ), compute the slope mₙ = f(xₙ, yₙ). Then move forward: xₙ₊₁ = xₙ + h and yₙ₊₁ = yₙ + h · f(xₙ, yₙ). This new point (xₙ₊₁, yₙ₊₁) is your next approximation on the solution curve. The idea is that over the tiny interval of width h, the solution behaves roughly like a straight line with slope mₙ.

Repeat Until the Target x-Value is Reached

Continue applying the update formula, using each new point as the starting point for the next step, until you reach the x-value at which you want to know the approximate value of y. Record each (xₙ, yₙ) pair in a table to track your progress and check for consistency.

Understand the Error

Because each step replaces a curved arc with a straight segment, a small error is introduced at every iteration. This is called local truncation error, and it is proportional to h². As errors accumulate over many steps, the global (total) error grows proportional to h. Halving the step size therefore approximately halves the total error — at the cost of doubling the number of calculations required.

The Key Equation

yn+1=yn+h⋅f(xn, yn)y_{n+1} = y_n + h \cdot f(x_n,\, y_n)
  • y_{n+1} — Next approximation (same units as y): The estimated value of the solution at the next x-step.
  • y_n — Current approximation (same units as y): The estimated value of the solution at the current step.
  • h — Step size (same units as x): The fixed increment added to x at each iteration; controls accuracy and computational cost.
  • f(x_n, y_n) — Slope function (same units as dy/dx): The right-hand side of the differential equation dy/dx = f(x, y), evaluated at the current point.

Worked Example

Problem. Use Euler's Method with step size h = 0.5 to approximate y(2), given the initial value problem dy/dx = x + y, y(0) = 1. Then compare your answer to the exact solution y = 3eˣ − x − 1.

y(2)≈7.125(exact: 3e2−3≈19.167)y(2) \approx 7.125 \quad (\text{exact: } 3e^2 - 3 \approx 19.167)

Answer. Euler approximation with h = 0.5: y(2) ≈ 7.125; exact value ≈ 19.167

Figure
Diagram
Euler's Method: Approximation vs. True Solutionxy00.51.01.52.01246810True solutionEuler steps (h=0.5)Error grows
Origins · 1 minLeonhard Euler and how this was discovered
LE
Leonhard Euler
1707–1783 · Swiss

Euler introduced the numerical integration method now bearing his name in his 1768 work Institutionum Calculi Integralis. He also introduced modern function notation f(x), the number e, the symbol π, and the imaginary unit i — making him arguably the most influential notation-setter in the history of mathematics. Euler lost sight in his right eye in his late twenties and became almost totally blind by age 59, yet he produced nearly half of his total mathematical output after losing his sight, dictating results and performing enormous calculations entirely in his head.

  • Slope Fields — Slope fields visualise the derivative f(x, y) at every point in the plane — they show the landscape that Euler's Method navigates one step at a time.
  • Separable Differential Equations — When a differential equation is separable, we can find an exact analytic solution to compare against Euler's numerical approximation and quantify the error.
  • Linear Approximation — Each Euler step is essentially a linear (tangent-line) approximation of the solution over a small interval — understanding linearisation clarifies why Euler's Method works and why it accumulates error.
  • Initial Value Problems — Euler's Method always requires an initial condition to start the iteration; initial value problems define the unique solution curve being approximated.