Suppose we want to find the electrostatic potential $$\phi_{0}$$, with reference to infinity, at $$r_{0}$$ resulting from a positive charge $$q$$ located at the origin. For simplicity, let us assume we are working in two dimensions.

By definition $$\phi _{0}$$ is the work per unit charge required to bring a positive test charge that is very far away to the vicinity of $$r_{0}$$.

$$\phi_{0}=\int_{\infty}^{r_{0}}-\textbf{E}\cdot\textbf{dl}$$

decomposing $$\textbf{dl}$$ into two orthogonal vectors $$\textbf{dl}=\textbf{dr}+\textbf{dr}_{\perp}$$

the integral becomes

$$\phi_{0}=\int_{\infty}^{r_{0}}-\textbf{E}\cdot \textbf{dr}$$ We define $$\hat{\textbf{r}}$$ as the unit vector pointing radially away from $$q$$. $$\textbf{E}$$ will be expressed as

$$\textbf{E}=\frac{q}{r^{2}}\hat{\textbf{r}}$$

and $$\textbf{dr}$$ as $$\textbf{dr}= \textrm{dr} \, \hat {\textbf{r}}$$

where, and I think this is important, $$\textrm{r}$$ starts from $$\infty$$ and goes all the way down to $$r_{0}$$, in other words, $$\textrm{r}$$ is decreasing, thereby making $$\textbf{dr}$$ point in the $$-\hat{\textbf{r}}$$ direction.

Going back to our integral

$$\phi _{0}= \int_{\infty}^{r_{0}}\frac{q}{r^2}\hat{\textbf{r}}\cdot \textrm{dr}\,\hat{\textbf{r}}$$ $$=\int_{\infty}^{r_{0}}\frac{q}{r^2}\textrm{dr}$$

In its final form $$\phi_{0}=-\frac{q}{r_{0}}$$

This result must certainly be incorrect since the potential ought to be positive. I suspect it is because of the way I set up $$\textbf{dr}$$, but I can't precisely pinpoint the incorrect step in the reasoning. Since $$r$$ is ranging from $$\infty$$ down to $$0$$, then $$\textrm{dr} <0$$, thus $$\textbf{dr}$$ is pointing in the correct direction. Where does the error lie in?

• What happened to the negative sign from the original integral ? – R.W. Bird Sep 27 at 17:00
• R.W.Bird Thank you. This is definitely one of the silliest posts I've ever made. Would it preferable to remove it? – Hilbert Sep 27 at 17:06
• A quibble: You said that potential is equal to the work done to move a charge in from infinity. But your first equation is the work done by the electrostatic force, with a minus sign added. The distinction can make a difference if one is not very careful when there are multiple forces involved, especially if one or more of them is non-conservative. It's safer, and arguably "more correct", not to mentions any forces other than the electrostatic force. Why add external forces when they are not necessary for the argument? – garyp Sep 29 at 14:33

I'm attempting to answer your question, I hope you may find it convincing.
(I will refer my explanation to this image, yellow arrows are the field lines going away from the charge and dl is coming inward)
If we write the equation of the potential as given in Griffiths:Introduction to Electrodynamics $$V(r) = - \int_{O}^{r} \mathbf{E} \cdot d\mathbf{l}$$ If we try to write the meaning of this equation in words, then: Potential is the negative of the work done by the electric field to move a unit charge from a standard point O to r
Let's do some maths now, $$V(r)= - \int_{O}^{r} E~dl~cos{180}^0$$ $$V(r)= - \int_{O}^{r} -E~dl$$ $$V(r)= \int_{O}^{r} E~dl$$ Now let's try to write the meaning of this last equation in words , then: Potential is the work done by the electric field to move a unit charge from a standard point O to r
See, both the definitions are contradicting each other, this contradiction has occurred because we assumed $$d\mathbf{l}$$ to be in negative direction of E. Actually, when we write $$-\int_{O}^{r} \mathbf{E} \cdot d\mathbf{l}$$ we mean that the negative of the work that our E will do on a unit charge to move it from a standard point to $$r$$, there it is implied by the minus sign that E and direction of motion are quite opposite. The founder/s of that equation put that minus sign so as to ensure that E will do a negative work when a charge is brought from a standard point to $$r$$ and therefore we need not to consider the direction of d$$\mathbf{l}$$ to be opposite of E.
Some people get frightened by the minus sign that appears in the potential equation $$\Delta U = - W_{by~ the~ field}$$ the minus sign is there because it was assumed (when equations were developed) that field lines always go away from the charged object/mass and hence whenever a unit charge/mass is brought close it the field always gonna do the negative work.

Hope it will convince you! I know the feeling of confusion is very painful, Feynaman too had this feeling of confusion.

I think this is important, $$\textrm{r}$$ starts from $$\infty$$ and goes all the way down to $$r_{0}$$, in other words, $$\textrm{r}$$ is decreasing, thereby making $$\textbf{dr}$$ point in the $$-\hat{\textbf{r}}$$ direction.

You're adding one too many minus signs here. If your lower integral bound is larger than your upper integral bound, then $$dr$$ is inherently negative, and so $$\mathbf{dr} = dr \mathbf{\hat r} = -|dr|\mathbf{\hat r}$$ is already pointing along $$-\mathbf{\hat r}$$.

To avoid confusion, you can use the minus sign at the beginning to flip the integral bounds:

$$\int_\infty^{r_0} -\mathbf{E}\cdot \mathbf{dr} = \int_{r_0}^\infty \mathbf E\cdot \mathbf{dr} = \int_{r_0}^\infty \frac{q}{r^2} dr = \left. -\frac{q}{r}\right|^\infty_{r_0} = \frac{q}{r_0}$$

Potential difference is negative of the work done by internal electric force on a unit positive charge to move it from reference point to desired point.\begin{align}\overbrace{-\underbrace{(V_{\infty}-V_{r_0})}_{\frac{W_{r_0\rightarrow\infty}}{q_0}}}^{\Delta V}&=\int_{r_0}^\infty \vec{E}\cdot\vec{dr}\\&=\int_{r_0}^\infty \dfrac{kq}{r^2}dr\\&=\bigg(-\dfrac{kq}{r}\bigg)^{\infty}_{r_0}\\&=\dfrac{kq}{r} \end{align}

$$\phi = \int_{\infty}^{r_o} -\mathbf{E} d\mathbf{l}$$

$$\phi= \int_{\infty}^{r_0} -E (\hat{-r})~ (-dr)\hat r$$ Direction of E is opposite to dr therefore I have taken the negative of $$\hat r$$ after E and since direction of dr is negative therefore I tried to put a minus sign before it. I have used $$\hat r$$ the way you pointed out in your question. Now., I think your integrand will be negative and hence your definite integral (due to lower limit being bigger) will have a positive value.

• "therefore you are getting a negative value for potential" and " we are getting a negative potential." are both incorrect unless you are speaking of a potential that is defined with respect to a negative test charge. – Hilbert Sep 27 at 16:41
• Your $r$ is not decreasing it is increasing in the direction in which it points. See, when force and displacements are in same direction we get a positive work. – adesh mishra Sep 27 at 16:43
• $r$ is the coordinate of the positive test charge $dq$, measured from our positive charge $q$ located at the origin. $r$ starts from $\infty$, and decreases toward $r_{0}$. It is decreasing. – Hilbert Sep 27 at 16:47
• If I’m pushing something with a constant force of $\vec{F}$ from $x = 5$ to $x=0$ then the work done will be positive because both the force and displacement are in same direction. You can also see this from Cartesian system, my force have a negative x-component and my displacement too is negative. – adesh mishra Sep 27 at 17:27
• the direction of my displacement is in negative $x$ direction but the magnitude is $5$ and the negative direction gets compensated my the negative direction of force. What you did was: first take the force to be negative, then the direction of displacement to be negative and then the magnitude of the displacement to be negative. – adesh mishra Sep 27 at 18:02