Loading
A step-by-step numerical technique for approximating solutions to differential equations that resist closed-form analysis.
Most differential equations encountered in physics, biology, and engineering do not possess neat closed-form solutions expressible in terms of elementary functions. Even when an exact solution exists, finding it can be extraordinarily difficult. This reality motivated mathematicians and scientists to develop numerical methods — systematic algorithms that produce approximate solutions to differential equations by computing values step by step across an interval. Among the earliest and most intuitive of these methods is the one introduced by the prolific Swiss mathematician Leonhard Euler in the eighteenth century.
Euler's method addresses a fundamental question: if you know a starting point on a solution curve and you know the slope at every point via the differential equation dy/dx = f(x, y), can you trace out the curve by taking small, straight-line steps along the tangent direction? The answer is yes, approximately — and the smaller the steps, the better the approximation. This deceptively simple idea forms the conceptual foundation for the entire field of numerical analysis of ordinary differential equations.
On the AP Calculus BC exam, Euler's method appears both as a conceptual question — understanding what the algorithm does geometrically — and as a computational question requiring you to execute several iterations by hand. The key gap this concept addresses is straightforward: given an initial value problem dy/dx = f(x, y) with y(x₀) = y₀, how do you estimate y at some later value of x when no closed-form antiderivative is available?
Euler's method converts the continuous process of following a solution curve into a discrete sequence of straight-line segments. Before diving into computations, it is essential to establish the foundational ideas that make the method work and to understand what each piece of the algorithm represents.
The following diagram illustrates Euler's method applied to a differential equation. The smooth, darker curve represents the true solution to the IVP, while the segmented, lighter path shows the Euler approximation with three steps. Observe how each step begins by computing the tangent-line slope at the current approximate point, then advances horizontally by Δx and vertically by Δy = f(xₙ, yₙ) · Δx.
Notice that the Euler approximation diverges from the true solution as x increases. This happens because each step introduces a small local truncation error — the difference between the tangent line and the actual curve over one step — and these errors compound. When the solution curve is concave up, the tangent-line approximation lies below the curve, so Euler's method produces an underestimate. Conversely, when the curve is concave down, the approximation lies above the curve, yielding an overestimate. This geometric insight about concavity is frequently tested on the AP exam.
The mathematical derivation of Euler's method begins with the definition of the derivative. For a differentiable function y(x), the derivative at x = xₙ satisfies dy/dx ≈ Δy/Δx for small Δx. Rearranging this approximation and substituting the differential equation f(xₙ, yₙ) for dy/dx yields the iterative update rule at the heart of the method.
Simultaneously, the x-coordinate advances by the step size at each iteration:
The derivation can also be viewed through the lens of Taylor series. The exact solution expanded about xₙ is y(xₙ₊₁) = y(xₙ) + y′(xₙ) · Δx + ½ y″(xₙ) · (Δx)² + ⋯. Euler's method retains only the first two terms, discarding the quadratic and higher-order terms. This is why the local truncation error is O(h²) — the leading omitted term is proportional to (Δx)². Over N = (b − a)/h total steps across an interval [a, b], these local errors sum to produce a global error of order O(h), which is why Euler's method is classified as a first-order method.
The choice of step size Δx is the single most important factor controlling the accuracy of Euler's method. A smaller step size means more frequent recalculation of the slope, which keeps the approximation closer to the true curve. The following diagram compares three different step sizes applied to the same IVP, demonstrating how the approximation converges toward the true solution as h decreases.
| Step Size (Δx) | Number of Steps | Approximate y(2) | Relative Error |
|---|---|---|---|
| 1.0 | 2 | Large deviation | Highest |
| 0.5 | 4 | Moderate deviation | Moderate |
| 0.2 | 10 | Close to true value | Lowest |
The table and diagram reinforce the fundamental trade-off: smaller steps improve accuracy but increase computational work. On the AP exam, you typically execute only 2–5 steps by hand, so the step size is chosen to keep arithmetic manageable. In real-world applications, computers perform millions of steps in seconds, making very small step sizes practical.
Consider the initial value problem dy/dx = x + y with y(0) = 1. Use Euler's method with a step size of Δx = 0.5 to approximate y(1.5). This is a classic AP-style problem requiring three complete iterations.
Euler's method is the simplest numerical ODE solver, and its simplicity is both its greatest strength and its greatest limitation. Understanding where the method excels and where it falters is essential for the AP exam, where you may be asked to evaluate the quality of an approximation.
| Strengths | Limitations |
|---|---|
| Conceptually transparent: each step is just a tangent-line approximation, directly connected to the geometric meaning of the derivative. | Only first-order accurate: the global error is O(h), which means many steps are needed for high precision. |
| Easy to implement by hand or with a simple program; requires only evaluation of f(x, y) at each step. | Errors accumulate over many steps and can grow exponentially for certain ODEs, leading to instability. |
| Works for any first-order ODE dy/dx = f(x, y) regardless of whether a closed-form solution exists. | Cannot adaptively control step size; a fixed Δx may be too large in regions where the solution changes rapidly. |
| Serves as the conceptual building block for understanding more advanced methods (improved Euler, Runge-Kutta). | Not used in practice for high-stakes engineering computations; higher-order methods are preferred. |
Euler's method is the first rung on a ladder of increasingly accurate numerical techniques. Understanding how it relates to more sophisticated methods provides valuable perspective, even though only Euler's method itself appears on the AP Calculus BC exam.
| Feature | Euler's Method | Improved Euler (Heun's) | Runge-Kutta (RK4) |
|---|---|---|---|
| Slope evaluations per step | 1 | 2 | 4 |
| Order of accuracy | First (global error ∝ h) | Second (global error ∝ h²) | Fourth (global error ∝ h⁴) |
| Key idea | Use slope at start of interval | Average slope at start and predicted end | Weighted average of 4 slopes within interval |
| AP BC relevance | Directly tested | Not tested, but good to know | Not tested; standard in engineering |
The improved Euler method (also called Heun's method) refines the basic approach by first taking a standard Euler step to predict y at the next point, then averaging the slopes at the current and predicted points. This trapezoidal-style averaging cancels the leading error term and achieves second-order accuracy. The celebrated fourth-order Runge-Kutta (RK4) method pushes this idea further, sampling four slopes within each step and combining them via a weighted average. RK4 achieves remarkable accuracy — halving h reduces the global error by a factor of 16 — and it remains the default solver in many scientific computing environments. All of these methods, however, trace their conceptual DNA back to Euler's original single-slope algorithm.
Euler's method is a first-order numerical algorithm for approximating solutions to initial value problems of the form dy/dx = f(x, y), y(x₀) = y₀. At each iteration, the algorithm computes the slope f(xₙ, yₙ) at the current point and advances along the tangent line by the step size Δx to reach the next approximation point via yₙ₊₁ = yₙ + f(xₙ, yₙ) · Δx. Smaller step sizes yield more accurate approximations, with the global error proportional to Δx.
A critical AP skill is determining whether the Euler approximation overestimates or underestimates the true solution by analyzing the concavity of the solution curve: concave up implies underestimate, concave down implies overestimate. When executing the algorithm on the exam, organize your work in a table with columns for n, xₙ, yₙ, f(xₙ, yₙ), and Δy to ensure clear communication and maximize partial credit. Euler's method serves as the conceptual foundation for all higher-order numerical ODE solvers, including the improved Euler and Runge-Kutta methods used in scientific computing.
Keep learning with more lessons from the same subject.