Electrostatic potential
By $∇\times \v E = 0$, now the electrostatic potential $\v Φ$ satisfies
$$ \begin{align*}
\v E = -∇Φ
\end{align*} $$
The potential difference or voltage between two points $\v x_1$ and $\v x_2$ is
$$ \begin{align*}
Φ(\v x_2)-Φ(\v x_1) = \int_{\v x_1}^{\v x_2} \d Φ = -\int_{\v x_1}^{\v x_2} \v E(\v x) \cdot \d \v x
\end{align*} $$
independent of path.
Adding an arbitrary constant to $Φ$ has no physical effect.
We usually choose $Φ\to 0$ as $|\v x|\to\infty$,
but this is only possible if $ρ(\v x)$ decays sufficiently rapidly.
E.g. for a line charge,
$Φ(r)\propto \ln r$.
(M1) implies $Φ$ satisfies the Poisson equation
$$ \begin{align*}
-∇^2Φ = \frac{ρ}{ε_0},
\end{align*} $$
which has an integral solution (assuming $Φ\to 0$ as $|\v x|\to \infty$)
$$ \begin{align*}
Φ(\v x) = \frac{1}{4πε_0} \int_{\R^3} \frac{ρ(\v x')}{|\v x'-\v x|} \d ^3\v x'.
\end{align*} $$
This is the convolution of $ρ(\v x)$ with potential of
a unit point charge at the origin
$$ \begin{align*}
Φ(\v x) = \frac{1}{4πε_0 |\v x|} \qquad \text{solving }
{-∇^2Φ} = \frac{δ(\v x)}{ε_0}.
\end{align*} $$
Let $\v d$ to be the vector from a $-q$ charge to a $+q$ charge. Define the dipole moment as
$$ \begin{align*}
\v p = q\v d.
\end{align*} $$
Torque
$$ \begin{align*}
\v G = \v d\times(q\v E) = \v p\times \v E.
\end{align*} $$
Force
$$ \begin{align*}
\v F = q\v E(\v r + \v d) - q\v E(\v r) \approx q(\v d\cdot\nabla)\v E = (\v p\cdot\nabla)\v E.
\end{align*} $$
For $|\v x|\gg|\v d|$, the electric potential and field due to the dipole is
$$ \begin{align*}
\Phi(\v x) &= \frac{\v p\cdot \v x}{4\pi\epsilon_0 |\v x|^3} &&= \frac{p\cos\theta}{4\pi\epsilon_0 r^2}, \\
\v E(\v r) &= \frac{3(\v p\cdot \v x)\v x - |\v x|^2 \v p}{4πε_0 |\v x|^5} &&= \frac{p\cos\theta}{2\pi\epsilon_0 r^3}\vhat r + \frac{p\sin\theta}{4\pi\epsilon_0 r^3}\vhat\theta
\end{align*} $$
where $\theta$ is the angle between $\v x$ and $\v p$.
(Derivation)
Note that $\Phi\propto 1/r^2, E\propto 1/r^3$.
Therefore on axis ($\theta = 0$),
$$ \begin{align*}
E(r) &= \frac{p}{2\pi\epsilon_0 r^3} \text{ parallel to axis}
\end{align*} $$
and off axis ($\theta = \pi/2$),
$$ \begin{align*}
E(r) &= \frac{p}{4\pi\epsilon_0 r^3} \text{ anti-parallel to axis}.
\end{align*} $$
A point dipole $\v p$ at the origin correspond to
$$ \begin{align*}
ρ(\v x) = -\v p\cdot ∇δ(\v x)
\end{align*} $$
so by linearity of Poisson's equation,
$$ \begin{align*}
Φ(\v x) = -\v p\cdot ∇\left(\frac{1}{4πε_0 |\v x|}\right).
\end{align*} $$
In atoms and molecules, external electric fields causes polarisation and induces $\v p\propto \v E_\text{ext}$.
This gives long-range forces between them:
Multipole expansion for electric potentials
open_in_new
For a general charge distribution $ρ(\v x)$ contained within $V = \sb{\v x}{|\v x|<R}$,
the potential is, at large $|\v x|\gg R$,
$$ \begin{align*}
Φ(\v x) = \frac{1}{4πε_0}\left(\frac{Q}{|\v x|} + \frac{\v p\cdot \v x}{|\v x|^3} + \frac{1}{2} \frac{Q_{ij} x_i x_j}{|\v x|^5} + \ldots\right)
\end{align*} $$
where the first three multipole moments are
-
total charge (electric monopole moment, scalar)
$$ \begin{align*}
Q = \int_{V} ρ(\v x) \d^3 \v x,
\end{align*} $$
-
electric dipole moment (vector)
$$ \begin{align*}
\v p = \int_{V} \v x\,ρ(\v x) \d^3 \v x,
\end{align*} $$
-
electric quadruple moment (traceless second-order symmetric tensor)
$$ \begin{align*}
Q_{ij} = \int_{V} (3x_i x_j - |\v x|^2 δ_{ij})\,ρ(\v x) \d^3 \v x.
\end{align*} $$
(Derivation)
The work done against the electric force
$\v F = q\v E$ in bringing a particle of charge $q$
from infinity (where $Φ = 0$) to $\v x$ is
$$ \begin{align*}
W = -\int_{\infty}^{\v x} \v F\cdot \d \v x = q \int_{\infty}^{\v x} ∇Φ\cdot \d \v x = q\, Φ(\v x).
\end{align*} $$
The total work done to assemble a configuration
of $N$ charges is
$$ \begin{align*}
U = \frac{1}{2} \sum_{i=1}^{N} \sum_{\substack{j=1\\j\neq i}}^{N} \frac{q_i q_j}{4πε_0 |\v x_j - \v x_i|}.
\end{align*} $$
For a continuous charge distribution, occupying a finite volume $V$,
$$ \begin{align*}
U = \frac{1}{2}\int_{V} ρ Φ \d V = \int_{\R^3} \frac{1}{2}ε_0 |\v E|^2\d^3 \v x.
\end{align*} $$
(Derivation)
We can interpret this as the energy stored in the electric field.
Our expressions for $U$ suggest
the self-energy of a point charge is infinite.
Discard this as it is unchanging and causes no force.