Solution (source code)

= Solution

In <principal axes>, $2E=\sum I_i\omega_i^2$ and $L^2=\sum I_i^2\omega_i^2$. Substitute the <Euler equations for a torque-free rigid body>:
$$
\dot E=\omega_1\omega_2\omega_3[(I_2-I_3)+(I_3-I_1)+(I_1-I_2)]=0.
$$
For the squared <angular momentum>,
$$
\tfrac12\frac d{dt}L^2=\omega_1\omega_2\omega_3[I_1(I_2-I_3)+I_2(I_3-I_1)+I_3(I_1-I_2)]=0.
$$
Thus \b[both $E$ and $L^2$ are conserved], even though the body-frame components of $L$ generally change.