Work and escape velocity integrals Question:
You know the Newton law of gravity:
$$F(x) = \frac{mgR^2}{x^2}, ~x \geq R,$$
Where $m$ is the mass of the object, $g$ is the acceleration due to gravity, $R$ is the radius of the earth and $x$ is the distance from the center of the earth to the object (this is a version of the formula that I am not familiar with as I usually expect the mass of the earth to show up).
Calculate the physical work that is needed to free the mass m, located at the surface of the earth, from the gravity of the Earth (neglect air resistance). What initial velocity does this correspond to?
Attempted solution:
The general idea I had was that I probably need to understand the derivative/integral relationship between the physical units involved. Since work is force times distance:
$$W = Fs$$ 
...I thought about integrating F from 0 to infinity to get W:
$$W = \int^{\infty}_{0} F dx = \int^{\infty}_{0} \frac{mgR^2}{x^2} = mgR^2 \int^{\infty}_{0} \frac{1}{x^2} dx = mgR^2\Big[-\frac{1}{x}\Big]^{\infty}_{0}$$
...but this seems to lead to a zero minus infinity expression that does not make sense.
What core things am I misunderstanding and how can I finish up this question?
The expected solution is that the work is equal to $mgR$ and that the velocity is $v = \sqrt{2gR}$ (which is about 11 $m/s$).
 A: The only way to find this out is to use the displacement integral of force. 
This is what you have done, but consider the object at the earth's surface. Newton's law tells us that the distance is to be measured from the centre of the earth, and hence your lower limit should be R, the radius of the earth. 
The initial velocity required to free an object of the earth's gravitational field is known as the escape velocity of the object, and is independent of the object's mass. 
Consider the object at the surface of the earth. The total mechanical energy of the object is given as the sum of kinetic and gravitational potential energies of the object. 
$E_{s}=\frac{1}{2}\cdot{mv_{e}^{2}} - \frac{GMm}{R}$
where $v_{e}$ is our required velocity
This object has to reach a very large distance, which in Newtonian mechanics translates to $\infty$, in order to escape the gravitational field. 
At $\infty$ the potential energy of the object is considered 0 by definition. 
Therefore, 
$E_{\infty}=\frac{1}{2}\cdot{mv_{\infty}^{2}}$
Now, observe that the escape velocity is the minimum velocity required to eject a particle to a region of zero gravitational field. This means that the particle has exhausted all its energy in reaching that point. So the velocity at that point too, should be 0. And so,
$E_{\infty}=0$
Using the law of conservation of mechanical energy, 
$E_{\infty}=E_{s}=0$
$\frac{1}{2}\cdot{mv_{e}^{2}} = \frac{GMm}{R}$
$v_{e}^{2}=\frac{2GM}{R}$
$v_{e}=\sqrt\frac{2GM}{R}=\sqrt{2gR}$
This value is approximated to 11.6 $m s^{-1}$
