# Mass density problem

1. Nov 5, 2009

### jdw_

Hi, I am wondering if somebody could explain how to answer these questions, it is from "Foundations of astrophysics" ch.15 q15.10

Suppose the mass density of a star as a function of radius is

p(r)=p0[1-(r/R)^2]

where R is the radius of the star

a) Find the mass M of the star in terms of p0 and R
b) Find the mean density of the star in terms of p0
c) Show that the central pressure of the star is:

Pc=15/16pi x GM^2/R^4

I have a good idea on how to do b) and c) but i need help with a)

useful equations :
P(r)= -GM(r)p(r)/r^2

M(r) = 4pi r^2 p(r)

2. Nov 5, 2009

### cepheid

Staff Emeritus
jdw,

It looks like you need to integrate the density over the volume in order to get the total mass. The problem is made simpler by the fact that there is symmetry (rho depends only on r, so that the density is constant everywhere on a sphere of radius r). Therefore, the integrals over the angular coordinates will just turn into 4pi, and you'll be integrating over successive spherical shells of surface area 4pi r^2, and thickness dr. To get this result, you need to know what a volume element is in terms of spherical coordinates.

3. Nov 5, 2009

### qraal

Spherical coordinates weren't specified so why use them?

Mass is straight forward. First the mass element is...

dM = 4.pi.ρ(r).r2 dr

...sub in ρ(r) = ρo(1-(r/R)2) and expand out the brackets to make it easier to integrate.

From there it's straight forward. I think you might've been confused by what you've quoted as the mass equation:

M(r) = 4pi r^2 p(r) [sic]

...except that's the equation for dM(r) NOT M(r). Was that the problem?

Also 'p(r)' should've been 'ρ(r)' else you'd be thinking "pressure as a function of radius" instead of "density as a function of radius".

Last edited: Nov 5, 2009
4. Nov 6, 2009

### cepheid

Staff Emeritus
I just meant that you implicity already *have* used them if you do the integration over "shells" having surface area 4pi r^2. It's just that the integral over the angular coordinates has already been done. Of course the spherical symmetry means that it reduces to a 1D integral -- I just thought it would be good if the OP could see how that comes about by starting with the full volume integral.