Question: $ \text{Find the mass of the surface } x^2 +y^2+z^2 = 16 \text{ where the density at a point is the distance to the xy-plane.} $
Distance from the xy plane can be given in terms of x and y is equal to z. So I solve for z and get $ z = \sqrt{16 - y^2 - x^2} $ I know that both y and x range from [0,4] to get me 1/8 of the sphere.
So the problem then becomes the following:
$ 8 \int_{0}^{4} \int_{0}^{4} \sqrt{16 - y^2 - x^2} dy dx$
But obviously that's a mess which makes me think I should be using spherical coordinates but I'm struggling to figure out how to work the density into that equation.
The spherical integral for the surface mass is
$$I = \int_S |z|r^2\sin\theta d\theta d\phi$$
where $|z|$ is the density. Plug in the radius $r=4$ and the distance
$$z=r\cos\theta,$$
and then carry out the integration
$$I=64 \int_0^{2\pi} d\phi \int_0^{\pi} \sin\theta|\cos\theta| d\theta = 128\pi$$