# Equation for the field of a magnetic dipole

In my electrodynamics class, my professor derived the equation for the field of the magnetic dipole

$$\vec{B}(\vec{r})=\frac{\mu_0}{4\pi}\frac{1}{r^3}[3(\vec{m}\cdot\hat{r})\hat{r}-\vec{m}]+\frac{2\mu_0}{3}\vec{m}\delta^3(\vec{r})$$

And as far as I understood, the delta function has value only at $$\vec{r}=0$$, but the first term is undefined at zero. So my question is how does the field look like at $$\vec{r}=0$$, do we just take one term depending on what the value or $$\vec{r}$$ is?

On pages 187 and 188 Jackson explains the reason for this singular term. If you take a dipole whose magnetization is distributed uniformly in a sphere of radius $$R$$ then one can show that $$\int_{r where $$\textbf{m}$$ is the total dipole moment. As one shrinks the sphere's radius $$R\to 0$$ the sphere becomes point-like but the integral stays the same.
Interestingly, if the dipole resulted from a pair of monopole charges infinitesimally close to each other and not from a circulating current then the term on the right side would be $$-\frac{\mu_0}{3}\textbf{m}$$. On page 191 Jackson comments that the hydrogen's hyperfine line would be at 42cm not at 21cm, etc. This is contrary to experiment implying that the source of the intrinsic magnetic dipole is current.
Using some Dirac delta "magic" there is also a very interesting transformation of the formula for the B field you quoted, namely: $$\textbf{B}(\textbf{r}) = \mu_0 \textbf{m}\delta(\textbf{r}) - \mu_0 \nabla\frac{1}{4\pi} \frac{\textbf{m}\cdot \textbf{r}^0} {|\textbf{r}|^2}$$ The scalar $$\phi(\textbf{r})= \frac{1}{4\pi} \frac{\textbf{m}\cdot \textbf{r}^0} {|\textbf{r}|^2}$$ is of course the potential of the dipole $$\textbf{m}$$.
Now if instead of a single dipole $$\textbf{m}$$ we have a distribution such that $$d\textbf{m}=\textbf{M}dV$$ then we get
$$\textbf{B}(\textbf{r}) =\left\{\begin{matrix} \mu_0 \textbf{M}(\textbf{r})+ \mu_0 \textbf{H}(\textbf{r}) & \textbf{r}\in V\\ \mu_0 \textbf{H}(\textbf{r}) & \textbf{r}\notin V \end{matrix}\right.$$
The magnetization occupies the 3d region $$V$$ and the $$\textbf{H}$$ is defined as the gradient of the scalar potential $$\textbf{H}(\textbf{r})=-\nabla\phi(\textbf{r})$$ and $$\phi(\textbf{r})=\frac{1}{4\pi}\int_{\textbf{r}'\in V} \frac{\textbf{M}\cdot (\textbf{r}-\textbf{r}')^0} {|\textbf{r}-\textbf{r}'|^2}dV$$