Skip to main content

Section 1.12 Euler method in \(\mathbb R^n\)

An autonomous (i.e. time-independent) ODE in \(\mathbb R^n\) writes as
\begin{equation*} {\mathbf x}(t) = {\mathbf v}({\mathbf x}(t)),\;{\mathbf x}(t_0) = {\mathbf x}_0 , \end{equation*}
where \({\mathbf x}\) is a point in \(\mathbb R^n\) and
\begin{equation*} {\mathbf v}:\mathbb R^n\to T\mathbb R^n\simeq\mathbb R^n\times\mathbb R^n \end{equation*}
is a vector field.

The corresponding recursive step of the explicit Euler method is
\begin{equation*} {\mathbf x}_{n+1} = {\mathbf x}_n + h {\mathbf v}({\mathbf x}_n), \end{equation*}
the one of the implicit method is
\begin{equation*} {\mathbf x}_{n+1} = {\mathbf x}_n + h {\mathbf v}({\mathbf x}_{n+1}). \end{equation*}
A planar example: the physical pendulum.

Consider the system
\begin{equation*} \begin{cases} \dot x(t) = y(t),\cr \dot y(t) = -\sin(x(t))\cr \end{cases} \end{equation*}
with initial condition
\begin{equation*} x(0)=1, y(0)=0, \end{equation*}
and notice that this system is equivalent to the 2nd order ODE
\begin{equation*} \ddot x(t) = -\sin(x(t)),\;x(0)=1,\;\dot x(0)=0, \end{equation*}
which is the Newtonian equation of motion on \(\mathbb R\) of a point of unitary mass under a force field \(F(x)=-\sin(x)\text{.}\)

In particular, there is a conserved quantity:
\begin{equation*} E(x,y) = \frac{y^2}{2}+1-cos(x). \end{equation*}
Namely, this function is constant on each solution of the ODE.

Explicit Euler step.
\begin{equation*} \begin{cases} x_{n+1} = x_n + h y_n\cr y_{n+1} = y_n -h\sin x_n\cr \end{cases} \end{equation*}
Implicit Euler step
\begin{equation*} \begin{cases} x_{n+1} = x_n + h y_{n+1}\cr y_{n+1} = y_n -h \sin x_{n+1}\cr \end{cases} \end{equation*}
Symplectic Euler step
\begin{equation*} \begin{cases} x_{n+1} = x_n + h y_{n+1}\cr y_{n+1} = y_n -h \sin x_{n}\cr \end{cases} \end{equation*}

or

\begin{equation*} \begin{cases} x_{n+1} = x_n + h y_{n}\cr y_{n+1} = y_n -h \sin x_{n+1}\cr \end{cases} \end{equation*}
Why does the symplectic method work so much better?

Because the method itself is a symplectic transformation and so it preserves energy. On the plane, being symplectic is equivalent to the fact that the Jacobian of
\begin{equation*} (x_n,y_n)\to(x_{n+1},y_{n+1}) \end{equation*}
has unitary determinant.

In case of Explicit Euler:
\begin{equation*} J = D\begin{pmatrix}x_n+h y_n\cr y_n-h\sin(x_n)\cr\end{pmatrix}= \begin{pmatrix}1&h\cr -h\cos(x_n)&1\cr\end{pmatrix} \end{equation*}
so
\begin{equation*} \det J = 1+h^2\cos(x_n)\neq1 \end{equation*}

In case of Symplectic Euler:
\begin{equation*} J = D\begin{pmatrix}x_n+h y_n-h^2\sin x_n\cr y_n-h\sin(x_n)\cr\end{pmatrix}= \begin{pmatrix}1-h^2\cos x_n&h\cr -h\cos(x_n)&1\cr\end{pmatrix} \end{equation*}
so
\begin{equation*} \det J = 1 \end{equation*}
Thanks to this, while the trajectory is anyways approximated, its fundamental qualitative property of being close is preserved (at least modulo round-off errors).