$H$ field formula For a permanent bar magnet is there a formula for the magnetic field strength $H$? Just like the electric field strength $E$ can be calculated at a point in space, can we do the same for the magnetic field strength $H$?
 A: A permanent magnet has no free current; therefore $\nabla \times H = 0$ and $\nabla \cdot H = -\nabla \cdot M$, and there is a "Coulomb's law" for the $H$ field:
$$
H(r) = \frac{1}{4\pi} \int \frac{r - r'}{\| r - r'\|^3} (- \nabla \cdot M)(r') \, \mathrm{d}^3 r'
$$
The quantity $-\nabla \cdot M$ can be imagined as the "magnetic charge density". In other words, when free current is absent, $H$ is sourced by notional magnetic charge the way $E$ is sourced by electric charge.
For a uniformly polarized bar magnet, this "magnetic charge density" is uniformly distributed on the two ends of the bar, and is positive at the north pole and negative at the south pole. The volume integral above can thus be replaced by two surface integrals.
A: Maxwell equations for static H are easily rearranged as follows:
$$\nabla \times \mathit{\mathbf{H}} =0$$
$$\mathbf{H}_{\parallel 1}=\mathbf{H}_{\parallel 2}$$
$$\nabla \mathbf{H}=-4\pi \nabla \mathbf{M}=4\pi\rho_m$$
$$\mathbf{H}_{\perp 2}-\mathbf{H}_{\perp 1}=4\pi(\mathbf{M}_{\perp 1}-\mathbf{M}_{\perp 2})=4\pi\sigma_m$$
which are exactly the equation of electrostatics if we replace H by E, with fictitious magnetic (bulk and surface) charges defined. As a matter of fact this equivalence is the reason why scientists were holding on to the existence of magnetic charges and why H and B are erroneously (from modern prospective) called field strength and induction respectively.
A: Given the magnetization density$4\pi\mathbf{M}$ you can calculate the fields within and without the magnet from the following equations.
Define the scalar and vector potentials as in Gaussian units with $ \mathbf{B}= \mathbf{H}+4\pi\mathbf{M}$:
$$\phi(\mathbf{r}) = \int dV' \frac{\mathbf{M(\mathbf{r'})}\cdot \mathbf {\hat r}}{|\mathbf{r}-\mathbf{r'}|^2} \tag{1}\label{1}\\
\mathbf{A}(\mathbf{r}) = \int dV' \frac{\mathbf{M(\mathbf{r'})}\times \mathbf {\hat r}}{|\mathbf{r}-\mathbf{r'}|^2}$$
Here $\mathbf {\hat r}$ denotes the unit vector along $\mathbf{r}-\mathbf{r'}$. 
Then everywhere $\mathbf{B}(\mathbf{r})= \nabla \times \mathbf A = -\nabla \phi$ and outside the magnet this is equivalent to
$$\mathbf{B}(\mathbf{r}) = \int dV' \frac{-\mathbf{M(\mathbf{r'})}+3\mathbf{M(\mathbf{r'})}\cdot \mathbf {\hat r}\mathbf {\hat r}}{|\mathbf{r}-\mathbf{r'}|^3} \tag{2}\label{2}$$
 In $\eqref{2}$, $\mathbf {\hat r}\mathbf {\hat r}$ is the dyadic product defined by $\mathbf {u}\cdot \mathbf {v}\mathbf {v}=(\mathbf {u}\cdot \mathbf {v})\mathbf {v}$
Of course, outside the magnet, in a vacuum, $\mathbf{B}=\mathbf{H}$, but inside the magnet the integral is divergent because of the cubic $1/r^3$ singularity. To calculate the fields inside one has to perform some further vector analysis gymnastics whose result is to make the integrals converge:
$$\mathbf H = -\nabla \phi = -\int dV' \frac{(\nabla \cdot \mathbf{M(\mathbf{r'})}) \mathbf {\hat r}}{|\mathbf{r}-\mathbf{r'}|^2}\\
\mathbf{B} = \nabla \times \mathbf{A} = \int dV' \frac{(\nabla \times\mathbf{M(\mathbf{r'})})\times \mathbf {\hat r}}{|\mathbf{r}-\mathbf{r'}|^2} \tag{3}\label{3}$$
To include the effects of surface discontinuities you have to apply the usual "div to flat pill" and "curl to flat loop" procedure and get surface integral term. At any rate both these integrals are convergent inside and outside the magnet.
