WHAT IS ESCAPE VELOCITY?
DERIVATION FOR ESCAPE VELOCITY
And the total work done in taking the body from the earth surface, x = R to x = ∞ is given as follows-
W = ∫dw = ∫[R to ∞] (GMm/x^2)dx
= GMm∫[R to ∞](1/x^2)dx

If body is projected vertically upward, then it must have some velocity, and the energy associated with the velocity is termed as kinetic energy.
This kinetic energy is equal to the above obtained work done .

This velocity is known as escape velocity , in terms of Gravitational constant , Mass of the planet
(earth) and radius (earth).
Escape velocity in terms of acceleration due to gravity is –

Escape velocity in terms of planet density (earth) , Gravitational constant and radius is as below-

This is the Derivation for the escape velocity.