1. The Initial-Value Problem
Definition
Euler’s method solves first-order ordinary differential equations of the form
Only equations that can be put in this form can be solved with Euler’s method.
Method – Putting an ODE in standard form
Isolate on the left; everything else is .
Example (slides):
Example (slides):
⚠️ Higher-order ODEs (e.g. ) aren’t directly in this form. They need rewriting as a system of first-order equations, which is beyond these slides.
2. Euler’s Method
Derivation (first step)
At the slope is known: . Follow the tangent line to :
with step size .
Theorem – Euler (Euler–Cauchy) formula
Repeat from each new (approximate) point:
flowchart LR A["(xᵢ, yᵢ)"] --> B["slope = f(xᵢ, yᵢ)"] B --> C["yᵢ₊₁ = yᵢ + h·slope"] C --> D["xᵢ₊₁ = xᵢ + h"] D -->|"repeat"| A
3. Worked Example – Cooling Ball
Example (slides)
A ball at 1200 K cools in air at 300 K, losing heat only by radiation:
Find with s.
Step 1: , ,
Step 2: , ,
⚠️ Slide typo in step 2: it writes ""; the right-hand side starts from .
Exact solution (from solving a nonlinear equation):
The ball can’t cool below the 300 K ambient, so K is physically impossible: the step is far too large.
Effect of step size (slides)
| (s) | % | ||
|---|---|---|---|
| 480 | −987.81 | 1635.4 | 252.54 |
| 240 | 110.32 | 537.26 | 82.964 |
| 120 | 546.77 | 100.80 | 15.566 |
| 60 | 614.97 | 32.607 | 5.0352 |
| 30 | 632.77 | 14.806 | 2.2864 |
Halving roughly halves the error once is small (). This is the signature of a first-order method.
⚠️ With the answer is a negative absolute temperature. A large step can make Euler unstable, not just inaccurate.
4. Errors
Theorem – Truncation error
Euler’s method is the first two terms of the Taylor series of about . The neglected terms give the true error per step:
so the local error is , and accumulated over steps the global error is (extra). Euler’s errors are large.
Example (extra) – the slides’ ODE , , find
Exact solution:
With :
| Euler | Error | |
|---|---|---|
| 0.5 | 0.39424 | 0.585 |
| 0.25 | 0.66848 | 0.311 |
| 0.1 | 0.85990 | 0.119 |
Again the error is roughly proportional to .