Electrostatics: Understanding this "Work Done" Line Integral Question

Just to emphasize. This has nothing to do with electrostatics. The maths you need to understand is that for any vector:

##\int_a^b \vec v \cdot d \vec r = - \int_b^a \vec v \cdot d \vec r = \int_b^a -\vec v \cdot d \vec r ##

Where, as previously explained we are keeping the same direction of ##d \vec r## throughout.

If you change the direction of ##d \vec r##, I.e. ##\vec r## points from ##b## to ##a## then that changes the sign again.

So I understand this bit. Perhaps I should rephrase my misunderstanding in a clearer way.

So we will end up with $Work = \int_{R}^{\infty} \vec F_{elec} \cdot d \vec r$, right? My question is then: how do we reconcile/ deal with the fact that $\vec F_{elec}$ is in the opposite direction to $d \vec r$ (because we have started out by defining $d \vec r$ inwards)? If we were to treat it as such, then we would end up with $Work = \frac{-Qq}{4 \pi \epsilon_{0} R}$

haruspex
Homework Helper
Gold Member
Where, as previously explained we are keeping the same direction of ##d \vec r## throughout.
There may be scope for ambiguity here. There's keeping the direction of the vector ##d\vec r## constant, and there's keeping constant the direction defined as positive for it.

Viewing the integral as an ordered sum, each ##d \vec r## is a step along the path from the lower bound to the upper bound. If the direction from R to ∞ is defined as positive, and R is the lower bound, then each ##d \vec r## is a positive step. If we reverse the bounds then we are stepping from ∞ to R, so each vector element is a negative step.

because we have started out by defining ##d \vec r ## inwards
Following my reasoning above, setting the lower bound as R and the upper as infinity determines that ##d \vec r ## is outwards.

PeroK
Homework Helper
Gold Member
2021 Award
There is scope for ambiguity. First, we need to define the path in each case. Here, I took ##\infty## and ##R## to be points in space.

If we define ##d \vec r## as inwards, then when we move to the scalar integral parametreised by ##r, dr## there's another negative factor introduced.

That may be where the OP is going wrong by moving from the generic vector integral to a specific parameterisation.

If we then take ##\infty## and ##R## not to represent points in space but to represent values of a specific parameter ##r##, then it should all work out.

That might be the problem.

That's interesting. In the Lewin text there is an inherent ambiguity. A vector integral with parameterised bounds.

That looks like another twist to this.

PeroK
Homework Helper
Gold Member
2021 Award
So I understand this bit. Perhaps I should rephrase my misunderstanding in a clearer way.

So we will end up with $Work = \int_{R}^{\infty} \vec F_{elec} \cdot d \vec r$, right? My question is then: how do we reconcile/ deal with the fact that $\vec F_{elec}$ is in the opposite direction to $d \vec r$ (because we have started out by defining $d \vec r$ inwards)? If we were to treat it as such, then we would end up with $Work = \frac{-Qq}{4 \pi \epsilon_{0} R}$

If you are using ##\vec r## as the vector from the origin, then this is different from using ##d \vec r## as the inwards line element.

Swapping between them could be the root of your problem.

PeroK
Homework Helper
Gold Member
2021 Award
PS with ##d \vec r## inwards we have the following:
##\int_{\infty}^R \vec{F} \cdot d \vec r = \int_{-\infty}^{-R} F dr##

Where, in the first integral the bounds represent points in space and in the second the bounds represent the parameter ##r##. Might be even better to use a different letter.

So, Lewins notation is a typical physicist's hybrid.

Sorry, I didn't notice this twist before if you parameterise the line integral.

And, of course, you can't Express the electrostatic force with ##r## in this case. You need to transform to a new parameter representing the distance from the central charge.

There may be scope for ambiguity here. There's keeping the direction of the vector ##d\vec r## constant, and there's keeping constant the direction defined as positive for it.

Viewing the integral as an ordered sum, each ##d \vec r## is a step along the path from the lower bound to the upper bound. If the direction from R to ∞ is defined as positive, and R is the lower bound, then each ##d \vec r## is a positive step. If we reverse the bounds then we are stepping from ∞ to R, so each vector element is a negative step.

Following my reasoning above, setting the lower bound as R and the upper as infinity determines that ##d \vec r ## is outwards.

Okay, I think this makes more sense to me now. To see if I am understanding what you mean: I should keep the $d \vec r$ vector pointing in the same way as the parameter r increases (i.e. outwards)?

If you are using ##\vec r## as the vector from the origin, then this is different from using ##d \vec r## as the inwards line element.

Swapping between them could be the root of your problem.

Is this also true for general line integrals? For example, if we want to integrate along a path, parameterized by $p$, then we ought to have $dp$ in the direction of (or tangential to the path at that point) of p increasing regardless of which direction we want to go (from high to low p or vice versa)?

kuruman
Homework Helper
Gold Member
2021 Award
All this confusion can be avoided by following this procedure when doing line integrals.
1. Write the field vector in the coordinate system of your choice using unit vector notation.
Here, ##\vec E=\frac{kQ}{r^2}~\hat r##
2. Write the element ##d\vec l## in standard unit vector notation ignoring the path direction. The convention is that ##d(something)## is positive when the ##(something)## is increasing.
Here, ##d\vec l=dr~\hat r##. In Cartesian coordinates it will always be ##d\vec l=dx~\hat x+dy~\hat y+dz~\hat z##.
3. Take the the dot product as suggested by the integrand.
Here, ##\vec E \cdot d\vec l=\frac{kQ}{r^2}~\hat r \cdot (dr~\hat r)=\frac{kQ}{r^2}dr##.
4. Integrate using the starting point as the lower limit and the end point as the upper limit. The limits define the sign of the integral.

If you follow this procedure, you cannot go wrong because it's based on the formal definition of the inner product and not on the ##AB\cos\theta## thing.

Last edited:
• Master1022 and PeroK