Euler's Method
Numerical Approximation
Learn to approximate solutions to differential equations step by step when exact solutions are out of reach.
What Is Euler's Method?
Many differential equations of the form \(\frac{dy}{dx} = f(x, y)\) cannot be solved with an exact, closed-form formula. Euler's Method gives us a way to numerically approximate the solution by stepping along the tangent line at each point.
Visual Intuition: Walking Along Tangent Lines
Why Does Euler's Method Matter?
The Core Formula
Given a differential equation \(\frac{dy}{dx} = f(x, y)\) with initial condition \(y(x_0) = y_0\) and step size \(\Delta x\):
In words: the new \(y\) equals the old \(y\) plus the slope at the old point times the step size.
One Step Up Close
Euler's Method vs. Exact Solutions
| Euler's Method | Separation of Variables | |
|---|---|---|
| Output | Approximate \(y\) values at specific points | Exact function \(y(x)\) |
| When to use | DE is not separable or exact solution is impractical | DE can be written as \(g(y)\,dy = h(x)\,dx\) |
| Accuracy | Depends on \(\Delta x\): smaller is better | Perfectly accurate |
| Requires | Initial condition + \(f(x,y)\) + step size | Integrability of both sides |
How to Apply Euler's Method
Worked Example 1: Two Steps
Given \(\frac{dy}{dx} = x + y\), \(y(0) = 1\), and \(\Delta x = 0.5\). Approximate \(y(1)\).
| Step | \(x_n\) | \(y_n\) | \(f(x_n, y_n)\) | \(y_{n+1}\) |
|---|---|---|---|---|
| 0 | 0 | 1 | 0 + 1 = 1 | 1 + 1(0.5) = 1.5 |
| 1 | 0.5 | 1.5 | 0.5 + 1.5 = 2 | 1.5 + 2(0.5) = 2.5 |
Example 1: Visualized
Worked Example 2: Smaller Steps
Same DE: \(\frac{dy}{dx} = x + y\), \(y(0)=1\), now with \(\Delta x = 0.25\). Approximate \(y(1)\).
| n | \(x_n\) | \(y_n\) | \(f(x_n, y_n)\) | \(y_{n+1}\) |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1.25 |
| 1 | 0.25 | 1.25 | 1.5 | 1.625 |
| 2 | 0.5 | 1.625 | 2.125 | 2.15625 |
| 3 | 0.75 | 2.15625 | 2.90625 | 2.8828 |
Worked Example 3: Non-Linear DE
Given \(\frac{dy}{dx} = y - x^2\), \(y(0) = 0.5\), \(\Delta x = 0.2\). Approximate \(y(0.4)\).
| n | \(x_n\) | \(y_n\) | \(f(x_n, y_n) = y_n - x_n^2\) | \(y_{n+1}\) |
|---|---|---|---|---|
| 0 | 0 | 0.5 | \(0.5 - 0 = 0.5\) | \(0.5 + 0.5(0.2) = 0.6\) |
| 1 | 0.2 | 0.6 | \(0.6 - 0.04 = 0.56\) | \(0.6 + 0.56(0.2) = 0.712\) |
Over- or Underestimate?
Common Mistakes
Quick Reference Summary
| Concept | Key Fact |
|---|---|
| Formula | \(y_{n+1} = y_n + f(x_n, y_n) \cdot \Delta x\) |
| Step Size | Smaller \(\Delta x\) = better accuracy, more computation |
| Concave up | Euler underestimates |
| Concave down | Euler overestimates |
| Requires | \(f(x,y)\), initial condition, \(\Delta x\) |
| Error per step | Proportional to \((\Delta x)^2\) (local truncation error) |
Question 1 of 5
Given \(\frac{dy}{dx} = 2x\), \(y(1) = 3\), and \(\Delta x = 0.5\), what is the Euler approximation for \(y(1.5)\)?
Question 2 of 5
In Euler's Method, the slope at each step is evaluated using which values?
Question 3 of 5
If the true solution to a DE is concave up on the interval of approximation, Euler's Method will produce:
Question 4 of 5
Given \(\frac{dy}{dx} = y\), \(y(0) = 1\), and \(\Delta x = 1\). Using one Euler step, what is \(y(1)\)?
Question 5 of 5
You need to approximate \(y(3)\) starting from \(y(1) = 2\) using Euler's Method with 4 equal steps. What is \(\Delta x\)?