# Mass of a sphere with a non-uniform density.

1. Jan 27, 2014

### Bergen

1. The problem statement, all variables and given/known data

A sphere is given by $x^2+y^2+z^2 ≤ 1$. The density is given by $ρ(x,y,z) = x+y+z$.
Show that the mass is $3π/2$.

2. Relevant equations

$m = ∫ρ ∂V$

$∂V=ρ^2sinϕ∂ρ∂ϕ∂θ$

3. The attempt at a solution

I have converted the x, y and z in the density function to spherical coordinates, and by using triple integrals this is where I am now.

$m = ∫∫∫(ρsin(ϕ)cos(θ)+ρsin(ϕ)sin(θ)+ρcos(ϕ))ρ^2sinθdρdθdϕ$

I am struggeling to solve the integration due to the density function in the bracket.

Integration limits; $θ = 2π→0. ϕ = π→0, ρ = 1→0$

Best regards

2. Jan 27, 2014

### LCKurtz

It would be better to write $\theta: 0\to 2\pi$, $\phi: 0\to \pi$, and $\rho: 0\to 1$ in the positive direction.

With regard to your question: Multiply out the integrand and show us your work. Show us where you are stuck.

3. Jan 27, 2014

### pasmith

That should be
$$m = \int_0^\pi \int_0^{2\pi} \int_0^1 (r \sin \phi \cos \theta + r \sin \phi \sin \theta + r \cos\phi)r^2\sin\phi\,dr\,d\theta\,d\phi$$
since
• there are two exactly opposite conventions for defining the angular coordinates $\theta$ and $\phi$, but in both the angle whose sine appears in $dV$ is the angle whose cosine appears in the expression for $z$; and
• you shouldn't use $\rho$ for the radial coordinate if the question has already defined it as something else.

4. Jan 27, 2014

### D H

Staff Emeritus
There's a typo or mistake in this problem statement. That density function results in regions of negative mass. In fact, there will be exactly as much negative mass as positive mass. The mass of this sphere is identically zero.

A mass of 3*pi/2 will result if the density is given by $\rho(x,y,z) = |x|+|y|+|z|$.

5. Jan 28, 2014

### Bergen

When i multiply out the bracket and factor out ρ i'm left with this:
$ρ^3(sin^2(ϕ)cos(θ)+sin^2(ϕ)sin(θ)+sin(ϕ)cos(ϕ))$

If I'm not mistaken, I have to seperate $ϕ$ and $θ$ before I can integrate. That is what I don't know how to do. Maby by using some trigonometric identities?

6. Jan 28, 2014

### haruspex

No need. When integrating wrt one, you can treat the other as a constant.
Don't forget to restrict the integral one octant to avoid the negative mass problem D H noticed.

7. Jan 28, 2014

### Bergen

Ok, think I got it now.
Thanks everyone!