\subsection{Electric Potential Energy}

This subsection introduces electric potential energy as an energy of a charge configuration and relates it to work done by electric forces.

\dfn{Electric potential energy of a system}{Let a system contain interacting charges. Let $U$ denote the \emph{electric potential energy} of the system, measured in joules. Electric potential energy is a property of the \emph{configuration of the system}, not of one charge by itself. For any two configurations,
\[
\Delta U=U_f-U_i,
\]
and if the electric force does work $W_{\mathrm{elec}}$ on the system, then
\[
W_{\mathrm{elec}}=-\Delta U.
\]
Thus, when the electric force does positive work, the system loses electric potential energy, and when an external agent slowly assembles a configuration against the electric force, the system gains electric potential energy.}

\thm{Point-charge pair formula and work relations}{Let two point charges $q_1$ and $q_2$ be separated by distance $r$, and choose the reference value
\[
U(\infty)=0.
\]
Then the electric potential energy of the two-charge system is
\[
U(r)=k\frac{q_1q_2}{r},
\]
where
\[
k=\frac{1}{4\pi\varepsilon_0}=8.99\times10^9\,\mathrm{N\,m^2/C^2}.
\]
If the separation changes from $r_i$ to $r_f$, then
\[
\Delta U=U_f-U_i=kq_1q_2\left(\frac{1}{r_f}-\frac{1}{r_i}\right).
\]
The work done by the electric force is
\[
W_{\mathrm{elec}}=-\Delta U,
\]
and for a slow external rearrangement of the charges,
\[
W_{\mathrm{ext}}=\Delta U.
\]}

\nt{Because $U=kq_1q_2/r$, the sign of $U$ depends on the signs of the two charges. If $q_1q_2>0$, then $U>0$ and positive external work is required to bring the like charges closer together. If $q_1q_2<0$, then $U<0$ and the electric force itself tends to pull the unlike charges together. The important viewpoint is that $U$ belongs to the pair of charges as a system. It is not correct to say that a single isolated charge ``has'' electric potential energy by itself.}

\pf{Derivation from quasistatic assembly}{Let charge $q_1$ be fixed, and let charge $q_2$ be brought slowly from infinity to a final separation $r$. Let $x$ denote the instantaneous separation during the motion, with outward radial unit vector $\hat{r}$. The electric force on $q_2$ is
\[
\vec{F}_{\mathrm{elec}}=k\frac{q_1q_2}{x^2}\hat{r}.
\]
For a quasistatic move, the external force balances the electric force, so
\[
\vec{F}_{\mathrm{ext}}=-\vec{F}_{\mathrm{elec}}.
\]
The external work done in assembling the pair is the increase in potential energy:
\[
U(r)-U(\infty)=W_{\mathrm{ext}}=\int_{\infty}^{r}\vec{F}_{\mathrm{ext}}\cdot d\vec{r}.
\]
Since $d\vec{r}=\hat{r}\,dx$,
\[
U(r)-0=-\int_{\infty}^{r}k\frac{q_1q_2}{x^2}\,dx
=-kq_1q_2\left[-\frac{1}{x}\right]_{\infty}^{r}
=k\frac{q_1q_2}{r}.
\]
This also gives
\[
\Delta U=kq_1q_2\left(\frac{1}{r_f}-\frac{1}{r_i}\right),
\]
and because electric potential energy is defined for a conservative force, the electric-force work satisfies $W_{\mathrm{elec}}=-\Delta U$.}

\qs{Worked AP-style problem}{Two point charges form a system. Let
\[
q_1=+2.0\,\mu\mathrm{C},
\qquad
q_2=-3.0\,\mu\mathrm{C}.
\]
Initially the charges are separated by
\[
r_i=0.50\,\mathrm{m},
\]
and they are moved slowly until their final separation is
\[
r_f=0.20\,\mathrm{m}.
\]
Take
\[
k=8.99\times10^9\,\mathrm{N\,m^2/C^2}.
\]
Find:
\begin{enumerate}[label=(\alph*)]
\item the initial electric potential energy $U_i$,
\item the final electric potential energy $U_f$,
\item the change in electric potential energy $\Delta U$, and
\item the work done by the external agent and by the electric force during the slow move.
\end{enumerate}}

\sol Use
\[
U=k\frac{q_1q_2}{r}.
\]
Because the charges have opposite signs, the product $q_1q_2$ is negative:
\[
q_1q_2=(2.0\times10^{-6}\,\mathrm{C})(-3.0\times10^{-6}\,\mathrm{C})=-6.0\times10^{-12}\,\mathrm{C}^2.
\]

For part (a), the initial potential energy is
\[
U_i=k\frac{q_1q_2}{r_i}
=(8.99\times10^9)\frac{-6.0\times10^{-12}}{0.50}\,\mathrm{J}.
\]
So
\[
U_i=-1.08\times10^{-1}\,\mathrm{J}=-0.108\,\mathrm{J}.
\]

For part (b), the final potential energy is
\[
U_f=k\frac{q_1q_2}{r_f}
=(8.99\times10^9)\frac{-6.0\times10^{-12}}{0.20}\,\mathrm{J}.
\]
Thus,
\[
U_f=-2.70\times10^{-1}\,\mathrm{J}=-0.270\,\mathrm{J}.
\]

For part (c),
\[
\Delta U=U_f-U_i=(-0.270)-(-0.108)\,\mathrm{J}.
\]
Therefore,
\[
\Delta U=-0.162\,\mathrm{J}.
\]

For part (d), because the move is slow,
\[
W_{\mathrm{ext}}=\Delta U=-0.162\,\mathrm{J}.
\]
The negative sign means the external agent removes energy from the system rather than supplying it. The electric force does the opposite amount of work:
\[
W_{\mathrm{elec}}=-\Delta U=+0.162\,\mathrm{J}.
\]

This result makes physical sense. Unlike charges attract, so when they are brought closer together, the system energy becomes more negative.

Therefore,
\[
U_i=-0.108\,\mathrm{J},
\qquad
U_f=-0.270\,\mathrm{J},
\]
\[
\Delta U=-0.162\,\mathrm{J},
\qquad
W_{\mathrm{ext}}=-0.162\,\mathrm{J},
\qquad
W_{\mathrm{elec}}=+0.162\,\mathrm{J}.
\]
