# Dipolar field in terms of demag. tensor

Assuming a potential as $$\Phi=\frac{1}{4\pi}\oint_S \frac{\vec M(\vec r')\cdot\hat n}{|\vec r - \vec r'|}da' \tag{1}\label{1}$$

where the integral can be written as

$$\int_V \nabla' \left(\frac{\vec M(\vec r')}{|\vec r - \vec r'|}dV'\right).$$

Then, if $$M$$ is constant

$$\Phi = \left(\frac{1}{4\pi} \int_{V} \frac{(\vec r - \vec r')}{|\vec r - \vec r'|^3}dV'\right) M$$

And the dipolar field can be taken as the gradient of that potential. Then

$$H_{d}=\sum_{i} \left[\frac{-1}{4\pi}\frac{\partial}{\partial_{i}n_{i}}\int_{V} \frac{(\vec r - \vec r')}{|\vec r - \vec r'|^3}dV'\right]$$ where $$n_i$$ is the scalar factor.

My question is where does this factor came from and why.

• Please use mathjax and not images pasted in, I have added the 1st equation, you should do the rest. See math.meta.stackexchange.com/q/5020 Mar 12 at 1:29
• I think in eqs. (4) and (5) instead of $\partial x_i$ you meant to write $\frac{\partial}{\partial x_i}$ Mar 12 at 1:36

The divergence theorem takes you from equation 1 to equation 2. The scale factor comes from the definition of the gradient in a specific coordinate system, so that $$\hat e$$ will be a unit vector.