Historical Context & Motivation
Mathematicians have long been fascinated by differential equations — equations that describe how quantities change over time. A differential equation might model the cooling of a cup of coffee, the growth of a population, or the trajectory of a rocket. The challenge is that many of these equations have no neat, closed-form solution you can write with familiar functions like polynomials or trigonometric expressions.
This reality motivated some of the greatest minds in mathematics to develop numerical methods — systematic procedures that produce approximate answers, step by step, even when exact answers are impossible. Among the earliest and most elegant of these methods is the one developed by the Swiss mathematician Leonhard Euler in the eighteenth century. Euler's approach is beautifully simple: use the slope at a known point to predict where the curve goes next, then repeat.
The central question Euler's method addresses is straightforward: if you know a curve's starting point and the rule that governs its slope everywhere, how can you trace out the curve one small step at a time? Understanding this method gives you a foundation for every more advanced numerical technique you will encounter in science and engineering.
Core Principles & Definitions
Euler's method rests on a few key ideas that connect concepts you already know — slope, tangent lines, and step-by-step computation — into a coherent algorithm for approximating solutions to initial value problems (IVPs). An initial value problem is a differential equation paired with a known starting point: you know where the curve begins, and you know the rule for its slope at every location.
Differential Equation as a Slope Rule
Tangent Line Approximation
Step Size (h)
Iteration
Visual Explanation
The diagram below illustrates the core idea of Euler's method. The smooth blue curve represents the exact solution to a differential equation, while the orange line segments represent the Euler approximation. At each labeled point, the method computes the slope, draws a tangent line, and follows it for one step of width h to reach the next point.
As you can see, the Euler approximation follows the general shape of the true solution, but a gap develops between the orange points and the blue curve. This gap is called the approximation error. The error tends to grow with each step because each new point starts from a slightly wrong position. Reducing the step size h makes each tangent-line segment shorter and more faithful to the actual curve, shrinking the error — but it also means you need more steps to cover the same interval.
Mathematical Framework
Euler's method translates the geometric idea of "walking along tangent lines" into precise formulas you can calculate. You start with an initial value problem of the form dy/dx = f(x, y) with y(x₀) = y₀. The function f(x, y) gives you the slope at any point, and the initial condition tells you where the curve starts.
The logic behind these formulas comes directly from the definition of slope. If the slope at a point is f(xₙ, yₙ), then over a small horizontal distance h, the change in y is approximately Δy ≈ f(xₙ, yₙ) × h. Adding this change to the current y-value gives the predicted next y-value. This is exactly the same idea as using the point-slope form of a line, applied repeatedly.
The Effect of Step Size
The choice of step size h is the single most important decision you make when applying Euler's method. A large step size covers ground quickly but produces a rough, inaccurate approximation. A small step size hugs the true solution much more closely but requires many more calculations. The diagram below compares three different step sizes on the same differential equation, showing how accuracy improves as h decreases.
| Step Size (h) | Number of Steps | Relative Accuracy | Computation Effort |
|---|---|---|---|
| 2.0 | 2 | Low — large errors | Very little |
| 1.0 | 4 | Moderate | Low |
| 0.5 | 8 | Good | Moderate |
| 0.1 | 40 | Very good | High |
In practice, you usually need to balance accuracy against the number of calculations. For hand computation on an exam, step sizes like h = 0.5 or h = 1 are common. When a computer handles the work, step sizes of h = 0.001 or smaller are routine, producing thousands of tiny steps and highly accurate results.
Worked Example
Let's work through a complete example using Euler's method. Consider the initial value problem dy/dx = x + y with y(0) = 1. We want to approximate y(1) using a step size of h = 0.5, which means we will take two steps.
| n | xₙ | yₙ | f(xₙ, yₙ) | h × f(xₙ, yₙ) |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0.5 |
| 1 | 0.5 | 1.5 | 2 | 1.0 |
| 2 | 1.0 | 2.5 | — | — |
Strengths & Limitations
Euler's method is the simplest numerical method for differential equations, which makes it a natural starting point for learning. However, simplicity comes with trade-offs. Understanding these strengths and limitations helps you decide when Euler's method is appropriate and when you might need a more sophisticated technique.
| Strengths | Limitations |
|---|---|
| Extremely easy to understand and implement — just multiply slope by step size and add. | Only first-order accurate: halving h only halves the global error, so many steps are needed for high precision. |
| Works for any differential equation of the form dy/dx = f(x, y), no special structure needed. | Error accumulates with each step, especially over long intervals or for rapidly changing solutions. |
| Excellent pedagogical tool — it builds intuition about how numerical methods approximate curves. | Can become unstable for certain equations if h is too large, producing wildly wrong or divergent results. |
| Requires minimal computational resources; easy to compute by hand for a few steps. | More advanced methods (Runge-Kutta, Adams-Bashforth) achieve far better accuracy with similar or less effort. |
Connection to Advanced Methods
Once you understand Euler's method, you have the conceptual foundation for every numerical ODE solver used in science and engineering. The key insight is that more sophisticated methods improve accuracy by sampling the slope at multiple points within each step, rather than relying on a single slope evaluation at the beginning. This extra information lets them follow curves more faithfully without requiring dramatically smaller step sizes.
| Feature | Euler's Method | Runge-Kutta (RK4) |
|---|---|---|
| Slope evaluations per step | 1 | 4 |
| Order of accuracy | First order (error ~ h) | Fourth order (error ~ h⁴) |
| Ease of implementation | Very simple — one formula | Moderate — four intermediate calculations |
| Practical use | Teaching, quick estimates | Standard workhorse for scientific computing |
| Halving h improves accuracy by | Factor of 2 | Factor of 16 |
If you continue studying differential equations, you will encounter methods like the Improved Euler method (also called Heun's method), which averages the slopes at the beginning and end of each step, and the fourth-order Runge-Kutta method (RK4), which is the gold standard for many applications. The beautiful thing is that each of these methods is a natural extension of the same tangent-line idea you learned with Euler — they just sample the slope more cleverly.
Practice Problems
Lesson Summary
Euler's method is the most fundamental numerical technique for approximating solutions to initial value problems of the form dy/dx = f(x, y). Starting from a known point (x₀, y₀), the method uses the iterative formula yₙ₊₁ = yₙ + h · f(xₙ, yₙ) to step forward along tangent-line segments, building an approximate solution point by point.
The step size h controls the trade-off between accuracy and computation: smaller h yields better results but requires more steps. As a first-order method, halving h roughly halves the global error. While more advanced methods like Runge-Kutta (RK4) offer vastly superior accuracy, Euler's method remains the essential starting point for understanding how all numerical ODE solvers work.