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.

Euler on the cooling ball012024036048003006009001200t (s)θ (K)exact (θ(480)=647.57)Euler h=240Euler h=120Euler h=30

Effect of step size (slides)

(s) %
480−987.811635.4252.54
240110.32537.2682.964
120546.77100.8015.566
60614.9732.6075.0352
30632.7714.8062.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 :

EulerError
0.50.394240.585
0.250.668480.311
0.10.859900.119

Again the error is roughly proportional to .