Solution (source code)

= Solution

For a lamina in the $xy$-plane,
$$
I_x=\int y^2\,dm,
\qquad I_y=\int x^2\,dm,
\qquad I_z=\int(x^2+y^2)\,dm,
$$
so the <perpendicular axis theorem> is immediately
$$
\boxed{I_z=I_x+I_y}.
$$

For the uniform ellipse, put $x=au$, $y=bv$, where $u^2+v^2\leq1$. Symmetry of the unit disk gives
$$
\frac1\pi\int_{u^2+v^2\leq1}u^2\,du\,dv
=\frac14,
$$
and the same for $v^2$. Hence
$$
\boxed{I_x=\frac{Mb^2}{4},\qquad
I_y=\frac{Ma^2}{4},\qquad
I_z=\frac M4(a^2+b^2)}.
$$