1. Aug 18, 2016

### Prem1998

Hi, I was deriving an expression for the work done by gravitational force of an object in moving another object from infinity to a distance 'r' from it. I think it should be positive valued because since displacement in this case is in the direction of the gravitational force, so work done by gravity must be positive. But why am I getting a negative valued expression as follows?:
Suppose the masses of the two objects A and B are 'M' and 'm'. Then gravitational force between them when located at a distance 'x' is:
F=GMm/R^2,
suppose B is moved by this force by a small distance dx, then work done by F is:
dW= (GMm/R^2)*dx*cos0 (because dx is in the direction of F)
= (GMm/R^2)*dx
therefore net work done in moving B from infinity to 'r' is:
W= integration[(GMm/R^2)*dx] with upper limit r and lower limit infinity,
= GMm* [-1/R] from infinity to r
= GMm* [-1/r-(-1/infinity)]
= GMm* [-1/r+0]
= -GMm/r
So, why am I getting negative value of work done by gravity even when displacement is in the direction of force?

2. Aug 18, 2016

### jbriggs444

You are integrating a positive quantity over a range where the initial value is greater than the final value. Of course you are going to get a negative result.

Gravity points inward. Its sign is negative. Multiply it by a positive dx and you should get a negative quantity. Let the fact that you are integrating with inverted endpoints take care of the resulting sign problem for you.

3. Aug 18, 2016

### Staff: Mentor

Here is the problem. Note that according to this expression F is not a function of x. If you were to write the force in terms of x then it would be F=-GMm/x^2 because F points in the opposite direction of increasing x.

4. Aug 18, 2016

### lychette

something else that may help you get to grips with this aspect of physics:- lifting an object increases its potential energy, therefore it has maximum potential energy when it is lifted to infinity.
This is true for all masses so it makes some sense to agree that the zero of potential energy is
at infinity. This means that all values of potential energy are negative.
The potential at the Earths surface is -63 Mj/kg which means that 63Mj of energy must be supplied to each kg to lift it to infinity (escape from the Earth)