Zermelo's navigation problem
# Zermelo's navigation problem

In mathematical optimization, Zermelo's navigation problem, proposed in 1931 by Ernst Zermelo, is a classic optimal control problem that deals with a boat navigating on a body of water, originating from a point $A$ to a destination point $B$. The boat is capable of a certain maximum speed, and the goal is to derive the best possible control to reach $B$ in the least possible time.

Without considering external forces such as current and wind, the optimal control is for the boat to always head towards $B$. Its path then is a line segment from $A$ to $B$, which is trivially optimal. With consideration of current and wind, if the combined force applied to the boat is non-zero the control for no current and wind does not yield the optimal path.

## History

In his 1931 article, Ernst Zermelo formulates the following problem:

   In an unbounded plane where the wind distribution is given by a vector field as a function of position and time, a ship moves with constant velocity relative to the surrounding air mass. How must the ship be steered in order to come from a starting point to a given goal in the shortest time?

This is an extension of the classical optimisation problem for geodesics – minimising the length of a curve $I[c]=\int _{a}^{b}{\sqrt {1+y'^{2}}}\,dx$ connecting points $A$ and $B$ , with the added complexity of considering some wind velocity. Although it is usually impossible to find an exact solution in most cases, the general case was solved by Zermelo himself in the form of a partial differential equation, known as Zermelo's equation, which can be numerically solved.

The problem of navigating an airship which is surrounded by air, was presented first in 1929 at a conference by Ernst Zermelo. Other mathematicians have answered the challenge over the following years. The dominant technique for solving the equations is the calculus of variations.

## Constant-wind case

The case of constant wind is easy to solve exactly. Let $\mathbf {d} ={\vec {AB}}$, and suppose that to minimise the travel time the ship travels at a constant maximum speed $V$. Thus the position of the ship at time $t$ is $\mathbf {x} =t(\mathbf {v} +\mathbf {w} )$. Let $T$ be the time of arrival at $B$, so that $\mathbf {d} =T(\mathbf {v} +\mathbf {w} )$. Taking the dot product of this with $\mathbf {w}$ and $\mathbf {d}$ respectively results in ${\vec {d}}\cdot {\vec {w}}=T(\mathbf {v} \cdot {\vec {w}}+\mathbf {w} ^{2})$ and $d^{2}=T^{2}(v^{2}+2{\vec {v}}\cdot \mathbf {w} +\mathbf {w} ^{2})$. Eliminating ${\vec {v}}\cdot {\vec {w}}$ and writing this system as a quadratic in $T$ results in $({\vec {v}}^{2}-{\vec {w}}^{2})T^{2}+2(\mathbf {d} \cdot \mathbf {w} )T-\mathbf {d} ^{2}=0$. Upon solving this, taking the positive square-root since $T$ is positive, we obtain

    ${\begin{aligned}T[\mathbf {d} ]&={\frac {-2(\mathbf {d} \cdot \mathbf {w} )\pm {\sqrt {4(\mathbf {d} \cdot \mathbf {w} )^{2}+4\mathbf {d} ^{2}(\mathbf {v} ^{2}-\mathbf {w} ^{2})}}}{2(\mathbf {v} ^{2}-\mathbf {w} ^{2})}}\\[8pt]&={\sqrt {{\frac {\mathbf {d} ^{2}}{\mathbf {v} ^{2}-{\vec {w}}^{2}}}+{\frac {(\mathbf {d} \cdot \mathbf {w} )^{2}}{({\vec {v}}^{2}-{\vec {w}}^{2})^{2}}}}}-{\frac {\mathbf {d} \cdot \mathbf {w} }{\mathbf {v} ^{2}-\mathbf {w} ^{2}}}\end{aligned}}$

Claim: This defines a metric on $\mathbb {R} ^{2}$, provided $|\mathbf {v} |>|\mathbf {w} |$.

### Proof

By our assumption, clearly $T[\mathbf {d} ]\geq 0$ with equality if and only if $\mathbf {d} =0$. Trivially if ${\tilde {\mathbf {d} }}={\vec {BA}}$, we have $T[\mathbf {d} ]=T[{\tilde {\mathbf {d} }}]$. It remains to show $T$ satisfies a triangle inequality $T[\mathbf {d} _{1}+\mathbf {d} _{2}]\leq T[\mathbf {d} _{1}]+T[\mathbf {d} _{2}].$

Indeed, letting $c^{2}:=\mathbf {v} ^{2}-\mathbf {w} ^{2}$, we note that this is true if and only if

    ${\begin{aligned}&{\sqrt {{\frac {(\mathbf {d} _{1}+\mathbf {d} _{2})^{2}}{c^{2}}}+{\frac {(({\vec {d}}_{1}+{\vec {d}}_{2})\cdot {\vec {w}})^{2}}{c^{4}}}}}-{\frac {(\mathbf {d} _{1}+\mathbf {d} _{2})\cdot \mathbf {w} }{c^{2}}}\\[8pt]\leq&{\sqrt {{\frac {\mathbf {d} _{1}^{2}}{c^{2}}}+{\frac {(\mathbf {d} _{1}\cdot \mathbf {w} )^{2}}{c^{4}}}-{\frac {\mathbf {d} _{2}\cdot \mathbf {w} }{c^{2}}}}}+{\sqrt {{\frac {\mathbf {d} _{2}^{2}}{c^{2}}}+{\frac {(\mathbf {d} _{2}\cdot \mathbf {w} )^{2}}{c^{4}}}}}-{\frac {\mathbf {d} _{2}\cdot \mathbf {w} }{c^{2}}}\end{aligned}}$

if and only if

    ${\frac {\mathbf {d} _{1}\cdot \mathbf {d} _{2}}{c^{2}}}+{\frac {(\mathbf {d} _{1}\cdot \mathbf {w} )(\mathbf {d} _{2}\cdot \mathbf {w} )}{c^{4}}}\leq \left[{\frac {{\vec {d}}_{1}^{2}}{c^{2}}}+{\frac {(\mathbf {d} _{1}\cdot \mathbf {w} )^{2}}{c^{4}}}\right]^{1/2}\left[{\frac {{\vec {d}}_{2}^{2}}{c^{2}}}+{\frac {(\mathbf {d} _{2}\cdot \mathbf {w} )^{2}}{c^{4}}}\right]^{1/2},$

which is true if and only if

    ${\frac {(\mathbf {d} _{1}\cdot \mathbf {d} _{2})^{2}}{c^{4}}}+{\frac {2(\mathbf {d} _{1}\cdot \mathbf {d} _{2})(\mathbf {d} _{1}\cdot \mathbf {w} )(\mathbf {d} _{2}\cdot \mathbf {w} )}{c^{6}}}\leq {\frac {\mathbf {d} _{1}^{2}\cdot \mathbf {d} _{2}^{2}}{c^{4}}}+{\frac {\mathbf {d} _{1}^{2}(\mathbf {d} _{2}\cdot \mathbf {w} )^{2}+\mathbf {d} _{2}^{2}(\mathbf {d} _{1}\cdot \mathbf {w} )^{2}}{c^{6}}}$

Using the Cauchy–Schwarz inequality, we obtain $(\mathbf {d} _{1}\cdot \mathbf {d} _{2})^{2}\leq \mathbf {d} _{1}^{2}\cdot \mathbf {d} _{2}^{2}$ with equality if and only if $\mathbf {d} _{1}$ and $\mathbf {d} _{2}$ are linearly dependent, and so the inequality is indeed true. $\blacksquare$

Note: Since this is a strict inequality if $\mathbf {d} _{1}$ and $\mathbf {d} _{2}$ are not linearly dependent, it immediately follows that a straight line from $A$ to $B$ is always a faster path than any other path made up of straight line segments. We use a limiting argument to prove this is true for any curve.

## General solution

Consider the general example of a ship moving against a variable wind ${\vec {w}}(x,y)$. Writing this component-wise, we have the drift in the $x$-axis as $u(x,y)$ and the drift in the $y$-axis as $v(x,y)$. Then for a ship moving at maximum velocity $V$ at variable heading $\theta$, we have

    ${\begin{aligned}{\dot {x}}&=V\cos \theta +u(x,y)\\{\dot {y}}&=V\sin \theta +v(x,y)\end{aligned}}$

The Hamiltonian of the system is thus

    $H=\lambda _{x}(V\cos \theta +u)+\lambda _{y}(V\sin \theta +v)+1$

Using the Euler–Lagrange equation, we obtain

    ${\begin{aligned}{\dot {\lambda }}_{x}&=-{\frac {\partial H}{\partial x}}=-\lambda _{x}{\frac {\partial u}{\partial x}}-\lambda _{y}{\frac {\partial v}{\partial x}}\\{\dot {\lambda }}_{y}&=-{\frac {\partial H}{\partial y}}=-\lambda _{x}{\frac {\partial u}{\partial y}}-\lambda _{y}{\frac {\partial v}{\partial y}}\\0&={\frac {\partial H}{\partial \theta }}=V(-\lambda _{x}\sin \theta +\lambda _{y}\cos \theta )\end{aligned}}$

The last equation implies that $\tan \theta =\lambda _{y}/\lambda _{x}$. We note that the system is autonomous; the Hamiltonian does not depend on time $t$, thus $H$ = constant, but since we are minimising time, the constant is equal to 0. Thus we can solve the simultaneous equations above to get

    ${\begin{aligned}\lambda _{x}&={\frac {-\cos \theta }{V+u\cos \theta +v\sin \theta }}\\[6pt]\lambda _{y}&={\frac {-\sin \theta }{V+u\cos \theta +v\sin \theta }}\end{aligned}}$

Substituting these values into our EL-equations results in the differential equation

    ${\frac {d\theta }{dt}}=\sin ^{2}\theta {\frac {\partial v}{\partial x}}+\sin \theta \cos \theta \left({\frac {\partial u}{\partial x}}-{\frac {\partial v}{\partial y}}\right)-\cos ^{2}\theta {\frac {\partial u}{\partial y}}$

This result is known as Zermelo's equation. Solving this with our system allows us to find the general optimum path.

### Constant-wind revisited example

If we go back to the constant wind problem $\mathbf {w}$ for all time, we have

    ${\frac {\partial v}{\partial y}}={\frac {\partial v}{\partial x}}={\frac {\partial u}{\partial x}}={\frac {\partial u}{\partial y}}=0$

so our general solution implies ${\frac {d\theta }{dt}}=0$, thus $\theta$ is constant, i.e. the optimum path is a straight line, as we had obtained before with an algebraic argument.

