ForwardEuler

1 The Forward Euler Method

We implement the explicit Euler method for ODEs and prove its convergence. Consider the initial value problem \(y'(t) = v(t, y(t))\), \(y(t_0) = y_0\), where \(v \colon \mathbb {R} \times E \to E\) is a vector field on a normed space \(E\).

1.1 Definitions

Definition 1 Euler step
#

Given a vector field \(v\), step size \(h\), time \(t\), and current value \(y\), the Euler step is

\[ \mathrm{eulerStep}(v, h, t, y) = y + h \cdot v(t, y). \]
Definition 2 Euler points
#

The sequence of Euler points is defined recursively by

\[ y_0 = y_0, \qquad y_{n+1} = \mathrm{eulerStep}(v, h, t_0 + nh, y_n). \]
Definition 3 Euler path
#

The Euler path is the piecewise linear interpolation of the Euler points. For \(t \in [t_n, t_{n+1})\) where \(n = \lfloor (t - t_0)/h \rfloor \),

\[ \mathrm{eulerPath}(t) = y_n + (t - t_n) \cdot v(t_n, y_n). \]
Definition 4 Euler derivative
#

The Euler derivative is the piecewise constant right derivative of the Euler path. For \(t \in [t_n, t_{n+1})\),

\[ \mathrm{eulerDeriv}(t) = v(t_n, y_n). \]

1.2 Properties of the Euler path

Theorem 5 Grid point values
#

The Euler path coincides with the Euler points at the grid points:

\[ \mathrm{eulerPath}(t_0 + nh) = y_n. \]
Theorem 6 Continuity
#

The Euler path is continuous on \([t_0, \infty )\).

Theorem 7 Right derivative

For \(t \geq t_0\), the Euler path has right derivative \(\mathrm{eulerDeriv}(t)\) at \(t\).

Theorem 8 Euler path on intervals
#

For \(t \in [t_n, t_{n+1})\),

\[ \mathrm{eulerPath}(t) = y_n + (t - t_n) \cdot v(t_n, y_n). \]
Theorem 9 Euler derivative on intervals
#

For \(t \in [t_n, t_{n+1})\),

\[ \mathrm{eulerDeriv}(t) = v(t_n, y_n). \]

1.3 Error analysis

Lemma 10 Point–path distance
#

Suppose \(\| v(t, y)\| \leq M\) for all \(t, y\). For \(t \in [t_n, t_{n+1})\),

\[ \mathrm{dist}(y_n, \mathrm{eulerPath}(t)) \leq hM. \]
Lemma 11 Local derivative bound

Suppose \(v\) is \(K\)-Lipschitz in space, \(L\)-Lipschitz in time, and \(\| v\| \leq M\). For \(t \in [t_n, t_{n+1})\),

\[ \mathrm{dist}(\mathrm{eulerDeriv}(t),\; v(t, \mathrm{eulerPath}(t))) \leq h(L + KM). \]
Lemma 12 Global derivative bound
#

Under the same hypotheses, for all \(t \geq t_0\),

\[ \mathrm{dist}(\mathrm{eulerDeriv}(t),\; v(t, \mathrm{eulerPath}(t))) \leq h(L + KM). \]
Theorem 13 Error bound
#

Let \(\mathrm{sol}\) be the true solution of the ODE on \([t_0, T]\). Under the Lipschitz and boundedness hypotheses on \(v\),

\[ \mathrm{dist}(\mathrm{eulerPath}(t), \mathrm{sol}(t)) \leq \mathrm{gronwallBound}(0, K, h(L + KM), t - t_0) \]

for all \(t \in [t_0, T]\).

Theorem 14 Convergence
#

The Euler method converges to the true solution as the step size \(h \to 0^+\): for all \(t \in [t_0, T]\),

\[ \mathrm{eulerPath}(v, h, t_0, y_0, t) \to \mathrm{sol}(t) \quad \text{as } h \to 0^+. \]