If mass of earth is M, radius is R and gravitational constant is G, then work done to take 1 kg mass from earth surface to infinity will be
Potential energy of the 1 kg mass which is placed at the earth surface =
its potential energy at infinite = 0
Work done = change in potential energy =