Solution (source code)

= Solution
{c}

By symmetry, the <centre of mass> is $G=(0,0,\ell/2)$. Choose horizontal axes through $G$ and the vertical symmetry axis as the third axis, writing $Z=z-\ell/2$. With uniform <mass density> $\rho$, the <inertia tensor> has entries
$$
I_{ij}=\int\bigl(|\mathbf R|^2\delta_{ij}-R_iR_j\bigr)\,dm,
\qquad \mathbf R=(x,y,Z),\qquad dm=\rho r\,dr\,d\theta\,dz.
$$
Reflection in each coordinate <plane> makes all the mixed <integrals> $\int xy\,dm$, $\int xZ\,dm$, and $\int yZ\,dm$ vanish. Rotational symmetry about the vertical axis gives $I_{11}=I_{22}=A$. Thus these are <principal axes> and
$$
\mathbf I_G=\begin{pmatrix}A&0&0\\0&A&0\\0&0&C\end{pmatrix}.
$$
The <axial moment of inertia of a hollow cylinder> is
$$
C=\int(x^2+y^2)\,dm
=2\pi\rho\ell\int_a^b r^3\,dr
=\frac{\pi\rho\ell}{2}(b^4-a^4).
$$
Its <mass> is $M=\pi\rho\ell(b^2-a^2)$. Dividing and factoring the difference of squares gives
$$
\boxed{\mathbf I_G=\operatorname{diag}(A,A,C),\qquad C=\frac12M(a^2+b^2).}
$$