# Different definitions of the electric potential

While studying electrostatics, my professor wrote the following definition for the electric potential: $$V(P)=V(P_{0})+ \int_{P}^{P_{0}} \vec{E} \cdot \vec{dl}$$

($$P_{0}$$ is the reference point) and I've used this formula many times without having any problem, but when I try to calculate the potential of a homogenous field, I get (setting $$V(P_{0})=0$$ and assuming that both $$P_{0}$$ and $$P$$ lie on the same line, and that $$\vec{E}$$ points from $$P_{0}$$ to $$P$$)

$$V(P)=-\int_{X_{p}}^{X_{p_{0}}}E_{0}dl=-E_{0}(X_{P_{0}}-X_{p}),$$

and the minus sign comes from the fact that I'm moving from $$P$$ to $$P_{0}$$, while the electric field points from $$P_{0}$$ to $$P$$. Now, when I try to do the same calculus using the gradient theorem, I get that, in the same conditions,

$$V(P)-V(P_{0})=\int_{P_{0}}^{P} \nabla V \cdot \vec{dl}=-\int_{P_{0}}^{P} \vec{E} \cdot \vec{dl}=-\int_{X_{P_{0}}}^{X_{P}} E_{0} dl=-E_{0}(X_{P}-X_{P_{0}})$$

because now $$\vec{E} \cdot \vec{dl}=E_{0} dl$$ as I'm moving from $$P_{0}$$ to $$P$$. I'm clearly missing a sign there, but what's my mistake?

If you're moving from $$P$$ to $$P_0$$, then $$\vec{dl}$$ points from $$P$$ to $$P_0$$.

In other words,

"and that the unit vector $$dl→$$ points from $$P_0$$ to $$P$$"

"from the fact that I'm moving from $$P$$ to $$P0$$"

• You're right, I made a mistake while I was writing the question, I'll remove that sentence – Gabriele Privitera Mar 26 at 16:41
• @GabrielePrivitera I'm still confused as to which direction you want to move? Because in the first equation you went from $P$ to $P_0$ but in the last equation you went the other way (from $P_0$ to $P$). So of course you would obtain an extra minus sign in one of them. – Mostafa Alkady Mar 26 at 17:03
• maybe it's better if you show me how you would evaluate the potential in this case (obviously the result is very simple but I'm interested in how you tackle the dot product and the path of integration). Could you please show me your method? Also, If I asked you to write the definition of the electric potential (choosing only between the two formulas I wrote, the one given by my professor and the one involving the gradient of V), which one would you pick ? – Gabriele Privitera Mar 26 at 17:41
• For the first question, I think @Bill N illustrated it carefully. In short, if $\vec{E}$ and $\vec{dl}$ are in opposite directions (e.g. $\vec{E}$ goes from $P$ to $P_0$ but you want to carry out the integral the other way around) then you pick a minus sign in the dot product. Regarding the second, both expressions are equivalent. (Try to see why! and don't forget that $\vec{E}=-\vec{\nabla}V$.) – Mostafa Alkady Mar 26 at 19:10
• I know that the expressions are equivalent because I can "use" the minus sign to interchange the extremes of integration, but when I do so, should I change the orientation of $\vec{dl}$ as well? I mean, if my integral is from $P_{0}$ to P (and $\vec{dl}$ points towards P), when I swap the extremes of integration now does $\vec{dl}$ point from P to $P_{0}?$ – Gabriele Privitera Mar 26 at 21:07

You must tie your points and your path to a coordinate system. The point $$P$$ has a signed coordinate value $$X_P$$, and $$P_o$$ has signed coordinate value $$X_{P_o}$$. Regardless where those to points are, d$$\vec{l}$$ must be expressed in terms of the coordinate system. The end points of your integral tell you whether you are moving in the positive or negative direction, not d$$\vec{l}$$.

You say that $$\vec{E}$$ points from $$P_o$$ to $$P$$, so let's set up a coordinate system in which the $$+x$$ direction is the same so that $$\vec{E}=E_o\hat{i}.$$

Because we are travelling along the $$x$$ coordinate, d$$\vec{l}$$ describes positive changes in $$x$$, with the actual total change (the real path) described by the endpoints of the integral: $$\mathrm d \vec{l}=\mathrm d x\hat{i}.\\ \vec{E}\cdot \mathrm d\vec{l}=E_o\mathrm d x$$

$$V(P)=\int_{P}^{P_o}\vec{E}\cdot \mathrm d\vec{l}=\int_{X_P}^{X_{P_o}} E_o\mathrm d x=E_o\left(X_{P_o}-X_P\right)$$

So, if you are changing in the direction of the electric field (large X to small X), your potential is decreasing. If you move opposite the electric field (small X to large X) the potential increases.

What's important for calculations is the coordinate descriptions of the field, the path (positive) increment, and the end points as related to a specific coordinate system. The mistake you made was double-counting the negatives.

• thank you so much for your answer. I'm still puzzled about one thing: what would have changed if I had taken $\vec{dl}=-\hat{x}dx$? – Gabriele Privitera Mar 26 at 18:08
• Moreover, you said that the end points of the integral tell me whether I'm moving in the positive or negative direction, but what does this mean? What's the "positive direction"? For instance, what if $X_{P}>X_{P_{0}}$? – Gabriele Privitera Mar 26 at 18:15
• You would have a sign error. The differential element tells you how the integral variable changes in a positive sense. The endpoints tell you whether you go from high to low or low to high. The lower endpoint of the integral is the start of the path regardless of its value. The upper endpoint is the end of the path regardless of its value. If you reverse the endpoints, you get the negative. If you reversed the endpoints AND put a negative on the differential, you wouldn't change anything. The path is determined by the combination of the differential and the endpoints. – Bill N Mar 27 at 1:57
• Consider the integral $\int_{x_i}^{x_f} dx = x_f-x_i = \Delta x$. $i$ and $f$ stand for initial and final. Does it matter what the actual values of the $x$s are? No. $\Delta x$ is always final minus initial. It can be negative or positive. – Bill N Mar 27 at 2:01
• Aaah thank you! Now I think I've understood. So, basically, $\vec{dl}$ determines the path (line joining the two points), but the direction in which I move is given by the endpoints, right? – Gabriele Privitera Mar 27 at 6:47