Escape velocity is the velocity required to just escape the gravitational pull of a body. The gravitational force of a body is given by Newtons Law:
F = GMm / r2 (where G is the gravitational constant, M is the mass of the body, m is the mass of the test object and r is the distance from the centre of the body to the centre of the test object)
So, the velocity of the test object you want to remove from the field needs to be enough so that the centripetal force is the same as the gravitational force. The centripetal force is given by:
F = mv2 / r (where v is the linear velocity of the test object)
So, to calculate the expression for the escape velocity: equate the two equations and rearrange to make v the subject.
GMm/r2 = mv2/r
GM/r = v2
So,
v = (GM/r)1/2