# Why the work done is positive when bringing 2 opposite charges together?

We know that if the applied force is in the direction of the displacement then work done is positive, but in case of bringing 2 opposite charges from infinite to a certain distance, the work done is negative even though the force and the displacement of the charge is in the same direction.

From mathematical point of view, it says the applied force is positive here and the $$dr$$ is negative here, but what's the physical significance of the sign here? And if so when can we say that the applied force is positive or negative(in case of bringing two same charges together)?

• $W=\vec{F}\cdot\Delta \vec{x}$ ... but what is $\vec{F}$? The electrostatic force between the two charges, or the force that is (somehow) pushing the charges? Commented May 19, 2019 at 19:38

It is a matter of who is doing the work. We are often interested in experiments where the work is done by the experimenter. In the case that you are mentioning, the experimenter has to apply force against the force of repulsion between the particles to bring two positively charged objects at a finite distance. Therefore the direction of the force of the experimenter is the same as the direction of the displacement and therefore the work done is positive. Reverse holds for the oppositely charged particles. The particles are trying to pull each other together and the experimenter has to apply force to keep them at a finite distance. Therefore the direction of force and displacement wrt to the experimenter is opposite.

"we know that if the applied force is in the direction of the displacement then work done is positive.But in case of bringing 2 opposite charges from infinite to a certain distance,the work done is negative even the force and the displacement of the charge is in the same direction."

I think you are not considering the displacement as a vector- suppose one is at a position $$\mathbf{r}$$ and moves a unit positive charge towards the other positive charge; then his differential element is $$- \mathbf{dr}$$ (a decrement in r) so the work done, $$F dr$$, becomes equivalent to $$- \mathbf{F}\cdot \mathbf{dr}$$ and the angle between $$\mathbf{F}$$ and $$\mathbf{dr}$$ is $$\pi$$ as they are just opposite to each other.

Or, say, $$\mathbf{F}$$ is radially outward and $$\mathbf{dr}$$ is inward. In this case the work done

$$dw = - \mathbf{F} \cdot \mathbf{dr} = - |F| |dr| \cos(\pi) = |Fdr|,$$

which is a positive number.

Let us now take situation in which the unit positive charge is moved from $$\mathbf{r}$$ towards a negative charge , then again $$\mathbf{dr}$$ is a decrement in $$r$$ and its $$-\mathbf{dr}$$.

In this case the work done will be $$dw = - \mathbf{F} \cdot \mathbf{dr}$$, where $$\mathbf{F}$$ is now radially inward and $$\mathbf{dr}$$ is a decrement so thath the angle between them is zero.

Thereby $$W$$ will be negative and such negative work is being done by the field rather than the external agency.

• but the F is here represents the applied force and the displacement is in the same direction of the applied force, so how can be the angle between them is pi? Commented May 22, 2019 at 0:21
• @Hawkingo Suppose an external agent is slowly moving the unit charge from a point a to b inward and he is just holding the charge against the force F-outward then the angle between displacement and force should be pi... Commented May 22, 2019 at 10:56

Remember that work is defined as $$W=\vec{F}\cdot \vec{x}$$ so only the angle between force and displacement matters not the sign convention (in the one-dimensional case). $$dr$$ is negative means that $$r$$ is decreasing and the positive direction here is taken in the direction away from the other charge and the work done by an external force is considered so force and displacement are in opposite direction and hence the work done (by external agent) is negative.

In the end this depends on the context. Are you asking "How much work did the system do?" or are you asking "How much work was applied to the system?". The former is really only useful when your system is some kind of motor / energy source, where you are looking at (one form of) energy flowing into a different system. The latter framing is how we usually talk in pure physics considerations. The idea here is that the work should be positive when the energy in the system increases and negative when it decreases.

Let's adopt the latter convention and apply it to your example: We have one positive charge $$A$$ "nailed to" the origin of our coordinate system and a negative one, $$B$$, at infinity. We say that $$B$$ has the potential energy $$E_0 = 0\,\mathrm J$$. Since opposite charges attract, $$B$$ will naturally fall toward $$A$$, so its potential energy has to decrease to some negative value $$E_1$$ when being moved to a new position at a finite distance from $$A$$. The work you are looking for is just $$W = E_1$$ here (which is negative).

Remember that we are only considering transitions between static states of the system here, i.e. no kinetic energies. You could say we want to move $$B$$ towards $$A$$ at an infinitely small velocity. In order to do that, we have to work against the charge's natural drive to fall towards $$A$$, so the force "we" are applying is opposite to the direction of movement.

we know that if the applied force is in the direction of the displacement then work done is positive.But in case of bringing 2 opposite charges from infinite to a certain distance,the work done is negative even the force and the displacement of the charge is in the same direction.

What makes you think the work done is negative?

If the electric field is bringing opposite charges together the electric field is doing positive work on each causing each to lose potential energy and gain kinetic energy. The force the field applies to each charge is in the same direction as their displacement.

The gravity analogy is the gravitational field doing work on a falling object. The direction of the force of gravity is the same as the displacement and the object loses potential energy and gains an equal amount of kinetic energy.

On the other hand, if the charges are initially close together and you want to separate them (move them apart), then an external agent is needed to do work positive work to separate them applying a force equal in magnitude to the opposing electrical force (thus moving the charge at constant velocity). However at the same time the external force does positive work on the charges, the electric field does an equal amount of negative work taking the energy away from the charge and storing it as electrical potential energy in the charge/electric field system.

The gravity analogy is when you apply an upward force equal to gravity to raise an object a height $$h$$. You (the external agent) does positive work on the object while gravity does an equal amount of negative work (the force of gravity being opposite to the displacement), taking the energy away from the object and storing it as gravitational potential energy of the object/earth system.

Hope this helps.

Assume that you have two point charges $$1$$ and $$2$$ and the force on charge $$2$$ due to charge $$1$$ is $$\vec F(r)_{\text{2 due to 1}} = F(r) _{\text{2 due to 1}}\,\hat r$$ where $$F(r)_{\text{2 due to 1}}$$ is the component of the force in the $$\hat r$$ direction, pointing away from charge $$1$$.

To move charge $$2$$ an external force $$\vec F(r)_{\rm external} = F(r)_{\rm external} \,\hat r$$ must be applied where $$\vec F(r)_{\rm external} + \vec F(r)_{\text{1 due to 2}}=0 \Rightarrow F(r)_{\rm external} = -F(r)_{\text{1 due to 2}}$$.

Suppose that the external force causes a small displacement of charge $$2$$ equal to $$\Delta \vec r = (r_{\rm final} - r_{\rm initial})\,\hat r$$

The work done by the external force is approximately equal to

$$\vec F_{\rm external}(r_{\rm initial}) \cdot \Delta \vec r = F_{\rm external}(r_{\rm initial}) \hat r \cdot (r_{\rm final} - r_{\rm initial})\,\hat r = F_{\rm external}(r_{\rm initial}) \times (r_{\rm final} - r_{\rm initial})$$

This a general result and has made no assumption about the sign of the charges and the displacement of charge $$2$$.

If the two charges are both positive then $$F_{\rm external}(r_{\rm initial})$$ is negative.
Bringing charge $$2$$ closer to charge $$1$$ means that $$r_{\rm final} < r_{\rm initial}$$ and so $$r_{\rm final} - r_{\rm initial}$$ is negative.

So the work done is the product of two negative quantities ie positive.

With the external force being a function of position the work done can be written as

$$\int^{r_{final}}_{r_{\rm initial}} \vec F(r)_{\rm external} \cdot d\vec r = \int^{r_{final}}_{r_{\rm initial}} F(r)_{\rm external}\,\hat r \cdot dr \,\hat r = \int^{r_{final}}_{r_{\rm initial}} F(r)_{\rm external}\, dr$$

with the sign of $$dr$$ being dictated by the limits of integration.

Within this site there are a number of questions about using the integral to find the work done and getting the wrong sign for the answer.
Almost all the errors are due to using $$-dr$$ instead of $$dr$$ within the integral and/or including $$\cos \pi$$ when evaluating the dot product, eg link 1, link 2, etc.