# Potential energy of a non-uniform density sphere

1. Sep 8, 2015

### Sais

1. The problem statement, all variables and given/known data
Perform potential energy W of a non-uniform density sphere by density d=d(r) and o(r)=dW/dm.

2. Relevant equations
The answer is W=1/2.integral(from 0 to R)(4x3.14xd(r)xo(r)xr^2xdr).

3. The attempt at a solution
I have solved this by this way:
o(r)=-GM(r)/r;
dW=-[GM(r)d(r)4x3.14xr^2]/r xdr;
assemble o(r) in dW then integrate it. But in the end, i find my W twice the answer. Can u help me explain this? Thanks. Sorry if my english was so bad :p

2. Sep 10, 2015

### Staff: Mentor

What does "Perform potential energy W" mean? You cannot perform an energy.
Do you want to calculate the potential from this field?
Do you want to calculate the total gravitational binding energy? <- my guess

x is often used for variables, multiplication is indicated with *.
3.14 should be $\pi$.

That is possible, but M(r) is an integral on its own so you'll get a double integral that you have to simplify.