Solution
= Solution
Under
$$
a_j=\frac12e^{u_j/2},
$$
the <chain rule> gives $dot a_j=(a_j/2)\dot u_j$. Part (ii) and $a_j>0$ therefore imply
$$
\frac12\dot u_j=a_{j+1}^2-a_{j-1}^2
=\frac14\left(e^{u_{j+1}}-e^{u_{j-1}}\right).
$$
Consequently
$$
\boxed{
\dot u_j=\frac12\left(e^{u_{j+1}}-e^{u_{j-1}}\right),
\qquad 1\leq j\leq n-1.
}
$$
The conventions $u_0=u_n=-\infty$ give $e^{u_0}=e^{u_n}=0$, exactly matching $a_0=a_n=0$.