[Physics] $R$ in the formula for escape velocity

celestial-mechanicsescape-velocityforcesnewtonian-gravitypotential

From the escape velocity formula

$$v_e = \sqrt \frac {2GM}R.$$

Some sources say it is the distance between two objects with mass $M$ and $m$.
Some examples I have read, only used radius of the $M$. For simplicity sake, lets use a rocket and planet Earth.

I google the escape velocity of earth as 11.186 km/s. I looked through example such as this. This particular example said that the escape velocity is
\begin{align}
v_e & = \sqrt {2gR}
\\ & = \sqrt {2\times9.8\:\mathrm{m/s^2} \times6.4\times10^3\:\mathrm{km}}
\\ & = 11.2 \: \mathrm{km/s}
\end{align}
I do know that $g = \frac {GM}{R^2}$, but in this example, the escape velocity is calculated using r as radius of earth. The radius of the Earth according to google is 6371 km or 6.4e6 (the value used for the calculation).

My question is, $R$ the radius of of the earth ($M$) or the distance between the rocket ($m$) and Earth? What I think makes sense is the radius of the Earth ($M$) because how could escape velocity be calculated without knowing the height it has to travel.

To add about the info Distance from M and m, Some sources say that R is actually
$$R = r_e + h_\mathrm{atmosphere}$$

Best Answer

$R$ is the distance between the centres of either object. By centres I mean their centres of mass (the point their gravitational forces "pull" from, so to speak).

$R$ is thus the sum of Earth's radius $R_e$, the object's radius $r_o$ (if spherical) and the height $h$ it is located above the ground:

$$R=R_e+h+r_o$$

For small objects not-too-far from the ground (such as thrown stones, fired rockets and orbiting satellites) you'll often see the radius of the object and the distance neglected. A rock's or a satellite's small radius is negligible compared to the ~6400 km of the Earth. Adding maybe 1km or even 10km or 100km in distance to this number makes no practical difference.

$$R=R_e+h+r_o\approx R_e$$

But when calculating escape velocity of e.g. Pluto's moon from Pluto, two objects that are comparable in size, you can't neglect either radius. And when calculating escape velocity of our own Moon from Earth, the ~400 000km distance must certainly be included as well (the sizes are almost negligible compared to this).