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?

You may integrate $\theta$ first, then $\phi$, and finally $r$.
$$I(r,\cos\theta,\phi):=(a^2r^2(1-\cos^2\theta) \cos^2\phi+b^2r^2(1-\cos^2 \theta) \sin ^2\phi+c^2r^2\cos^2 \theta)$$
$$J(r,\phi)=\int_{0}^{\pi}I(r,\cos\theta,\phi)\sin\theta d\theta=
\int_{-1}^{1}I(r,x,\phi)dx=\frac{2}{3}r^4(a^2 + b^2 + c^2 + (a^2 - b^2)\cos(2\phi))$$
$$K(r)=\int_0^{2\pi}J(r,\phi)d\phi=\frac{4}{3}(a^2 + b^2 + c^2)\pi r^4$$
$$L=\int_0^1 K(r)r^2 dr=\frac{4}{15}(a^2 + b^2 + c^2)\pi$$
Final result is 
$$\frac{4}{15}abc(a^2 + b^2 + c^2)\pi$$
