Solution (source code)

= Solution

Given a solution $u(t)$, construct $a_j(t)=\tfrac12e^{u_j(t)/2}$ and hence the smooth matrices $L(t)$ and $B(t)$. Let $U(t)$ solve the <linear ordinary differential equation>
$$
\dot U(t)=B(t)U(t),
\qquad U(0)=I.
$$
Because $B(t)$ is <skew-symmetric matrix>[skew-symmetric],
$$
\frac d{dt}(U^TU)=U^T(B^T+B)U=0,
$$
so $U(t)$ is an <orthogonal matrix> and is invertible. Moreover,
$$
\frac d{dt}\left(U^{-1}LU\right)
=U^{-1}\bigl(\dot L-[B,L]\bigr)U=0.
$$
It follows that
$$
\boxed{L(t)=U(t)L(0)U(t)^{-1}.}
$$
Thus the <Lax pair> flow is an <Isospectral Lax equation>: every $L(t)$ is <similar matrices>[similar] to $L(0)$ and has the same <eigenvalue>[eigenvalues] and <characteristic polynomial>.

Every symmetric function of these constant eigenvalues is a <first integral>. In particular, the <trace invariants of a Lax equation>
$$
I_k=\operatorname{tr}(L^k),
\qquad k=1,2,\ldots,
$$
are constant because the <cyclic property of the trace> gives
$$
\frac d{dt}I_k
=k\operatorname{tr}(L^{k-1}[B,L])=0.
$$
For example,
$$
\operatorname{tr}(L^2)=2\sum_{j=1}^{n-1}a_j^2
=\frac12\sum_{j=1}^{n-1}e^{u_j}
$$
is an explicit first integral of equation $(\dagger)$.