<s>[INST] Mass of ellipsoid 
We are given the elipsoid $$\frac{x^2}{a^2}+\frac{y^2}{b^2}+\frac{z^2}{c^2} \leq 1$$ with density function $$p(x,y,z)=x^2+y^2+z^2$$ Find the mass of the elipsoid.


I used the transformation $x=ar\sin\theta \cos\phi$, $y=br\sin \theta \sin \phi$ and $z=cr\cos\theta$. Spherical coordinates but I multiplied $x,y,z$ by $a,b,c$ respectively.
I calculate the jacobian of this transformation, it is $abcr^2\sin\theta$.
So the mass is $$\int_{0}^{2\pi} \int_{0}^{\pi}\int_{0}^{1}(a^2r^2\sin^2\theta \cos^2\phi+b^2r^2\sin^2 \theta \sin ^2\phi+c^2r^2\cos^2 \theta)abcr^2\sin\theta drd\theta d\phi$$
But I'm having trouble calculating this integral. I thought maybe we can use that $$\sin^2x+\cos^2x=1$$ but because the coefficients are different it's difficult to use that here. How would I calculate this integral?
 [/INST] $$\int_{0}^{2\pi} \int_{0}^{\pi}\int_{0}^{1}(a^2r^2\sin^2\theta \cos^2\phi+b^2r^2\sin^2 \theta \sin ^2\phi+c^2r^2\cos^2 \theta)abcr^2\sin\theta drd\theta d\phi=$$
$$\int_{0}^{2\pi} \int_{0}^{\pi}\int_{0}^{1}a^3bcr^4\sin^3\theta \cos^2\phi drd\theta d\phi+\int_{0}^{2\pi} \int_{0}^{\pi}\int_{0}^{1}ab^3cr^4\sin^3 \theta \sin ^2\phi  dr d\phi+\\\int_{0}^{2\pi} \int_{0}^{\pi}\int_{0}^{1}abc^3r^4\cos^2 \theta \sin\theta drd\theta d\phi=$$
$$a^3bc\int_{0}^{2\pi} sin^3\theta d\theta\int_{0}^{\pi}cos^2\phi d\phi\int_{0}^{1}r^4dr +ab^3c\int_{0}^{2\pi} sin^3 \theta d\theta \int_{0}^{\pi}\sin ^2\phi d\phi\int_{0}^{1}r^4dr +\\abc^3\int_{0}^{2\pi}cos^2 \theta \sin\theta d\theta\int_{0}^{\pi}d\phi\int_{0}^{1}r^4dr $$
</s>