# 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 Nov 10, 2013 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. Mar 31, 2016 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.
• @John Rennie Could you please explain this doubt? There are two objects and if I consider just one of them as my system, then the gravitational pull of the other does work on the object chosen as system. Let’s say the initial separation is $r_1$ and final separation is $r_2$, then work done by pull of other object on chosen object is $\int_{r_1}^{r_2}\frac{Gm_1m_2}{r^2}dr$. This actually comes out to be $Gm_1m_2(\frac{1}{r_1}-\frac{1}{r_2})$, which is negative. What have I done wrong? Apr 23, 2020 at 6:11