AP CALCULUS BC • DIFFERENTIAL EQUATIONS

Approximating Solutions Using Euler's Method

A step-by-step numerical technique for approximating solutions to differential equations that resist closed-form analysis.

Historical Context & Motivation

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.

1768
Euler's Institutionum Calculi Integralis
Leonhard Euler publishes his three-volume treatise on integral calculus, introducing the step-by-step tangent-line approximation technique that now bears his name. He recognized that following the slope field in small increments could approximate otherwise unsolvable differential equations.
1895
Runge's Higher-Order Methods
Carl Runge develops improved numerical methods that evaluate the slope at multiple intermediate points within each step, dramatically reducing the error compared to Euler's single-slope approach while retaining its iterative spirit.
1901
Kutta Refines the Method
Martin Kutta extends Runge's work, producing the fourth-order Runge-Kutta method (RK4), which becomes the most widely used numerical ODE solver. This family of methods traces its intellectual lineage directly back to Euler's original algorithm.
1950s
Digital Computers Transform Numerical Analysis
The advent of electronic computers enables millions of Euler-type steps to be computed in seconds, making numerical methods practical for complex engineering simulations, orbital mechanics, and weather modeling.

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?

Core Principles & Definitions

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.

1

Initial Value Problem (IVP)

A differential equation dy/dx = f(x, y) paired with a specific starting condition y(x₀) = y₀. The initial condition anchors the solution to a particular curve in the slope field, giving Euler's method its starting point.
2

Step Size (Δx or h)

The fixed horizontal increment between successive approximation points. Smaller step sizes yield more accurate approximations but require more iterations. The AP exam typically specifies h or the number of equal steps over an interval.
3

Tangent-Line Approximation

At each point (xₙ, yₙ), the derivative f(xₙ, yₙ) gives the slope of the tangent line to the solution curve. Euler's method follows this tangent line for one step instead of the actual (unknown) curve, then recalculates the slope at the new point.
4

Local vs. Global Error

The local truncation error at a single step is proportional to h². However, errors accumulate across all steps, so the global error over a fixed interval is proportional to h — meaning halving the step size roughly halves the total error.
KEY TAKEAWAY
Think of Euler's method like navigating a winding mountain road in dense fog with only a compass. At each point, your compass (the differential equation) tells you the direction you should head. You walk a short distance in that direction, then check your compass again. If you take very small steps and recheck frequently, you'll closely follow the actual road. But if you take long strides between compass readings, you may drift off the true path — analogous to the accumulation of error with a large step size.

Visual Explanation: Euler's Method in Action

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.

The cyan point marks the initial condition (x₀, y₀). Each colored segment represents one Euler step: the algorithm advances Δx to the right and Δy = f(xₙ, yₙ) · Δx vertically. The violet curve is the true solution. The red dashed segment at x₃ shows the accumulated global error — the gap between the Euler approximation and the true solution.

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.

Mathematical Framework

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.

EULER'S ITERATIVE UPDATE RULE
yₙ₊₁ = yₙ + f(xₙ, yₙ) · Δx
where yₙ is the current approximate y-value, f(xₙ, yₙ) is the slope given by the differential equation evaluated at the current point, and Δx (also written as h) is the step size.

Simultaneously, the x-coordinate advances by the step size at each iteration:

X-COORDINATE UPDATE
xₙ₊₁ = xₙ + Δx
The x-values form a uniformly spaced sequence: x₀, x₀ + Δx, x₀ + 2Δx, and so on.

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.

ERROR RELATIONSHIP
Local error ∝ (Δx)² | Global error ∝ Δx
Halving the step size halves the global error (approximately). This linear relationship with h is the defining characteristic of a first-order numerical method.
📝 AP Exam Strategy
When the AP exam asks whether an Euler approximation is an overestimate or underestimate, check the concavity of the solution. If y″ > 0 (concave up), the tangent lines lie below the curve, so Euler underestimates. If y″ < 0 (concave down), the tangent lines lie above the curve, so Euler overestimates. Compute y″ by differentiating dy/dx = f(x, y) implicitly with respect to x.

Effect of Step Size on Accuracy

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.

Three approximations of the same IVP over the interval [0, 2]. The red path (Δx = 1.0) uses only 2 steps and deviates significantly. The amber path (Δx = 0.5) with 4 steps is noticeably closer. The green path (Δx = 0.2) with 10 steps nearly overlaps the true solution.
Decreasing step size yields closer approximations at the cost of more iterations.
Step Size (Δx)Number of StepsApproximate y(2)Relative Error
1.02Large deviationHighest
0.54Moderate deviationModerate
0.210Close to true valueLowest

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.

Worked Example

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: dy/dx = x + y, y(0) = 1, Δx = 0.5, approximate y(1.5)
1
Step 0 — Identify the Initial ConditionThe starting point is (x₀, y₀) = (0, 1). We also note f(x, y) = x + y, and the step size is Δx = 0.5. We need to reach x = 1.5, which requires (1.5 − 0)/0.5 = 3 steps.
x₀ = 0, y₀ = 1, 3 steps needed
2
Step 1 — From x = 0 to x = 0.5Compute the slope at (0, 1): f(0, 1) = 0 + 1 = 1. Then apply the update rule: y₁ = y₀ + f(x₀, y₀) · Δx = 1 + (1)(0.5) = 1.5. The new x-value is x₁ = 0 + 0.5 = 0.5.
(x₁, y₁) = (0.5, 1.5)
3
Step 2 — From x = 0.5 to x = 1.0Compute the slope at (0.5, 1.5): f(0.5, 1.5) = 0.5 + 1.5 = 2. Then: y₂ = 1.5 + (2)(0.5) = 1.5 + 1.0 = 2.5. The new x-value is x₂ = 0.5 + 0.5 = 1.0.
(x₂, y₂) = (1.0, 2.5)
4
Step 3 — From x = 1.0 to x = 1.5Compute the slope at (1.0, 2.5): f(1.0, 2.5) = 1.0 + 2.5 = 3.5. Then: y₃ = 2.5 + (3.5)(0.5) = 2.5 + 1.75 = 4.25. The new x-value is x₃ = 1.0 + 0.5 = 1.5.
(x₃, y₃) = (1.5, 4.25)
5
Final Answer & Error AnalysisThe Euler approximation gives y(1.5) ≈ 4.25. The exact solution to dy/dx = x + y with y(0) = 1 is y = 2eˣ − x − 1, which gives y(1.5) = 2e¹·⁵ − 1.5 − 1 ≈ 7.463. The significant underestimate is expected because the solution curve is concave up (y″ = y′ + 1 = x + y + 1 > 0 throughout), meaning the tangent-line approximations consistently lie below the curve.
y(1.5) ≈ 4.25 (underestimate since the solution is concave up)
📋 Organizing Your Work
On the AP free-response section, create a small table with columns for n, xₙ, yₙ, f(xₙ, yₙ), and Δy = f · Δx. This keeps your arithmetic organized and makes it easy for the reader (and grader) to follow your reasoning. Even if your final answer has a computational error, clear intermediate work can earn partial credit.

Strengths, Limitations & Concavity Analysis

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 and limitations of Euler's method
StrengthsLimitations
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.
📐 CONCAVITY AND OVER/UNDER-ESTIMATION
The relationship between concavity and estimation error is analogous to how a straight ruler approximates a curved surface. If the surface bends away from the ruler (concave up from below), the ruler reads short — an underestimate. If the surface bends toward the ruler (concave down), the ruler extends past the surface — an overestimate. On the AP exam, determine concavity by computing d²y/dx² using the chain rule on f(x, y), or by examining how f(x, y) changes along the approximation path.

Connection to Advanced Numerical Methods

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.

Comparison of numerical ODE methods
FeatureEuler's MethodImproved Euler (Heun's)Runge-Kutta (RK4)
Slope evaluations per step124
Order of accuracyFirst (global error ∝ h)Second (global error ∝ h²)Fourth (global error ∝ h⁴)
Key ideaUse slope at start of intervalAverage slope at start and predicted endWeighted average of 4 slopes within interval
AP BC relevanceDirectly testedNot tested, but good to knowNot 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.

🔭 Looking Ahead
If you continue into college-level differential equations or numerical analysis courses, you will encounter adaptive step-size methods that automatically shrink Δx where the solution changes rapidly and enlarge it where the solution is smooth. These sophisticated algorithms can be understood as intelligent extensions of Euler's fundamental idea: follow the slope field, but be smart about how often you recalibrate.

Practice Problems

1
Consider the initial value problem dy/dx = f(x, y) with y(a) = y₀. If the particular solution to this IVP is concave down on the interval [a, b], then an Euler's method approximation with step size Δx > 0 will:
2
Let dy/dx = 2x − y with y(1) = 0. Using Euler's method with two equal steps of size Δx = 0.5, what is the approximate value of y(2)?
3
Consider dy/dx = y − x with y(0) = 2. Using Euler's method with Δx = 0.25, what is the approximate value of y(0.75)?
PROBLEM 4APPLIED
A chemical reaction produces a substance whose concentration C(t), measured in moles per liter, satisfies the differential equation dC/dt = 0.5(4 − C) with C(0) = 1. (a) Use Euler's method with three steps of size Δt = 1 to approximate C(3). (b) Is the Euler approximation from part (a) an overestimate or an underestimate of the true value of C(3)? Justify your answer using the second derivative of C. (c) The exact solution is C(t) = 4 − 3e^(−0.5t). Find the exact value of C(3) and compute the absolute error of the Euler approximation.
PROBLEM 5CRITICAL THINKING
Consider the IVP dy/dx = sin(y) with y(0) = π/2. A student uses Euler's method with step size Δx = 0.5 and obtains the approximation y(1) ≈ 2.4521. (a) Verify the student's first Euler step. Then carry out the second step and determine whether the student's reported value of y(1) ≈ 2.4521 is correct. If it is not, identify the correct value. (b) Without solving the differential equation, explain why Euler's method will produce values that are always less than π for this IVP. (Hint: consider the behavior of dy/dx as y approaches π.) (c) Would decreasing the step size to Δx = 0.1 change the conclusion in part (b)? Explain.

Summary & Key Takeaways

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.

Varsity Tutors • AP Calculus BC • Approximating Solutions Using Euler's Method