Euler's method estimates a solution of a differential equation by repeatedly following short tangent-line segments. It uses the slope at the current point to predict the next point, then updates the slope before moving again.
One step is a local linear prediction
For with starting point and step size , the update is
The quantity is the predicted change in . The slope is evaluated at the old point, not at the destination. Once the new is estimated, use it in the next slope calculation.
Euler's method is particularly useful when the differential equation is known but an explicit solution is difficult to obtain. It is an approximation, not an exact integration formula.
Example: take two steps carefully
Estimate for using
At the slope is The first update gives at
At the new estimated point the slope is The second update gives at
| Current | Current | Current slope | Next |
|---|---|---|---|
| 0 | 1 | 1 | 1.1 |
| 0.1 | 1.1 | 1.2 | 1.22 |
Using the original slope twice would give 1.2 instead of 1.22 and would not be Euler's method. The defining idea is to refresh the slope after every step.
The exact solution 2e^x minus x minus one is shown with Euler segments from (0,1) to (0.1,1.1) to (0.2,1.22). The exact endpoint is about 1.24281.
Euler steps follow the slope at each estimated point. The two-step path ends below the exact solution at .
Describe this figure
The exact solution minus minus one is shown with Euler segments from (0, 1) to (0.1, 1.1) to (0.2, 1.22). The exact endpoint is about 1.24281.
Marked points: filled marker at (0, 1); filled marker at (0.1, 1.1); Euler: filled marker at (0.2, 1.22); Exact: filled marker at (0.2, 1.2428).
Compare with the exact solution when available
For this example, the exact solution is At it is approximately 1.24281, so the Euler estimate 1.22 is low.
The exact solution has making it concave up. Forward tangent predictions lie below the true curve locally. Over several steps, errors also affect the next slope, so a global error claim should be supported by the equation's behavior rather than an isolated sketch.
Smaller steps usually improve accuracy for a smooth, well-behaved solution over a fixed interval. They require more updates. Halving h does not make the result exact; it reduces the accumulated discretization error under appropriate conditions.
Example: a rate that depends on the amount
A population follows with Using a one-unit time step, the initial rate is so
The next rate is giving Keeping intermediate digits avoids extra rounding error. Round the final reported estimate to the requested precision.
The changing rate is why adding 3.2 every time would produce the wrong model. Also, an overly large step can produce implausible numerical behavior even when the true solution stays bounded; a numerical estimate must still be checked against the equation's qualitative predictions.
Step direction and number of steps
To move backward in x, is negative. The same update formula applies, but the input change carries its sign. To reach a target from a with equal steps, use Confirm that the last x equals the requested target; an extra or missing update answers a different question.
Distinguish numerical error from model error
Euler's method approximates the solution of the stated equation. Even extremely small steps cannot establish that the equation itself accurately models a real population or physical process. A discrepancy between prediction and observation can arise from numerical approximation, parameter estimates, measurement noise, or an inadequate model. Refining the step addresses only the first of those sources.
Try it yourself
Use two steps of size 0.5 to estimate for
Answer: The first slope is 0, so The next slope is 1, so The exact solution is giving 4 at 1. The forward estimates are low for this concave-up curve.
What to remember
Evaluate the slope at the current estimated point, multiply by the signed step size, update both coordinates, and repeat. Keep intermediate precision and distinguish the approximation from the true solution.