# Find the work done against the force

If there is a force $$\mathbf F(x)=ax\hat i$$ and an object is moving from $$x_2>0$$ to $$x_1>0$$ in the opposite direction of force. Then work could be calculated as follows

$$\int_{x_2}^{x_1} -F(x)\cdot\text dx$$

the negative sign is because the direction between $$\mathbf F(x)$$ and $$\text dx$$ are anti-parallel

$$-\int_{x_2}^{x_1} ax\cdot\text dx$$ $$-a(\frac{x_1^2-x_2^2}{2})$$

since $$x_1 < x_2$$, therefore $$x_1^2 so $$x_1^2-x_2^2 < 0$$ and $$-a(\frac{x_1^2-x_2^2}{2})>0$$

So my calculation shows that the work done in going against the force is positive, which is absolutely wrong.

the negative sign is because the direction between $$\mathbf F(x)$$ and $$\text dx$$ are anti-parallel

Here is the mistake. Your issue is in putting the negative sign into your integral. If $$x_2>x_1$$, then the sign of $$\text d x$$ is already negative. You don't need to explicitly say what the sign of $$\text dx$$ is. The sign of the infinitesimal is encoded in the limits of integration. Therefore, the work done by the force is just $$\int_{x_2}^{x_1}F\cdot\text dx$$

Additionally I will point out a minor flaw in terminology. There is no "work done against a force". Your calculations are showing that you are just calculating the work done by your force. That is all it is. Forces do work, and the work done by a force does not depend on the presence of other forces (assuming you already know the path the object takes due to all forces acting on it). You don't need to add the complexity of saying doing "work against a force". It is confusing, because I thought you were interested in looking at the work you would have to do to move the object against this force, but this was not what you were looking at. It is much less confusing just to say "what is the work done by this force?"

You can either say work done by the force is $$\int_{x2}^{x1} F(x)dx$$ (as Aaron Stevens says, this is always correct regardless of the direction of motion), or equivalently you can say work done against the force is $$-\int_{x2}^{x1} F(x)dx$$. Since work done by the force is negative, then work done against the force is positive i.e. your answer is correct.

• I don't agree with the idea of "work against the force". Are you just defining it to be the negative of the work done by the force? – Aaron Stevens Jul 25 '19 at 15:33
• @AaronStevens Yes, If you lift a weight you do work against gravity. If you compress a spring you do work against the spring. If you compress gas with a piston you do work against the pressure of the gas. In each case the work done against the opposing force is positive, and results in an increase in potential energy (although some of the energy may also be dissipated as heat). – gandalf61 Jul 25 '19 at 15:42
• But just because you apply a force against another force does not mean the work done by you is equal but opposite of the work done by that force. Additionally should we say that as we push something down we do work along gravity? What about pushing a block sideways, should we say we do work perpendicular to gravity? Work is a scalar, and adding onto it other qualifiers just makes things confusing. – Aaron Stevens Jul 25 '19 at 15:44
• @AaronStevens Yes, the work done by you will not be the same as the work done against the opposing force, but sometimes the work done against the opposing force is a more useful quantity, Imagine you are pushing a block up a rough slope. The total work done by you will be difficult to calculate and much of that energy will be dissipated as heat. But a more useful quantity is the part of this energy that is recoverable, which we call potential energy. This is the work that you do against gravity - or, alternatively, it is the negative of the work done by gravity on the block. – gandalf61 Jul 25 '19 at 16:16
• I guess you can talk about it in that way if you want to, but I just think it is an unnecessary terminology. Objects move along some path based on the forces acting on it (and initial conditions). When you go to find the work done by any one of those forces along this path you don't need to consider other forces. Forces just do work. – Aaron Stevens Jul 25 '19 at 16:22