Review / Part III — Series & Numerical Methods / Ch 16

Euler's Method

Ch 16 — Part III — Series & Numerical Methods

Euler's method is the simplest numerical scheme: replace the tangent at \(t_k\) by a straight line for a small step \(h\).

Formula

For \(y' = f(t, y),\; y(t_0) = y_0\) and step \(h>0\): $$t_{k+1} = t_k + h, \qquad y_{k+1} = y_k + h f(t_k, y_k).$$

Accuracy

Local truncation error per step is \(O(h^2)\); global error over a fixed interval is \(O(h)\) — first-order accurate. Halving \(h\) halves error.

Stability

For \(y' = \lambda y\) with \(\lambda < 0\), Euler is stable iff \(|1 + h\lambda| \le 1\), i.e., \(h \le 2/|\lambda|\). Stiff problems require very small \(h\) or implicit methods.

Practice Problems

Problem 1easy
Take two Euler steps with \(h = 0.1\) on \(y' = y,\; y(0)=1\). Compare with \(e^{0.2}\).
Hint
\(y_1 = y_0 + h y_0 = 1.1\); \(y_2 = y_1 + h y_1 = 1.21\).
Solution

\(e^{0.2} \approx 1.2214\). Euler underestimates.

Answer: \(y_2 = 1.21.\)

Problem 2hard
Derive global error order for Euler applied to a Lipschitz RHS.
Hint
Local error \(O(h^2)\); accumulate \(N = (T-t_0)/h\) steps.
Solution

Rough argument: \(N \cdot O(h^2) = O(h)\), with Lipschitz constant in a Gronwall-style bound. Formally \(|e_n| \le C (e^{L T} - 1)/L \cdot h\).

Answer: Global error \(O(h)\).

Problem 3medium
For \(y' = -50 y\), what step size \(h\) keeps explicit Euler stable?
Hint
Condition \(h \le 2/50\).
Solution

Need \(h \le 0.04\).

Answer: \(h \le 0.04.\)