Euler's Method
Learn to approximate solutions to differential equations one step at a time, using tangent lines to trace a curve you cannot solve exactly.
What Is Euler's Method?
Many differential equations have no closed-form solution. Euler's Method gives us a way to numerically approximate the solution curve by taking small, straight-line steps that follow the slope field.
The Core Idea: Walk the Tangent
At each point, the differential equation tells us the slope. We use that slope to take a small step of size \(h\) along the tangent line, arriving at the next approximation.
Key Ingredients You Need
The Euler Recursion
This is the heart of the method. Each new \(y\)-value equals the old \(y\)-value plus the step size times the slope at the current point. The \(x\)-values simply march forward by \(h\).
Following the Slope Field
The Euler path follows the slope field in discrete jumps. Notice how it gradually drifts away from the true curve: the error accumulates at each step.
Euler vs Exact Solutions
How to Apply Euler's Method
Example 1: \(\frac{dy}{dx} = x + y\)
Given \(\frac{dy}{dx} = x + y\), \(y(0) = 1\), step size \(h = 0.5\). Approximate \(y(1)\).
| Step | \(x_n\) | \(y_n\) | \(f(x_n,y_n)\) | \(h \cdot f\) |
|---|---|---|---|---|
| 0 | 0 | 1 | \(0+1=1\) | \(0.5\) |
| 1 | 0.5 | 1.5 | \(0.5+1.5=2\) | \(1.0\) |
| 2 | 1.0 | 2.5 | — | — |
Example 1: Visualized
With only 2 steps (\(h=0.5\)), the Euler approximation undershoots the true curve. The error at \(x=1\) is about 0.94.
Example 2: Smaller Steps
Same equation: \(\frac{dy}{dx} = x + y\), \(y(0) = 1\), but now with \(h = 0.25\). Approximate \(y(1)\).
| n | \(x_n\) | \(y_n\) | \(f(x_n,y_n)\) | \(h \cdot f\) |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0.25 |
| 1 | 0.25 | 1.25 | 1.5 | 0.375 |
| 2 | 0.5 | 1.625 | 2.125 | 0.53125 |
| 3 | 0.75 | 2.15625 | 2.90625 | 0.72656 |
| 4 | 1.0 | 2.8828 | — | — |
Example 3: \(\frac{dy}{dx} = 2x\)
Given \(\frac{dy}{dx} = 2x\), \(y(0) = 0\), \(h = 0.5\). Approximate \(y(2)\). Note: the exact solution is \(y = x^2\).
| n | \(x_n\) | \(y_n\) | \(f(x_n,y_n)=2x_n\) | \(h \cdot f\) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0.5 | 0 | 1 | 0.5 |
| 2 | 1.0 | 0.5 | 2 | 1.0 |
| 3 | 1.5 | 1.5 | 3 | 1.5 |
| 4 | 2.0 | 3.0 | — | — |
Step Size and Error
Over vs Underestimate?
Common Mistakes
Summary Comparison
| Euler's Method | Exact Solution | |
|---|---|---|
| Type | Numerical approximation | Analytical formula |
| Output | Table of \((x_n, y_n)\) pairs | \(y = g(x)\) |
| Accuracy | Depends on \(h\) (first-order) | Exact (no error) |
| Works for | Any \(\frac{dy}{dx}=f(x,y)\) | Only specific ODE types |
| AP Use | Free response, 2-4 steps | Separation of variables, etc. |
Question 1 of 5
Given \(\frac{dy}{dx} = y\), \(y(0) = 1\), and \(h = 1\), what is the Euler approximation for \(y(1)\)?
Question 2 of 5
In Euler's Method, the formula \(y_{n+1} = y_n + h \cdot f(x_n, y_n)\) can be interpreted as using a local ___ to step forward.
Question 3 of 5
If the true solution to a differential equation is concave up on an interval, Euler's Method will:
Question 4 of 5
Given \(\frac{dy}{dx} = 3x^2\), \(y(1) = 2\), and \(h = 0.5\), what is \(y(1.5)\) using one Euler step?
Question 5 of 5
How many Euler steps are needed to approximate \(y(3)\) starting at \(x = 1\) with step size \(h = 0.25\)?