# Gravitational potential energy of a sphere of non-uniform density

1. Mar 12, 2013

### mell0r

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

Find the total gravitational potential energy stored in a sphere with a 1/r2 density distribution if the total mass is 6.7 solar mass and the radius is 1.3 solar radius. Express you answer in units of 1041 Joules.

3. The attempt at a solution

To derive the equation, i attempted to follow the same procedure in deriving the gravitational potential energy of a constant sphere, but with also considering the altering value of density throughout.

I started off by figuring out an equation for the mass in a thin shell of mass dM and width dr at radius r:

dM=4πr2ρ0dr

Then integrated to obtain an equation of the total mass of material already assembled:

M(r)=(4/3)πr3ρ0

After this, i plugged these equations into dU(r)=-((GM(r)dM)/r) and integrated again for an equation for gravitational potential energy:

U=G(16/15)π2ρ02R5

The problem is that i can't for the life of me right now figure out how to re-arange this into an equation of the form ((GM2)/R), as i can't simply plug in ρ=((M)/(4/3)πr3) like i did for the sphere of constant density...

Any help would be greatly appreciated - this has been irritating me for a while now!

Thanks.

2. Mar 12, 2013

### Staff: Mentor

How does the above incorporate the fact that density varies as 1/r2 ?

Presumably you should let the density be given by some function of r like $\rho(r) = \frac{\rho_0}{r^2}$

3. Mar 12, 2013

### smatik

Potential energy is the work done in bringing a unit mass from infinity to the center of sphere.
U=integral[from infinty to zero](F.dr.cos(x)) here x=0=>cosx=1.
now f is not constant. it is different outside the sphere and also inside(non uniform density).
Break the integral for outside the sphere and inside. Like for outside do integral[infinity to R]((G{M,integrated mass of the sphere)/r^2).dr).

4. Mar 12, 2013

### mell0r

Ah, yes, sorry - i meant to include that.

Even so, my mind is completely blank now.. How can i relate that function to my derivation from my ρ0 variable?

5. Mar 12, 2013

### Staff: Mentor

If you integrate dM to find the expression for the mass (which is a given value), then you can solve that for your $\rho_0$ (probably best to leave it in symbolic form for now).

Then you can redo the integration for the mass to find the mass of the sphere as a function of r. That is, M(r). Then you can go back to summing the potential energies of the shells.

6. Mar 12, 2013

### mell0r

So overall i'd be performing 3 integration's? What would be the difference between integrating for the mass and the mass as a function? This math seems completely new to me, and i would have Google searched to figure it out, but i'm not even sure what to search..

Sorry for being annoying haha! Thanks for your time so far though

7. Mar 12, 2013

### Staff: Mentor

The first integration is to determine the value (or expression for) your density constant in terms of the known values (total mass, total radius).

The second integration uses this constant expression to replace your previously unknown constant $\rho_0$ when determining an expression for the mass of a sphere of arbitrary radius. That is, M(r).

The third integration uses the above M(r) and dM(r) to sum the shell-wise contributions to the potential energy.

8. Mar 12, 2013

### mell0r

so I integrated dM=4πr2ρ0dr over 0 and R, i get M=$\frac{4}{3}$πR3ρ0 and thus worked out ρ0 from re-aranging that equation. Is that correct so far?

I'm finding this so confusing, yet I can do the same derivation for a uniform density perfectly fine..

9. Mar 12, 2013

### SammyS

Staff Emeritus
You need to integrate, $\displaystyle\ dM=4\pi r^2\rho(r) dr=4\pi r^2\frac{\rho_0}{r^2} \,dr\,\$ because $\displaystyle\ \rho(r)=\frac{\rho_0}{r^2}\ .$ Integrate this from 0 to R and set it equal to M to evaluate ρ0.

10. Mar 12, 2013

### mell0r

Thank you! so the integral would be M=4πRρ0, and therefore ρ0=$\frac{M}{4πR}$??

11. Mar 13, 2013

### SammyS

Staff Emeritus
Right !

12. Mar 13, 2013

### mell0r

Wow, there you go. I Don't think I've ever been as happy to see an equation before as i just have haha! Thank you SammyS, gneill and smatik for the fantastic help and for coping with me :tongue: