# Physics with Calculus/Mechanics/Gravitational Potential Energy
## The Basic Equation

To establish a basic equation for the gravitational potential energy of a small object above a planet, let us assume that the height displacement, h, is small compared to the radius of the planet involved. We shall also assume that the potential energy (PE) is 0 at the surface of the planet. From this, we get:
Since energy is force times distance, the potential energy is force times the height distance:
${\begin{aligned}PE&=F_{g}h\\&=mgh\\\end{aligned}}$
Since gravity is a conservative force, the potential energy gain or loss is independent of the path taken to get there.

## The Real Equation

Sometimes, the above equation isn't enough. Though it is a convenient shortcut when h is much smaller than the planet's radius, there exists an equation which is accurate regardless of the height involved or the change of the acceleration due to gravity.
Suppose an object moves, starting at a distance r$_1$ from the center of a planet and moving to a further distance r$_2$ from the center of the planet. The work done by the gravitational force is:
${\begin{aligned}W_{g}&={\frac {GMm}{r_{2}}}-{\frac {GMm}{r_{1}}}\\&=GMm\left({\frac {1}{r_{2}}}-{\frac {1}{r_{1}}}\right)\\\end{aligned}}$
Since potential energy is the opposite of work,
${\begin{aligned}\Delta PE_{g}&=-W_{g}\\&=-GMm\left({\frac {1}{r_{2}}}-{\frac {1}{r_{1}}}\right)\\\end{aligned}}$
The change in potential energy can also be written as the potential energy at the start minus the potential energy at the finish.
$PE_{2}-PE_{1}=-GMm\left({\frac {1}{r_{2}}}-{\frac {1}{r_{1}}}\right)$
The only possible universal reference point for gravitational potential energy is at infinity. In other words:
$\lim _{r_{2}\to \infty }PE_{2}=0$
This means that the equation simplifies a bit, since 1 over infinity is 0:
$PE=-{\frac {GMm}{r}}$

## Another proof

Because the gravitational force changes over the displacement in the example above, the work done by this force is a definite integral:
$dW={\vec {F}}dx\Rightarrow W=\int _{r_{1}}^{r_{2}}{\vec {F}}dx$
Since the inward gravitational force is the opposite direction of the displacement, we get:
${\begin{aligned}{\vec {F}}dr&=-//Fdr\\&=-{\frac {GMm}{r^{2}}}dr\\\end{aligned}}$
Putting that into the original equation:
${\begin{aligned}W&=//\int _{r_{2}}^{r_{1}}{\vec {F}}dr\\&=\int _{r_{2}}^{r_{1}}-{\frac {GMm}{r^{2}}}dr\\&=GMm\int _{r_{2}}^{r_{1}}-{\frac {1}{r^{2}}}dr\\&=GMm\ ]_{r_{2}}^{r_{1}}\\&=-GMm\left({\frac {1}{r_{2}}}-{\frac {1}{r_{1}}}\right)\\\end{aligned}}$
Recognize that last step? (If not, scroll up slightly) This leads back to the true equation for Gravitational Potential Energy.

## Escape velocity

To get an object permanently far away from the Earth, we want the final gravitational potential energy to become zero. However, to find its minimum launch speed, we want the objects speed when the gravitational potential energy becomes zero to also be zero. This means that the final kinetic energy and gravitational potential energy should both be zero. Due to Conservation of Energy:
${\begin{aligned}KE_{0}+PE_{0}&=KE+PE\\{\frac {1}{2}}mv^{2}-{\frac {GM_{E}m}{r_{E}}}&=0+0\\\end{aligned}}$
Isolating v:
${\begin{aligned}{\frac {1}{2}}mv^{2}&={\frac {GM_{E}m}{r_{E}}}\\mv^{2}&={\frac {2GM_{E}m}{r_{E}}}\\v^{2}&={\frac {2GM_{E}}{r_{E}}}\\v&={\sqrt {\frac {2GM_{E}}{r_{E}}}}\\\end{aligned}}$
And that's the formula for escape velocity. Plugging in values for G, M$_E$, and r$_E$:
${\begin{aligned}v&={\sqrt {\frac {2(6.67*10^{-11})(5.98*10^{24})}{6.37*10^{6}}}}\\&=1.12*10^{4}{\frac {m}{s}}\\\end{aligned}}$