If g is acceleration due to gravity on the Earth's surface, the gain in the potential energy of an object of mass m raised from the surface of Earth to a height equal to the radius R of the earth is
At a distance x from the centre of earth, the gravitational force
Therefore, the gain in potential energy is