# Deriving expression for gravitational potential energy around a mass, $M$, using vectors

(I think my question will be somewhat related to this one: Deriving gravitational potential energy using vectors .)

I know the change in the potential energy associated with a conservative force, $$\vec{F}$$, moving along any path between A and B is given by: $$\Delta U = - \int_{\vec{r_A}} ^{\vec{r_B}} \vec{F} \cdot d\vec{r}$$

So when we're thinking about the force of gravity, $$\vec{F_G} = - \frac{GMm}{r^2}\hat{r}$$ where I've chosen $$\vec{F_G}$$ to be the graviational force exerted on the mass, $$m$$ by $$M$$ and $$\vec{r}$$ to be the position of the COM of $$m$$ relative to $$M$$'s COM.

So I get: $$\Delta U_G = - \int_{\vec{r_A}} ^{\vec{r_B}} \left(- \frac{GMm}{r^2}\hat{r}\right) \cdot d\vec{r} = \int_{\vec{r_A}} ^{\vec{r_B}} \left(\frac{GMm}{r^2}\hat{r}\right) \cdot d\vec{r}$$

Now, how would I go about evaluating this line integral to get: $$\Delta U_G = \left(-\frac{GMm}{r_B}\right) - \left(-\frac{GMm}{r_A}\right)$$

• Just want to point out that your expression for gravitational force only works if $M$ is a point mass or a spherical distribution. Commented May 16 at 13:50

We have the dot product: $$\hat r\cdot d\vec r=|\hat r|\cdot|d\vec r|=dr$$ Because the unit vector $$\hat r$$ and differential displacement vector $$d\vec r$$ are in the same direction. Note that the angle between $$\hat r$$ and $$d\vec r$$ is not necessarily zero, especially if the path is curved.
Change in the gravitational potential energy: \begin{align*}\Delta U_G=\int_{\vec{r_A}} ^{\vec{r_B}} \left(\frac{GMm}{r^2}\hat{r}\right) \cdot d\vec{r} & = \int_{\vec{r_A}} ^{\vec{r_B}} \frac{GMm}{r^2}\hat{r} \cdot d\vec{r}\\&=\int_{\vec{r_A}} ^{\vec{r_B}} \frac{GMm}{r^2}\ dr=-\dfrac{GMm}{r}\bigg|_{\vec{r_A}} ^{\vec{r_B}}\\&=-\dfrac{GMm}{|\vec r|}\bigg|_{\vec{r_A}} ^{\vec{r_B}}\\&=\left(-\frac{GMm}{|\vec {r_B}|}\right) - \left(-\frac{GMm}{|\vec {r_A}|}\right)\\\Delta U_G&=\left(-\frac{GMm}{r_B}\right) - \left(-\frac{GMm}{r_A}\right)=\left(\frac{GMm}{r_A}-\frac{GMm}{r_B}\right) \end{align*} We can also use the concept of potential function and gradient theorem as follows: $$\vec{F_G} = - \frac{GMm}{r^2}\hat{r}=-\nabla\Phi(\vec r)=-\dfrac{\partial\Phi(\vec r)}{\partial r}\hat r\implies\Phi(\vec r)=-\dfrac{GMm}{r}$$ $$\Delta U_G = \int_{\vec{r_A}} ^{\vec{r_B}} \nabla\Phi(\vec r)\cdot d\vec{r} = \Phi(\vec{r_B})-\Phi(\vec{r_A})=\left(\frac{GMm}{r_A}-\frac{GMm}{r_B}\right)$$
• Thanks. A little confused by how $\hat{r}$ and $d\vec{r}$ are in the same direction, but the angle between them isn't necessarily zero? Commented May 16 at 13:10