Homework Statement
Perform potential energy W of a non-uniform density sphere by density d=d(r) and o(r)=dW/dm.
Homework Equations
The answer is W=1/2.integral(from 0 to R)(4x3.14xd(r)xo(r)xr^2xdr).
The Attempt at a Solution
I have solved this by this way:
o(r)=-GM(r)/r...