Mass of variable density hemisphere could I ask whether I'm right or the book I'm working from is right?
Determine the total mass of a solid hemisphere, bounded by the plane $z = 0$ and the surface $x^2 + y^2 + z^2 = a^2\,\,(where\,z\ge 0)$ if the density at any point is given by $p = 1 - z\,\,(where\,z < a)$
Here's my answer:
Using spherical coordinates:
Element of volume is $\delta{v}=r^2\sin{\theta}\,\delta{r}\,\delta{\theta}\,\delta{\phi} \therefore$
Elemental mass is $\delta{m}=(1-z)r^2\sin{\theta}\,\delta{r}\,\delta{\theta}\,\delta{\phi}$
But in spherical system $z = r\cos\theta \therefore$
$\delta{m}=(1-r\cos\theta)r^2\sin{\theta}\,\delta{r}\,\delta{\theta}\,\delta{\phi}$
And so, total mass of hemisphere is
$M=\int\limits_{\phi=0}^{2\pi}\,\int\limits_{\theta=0}^{\pi/2}\,\int\limits_{r=0}^{a} (r^2\sin{\theta}-r^3\sin{\theta}\,cos{\theta})\,dr\,d{\theta}\,d\phi$
$=\int\limits_{\phi=0}^{2\pi}\,\int\limits_{\theta=0}^{\pi/2}\,\int\limits_{r=0}^{a} r^2\sin{\theta}\,dr\,d{\theta}\,d\phi-\int\limits_{\phi=0}^{2\pi}\,\int\limits_{\theta=0}^{\pi/2}\,\int\limits_{r=0}^{a}r^3\sin{\theta}\cos{\theta}\,dr\,d{\theta}\,d\phi$
$= I_1 - I_2$ say.
The first integral $I_1$is just the sum of the volume elements over the hemisphere and so is equal to $\frac{2}{3}{\pi}a^3$
For the second integral:
$I_2 = \int\limits_{\phi=0}^{2\pi}\,\int\limits_{\theta=0}^{\pi/2}\frac{a^4}{4}sin{\theta}\,cos{\theta}\,d{\theta}\,d\phi=$
$\frac{a^4}{4}\int\limits_{\phi=0}^{2\pi}\left[\frac{sin^2\theta}{2}\right]_{0}^{\pi/2}d\phi=$
$\frac{a^4}{8}\int\limits_{\phi=0}^{2\pi}d\phi=$
$\frac{a^4}{8}\left[\phi\right]_{0}^{2\pi}=$
$\frac{2{\pi}a^4}{8} \therefore$
$M = I_1 - I_2 = \frac{2}{3}{\pi}a^3 - \frac{1}{4}{\pi}a^4 = $
$\frac{a^3(8-3a)\pi}{12}$
But the book answer is:
$\frac{a^3(8-3a)\pi}{48}$
A quarter of my value.
Thanks,
Mitch.

Did you consider integrating discs $z=\text{const.}$...? Such disc has a constant density $\rho$ so it's easy to express the mass differential as $$dm = \pi r^2 \rho\, dz$$ with $$r^2 = a^2 - z^2$$ and $$\rho = 1-z$$ then integrate $$M=\int\limits_{z=0}^{z=a} dm$$
(edit 1)
PS.
Got same result: $M = \pi \frac{a^3(8-3a)}{12}$
(edit 2)
Please note that if the sphere radius is small ($a\ll 1$), then $M\approx \pi\frac{2a^3}3$ which is the hemisphere volume. That corresponds to the fact the density is then almost equal one: $$0<z<a\ll 1\ \implies\ \rho=1-z\approx 1$$
The book's answer contradicts the above correspondence.
