# Trying to find the mass of sphere using density per unit area

A metallic surface S is in the shape of a hemisphere
$z=\sqrt{R^2-x^2-y^2}$, $0 \leq x^2 + y^2 \leq R^2\\$
If the mass density of the metal per unit area is given by $m(x,y,z)=x^2+y^2$, find the total mass of S.

This is how I attempted the question:
I decided to integrate it layer by layer. So I first find the mass in term of $\rho$ and then integrate it w.r.t $\rho$ on $[0,R]$

$x=\rho sin\theta\cos\phi$
$y=\rho sin\theta sin\phi$
$y=\rho cos\theta$
$|{T_\theta\times T_\phi}|=\rho^2sin\theta$
\begin{align}\int_0^{2\pi} \int_0^{\pi /2} \rho^2\sin^2\theta \cdot \rho^2\sin\theta d\theta d\phi &= \rho^4\int_0^{2\pi}\int_0^{\pi/2}\sin^3\theta d\theta d\rho \\ &= -2\pi\rho^4\biggl[cos\theta - \frac{cos^3\theta}{3}\biggr]_0^{\pi/2} \\ &= \frac{4\pi\rho^4}{3} \end{align}

Then I integrate it with respect to $\rho$
\begin{align}\int_0^R \frac{4\pi\rho^4}{3} d\rho & = \frac{4\pi}{3}\biggl[\frac{\rho^5}{5}\biggr]_0^R \\ & = \frac{4 \pi R^5}{15}\end{align}

However the answer is $\frac43 \pi R^4$.
Can someone please shed some light on which part I've done it wrong?
Really appreciate the help!

You should not be integrating over $\rho$ as $\rho$ is a fixed value. The $z$ equation guarantees all the points are on the sphere, not inside. You can also see it by a unit argument. The area of the sphere is quadratic in $R$ and the density formula has two powers of length, so the mass must have four powers of length, not five.