# Relation between potential difference and electric field

I was reading an article about resistivity when I faced this equation:

$$V_P-V_O=\int_P^O E.dr$$

The equation is in one dimension and $P$ and $O$ are points on the $x$ axis.

The Electric field is oriented in the $+x$ direction ans has the formula $c\frac1r$ where $c$ is a coefficient and $r$ is the distance form the origin of the coordinate system.

The vector $\vec r_P - \vec r_O$ has the same direction as that of the electric field.

Now, Why do we put $P$ below the integral and $O$ above it? Can someone explain the equation for me?

• Because by definition $V_P - V_O$ is the line integral of $(-E)$ from $O$ to $P$. If you add a minus sign to $E$, then $O$ is below and $P$ is above. – velut luna Apr 21 '16 at 5:17
• @Mathaholic so to obtain the potential difference from point $A$ to point $B$ all I need is to take the line integral of $-E$ from $B$ to $A$. Why $-E$ ? – AHB Apr 21 '16 at 5:30
• It is just a convention. But if you define it as the line integral of $E$ instead of $-E$, then positive charges flow from lower potential to higher potential, negative charges flow from higher potential to lower potential. It's perfectly ok if everyone can accept this. – velut luna Apr 21 '16 at 5:34

Inverting the limits in your equation $V_P-V_O=\int_P^O \vec E \cdot d\vec r$ gives $V_P-V_O=-\int_O^P \vec E \cdot d\vec r$.
So the right hand side of the equation is minus the work done by the the electric field in taking unit positive charge from position $O$ to position $P$.
Writing your equation as $V_P-V_O=\int_O^P \left( -\vec E \right)\cdot d\vec r$ gives you the work done by the external force $-\vec E$ in taking unit positive charge from position $O$ to position $P$.