# Work done should be positive but coming out negative?

$\int\frac{GMm}{x^2}dx$ where $x$ varies from $\infty$ to $r$.

Situation we are bringing a very small mass from infinity to a distance r in the gravitational field of Earth with constant velocity(distances are measured between earth and small mass). now work done by gravity is $\int\frac{GMm}{x^2}dx$ (where $x$ varies from $\infty$ to $r$) as force and displacement are in same direction; so work done by gravity should come out to be $+ve$. but after solving this integral it comes out to be $-ve$. how can work be $-ve$ when force and displacement are in same direction.

But the $-ve$ work satisfies the eq. that $W\text{(gravity)} = -\Delta u$ if we take the $-ve$ work to be potential energy at distance $r$.

BUT the point is work done should be $+ve$. please explain (mathematically).

• Related question by OP: physics.stackexchange.com/q/80592/2451 – Qmechanic Nov 10 '13 at 1:21
• The work done by gravity in moving an object from some initial distance $r_i$ from the center of the earth to some final distance $r_f$ is given by the expression $-GM_em \left[\frac{1}{r_i} - \frac{1}{r_f} \right]$ or $\frac{GM_em}{r_f} - \frac{GM_em}{r_i}$; if $r_i = \infty$, the second becomes $0$, and the work done by gravity comes out to be positive. – Samama Fahim Mar 31 '16 at 22:00

Look at the work done by the object. The direction of force the object is exerting, $mg$, is towards the Earth and the direction of the objects motion is towards the Earth. Let's take this direction to be positive, then the work done by the object is given by integrating $d\vec{F}.d\vec{r}$ and it's positive. So the object does work (on the rocket) and as a result it's energy must decrease, which is of course exactly what happens because it's kinetic energy doesn't change and it's potential energy decreases.