# Electric potential energy

Electric potential energy is a potential energy (measured in joules) that results from conservative Coulomb forces and is associated with the configuration of a particular set of point charges within a defined system. An object may be said to have electric potential energy by virtue of either its own electric charge or its relative position to other electrically charged objects.
The term "electric potential energy" is used to describe the potential energy in systems with time-variant electric fields, while the term "electrostatic potential energy" is used to describe the potential energy in systems with time-invariant electric fields.

## Definition

The electric potential energy of a system of point charges is defined as the work required to assemble this system of charges by bringing them close together, as in the system from an infinite distance. Alternatively, the electric potential energy of any given charge or system of charges is termed as the total work done by an external agent in bringing the charge or the system of charges from infinity to the present configuration without undergoing any acceleration.
$U_{\mathrm {E} }(\mathbf {r} )=-W_{r_{\rm {ref}}\rightarrow r}=-\int _{{\mathbf {r} }_{\rm {ref}}}^{\mathbf {r} }q\mathbf {E} (\mathbf {r'} )\cdot \mathrm {d} \mathbf {r'}$
The electrostatic potential energy can also be defined from the electric potential as follows:
$V$
$U_{\mathrm {E} }(\mathbf {r} )=qV(\mathbf {r} )$
$V$

## Units

The SI unit of electric potential energy is joule (named after the English physicist James Prescott Joule). In the CGS system the erg is the unit of energy, being equal to 10$^{−7}$ Joules. Also electronvolts may be used, 1 eV = 1.602×10$^{−19}$ Joules.

## Electrostatic potential energy of one point charge
### One point charge q in the presence of another point charge Q

The electrostatic potential energy, U$_E$, of one point charge q at position r in the presence of a point charge Q, taking an infinite separation between the charges as the reference position, is:
$U_{E}(\mathbf {r} )={\frac {1}{4\pi \varepsilon _{0}}}{\frac {qQ}{r}}$
where r is the distance between the point charges q and Q, and q and Q are the charges (not the absolute values of the charges—i.e., an electron would have a negative value of charge when placed in the formula). The following outline of proof states the derivation from the definition of electric potential energy and Coulomb's law to this formula.
The electrostatic force F acting on a charge q can be written in terms of the electric field E as $\mathbf {F} =q\mathbf {E} ,$
By definition, the change in electrostatic potential energy, U$_E$, of a point charge q that has moved from the reference position r$_{ref}$ to position r in the presence of an electric field E is the negative of the work done by the electrostatic force to bring it from the reference position r$_{ref}$ to that position r.
$U_{E}(r)-U_{E}(r_{\rm {ref}})=-W_{r_{\rm {ref}}\rightarrow r}=-\int _{{r}_{\rm {ref}}}^{r}q\mathbf {E} \cdot \mathrm {d} \mathbf {s} .$
where:
* r = position in 3d space of the charge q, using cartesian coordinates r = (x, y, z), taking the position of the Q charge at r = (0,0,0), the scalar r = |r| is the norm of the position vector,
* ds = differential displacement vector along a path C going from r$_{ref}$ to r,
* $W_{r_{\rm {ref}}\rightarrow r}$ is the work done by the electrostatic force to bring the charge from the reference position r$_{ref}$ to r,
Usually U$_E$ is set to zero when r$_{ref}$ is infinity: $U_{E}(r_{\rm {ref}}=\infty )=0$ so $U_{E}(r)=-\int _{\infty }^{r}q\mathbf {E} \cdot \mathrm {d} \mathbf {s}$
When the curl ∇ × E is zero, the line integral above does not depend on the specific path C chosen but only on its endpoints. This happens in time-invariant electric fields. When talking about electrostatic potential energy, time-invariant electric fields are always assumed so, in this case, the electric field is conservative and Coulomb's law can be used.
Using Coulomb's law, it is known that the electrostatic force F and the electric field E created by a discrete point charge Q are radially directed from Q. By the definition of the position vector r and the displacement vector s, it follows that r and s are also radially directed from Q. So, E and ds must be parallel:
$\mathbf {E} \cdot \mathrm {d} \mathbf {s} =|\mathbf {E} |\cdot |\mathrm {d} \mathbf {s} |\cos(0)=E\mathrm {d} s$
Using Coulomb's law, the electric field is given by
$|\mathbf {E} |=E={\frac {1}{4\pi \varepsilon _{0}}}{\frac {Q}{s^{2}}}$
and the integral can be easily evaluated:
$U_{E}(r)=-\int _{\infty }^{r}q\mathbf {E} \cdot \mathrm {d} \mathbf {s} =-\int _{\infty }^{r}{\frac {1}{4\pi \varepsilon _{0}}}{\frac {qQ}{s^{2}}}{\rm {d}}s={\frac {1}{4\pi \varepsilon _{0}}}{\frac {qQ}{r}}=k_{e}{\frac {qQ}{r}}$

### One point charge q in the presence of n point charges Q$_i$

The electrostatic potential energy, U$_E$, of one point charge q in the presence of n point charges Q$_i$, taking an infinite separation between the charges as the reference position, is:
$U_{E}(r)={\frac {q}{4\pi \varepsilon _{0}}}\sum _{i=1}^{n}{\frac {Q_{i}}{r_{i}}},$
where r$_i$ is the distance between the point charges q and Q$_i$, and q and Q$_i$ are the assigned values of the charges.

## Electrostatic potential energy stored in a system of point charges

The electrostatic potential energy U$_E$ stored in a system of N charges q$_1$, q$_2$, …, q$_N$ at positions r$_1$, r$_2$, …, r$_N$ respectively, is:
where, for each i value, V(r$_i$) is the electrostatic potential due to all point charges except the one at r$_i$, and is equal to: $V(\mathbf {r} _{i})=k_{e}\sum _{\stackrel {j=1}{j\neq i}}^{N}{\frac {q_{j}}{r_{ij}}},$ where r$_{ij}$ is the distance between q$_i$ and q$_j$.
The electrostatic potential energy U$_E$ stored in a system of two charges is equal to the electrostatic potential energy of a charge in the electrostatic potential generated by the other. That is to say, if charge q$_1$ generates an electrostatic potential V$_1$, which is a function of position r, then $U_{\mathrm {E} }=q_{2}V_{1}(\mathbf {r} _{2}).$
Doing the same calculation with respect to the other charge, we obtain $U_{\mathrm {E} }=q_{1}V_{2}(\mathbf {r} _{1}).$
The electrostatic potential energy is mutually shared by $q_{1}$ and $q_{2}$, so the total stored energy is $U_{E}={\frac {1}{2}}\left[q_{2}V_{1}(\mathbf {r} _{2})+q_{1}V_{2}(\mathbf {r} _{1})\right]$
This can be generalized to say that the electrostatic potential energy U$_E$ stored in a system of n charges q$_1$, q$_2$, …, q$_n$ at positions r$_1$, r$_2$, …, r$_n$ respectively, is:
$U_{\mathrm {E} }={\frac {1}{2}}\sum _{i=1}^{n}q_{i}V(\mathbf {r} _{i}).$

### Energy stored in a system of one point charge

The electrostatic potential energy of a system containing only one point charge is zero, as there are no other sources of electrostatic force against which an external agent must do work in moving the point charge from infinity to its final location.
A common question arises concerning the interaction of a point charge with its own electrostatic potential. Since this interaction doesn't act to move the point charge itself, it doesn't contribute to the stored energy of the system.

### Energy stored in a system of two point charges

Consider bringing a point charge, q, into its final position near a point charge, Q$_1$. The electric potential V(r) due to Q$_1$ is $V(\mathbf {r} )=k_{e}{\frac {Q_{1}}{r}}$
Hence we obtain, the electrostatic potential energy of q in the potential of Q$_1$ as $U_{E}={\frac {1}{4\pi \varepsilon _{0}}}{\frac {qQ_{1}}{r_{1}}}$ where r$_1$ is the separation between the two point charges.

### Energy stored in a system of three point charges

The electrostatic potential energy of a system of three charges should not be confused with the electrostatic potential energy of Q$_1$ due to two charges Q$_2$ and Q$_3$, because the latter doesn't include the electrostatic potential energy of the system of the two charges Q$_2$ and Q$_3$.
The electrostatic potential energy stored in the system of three charges is: $U_{\mathrm {E} }={\frac {1}{4\pi \varepsilon _{0}}}\left[{\frac {Q_{1}Q_{2}}{r_{12}}}+{\frac {Q_{1}Q_{3}}{r_{13}}}+{\frac {Q_{2}Q_{3}}{r_{23}}}\right]$
Using the formula given in (1), the electrostatic potential energy of the system of the three charges will then be: $U_{\mathrm {E} }={\frac {1}{2}}\left[Q_{1}V(\mathbf {r} _{1})+Q_{2}V(\mathbf {r} _{2})+Q_{3}V(\mathbf {r} _{3})\right]$
Where $V(\mathbf {r} _{1})$ is the electric potential in r$_1$ created by charges Q$_2$ and Q$_3$, $V(\mathbf {r} _{2})$ is the electric potential in r$_2$ created by charges Q$_1$ and Q$_3$, and $V(\mathbf {r} _{3})$ is the electric potential in r$_3$ created by charges Q$_1$ and Q$_2$. The potentials are:
$V(\mathbf {r} _{1})=V_{2}(\mathbf {r} _{1})+V_{3}(\mathbf {r} _{1})={\frac {1}{4\pi \varepsilon _{0}}}{\frac {Q_{2}}{r_{12}}}+{\frac {1}{4\pi \varepsilon _{0}}}{\frac {Q_{3}}{r_{13}}}$ $V(\mathbf {r} _{2})=V_{1}(\mathbf {r} _{2})+V_{3}(\mathbf {r} _{2})={\frac {1}{4\pi \varepsilon _{0}}}{\frac {Q_{1}}{r_{21}}}+{\frac {1}{4\pi \varepsilon _{0}}}{\frac {Q_{3}}{r_{23}}}$ $V(\mathbf {r} _{3})=V_{1}(\mathbf {r} _{3})+V_{2}(\mathbf {r} _{3})={\frac {1}{4\pi \varepsilon _{0}}}{\frac {Q_{1}}{r_{31}}}+{\frac {1}{4\pi \varepsilon _{0}}}{\frac {Q_{2}}{r_{32}}}$
Where r$_{ij}$ is the distance between charge Q$_i$ and Q$_j$.
If we add everything:
$U_{\mathrm {E} }={\frac {1}{2}}{\frac {1}{4\pi \varepsilon _{0}}}\left[{\frac {Q_{1}Q_{2}}{r_{12}}}+{\frac {Q_{1}Q_{3}}{r_{13}}}+{\frac {Q_{2}Q_{1}}{r_{21}}}+{\frac {Q_{2}Q_{3}}{r_{23}}}+{\frac {Q_{3}Q_{1}}{r_{31}}}+{\frac {Q_{3}Q_{2}}{r_{32}}}\right]$
Finally, we get that the electrostatic potential energy stored in the system of three charges:
$U_{\mathrm {E} }={\frac {1}{4\pi \varepsilon _{0}}}\left[{\frac {Q_{1}Q_{2}}{r_{12}}}+{\frac {Q_{1}Q_{3}}{r_{13}}}+{\frac {Q_{2}Q_{3}}{r_{23}}}\right]$

## Energy stored in an electrostatic field distribution in vacuum

The energy density, or energy per unit volume, dU/dV {\textstyle {\frac {dU}{dV}}}, of the electrostatic field of a continuous charge distribution is: $u_{e}={\frac {dU}{dV}}={\frac {1}{2}}\varepsilon _{0}\left|{\mathbf {E} }\right|^{2}.$
One may take the equation for the electrostatic potential energy of a continuous charge distribution and put it in terms of the electrostatic field.
Since Gauss's law for electrostatic field in differential form states $\mathbf {\nabla } \cdot \mathbf {E} ={\frac {\rho }{\varepsilon _{0}}}$ where
* $\mathbf {E}$ is the electric field vector
* $\rho$ is the total charge density including dipole charges bound in a material
* $dV$ is a volume element
* $\Phi$ is the electric potential
* $\varepsilon _{0}$ is the permittivity of free space,
then, ${\begin{aligned}U&={\frac {1}{2}}\int \limits _{\text{all space}}\rho (r)\Phi (r)\,dV\\&={\frac {1}{2}}\int \limits _{\text{all space}}\varepsilon _{0}(\mathbf {\nabla } \cdot {\mathbf {E} })\Phi \,dV\end{aligned}}$
so, now using the following divergence vector identity
$\nabla \cdot (\mathbf {A} {B})=(\nabla \cdot \mathbf {A} ){B}+\mathbf {A} \cdot (\nabla {B})\Rightarrow (\nabla \cdot \mathbf {A} ){B}=\nabla \cdot (\mathbf {A} {B})-\mathbf {A} \cdot (\nabla {B})$
we have
$U={\frac {\varepsilon _{0}}{2}}\int \limits _{\text{all space}}\mathbf {\nabla } \cdot (\mathbf {E} \Phi )dV-{\frac {\varepsilon _{0}}{2}}\int \limits _{\text{all space}}(\mathbf {\nabla } \Phi )\cdot \mathbf {E} dV$
using the divergence theorem and taking the area to be at infinity where $\Phi (\infty )=0$, and using $\nabla \Phi =-\mathbf {E}$
${\begin{aligned}U&=\overbrace {{\frac {\varepsilon _{0}}{2}}\int \limits _{_{\text{ of space}}^{\text{boundary}}}\Phi \mathbf {E} \cdot d\mathbf {A} } ^{0}-{\frac {\varepsilon _{0}}{2}}\int \limits _{\text{all space}}(-\mathbf {E} )\cdot \mathbf {E} \,dV\\&=\int \limits _{\text{all space}}{\frac {1}{2}}\varepsilon _{0}\left|{\mathbf {E} }\right|^{2}\,dV.\end{aligned}}$
So, the energy density, or energy per unit volume dU/dV {\textstyle {\frac {dU}{dV}}} of the electrostatic field is:
$u_{e}={\frac {1}{2}}\varepsilon _{0}\left|{\mathbf {E} }\right|^{2}.$

## Energy stored in electronic elements

Some elements in a circuit can convert energy from one form to another. For example, a resistor converts electrical energy to heat. This is known as the Joule effect. A capacitor stores it in its electric field. The total electrostatic potential energy stored in a capacitor is given by $U_{E}={\frac {1}{2}}QV={\frac {1}{2}}CV^{2}={\frac {Q^{2}}{2C}}$ where C is the capacitance, V is the electric potential difference, and Q the charge stored in the capacitor.
One may assemble charges to a capacitor in infinitesimal increments, $dq\to 0$, such that the amount of work done to assemble each increment to its final location may be expressed as
$W_{q}=V\,dq={\frac {q}{C}}dq.$
The total work done to fully charge the capacitor in this way is then $W=\int dW=\int _{0}^{Q}V\,dq={\frac {1}{C}}\int _{0}^{Q}q\,dq={\frac {Q^{2}}{2C}}.$ where $Q$ is the total charge on the capacitor. This work is stored as electrostatic potential energy, hence, $W=U_{E}={\frac {Q^{2}}{2C}}.$
Notably, this expression is only valid if $dq\to 0$, which holds for many-charge systems such as large capacitors having metallic electrodes. For few-charge systems the discrete nature of charge is important. The total energy stored in a few-charge capacitor is $U_{E}={\frac {Q^{2}}{2C}}$ which is obtained by a method of charge assembly utilizing the smallest physical charge increment $\Delta q=e$ where $e$ is the elementary unit of charge and $Q=Ne$ where $N$ is the total number of charges in the capacitor.
The total electrostatic potential energy may also be expressed in terms of the electric field in the form $U_{E}={\frac {1}{2}}\int _{V}\mathrm {E} \cdot \mathrm {D} \,dV$
where $\mathrm {D}$ is the electric displacement field within a dielectric material and integration is over the entire volume of the dielectric.
The total electrostatic potential energy stored within a charged dielectric may also be expressed in terms of a continuous volume charge, $\rho$, $U_{E}={\frac {1}{2}}\int _{V}\rho \Phi \,dV$ where integration is over the entire volume of the dielectric.
These latter two expressions are valid only for cases when the smallest increment of charge is zero ($dq\to 0$) such as dielectrics in the presence of metallic electrodes or dielectrics containing many charges.
Note that a virtual experiment based on the energy transfer between capacitor plates reveals that an additional term should be taken into account when dealing with semiconductors for instance. While this extra energy cancels when dealing with insulators, the derivation predicts that it cannot be ignored as it may exceed the polarization energy.