backward problem.

Solving this equation requires the computation of the partial differential $\partial E/\partial x_0$ at the initial point $\bar{x}(t)$. We will see now that it can be overcome by introducing a backward problem. Of course, the two formulations are equivalent.

Let $u = (t_1, \ldots, t_N)$ be a bang-bang control, and $t \in [0,t_f]$. We define the backward end-point mapping by $$\tilde{E}(t, t_1, \ldots, t_N) = \tilde{x}(t_f - t),$$ where $\tilde{x}(\cdot)$ is the solution to the Cauchy problem $$\begin{aligned}
\dot{\tilde{x}}(t) &= -f(t_f - t, \tilde{x}(t),u(t_f - t)), \\
\tilde{x}(0) &= x_f.\end{aligned}$$

Note that for the nominal trajectory $(\overline{x}(\cdot),\overline{u}(\cdot))$, we have that $$\tilde{E}(t, \overline{t}_1, \ldots, \overline{t}_N) = \overline{x}(t).$$ Indeed, we have in this case that $\overline{x}(t) = \tilde{x}(t_f - t)$: if we integrate the nominal system backward, starting from the point $x_f$ during a time period $t_f - t$, we end up at point $\overline{x}(t)$.

Let $t \in [0,t_f]$, and $j$ be the smallest index such that $\overline{t}_j > t$ (with the convention that $j = N+1$ if $t>t_N$). Then, note that $\overline{t}_1, \ldots, \overline{t}_{j-1}$ do not play any role in the computation of $\tilde{E}(t, \overline{t}_1, \ldots, \overline{t}_N)$. The differential of $\tilde{E}$ can be computed with the Proposition \[prop\_differentiability\_epm\]. It 