A spherical cloud of gas of radius 3km is more dense at the center that toward the edge, at a distance p km from the center the density is d(p) = 3 - p, write an integral representing the total mass of the cloud and evaluate it.

My problem is not evaluating the integral it is setting it up.

Clearly the best option is a triple integral in spherical coordinates.

/pi / 2pi / 3

| | | d(p)p^2 sin(x) dp dy dx

| | |

/0 /0 /0

Here is my problem, I've tried with d(p) = 3-p like the problem states and I get a very strange answer, the homework solution uses p - 3, and I dont see why that make this change. Please help.

-Brian

The mass of a thin spherical shell of radius r1 and thickness dr is:

(3-r1)4*pi*r1^2 dr

So I think you just need to integrate this from 0 to 3 wrt r.