# Electrostatic Potential Energy Derivation

How is the boxed step , physically as well as mathematically justified and correct ?

As work done = $- \Delta U$. for Conservative force and it shouldn't matter whether we take $ds$ or $-dr$ ?

And when $dr$ is just a notation to specify the variable and the real thing behind it , is a limit , why is it that $dr$ is so important here .

What is wrong here ?

\newcommand{\newln}{\\&\quad\quad{}} \begin{align}&\int^{r_b}_{r_a}\mathbf{\vec{F}}\cdot d\mathbf{\vec{r}}=-(U_a-U_b) \newln \Rightarrow \int^{r}_{\infty}\mathbf{\vec{F}}\cdot d\mathbf{\vec{r}}=-(U_r-U_\infty) \newln \Rightarrow \int^{r}_{\infty}\mathbf{\vec{F}}\cdot d\mathbf{\vec{r}} =-U_r ~~~~~~~ [U_\infty = 0], \cos\theta=-1 , \vec{A} \cdot \vec{B}=|A||B|\cos\theta\newln \Rightarrow -\int^{r}_{\infty}k\cdot\frac{q.q_o}{r^2}dr=-U_r ~~~~~~~ [\textrm{Coulomb's Law}]\newln \Rightarrow kq\cdot q_o\int^{r}_{\infty}\frac{1}{r^2}dr=U_r\newln \Rightarrow kq\cdot q_o\left[\frac{-1}{r} \right]^r_\infty=U_r\newln\Rightarrow \frac{-kq.q_o}{r}=U_r\newln \Rightarrow U_r=-\frac{kq.q_o}{r} \end{align}

-
Next time, please edit the post, don't re post. People will upvote, taking away the downvotes. –  Manishearth Apr 26 '13 at 9:10
Possible duplicate: physics.stackexchange.com/q/62262/2451 –  Qmechanic Apr 26 '13 at 10:25
@Qmechanic: Exact duplicate in math.SE with acceptance.Nonagon what do you want now with this bounty? –  ABC Apr 28 '13 at 13:59
Yes it's a good thought. It may bring some attention.I myself don't really prefer going into $\pm$ in solving. Just get the magnitude and see the direction later physically. –  ABC Apr 28 '13 at 17:06
@nonagon: well u can't do that , next bounty must be atleast double the previous one. –  ABC Apr 29 '13 at 15:57

When you calculate work, you do so along a given path. Here, that path has tangent vector $d\mathbf s$. This is a vector with direction; the minus sign will ultimately come from choosing the path's orientation--inward or outward.

Edit: Aha, I think I've found the unintuitive part. The key is in the use of the coordinate $r$ to parameterize the path, in that $r$ is larger at the start of the path and smaller at the end. This runs counter to what you would usually do when parameterizing such a path with an arbitrary parameter.

Let $\mathbf s_0$ and $\mathbf s_1$ be the starting and ending points of a path $\mathbf s(\lambda) = \mathbf s_0 + (\mathbf s_1 -\mathbf s_0)\lambda$. The work integral is then

$$W = \int_{\mathbf s_0}^{\mathbf s_1} \mathbf F(\mathbf s) \cdot d\mathbf s= \int_0^1 \mathbf F(\mathbf s(\lambda)) \cdot \frac{d\mathbf s}{d\lambda} \, d\lambda = \int_0^1 \mathbf F (\mathbf s(\lambda))\cdot (\mathbf s_1 - \mathbf s_0) \, d\lambda$$

For two finite points, the basic approach is sound, but it breaks down when you have a point at infinity involved. This is the reason that the problem of assembling a configuration is usually attacked with a different basic parameterization.

Instead, set $\mathbf s(\lambda) = \lambda \hat{\mathbf a}$ for some unit vector $\hat{\mathbf a}$ and set the bounds of the integral as being from $[\infty, R)$. This is the important point: even though the path is being traversed coming in from infinity, the parameterization means that $d\mathbf s/d\lambda = + \hat{\mathbf a}$, not minus as I originally thought. The path's still oriented outward; we're just traversing it backwards.

Here's how that integral looks:

$$W = \int_{\infty}^R \mathbf F(\lambda \hat{\mathbf a}) \cdot \hat{\mathbf a} \, d\lambda$$

Of course, we know the expression for the electric force:

$$\mathbf F(\mathbf r) = k\frac{qq_0 \mathbf r}{|r|^3}$$

Plug in $\mathbf r = \lambda \hat{\mathbf a}$ to get

$$\mathbf F(\lambda \hat{\mathbf a}) = k \frac{qq_0 \lambda \hat{\mathbf a}}{\lambda^3} = k \frac{q q_0 \hat{\mathbf a}}{\lambda^2}$$

We find that the integrand is then

$$W = \int_{\infty}^R k \frac{q q_0}{\lambda^2} \hat{\mathbf a} \cdot \hat{\mathbf a} \, d\lambda = \int_\infty^R k \frac{q q_0}{\lambda^2} \, d\lambda = - k \frac{q q_0}{R} < 0$$

The work is negative, so the change in potential energy $\Delta U = - W$ is positive as required.

So where is the problem then? As we've seen, there actually shouldn't be an extra negative sign coming in on line 4 (as posted in the OP's question). This is somewhat obscured because an explicit parameterization of the path is never written down in the first place--usually, you don't have to, but this problem is tricky enough that it helps immensely.

-
Work done is $A.B$ = $|A| |B| \cos\theta$ . Now work is $|F|=|\frac{kq_1q_2}{r^2}|$ & $|ds|=|dr|$. $\cos\theta = 1$ from $\infty$ to $r$ is $= U_r$. , do this , you'll get a unnecessary minus sign . Did I do something wrong here ? I just followed definitions . –  nonagon Apr 29 '13 at 5:30
Also But definition of work doesn't care about position vectors , just displacement , and it is just that $−\Delta U=W_{cons}.$ , this is the only definiton I know , can this whole derivation not be based on just this and that PE at ∞ is $0$ –  nonagon Apr 29 '13 at 5:35
$\cos \theta = -1$, not $+1$, from $\infty$ to $r$. This is an important point. Work cares about only displacements, yes; here $dr$ is not being used in the sense of talking about positions, but rather an infinitesimal displacement along a given curve. We're saying that everywhere along our curve coming in from infinity, the direction of the curve is radial. This is meaningful and important. –  Muphrid Apr 29 '13 at 5:37
I have edited my problem as this is the trouble that I am facing now . –  nonagon Apr 29 '13 at 13:53
@nonagon I've edited and corrected this answer. I was initially incorrect, and I think this should explain things. –  Muphrid Apr 29 '13 at 15:50

$\mathbf{r}$ is a position vector and $\mathbf{s}$ is a displacement vector between two points, let say A and B. In general case, they are not equal, but they can be if we properly choose the origin of the coordinate system: A={0,0,0} or B={0,0,0} The sign depends on at which point A or B the origin is placed.

-
But definition of work doesn't care about position vectors , just displacement , and it is just that $-\Delta U = W_{cons.}$ , this is the only definiton I know , can this whole derivation not be based on just this and that PE at $\infty$ is $0$ –  nonagon Apr 26 '13 at 9:19
That is true, the work is related to displacement. The potential energy however is not an absolute value, it can be measured according to some reference point only. –  freude Apr 26 '13 at 9:28
So , how is this step justified ? Both mathematically and physically , why replace $ds$ by $-dr$ ? –  nonagon Apr 26 '13 at 9:29
Let us try to think ex adverso. Why (when) can't we replace $ds$ by $-dr$? –  freude Apr 26 '13 at 10:49
I can't understand this point –  nonagon Apr 28 '13 at 9:06

$$\mbox{d}\vec s = \mbox{d}r$$

Edit: sorry for the error where I forgot to put the magnitude sign. I did mean the magnitude sign.

$$\| \mbox{d}\vec s\| = \mbox{d}r$$

Therefore,

$$\vec F\cdot \mbox{d}\vec s= F\mbox{ d}r\mbox{ }\cos\theta=F\mbox{ d}r\mbox{ }\cos\pi=-F\mbox{ d}r$$

-
If I do what you've written , I get a minus sign . –  nonagon Apr 29 '13 at 5:32
vector = scalar is an automatic no-no. –  Emilio Pisanty Apr 29 '13 at 10:05
@EmilioPisanty He means to write it in terms of magnitude , it is a typo . –  nonagon Apr 29 '13 at 10:17
Then one needs to write it in terms of magnitude - or in terms of signed components, using a dot product, which is quite different. Either way, the mistype actively detracts from the understanding of the topic and only leads to further confusion. Notation matters! –  Emilio Pisanty Apr 29 '13 at 16:25

Just to be clear, the potential energy of a particle of charge $q_2$ at a distance $r$ from a source of potential (supposidely at zero) of charge $q_1$ is the work that an external operator has to provide to bring the particle from infinity to $r$ at constant velocity. This reads then:

$\int_{\infty}^r \vec{F}_{op}\cdot \vec{ds}$

As people have said, the only part of $\vec{ds}$ that will contribute to the work is the radial one in our case and since we go from infinity to $r$ then $\vec{ds}\cdot \hat{u}_r = dr$ (this was my mistake before...the integral boundaries are already taking into account the fact that I am going backward, convention in integral calculations have been made this way).

Now, $\vec{F}_{op}$ has to exactly oppose the force exerted by the source charge on our particle otherwise the constant velocity constraint won't be satisfy. We thus have:

$\vec{F}_{op} = -\frac{q_1q_2}{4 \pi \epsilon_0 r^2}\hat{u}_r$

When I consider the scalar product of the force generated by the external operator and the working direction along the path, I end up with:

$U(r)-U(\infty) = -\int_{\infty}^{r} dr' \:\frac{q_1q_2}{4 \pi \epsilon_0 r'^2}= \frac{q_1q_2}{4 \pi \epsilon_0 r}$

-
$- \Delta U = W_{conservative force}$ , isn't it ? –  nonagon Apr 29 '13 at 11:15
yes but that's right but it just that I find this convension more intelligible when formulated as $\Delta U = W_{op}$ because this is what happens in real life. If I want to lift an object from the ground, gravity will generate a negative work while I will have to provide a positive work and therefore give energy to the system. In this practical example, I am an external operator doing something to the system under study. (Note that I had made a mistake in my reply and edited it in consequence). –  gatsu Apr 29 '13 at 13:35
F opposing and displacement are in same direction , not opposite . you included a - sign. why ? –  nonagon Apr 29 '13 at 13:37
I have edited my problem as this is the trouble that I am facing now . –  nonagon Apr 29 '13 at 13:53
I didn't include a minus sign. I just think it is wrong to say something like $\vec{ds}=-dr \hat{u}_r$ and not change anything at the boundaries of the integral. Integral calculus is made in such a way that $\int_{A}^B = -\int_{B}^A$. So the minus sign is already there but hidden in the maths of integral calculus. If you descretize your integral you will see that what I am saying is pretty clear. –  gatsu Apr 29 '13 at 14:10

New version

The problem in your demonstration is when you write down $\vec{A}\cdot\vec{B} = ||\vec{A}||\,||\vec{B}||\,\cos\theta$. More exactly, in your case $||d\vec{r}||\neq dr$ because $dr<0$ when you go from $\infty$ to $r$ and a norm is positive by definition. So the sign error is introduced from 3rd to 4th line.

Old version

The demonstration on wikipedia is ill-defined on several places. In particular, when they note

$$\vec{F}\cdot d\vec{s} = |F|\,|ds|\,\cos(\pi) = -F\,ds$$

the writer is assuming that $ds>0$ and also $F=qQ/(4\pi\varepsilon_0r^2)>0$, the latter being wrong in the cases where $qQ<0$, that is the two charges have different signs... Whereas it needs a negative $dr$ in the next section because it's coming from the infinity which cause you so much trouble.

Anyway, let's do it right. The electrical force is written in spherical coordinates $(r,\theta,\varphi)$ in base $(\vec{e_r},\vec{e_\theta},\vec{e_\varphi})$ as $$\vec{F} = \frac{Qq}{4\pi\varepsilon_0\,r^2}\,\vec{e_r}$$

In those coordinates, the elementary displacement would be $$d\vec{s} = dr\,\vec{e_r} + rd\theta\,\vec{e_\theta} + r\sin\theta\,d\varphi\,\vec{e_\varphi}$$

where $dr$, $d\theta$ and $d\varphi$ could be positive or negative depending where you would like to go. Thus, the dot product gives $$\vec{F}\cdot d\vec{s} = \frac{Qq}{4\pi\varepsilon_0\,r^2}\,\vec{e_r} \cdot (dr\,\vec{e_r} + rd\theta\,\vec{e_\theta} + r\sin\theta\,d\varphi\,\vec{e_\varphi}) = \frac{Qq}{4\pi\varepsilon_0\,r^2}\,dr$$ which was what you were looking for. You can then integrate as specified.

-
I have edited my problem as this is the trouble that I am facing now . –  nonagon Apr 29 '13 at 13:54
@nonagon I have edited my answer: is it good for you ? –  JJ Fleck Apr 29 '13 at 14:10
$||d\vec{r}||\neq dr$, please elaborate this . –  nonagon Apr 29 '13 at 14:11
The negativity of 'dr' got included when I did the dot product . –  nonagon Apr 29 '13 at 14:21
@nonagon well: from $\infty$ to $r$, do you agree that the coordinate decreases ? Then $dr<0$. And as by definition $||d\vec{r}||>0$, you cannot have the above equality. It the same as picking a real $x$ negative ($x<0$) then it's absolute value is $|x|=-x$. for example $|-3.14159|=3.14159 = - (-3.14159)$ –  JJ Fleck Apr 29 '13 at 14:24

I think I've understood it now .

$ds=dr$ . but $dr<0$ and $|dr|=-dr$ Because dr is a small position vector and position vector is directed along field .

Now why I can't use ds directly is because the limits in the integral , (the upper and lower limit in integral notation) are in terms of position vector and not the displacement .

Had they been in terms of displacement vector , the limits would have been $0$ to $\infty - R$ (not trying to enter into debate about $\infty$, one can as well imagine coming from $1000$ m to $1$m, your displacement is $0$to $999$ , but in terms of integral in position vector, you will put limits as $1000$ to $1$ .

But they are from $\infty$ to $r$ , now simple use the dot product definition and the correct answer will follow .

Hence we used $\vec{r}$ , since integration wasn't possible in terms of $ds$ as you can't put appropriate integral limits .

Suppose it was even the case of an infinite sheet ,where force is constant everywhere, you could never still use the displacement vector directly as what limits you will put in the integral then, so you've to express displacement in terms of position vectors here , it is must .

So in the end thr problem is you can't choose origin at infinity . And rest follows from the correct answer by JJ Fleck

-
SO the derivation at wiki is correct , it just doesn't give you all the details and why you can't integrate without the position vector because you simply can't evaluate the integral that way . –  nonagon Apr 29 '13 at 18:05
And there are some of the answers which hint towards these things , but I failed to deduce them ,sorry . So please comment here , if this was what you meant or if there are still flaws in my understanding . –  nonagon Apr 29 '13 at 18:06
I guess we're saying the same thing in that sense. If it weren't a point where $r \to \infty$, you could reverse the path's direction by changing the coordinate's sign, calling the other endpoint zero, and going from there, but yeah, you can't do that with infinity, so they have to do some gymnastics to get the same result. Still, I disagree with the statement $ds = -dr$. To me, the limits take care of things--trying to put a minus in the derivative leads to the double counting we've struggled with in this problem. –  Muphrid Apr 29 '13 at 19:02
I don't know what you mean. I worked the problem in my answer exactly with $d\mathbf s = + d\mathbf r$. –  Muphrid Apr 29 '13 at 20:39
I agree with Muphrid, $ds=-dr$ first does not make sense and second it gives back exactly the original problem. As I said earlier the direction of the path is already accounted for by the integral boundaries. You can split your integral $\int_{\infty}^r$ dr into discrete intevals of size $\Delta r$ via the sum rule $\int_{\infty}^r dr = \int_{\infty}^{\infty-\Delta r} dr +...+\int_{r+\Delta r}^r dr$. You will realize that each integral is $-\Delta r$ and not $\Delta r$ because the path is already specified in the limits of integration [to be continued ]. –  gatsu May 1 '13 at 8:43