# Thread: Mass of a sphere, checking my result

1. ## Mass of a sphere, checking my result

Let $B$ be a ball with radius $a$ and in which the density of any point is equal to the distance to a fixed diameter. Find the mass of the ball.

My attempt : $m=\iiint _{B} \rho (r,\phi, \theta) drd\phi d \theta = \int_0^{2\pi} \int_0^{\pi} \int _0^a r^3 \sin (\phi) drd\phi d\theta=a\pi$.
I had a hard time finding that $\rho (x,y,z)=x^2+y^2$ if I chose the fixed diameter as the $z$-axis. Then I simply converted into spherical coordinates chosing " $r$" instead of " $\rho$" because I already got confused in another exercise because of the notation.
Is my result correct?

2. Do they mean the shortest distance?

If that's what they mean, the shortest distance from a point to the z-axis is $\sqrt{x^{2}+y^{2}} = r \sin \phi$.

3. See attachment--I think you are also confusing the cylindrical coordinate r.

4. Originally Posted by Random Variable
Do they mean the shortest distance?

If that's what they mean, the shortest distance from a point to the z-axis is $\sqrt{x^{2}+y^{2}} = r \sin \phi$.
I guess yes.
Ah yes, I knew it was $\sqrt{x^2+y^2}$ but I don't know why I wrote $x^2+y^2$, even in my draft!

Originally Posted by Calculus26
See attachment--I think you are also confusing the cylindrical coordinate r.
Oops, right. Ahmm... poor me.
Calculus 26, $\delta (x,y,z)=\sqrt{x^2+y^2}$ as Random Variable pointed out.

5. thanks that makes the integrand p^3 sin^2(phi) etc...