Electrostatics: Understanding this "Work Done" Line Integral Question

In summary, the work done from getting from point A to B is given by: \int_{a}^{b} \vec F \cdot d\vec r .However, within the context of electric fields, when we define electrostatic potential energy, we define it as the work that WE need to do in order to bring the test charge from infinity to a given point in space, thus leading to this expression: \int_{\infty}^{R} \vec F_{me} \cdot d\vec r
  • #1
Master1022
611
117
Homework Statement
What is the work done when bringing a test charge of +q from infinity to a distance R from the centre of a charge +Q (where R > radius r of charge +Q)?
Relevant Equations
[itex] Work = \int_{a}^{b} \vec F \cdot d\vec r [/itex]
I have a quick question about the work done concept here, especially the line integral part of it. So I understand the fact that the work done from getting from point A to B is: [itex] \int_{a}^{b} \vec F \cdot d\vec r [/itex].

However, within the context of electric fields, when we define electrostatic potential energy, we define it as the work that WE need to do in order to bring the test charge from infinity to a given point in space, thus leading to this expression: [itex] \int_{\infty}^{R} \vec F_{me} \cdot d\vec r [/itex] where [itex] \vec F_{me} = - \vec F_{elec} [/itex] and [itex] d \vec r [/itex] was along a given path between infinity and R (and directed from infinity to R)?

In an online lecture by Walter Lewin (MIT OCW Electricity and Magnetism 8.02x Lecture 4 @ around 3:20), he says that this our definition of electrostatic potential energy is also equal to [itex] \int_{R}^{\infty} \vec F_{elec} \cdot d\vec r [/itex]. I assumed that [itex] d \vec r [/itex] was along any different path to the one defined above and was direction FROM R to infinity.

However, why does this not seem to be the case?

For example, when I evaluate the first expression, I would guess that [itex] \vec F_{me} \cdot d\vec r = \vec F_{me} d \vec r = \frac{Qq}{4 \pi \epsilon_{0} r^2} [/itex]. Then evaluating that integral leads to [itex] \frac{-Qq}{4 \pi \epsilon_{0} R} [/itex], which is not what is supposed to be the answer...

Here are my thoughts on where things have gone wrong. I thought my dot product evaluation is correct. However, that would mean the error lies in the definition of [itex] d \vec r [/itex], which I thought should some be some arbitrary vector along any given path of my choice. If we define [itex] d \vec r [/itex] pointing radially outwards from +Q, then both integrals yield the same result, but I am not sure that is really correct, or whether that has just managed to get the required -ve sign where it ought to be.

I would appreciate any help in resolving this problem.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Master1022 said:
If we define ##d \vec r## pointing radially outwards
You have chosen to integrate from infinity to R. Your element ##d \vec r## therefore points that way.
 
  • #3
haruspex said:
You have chosen to integrate from infinity to R. Your element ##d \vec r## therefore points that way.

Thank you for your response. So where is the integral going wrong then? If [itex] d \vec r [/itex] is pointing as you say (which I agree with), then we are still missing a -ve sign. However, I don't see how this can drop out of the dot product or any other place in the problem
 
  • #4
Master1022 said:
then we are still missing a -ve sign.
No, it means the ##d\vec r## and ##\vec F## vectors are pointing in opposite directions, so the dot product is negative.
 
  • #5
haruspex said:
No, it means the ##d\vec r## and ##\vec F## vectors are pointing in opposite directions, so the dot product is negative.
I thought we were talking about [itex] \vec F_{me} = - \vec F_{elec}[/itex] which would be pointing radially inwards here, thus being parallel to the [itex] d \vec r [/itex] vector?
 
  • #6
Master1022 said:
I thought we were talking about [itex] \vec F_{me} = - \vec F_{elec}[/itex] which would be pointing radially inwards here, thus being parallel to the [itex] d \vec r [/itex] vector?
There are actually three things that affect the sign of your integral: the direction of the force; the direction of your line element; and, the order of the limits on your integral. If you change the direction of your line element and swap the end points of your path, then these changes cancel out.
 
  • #7
Master1022 said:
I thought we were talking about [itex] \vec F_{me} = - \vec F_{elec}[/itex] which would be pointing radially inwards here, thus being parallel to the [itex] d \vec r [/itex] vector?
In that case the dot product would be positive, as desired.
 
  • #8
haruspex said:
In that case the dot product would be positive, as desired.
Perhaps I am missing something, but surely if the integral was [itex] \int_{\infty}^{R} \frac{Qq}{4 \pi \epsilon_{0} r^2} dr [/itex], then it would come out as [itex] \frac{-Qq}{4 \pi \epsilon_{0} R} [/itex]?
 
  • #9
haruspex said:
You have chosen to integrate from infinity to R. Your element ##d \vec r## therefore points that way.
Just to add to this. Lewin has chosen to keep ##d \vec r## pointing inward, along the path of the particle, but has swapped the limits.

I must admit, I find this a bit confusing as well. To expand this, keeping tge direction of ##d \vec r## constant:

##\int_{\infty}^R F_m dr = - \int_{\infty}^R F_e dr = \int_{R}^{\infty} F_e dr##

I dropped the vector signs as I'm on my phone.
 
  • #10
Master1022 said:
Perhaps I am missing something, but surely if the integral was [itex] \int_{\infty}^{R} \frac{Qq}{4 \pi \epsilon_{0} r^2} dr [/itex], then it would come out as [itex] \frac{-Qq}{4 \pi \epsilon_{0} R} [/itex]?

See above. Swapping the limits of the integral changes its sign back.
 
  • #11
PeroK said:
Just to add to this. Lewin has chosen to keep ##d \vec r## pointing inward, along the path of the particle, but has swapped the limits.

I must admit, I find this a bit confusing as well. To expand this, keeping ##d \vec r## constant:

##\int_{\infty}^R F_m dr = - \int_{\infty}^R F_e dr = \int_{R}^{\infty} F_e dr##

I dropped the vector signs as I'm on my phone.
This is what I thought previously, but then I thought that: [itex] \vec a \cdot \vec b = |a||b| \cos(\theta) [/itex], thus we would have [itex] |\vec F_{me}| = \vec F_{elec} [/itex], thus making the substitution between step 1 and 2 impossible..?

I am assuming that in step 1, you have done the dot product and then in step 2, you make the substitution from [itex] \vec F_{me} [/itex] to [itex] \vec F_{elec} [/itex]
 
  • #12
Master1022 said:
This is what I thought previously, but then I thought that: [itex] \vec a \cdot \vec b = |a||b| \cos(\theta) [/itex], thus we would have [itex] |\vec F_{me}| = \vec F_{elec} [/itex], thus making the substitution between step 1 and 2 impossible..?

I am assuming that in step 1, you have done the dot product and then in step 2, you make the substitution from [itex] \vec F_{me} [/itex] to [itex] \vec F_{elec} [/itex]
I don't understand that. It's nothing to do with the dot product, as such.

Your mistake I believe is that when you see the limits of an integral change you automatically change the direction of integration as well.

This can be confusing, and it's something to be careful of. Lewin swapped the limits as I have done, but kept a common definition/direction of ##dr##.
 
  • #13
##
Master1022 said:
This is what I thought previously, but then I thought that: [itex] \vec a \cdot \vec b = |a||b| \cos(\theta) [/itex], thus we would have [itex] |\vec F_{me}| = \vec F_{elec} [/itex], thus making the substitution between step 1 and 2 impossible..?

I am assuming that in step 1, you have done the dot product and then in step 2, you make the substitution from [itex] \vec F_{me} [/itex] to [itex] \vec F_{elec} [/itex]
##F_m = -F_e##

Why would that ever be an "impossible substitution"?
 
  • #14
PeroK said:
##

##F_m = -F_e##

Why would that ever be an "impossible substitution"?

I thought we had to take the magnitude of the two vectors when evaluating the dot product? Thus [itex] |\vec F_{me} | = \vec F_{elec} [/itex]

Also, thank you for responding. I do appreciate the help!
 
  • #15
PeroK said:
I don't understand that. It's nothing to do with the dot product, as such.

Perhaps I am wrong, but this is what I think:
[tex] Work = \int_{\infty}^{R} \vec F_{me} \cdot d \vec r = \int_{\infty}^{R} |\vec F_{me}||d \vec r|\cos(0) [/tex]

But this way of thinking seems to lead to an error...
 
  • #16
Master1022 said:
I thought we had to take the magnitude of the two vectors when evaluating the dot product? Thus [itex] |\vec F_{me} | = \vec F_{elec} [/itex]

Also, thank you for responding. I do appreciate the help!

I don't understand the issue. In general:

##(-\vec a) \cdot \vec b = - (\vec a \cdot \vec b)##
 
  • #17
Master1022 said:
Perhaps I am wrong, but this is what I think:
[tex] Work = \int_{\infty}^{R} \vec F_{me} \cdot d \vec r = \int_{\infty}^{R} |\vec F_{me}||d \vec r|\cos(0) [/tex]

But this way of thinking seems to lead to an error...
It shouldn't. That transforms the integral to a single variable integral in ##r##.

On this issue, please evaluate:

##\int_0^1 x dx##

And

##\int_1^0 x dx##
 
  • #18
PeroK said:
I don't understand the issue. In general:

##(-\vec a) \cdot \vec b = - (\vec a \cdot \vec b)##

I understand that, but I still don't see what I am missing:
so fast-forward me writing out everything out from the beginning...:
[tex] Work = \int_{\infty}^{R} \vec F_{me} \cdot d \vec r = \int_{\infty}^{R} (-\vec F_{elec}) \cdot d \vec r = \int_{\infty}^{R} -(\vec F_{elec} \cdot d \vec r) [/tex]

I am with you up to this point. However, as you said, we are keeping the definition of [itex] d \vec r [/itex] pointing radially inwards, so [itex] -(\vec F_{elec} \cdot d \vec r) = \vec F_{elec}d \vec r [/itex] (because they point in the opposite direction, dr inwards and Fe outwards), thus making the integral [tex] \int_{\infty}^{R} \vec F_{elec}d \vec r = \int_{\infty}^{R} \frac{Qq}{4 \pi \epsilon_{0} r^2} dr [/tex]

Irrespective of whether we swap the limits, that shouldn't change the result of the integral as we are just multiplying by -1 * -1 = 1...

PeroK said:
On this issue, please evaluate:

##\int_0^1 x dx##
And
##\int_1^0 x dx##

It is 0.5 for the former and -0.5 for the latter.
 
  • #19
Master1022 said:
I am with you up to this point. However, as you said, we are keeping the definition of [itex] d \vec r [/itex] pointing radially inwards, so [itex] -(\vec F_{elec} \cdot d \vec r) = \vec F_{elec}d \vec r [/itex]

Irrespective of whether we swap the limits, that shouldn't change the result

You can't just drop a minus sign!
 
  • #20
PeroK said:
You can't just drop a minus sign!
I wasn't dropping it, I was evaluating the dot product

NB. I don't mean for this to sound aggressive.
 
  • #21
Master1022 said:
I wasn't dropping it, I was evaluating the dot product

NB. I don't mean for this to sound aggressive.
Whatever you think you are doing it's effectively dropping a minus sign.
 
  • #22
PeroK said:
Whatever you think you are doing it's effectively dropping a minus sign.
I was just doing: [itex] -(\frac{Qq}{4 \pi \epsilon_{0} r^2} \vec r \cdot d \vec l) [/itex] where dl is opposite to dr... (can't find the unit vector symbol for r...). How would you evaluate that?

So that leads me back to thinking that Prof Lewin has actually defined [itex] d \vec r [/itex] outwards and that would be the only thing that makes sense and allows for the swap of limits and evaluation of the dot product to yield the correct answer. However, that then defies the intuition about the definition of a path [itex] d \vec l [/itex] in the integral (one would assume that it would be along a different path for both integrals, but this last point would mean that same path direction was used for both...)
 
  • #23
Master1022 said:
I was just doing: [itex] -(\frac{Qq}{4 \pi \epsilon_{0} r^2} \vec r \cdot d \vec l) [/itex] where dl is opposite to dr... (can't find the unit vector symbol for r...). How would you evaluate that?

So that leads me back to thinking that Prof Lewin has actually defined [itex] d \vec r [/itex] outwards and that would be the only thing that makes sense and allows for the swap of limits and evaluation of the dot product to yield the correct answer. However, that then defies the intuition about the definition of a path [itex] d \vec l [/itex] in the integral (one would assume that it would be along a different path for both integrals, but this last point would mean that same path direction was used for both...)
This is not correct. Your approach leads to an integral in ##dr## going from infinity to ##R##. If you evaluate that integral as you did for the ones in ##dx## I gave you then it also comes out.

If you redefine ## d \vec r## outwards then the integral clearly gets the wrong sign.
 
  • #24
Master1022 said:
I was just doing: [itex] -(\frac{Qq}{4 \pi \epsilon_{0} r^2} \vec r \cdot d \vec l) [/itex] where dl is opposite to dr... (can't find the unit vector symbol for r...). How would you evaluate that?

So that leads me back to thinking that Prof Lewin has actually defined [itex] d \vec r [/itex] outwards and that would be the only thing that makes sense and allows for the swap of limits and evaluation of the dot product to yield the correct answer. However, that then defies the intuition about the definition of a path [itex] d \vec l [/itex] in the integral (one would assume that it would be along a different path for both integrals, but this last point would mean that same path direction was used for both...)

See also post #6. If you change all three factors, then you change the integral by ##-1##. Lewin has changed two: the sign of the force and the order of the end points. This leaves the integral unchanged.
 
  • #25
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.
 
Last edited:
  • #26
PeroK said:
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 [itex] Work = \int_{R}^{\infty} \vec F_{elec} \cdot d \vec r [/itex], right? My question is then: how do we reconcile/ deal with the fact that [itex] \vec F_{elec} [/itex] is in the opposite direction to [itex] d \vec r [/itex] (because we have started out by defining [itex] d \vec r [/itex] inwards)? If we were to treat it as such, then we would end up with [itex] Work = \frac{-Qq}{4 \pi \epsilon_{0} R} [/itex]
 
  • #27
PeroK said:
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.

Master1022 said:
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.
 
  • #28
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.
 
  • #29
Master1022 said:
So I understand this bit. Perhaps I should rephrase my misunderstanding in a clearer way.

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

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.
 
  • #30
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.
 
  • #31
haruspex said:
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 [itex] d \vec r [/itex] vector pointing in the same way as the parameter r increases (i.e. outwards)?
PeroK said:
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.

Yes, thinking about this a bit more, that does seem to be the problem.

Is this also true for general line integrals? For example, if we want to integrate along a path, parameterized by [itex] p [/itex], then we ought to have [itex] dp [/itex] 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)?
 
  • #32
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:
  • Like
Likes Master1022 and PeroK

1. What is electrostatics and why is it important?

Electrostatics is the study of stationary electric charges and their interactions. It is important because it helps us understand how electric charges behave and how they can be manipulated for practical applications, such as in electronic devices.

2. What is a "work done" line integral in electrostatics?

A "work done" line integral in electrostatics is a mathematical tool used to calculate the work done by an electric field on a charged particle as it moves along a specific path. It takes into account the magnitude and direction of the electric field, as well as the distance and direction of the particle's movement.

3. How is a "work done" line integral calculated?

A "work done" line integral is calculated by multiplying the magnitude of the electric field by the component of the particle's displacement in the direction of the field. This is then integrated over the path of the particle's movement to get the total work done.

4. What is the significance of a "work done" line integral in electrostatics?

The "work done" line integral is significant because it allows us to determine the amount of work required to move a charged particle in an electric field. This can help us understand the behavior of electric charges and design more efficient electronic devices.

5. How does the direction of the path affect the "work done" line integral?

The direction of the path can affect the "work done" line integral because it determines the component of the particle's displacement in the direction of the electric field. If the path is perpendicular to the field, the work done will be zero. If the path is parallel to the field, the work done will be maximum.

Similar threads

  • Introductory Physics Homework Help
Replies
10
Views
196
  • Introductory Physics Homework Help
Replies
1
Views
162
  • Introductory Physics Homework Help
Replies
1
Views
138
  • Introductory Physics Homework Help
Replies
5
Views
591
  • Introductory Physics Homework Help
Replies
1
Views
360
  • Introductory Physics Homework Help
Replies
3
Views
156
  • Introductory Physics Homework Help
Replies
9
Views
933
  • Introductory Physics Homework Help
2
Replies
64
Views
2K
  • Introductory Physics Homework Help
Replies
3
Views
724
  • Introductory Physics Homework Help
Replies
15
Views
361
Back
Top