Solution (source code)

= Solution

The rotational kinetic energy and squared angular momentum are the <torque-free rigid-body invariants>
$$
E=\frac12\left(I_1\omega_1^2+I_2\omega_2^2+I_3\omega_3^2\right),
$$
and
$$
L^2=I_1^2\omega_1^2+I_2^2\omega_2^2+I_3^2\omega_3^2.
$$
Differentiating the energy and inserting the Euler equations gives
$$
\begin{aligned}
\dot E
&=I_1\omega_1\dot\omega_1+I_2\omega_2\dot\omega_2+I_3\omega_3\dot\omega_3\\
&=\omega_1\omega_2\omega_3
\bigl[(I_2-I_3)+(I_3-I_1)+(I_1-I_2)\bigr]=0.
\end{aligned}
$$
Similarly,
$$
\begin{aligned}
\frac12\frac{dL^2}{dt}
&=I_1^2\omega_1\dot\omega_1+I_2^2\omega_2\dot\omega_2+I_3^2\omega_3\dot\omega_3\\
&=\omega_1\omega_2\omega_3
\bigl[I_1(I_2-I_3)+I_2(I_3-I_1)+I_3(I_1-I_2)\bigr]=0.
\end{aligned}
$$