Chapter 11: Initial Value Problems & Euler's Method
Well-posedness · Euler's Method · Local vs. global truncation error · Higher-order Taylor methods
Everything before this chapter approximated a fixed, already-defined function. Starting here, the function itself is the unknown - we're given only its rate of change and a single starting value, and have to march forward in small steps to reconstruct the whole curve. Euler's Method is the simplest possible way to do this: at each point, assume the slope stays constant for one small step. It's crude, and this chapter is honest about exactly how crude, but it sets up the vocabulary - local truncation error, global error, stability - that every more sophisticated method in Chapter 12 builds on.
Section 5.1
Initial Value Problems
Definition - Initial Value Problem (IVP)
$$\frac{dy}{dt} = f(t,y), \qquad a\le t\le b, \qquad y(a)=\alpha$$
The goal: approximate $y(t)$ for $t\in[a,b]$ knowing only $f$ and the starting value $\alpha$.
If $f(t,y)$ is continuous on $\{(t,y): a\le t\le b,\,-\infty\lt y\lt\infty\}$ and satisfies a Lipschitz condition in $y$ - a constant $L$ exists with $|f(t,y_1)-f(t,y_2)|\le L|y_1-y_2|$ for all $t,y_1,y_2$ - then the IVP has a unique solution $y(t)$, and small perturbations to $f$ or $\alpha$ produce only small, boundedly growing changes in $y(t)$ (the problem is well-posed). The Lipschitz constant $L$ reappears directly in every error bound below - it measures how fast nearby solution trajectories can pull apart.
Section 5.2
Euler's Method
Derivation
Truncating the Taylor Expansion of $y(t)$
Taylor-expand the true solution about $t_i$ (Chapter 1):
$$y(t_{i+1}) = y(t_i) + hy'(t_i) + \frac{h^2}{2}y''(\xi_i) = y(t_i) + h f(t_i,y(t_i)) + \frac{h^2}{2}y''(\xi_i)$$
Dropping the $O(h^2)$ remainder gives Euler's Method: starting from $w_0=\alpha$,
$$w_{i+1} = w_i + h f(t_i, w_i), \qquad t_{i+1}=t_i+h$$
Geometrically: at each step, follow the tangent line (using the known slope $f(t_i,w_i)$) for exactly one step of width $h$ - then re-evaluate the slope at the new point and repeat. It is, in a real sense, the same tangent-line idea as Newton's Method (Chapter 4), but marching forward through time instead of toward a root.
Euler's Method on $y'=y-t^2+1,\;y(0)=0.5$ (true solution $y(t)=(t+1)^2-\tfrac12e^t$, gray). The polygon of straight segments (blue) systematically drifts below the true curve here - each individual step's tangent-line error compounds into the next step's starting point, which is exactly what §11.2's global-error analysis explains.
Local and Global Truncation Error
Theorem 11.2 - Euler's Method Error Bound
Suppose $f$ satisfies a Lipschitz condition with constant $L$ and $|y''(t)|\le M$ on $[a,b]$. Then the global error at step $i$ satisfies
$$|y(t_i)-w_i| \le \frac{hM}{2L}\Big(e^{L(t_i-a)}-1\Big)$$
The local truncation error (the error introduced in a single step, assuming the previous value was exact) is $O(h^2)$ - the dropped Taylor term. But those per-step errors accumulate and get amplified by the Lipschitz constant over $n=O(1/h)$ steps, so the global error is only $O(h)$ - Euler's Method is a first-order method, exactly like Bisection was a first-order root-finder (Chapter 2) for the same reason: one order of accuracy is "spent" converting local to global error.
📘 Example 11.1 - Euler's Method Step by Step
Apply Euler's Method to $y'=y-t^2+1,\,y(0)=0.5$ on $[0,2]$ with $h=0.2$.
Solution $w_{i+1}=w_i+0.2(w_i-t_i^2+1)$.
$t_i$
$w_i$
true $y(t_i)$
error
0.0
0.500000
0.500000
0.000000
0.2
0.800000
0.829299
0.029299
0.6
1.550400
1.648941
0.098541
1.0
2.458176
2.640859
0.182683
1.4
3.451773
3.732400
0.280627
2.0
4.865785
5.305472
0.439687
The error doesn't just grow - it grows faster than linearly with $t$, exactly as the $e^{L(t_i-a)}$ term in Theorem 11.2 predicts (here $L=1$, the Lipschitz constant of $f(t,y)=y-t^2+1$ in $y$). By $t=2$ the relative error is over 8%, from a method that looks perfectly reasonable step by step.
Global error at $t=2$ as $h$ halves: $0.4397,\,0.2420,\,0.1275,\,0.0655$ - each halving of $h$ roughly halves the error, confirming $O(h)$ global convergence, the same rate as Bisection (Chapter 2) and for a structurally similar reason.
Section 5.3
Higher-Order Taylor Methods
Keeping More Terms
Euler's Method drops everything past the $h^1$ term. The Taylor Method of order $n$ keeps more:
$$w_{i+1} = w_i + hf(t_i,w_i) + \frac{h^2}{2}f'(t_i,w_i) + \cdots + \frac{h^n}{n!}f^{(n-1)}(t_i,w_i)$$
where $f' = \dfrac{d}{dt}f(t,y(t)) = f_t + f_y\cdot f$ (the total derivative, via the chain rule, since $y$ itself depends on $t$), and each higher term needs one more chain-rule differentiation of $f$. Local truncation error is $O(h^{n+1})$, global error $O(h^n)$.
📘 Example 11.2 - Taylor Order 2 on the Same Problem
Repeat Example 11.1 using the order-2 Taylor method. For $f(t,y)=y-t^2+1$: $f_t=-2t$, $f_y=1$, so $f'(t,y) = -2t + 1\cdot(y-t^2+1) = y-t^2-2t+1$.
$$w_{i+1} = w_i + h(w_i-t_i^2+1) + \frac{h^2}{2}(w_i-t_i^2-2t_i+1)$$
Solution
$t_i$
$w_i$ (Taylor-2)
true $y(t_i)$
error
0.2
0.830000
0.829299
0.000701
0.6
1.652076
1.648941
0.003135
1.0
2.648646
2.640859
0.007787
1.4
3.748645
3.732400
0.016245
2.0
5.347684
5.305472
0.042212
Final error at $t=2$: $0.0422$ vs. Euler's $0.4397$ - better by a factor of $\approx10$, using the same step size $h=0.2$ and same 10 steps, purely from keeping one more Taylor term.
Why Taylor Methods Aren't the Final Answer
Order-2 Taylor needed $f_t$ and $f_y$ by hand; order 4 would need third and fourth partial derivatives of $f$ - for anything beyond textbook examples, deriving (and correctly coding) these by hand quickly becomes impractical or outright infeasible. Chapter 12's Runge-Kutta methods solve exactly this problem: they match a Taylor method's order of accuracy using only evaluations of $f$ itself, at cleverly chosen points - never a single analytic derivative of $f$.
Practice
Practice Problem
Try this problem yourself before expanding the solution below.
✏️ Practice Problem 11.1 - Euler's Method for $y'=-2xy$
Solve the IVP $y'=-2xy$, $y(0)=1$ with Euler's Method using $h=0.2$, for four steps. The exact solution is $y(x)=e^{-x^2}$; tabulate the global error at each step.
Solution
Euler's update is $w_{i+1}=w_i+h\,f(x_i,w_i) = w_i - 2h\,x_i w_i$.
$i$
$x_i$
$w_i$ (Euler)
$y(x_i)$ (exact)
$|w_i-y(x_i)|$
0
0.0
1.000000
1.000000
0.000000
1
0.2
1.000000
0.960789
0.039211
2
0.4
0.920000
0.852144
0.067856
3
0.6
0.772800
0.697676
0.075124
4
0.8
0.587328
0.527292
0.060036
The global error grows through $x\approx0.6$ and then shrinks again as both $w_i$ and $y(x_i)$ decay toward zero - it is not monotonic, a reminder that Euler's $O(h)$ error bound is a worst-case guarantee, not a step-by-step prediction.
Connections Across the Course
The local-vs-global error gap ($O(h^2)$ per step but $O(h)$ overall) mirrors exactly how Chapter 9's single-panel error compounds into the composite rule's error.
The Lipschitz constant $L$ plays the same structural role here as $|f'(p)|$ did for Chapter 3's fixed-point convergence - a bound on how fast errors can amplify step to step.
Taylor methods' need for analytic derivatives of $f$ is the direct ODE analogue of why Newton's Method needs $f'$ - and Runge-Kutta's derivative-free workaround (next chapter) parallels the Secant Method's workaround for the same problem in root-finding.