I came across this question during my physics class. Suppose we have a solid, spherical planet with mass $M$ radius $R$ s.t. the density of this planet is uniform everywhere, then what is the gravitational potential at its center. (Assume that there is no external force that affects this system)
Approach one:
Suppose $r<R$ is the distance of the point from the center of the planet, then we know that $$ V_r=-\dfrac{G\rho\frac{4}{3}\pi r^3}{r}=-\dfrac{4}{3}G\rho\pi r^2=-\dfrac{GMr^2}{R^3} $$ which means $V_r\propto r^2$, so that $V_0=0$ (the gravitational potential at the center is zero)
Approach two:
By definition, gravitational potential at a point is the work done per unit mass to move an object from infinitely far to that point, so $$ V_r=\int_\infty^r\vec{E}\cdot d\vec{l}=\int_\infty^R\dfrac{GM}{l^2}dl+\int_R^r -\dfrac{GM l}{R^3}dl=-\dfrac{GM}{R}-\left(\dfrac{GMr^2}{2R^3}-\dfrac{GM}{2R}\right)=-\dfrac{GM}{2R}-\dfrac{GMr^2}{2R^3} $$ suggesting that $V_0\neq 0$, which contradicts result obtained by the previous method.
Interestingly, if plug in $r=R$, then Approach one agrees with Approach two, so I'm kind of confused about which method is correct.
Can someone please explain what's wrong? Thanks in advance.