Center of mass of paraboloid, changing order of integration I have the following question:
Find the center of mass for the following body:
A paraboloid $z=a(x^2+y^2)$ between z = 0 and z = b with uniform density $\rho=\rho_0\frac{z}{a}$.

I tried to calculate the total mass using cylindrical coordinates in two different ways:

*

*by integrating over z first and r later:
$$M_{tot}=\int_0^{2\pi}d\theta\int_0^{\sqrt{b/a}}r \left(\int_0^{ar^2}zdz \right)dr=\pi a\rho_0 \int_0^{\sqrt{b/a}}r^5dr=\frac{\pi\rho_0b^3}{6a^2}$$


*By changing the order of integration so that I integrate over r first and z later:
$$M_{tot}=\frac{2\pi\rho_0}{a}\int_0^b z \left(\int_0^{\sqrt{z/a}}rdr \right)dz=\frac{\pi\rho_0}{a^2}\int_0^bz^2dz=\frac{\pi\rho_0b^3}{3a^2}$$
I don't understand what I did wrong because the answers should be the same.

thank you!
 A: If you want to integrate over $z$ first and over $r$ later, you get\begin{align}\int_0^{2\pi}\int_0^b\int_0^{\sqrt{z/a}}z\rho_0\frac{z^2}a\,\mathrm dr\,\mathrm dz\,\mathrm d\theta&=2\pi\frac{\rho_0}a\int_0^bz^3\sqrt{\frac za}\,\mathrm dz\\&=\frac49\pi\frac{\rho_0b^{9/2}}{a^{3/2}}.\end{align}And if you want to integrate over $r$ first and over $z$ later, you get\begin{align}\int_0^{2\pi}\int_0^{\sqrt{b/a}}\int_{ar^2}^bz\rho_0\frac{z^2}a\,\mathrm dz\,\mathrm dr\,\mathrm d\theta&=2\pi\frac{\rho_0}a\int_0^{\sqrt{b/a}}\frac{b^4-a^4r^8}4\,\mathrm dr\\&=\frac49\pi\frac{\rho_0b^{9/2}}{a^{3/2}}.\end{align}So, you get the same answer twice.
A: On your work to calculate total mass using two approaches -
See the side projection of the region. In your first method where you are integrating wrt $dz$ first, you are integrating over the region below and outside the paraboloid shaded in dark grey instead of region inside the paraboloid.

The correct integral should be,
$ \displaystyle M_{\text{tot}}= \frac{\rho_0}{a} \int_0^{2\pi}d\theta\int_0^{\sqrt{b/a}}r \left(\int_{ar^2}^b z ~ dz \right) ~ dr = \frac{\pi\rho_0b^3}{3a^2}$
Then the answer matches with your second approach where you are integrating with respect to $dr$ first.

Now using same bounds you can find the center of mass.
$ \displaystyle \overline{z}  = \frac{1}{M_{\text{tot}}} \iiint z ~\rho \, dV$
