Lesson 3.2 · Differential Equations
Euler's method
Most differential equations can't be solved by separating variables. Equations like have no neat formula for , yet you can still estimate the solution. Euler's method does this by following tangent lines in small steps, and it is a BC-only topic that shows up regularly on the AP exam.
The idea: tangent lines in small steps
You already know the local linear approximation: near a point , a differentiable function is close to its tangent line,
A differential equation gives you that slope at any point, not just at the starting point. So instead of riding a single tangent line a long way (which drifts far from the curve), you take a short step, recompute the slope at the new point, take another short step, and so on.
Euler's method
To approximate the solution of with , choose a step size (often written ). Then repeat:
Each new equals the old plus (step size) (slope at the old point). After steps, approximates .
The number of steps is the distance you travel divided by the step size. Going from to with takes steps.
Organizing the work in a table
Keep the calculation tidy by recording , , the slope , and the change for each step. AP free-response graders need to see the setup, so write every step, not just the final number.
Worked example: Two steps
Let be the solution of with . Use Euler's method with two steps of equal size to approximate .
Solution. Two equal steps from to means .
| slope | |||
|---|---|---|---|
So .
This equation happens to have the exact solution , so . The estimate is well below the true value. You will see why shortly.
Worked example: Three steps with a smaller step size
Let be the solution of with . Use Euler's method with step size to approximate .
Solution. Three steps are needed.
So . This equation is not separable, so a numerical estimate like this is the practical way to get a value.
Common mistake
Evaluate the slope at the start of each step, using the and values you just computed. The two most common errors are reusing the original slope for every step, and updating but forgetting to use the new estimated in the slope formula.
Overestimate or underestimate?
Each Euler step follows a tangent line. Whether a tangent line lies above or below the curve depends on concavity:
- If the solution is concave up, tangent lines lie below the curve, so Euler's method underestimates.
- If the solution is concave down, tangent lines lie above the curve, so Euler's method overestimates.
To find concavity, compute by differentiating the differential equation implicitly, remembering that is a function of . Then substitute from the original equation.
In the first example, gives . Along the solution from to , both and are positive, so . The curve is concave up, and that explains why underestimates .
Worked example: Justifying an overestimate
Let solve with . Use Euler's method with two steps of size to approximate , and decide whether the estimate is too large or too small. The exact solution is .
Solution. First step: slope , so . Second step: slope , so . So .
For concavity, . The solution starts at and stays below the equilibrium , so : the curve is concave down, and Euler's method overestimates. Indeed, .
The picture shows the two Euler steps as a broken line riding above the concave-down solution curve.
Accuracy and step size
Smaller steps mean each tangent segment is shorter, so it has less room to drift away from the curve. Halving the step size roughly halves the error of Euler's method, but it doubles the number of steps. On the AP exam you will usually take two or three steps by hand; a calculator program or spreadsheet can take hundreds.
Tip
Before computing, check the step count: (final initial ) . If it isn't a whole number, reread the problem. Also keep full precision between steps and round only at the end, to three decimal places unless told otherwise.
Practice
Let solve with . Use Euler's method with two steps of equal size to approximate .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A pot of soup cools according to , where is the temperature in degrees Celsius and is in minutes. At the soup is at degrees. Use Euler's method with two steps of size minutes to approximate the temperature at .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Let be the solution of with . What is the approximation for obtained by using Euler's method with two steps of equal size?
Let solve with . Use Euler's method with step size to approximate .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Let solve with . Use Euler's method with two steps of equal size to approximate . Round to three decimal places.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Let solve with . Use Euler's method with step size to approximate . Round to three decimal places.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Let solve with . An Euler's method approximation of uses a positive step size. Which statement is true?