Doubt regarding derivation of escape velocity In my text book the derivation goes like this:

The minimum speed required to project a body from the surface of the Earth so that it never returns to the surface of the Earth is called escape speed. If a velocity greater than the escape velocity is imparted, the body will escape and leave the surface. If a velocity lesser than the escape velocity is given, it will fall back to the surface or be in an orbit. A body thrown with escape speed goes out of the gravitational pull of the Earth. Work done to displace the body from the surface of the Earth ($r=R_e$) to infinity ($r=\infty$) is given by:
$$\int dW=\int^{\infty}_{R_e}\frac{GM_e m}{r^2}dr$$
or
$$W=GM_e m\int^{\infty}_{R_e}\frac{1}{r^2}dr=-GM_e m\frac{1}{r}\Biggr| ^{\infty}_{R_e}$$
$$=-GM_e m\left(\frac{1}{\infty}-\frac{1}{R_e}\right)\Rightarrow W=\frac{GM_e m}{R_e}$$
Let $v_e$ be the escape speed of the body of mass m, then kinetic energy of the body is given by:
$$\frac{1}{2}mv^2=\frac{GM_e m}{R_e}\Rightarrow v_e=\sqrt{2gR_e}=11.2 \:\text{kms}^{-1}$$

But isn’t work done $Fdx=Fdx\cos z$. The direction of force and displacement is anti parallel but there is no -ve sign in the derivation. Have I misunderstood something?
 A: Here, the force is the force you are applying to the body, and not the force the Earth applies to it. As $F|_{by\,Earth} = -\frac{GMm}{r^2}\hat r$, and $F|_{by\,you} = - F|_{by\,Earth}$, $F|_{by\,you} = \frac{GMm}{r^2}\hat r$.
Thus, the force and displacement are in the same direction.
A: 
Work done to displace the body from the surface of the Earth ($r=R_e$) to infinity ($r=\infty$) is given by:
$$\int dW=\int^{\infty}_{R_e}\frac{GM_e m}{r^2}dr$$

That's rather sloppy, and it's incorrect. Unfortunately, once a mistake gets into one physics text from India to mistake gets propagated to many physics texts from India. I've found this sloppy mistake in three Indian physics textbooks so far.
It's obvious that the work has to be negative. The initial velocity is nonzero and hence the initial kinetic energy is positive. The final velocity is identically zero and hence so is the final kinetic energy. This means the change in kinetic energy is negative. Since work equals the change in kinetic energy in the case of a conservative force, the work done by gravity must also be negative. When computed correctly, this negative amount of work is exactly what is needed to derive escape velocity as $v_e = \sqrt{2 g R_e}$.
