๐ผ Case: Consider an indeterminate distribution of charges at a distance $\vec r$ from where we measure, with $\vec r'$ being the distance from the origin to the volume $\delta \tau '$ inside the charge distribution and $\vec R = \vec r - \vec r'$
The rigorous way to solve it is:
$$ V(\vec r)=\frac{1}{4\pi \epsilon_0} \int _V \frac{\rho (\vec r')}{R} \,\text d \tau' $$
We assume $r\gg r'$ so we assume $\vec R\approx \vec r$
$$ \begin{aligned} V(\vec r)&\approx \frac{1}{4\pi \epsilon_0} \frac{\int \rho (\vec r') \,\text d \tau'}{r} \\ &= \frac{1}{4\pi \epsilon_0} \frac{Q}{r} \end{aligned} $$
Where we defined the Nett charge: $Q=\int \rho (\vec r') \,\text d \tau'$
๐ Conclusion: This is the โmonopoleโ approximation because the charge distribution acts like a point charge
๐ผ Case: The same system with $Q=0$ overall but positive and negative charge distributions do not perfectly cancel one another
$$ V=\frac{1}{4\pi \epsilon_0} \underbrace{\times\frac{qa}{r^2}}_\text{"dipole" term} $$
๐ผ Case: this time there is no dipole, $Q=0$ but the charges don't cancel one another
$$ V=\frac{1}{4\pi \epsilon_0} \underbrace{\times \frac{q a^2}{r^3}}_\text{"quadrupole" term} $$
We start with ampers law for a continuous charge distribution
$$ V(\vec r)=\frac{1}{4\pi \epsilon_0} \int _V \frac{\rho (\vec r')}{R} \,\text d \tau' $$
Lets look more closely at $R$ so that we can simplify the $1/R$ term
$$ \begin{aligned} R^2&=r^2 + (r')^2 -2rr'\cos\alpha = r^2\left [ 1+\left ( \frac{r'}{r} \right )^2-2\left ( \frac{r'}{r} \right )\cos\alpha \right ] \\ R&=r\sqrt{1+\epsilon} \qquad \text{where: } \epsilon \equiv \left ( \frac{r'}{r} \right ) \left ( \frac{r'}{r}-2\cos \alpha \right )
\end{aligned} $$
where $\alpha$ is the angle between $\vec r'$ and $\vec r$
We can Taylor expand $1/R$ to get a description for it
$$ \begin{aligned} \frac{1}{R} &=\frac{1}{r}(1+\epsilon)^{-\frac 12} =\frac{1}{r}\left ( 1-\frac{1}{2}\epsilon+\frac{3}{8}\epsilon^2 -\frac{5}{16}\epsilon^3+\ldots \right )
\end{aligned} $$
Plugging the value of $\epsilon$ we get
$$ \begin{aligned} \frac{1}{R}&=\frac 1r \left [1-\frac{1}{2} \left ( \frac{r'}{r} \right ) \left ( \frac{r'}{r}-2\cos\alpha \right )+\frac{3}{8}\left ( \frac{r'}{r} \right )^2 \left ( \frac{r'}{r}-2\cos\alpha \right )^2-\frac{5}{16} \left ( \frac{r'}{r} \right )^3 \left ( \frac{r'}{r}-2\cos\alpha \right )^3+\ldots \right ] \\ &=\frac{1}{r}\left [ 1+\left ( \frac{r'}{r}\right )(\cos\alpha)+\left ( \frac{r'}{r}\right )^2\left ( \frac{3\cos^2\alpha-1}{2} \right )+\left ( \frac{r'}{r}\right )^3\left ( \frac{5\cos^3\alpha-3\cos\alpha}{2} \right )+\ldots \right ] \\ &=\frac{1}{r}\sum^\infin_{n=0} \left ( \frac{r'}{r} \right )^n P_n (\cos\alpha) \end{aligned} $$
where we recognised the fact that the RHS terms were Legendre polynomials
We can substitute this back into our original equation to get
$$ V(\vec r)=\frac{1}{4\pi \epsilon_0} \sum_{n=0}^\infin \frac{1}{r^{(n+1)}} \int (r')^n P_n(\cos \alpha)\rho (\vec r') \,\text d \tau ' $$
๐๏ธ Note: since $r$ is a constant for the integral
Since we assume $r\gg r'$ we only consider the first few terms of the expansion
$$ \begin{aligned} V(\vec r)=\frac{1}{4\pi \epsilon_ 0} &\left [ {\color{orange} \frac{1}{r} \int \rho (\vec r')\,\text d\tau '}+{\color{Aquamarine} \frac{1}{r^2} \int r'\cos\alpha\rho (\vec r')\,\text d\tau '} \right . \\ &\;\;\left . +{\color{Salmon}\frac{1}{r^3} \int (r')^2\left [\frac{3}{2}\cos^2\alpha - \frac{1}{2} \right ]\rho (\vec r')\,\text d\tau '}+\ldots\right ] \end{aligned} $$
๐ Conclusion: This is called the multipole expansion for $V(\vec r)$
where orange, turquoise, salmon are the monopole, dipole and quadrupole terms respectively
Using $r'\cos\alpha = \hat r \cdot \vec r'$ we can rewrite the dipole term as
$$ \begin{aligned} V_\text{dipole} &= \frac{1}{4\pi \epsilon_0} \frac{1}{r^2} \hat r \cdot \int \vec r' \rho ( \vec r')\,\text d \tau '=\frac{1}{4\pi \epsilon_0} \frac{\hat r \cdot \vec \rho}{r^2} \\ \text{where} \qquad \vec \rho &=\int \vec r' \rho ( \vec r')\,\text d \tau ' \end{aligned}
$$
$\rho$ is the dipole moment
๐๏ธ Note: $\rho$ depends only on the distribution of charge and not $\vec r$
๐ผ Case: Consider a point charge $q$ at a position $\vec a$ (ie not at the origin) where $a\ll r$
$$ \begin{aligned} V(\vec r) &= \frac{q}{4\pi \epsilon_0} \frac{1}{|\vec r - \vec a|} =\frac{q}{4\pi \epsilon_0} \underbrace{\frac{1}{(r^2 +a^2-2ra\cos\alpha)^\frac 12}}_\text{cosine rule} \\ &\approx \frac{q}{4\pi \epsilon_0 }\frac{1}{r} \left ( 1-2\frac{a}{r}\cos\alpha \right )^{-\frac 12} \qquad \leftarrow \text{where we used }a\ll r\\ &\approx \frac{q}{4\pi \epsilon_0} \left ( \frac{1}{r}+\frac{a\cos\alpha}{r^2} +\ldots \right ) \quad \; \,\leftarrow \text{taylor expansion around }2\frac{a}{r}\cos\alpha\to 0
\end{aligned} $$
Monopole term $\frac 1r$ the dipole and higher terms $\frac{a\cos\alpha}{r^2} +\ldots$ due to the charge not being cantered