# I Why am I getting Maxwell's second equation wrong?

Summary
I am going somewhere wrong in my calculations (maybe somewhere in the highlighted text). Please point out my mistakes.
While going through an article titled "Reflections in Maxwell's treatise" a misunderstanding popped out at page 227 and 228. Consider the following equations $(23\ a)$ and $(23\ c)$ in the article (avoiding the surface integral):

$\displaystyle \psi_m (\mathbf{r})=-\dfrac{1}{4 \pi} \int_V \dfrac{\nabla' \cdot \mathbf{M} (\mathbf{r'})}{|\mathbf{r}-\mathbf{r'}|} dV'=\dfrac{1}{4 \pi} \int_V \dfrac{\rho_m}{|\mathbf{r}-\mathbf{r'}|} dV' \tag{23a}$

$\displaystyle \mathbf{H}(\mathbf{r})=-\dfrac{1}{4 \pi} \int_V \nabla' \cdot \mathbf{M} (\mathbf{r'}) \dfrac{\mathbf{r}-\mathbf{r'}}{|\mathbf{r}-\mathbf{r'}|^3} dV'=\dfrac{1}{4 \pi} \int_V \rho_m \dfrac{\mathbf{r}-\mathbf{r'}}{|\mathbf{r}-\mathbf{r'}|^3} dV' \tag{23b}$

$\displaystyle \mu_0\mathbf{H}(\mathbf{r})=\dfrac{\mu_0}{4 \pi} \int_V \rho_m \dfrac{\mathbf{r}-\mathbf{r'}}{|\mathbf{r}-\mathbf{r'}|^3} dV'$

where $\rho_m=-\nabla' \cdot \mathbf{M} (\mathbf{r'})$

Using Gauss law and divergence theorem and noting that the divergence due to the surface integral (in the article) is zero:

$\nabla \cdot \mu_0\mathbf{H}(\mathbf{r})=\mu_0\ \rho_m=-\mu_0 \nabla' \cdot \mathbf{M} (\mathbf{r'})$

Using the above result:

$\nabla \cdot \mathbf{B}(\mathbf{r}) =\nabla \cdot (\mu_0\mathbf{H}(\mathbf{r})+\mu_0\mathbf{M} (\mathbf{r'}))=-\mu_0 \nabla' \cdot \mathbf{M} (\mathbf{r'})+\bbox[yellow]{\mu_0 \nabla \cdot \mathbf{M} (\mathbf{r'})}$

$\bbox[yellow]{\text{In the second term, since divergence is with respect to field coordinates, the second term is zero.}}$ Therefore:

$\nabla \cdot \mathbf{B}(\mathbf{r})=-\mu_0 \nabla' \cdot \mathbf{M} (\mathbf{r'})$

But it should be zero (equation $32$ in the article). There must be something wrong in my calculation. Please explain why am I getting $\nabla \cdot \mathbf{B}(\mathbf{r}) \neq 0$

Related Classical Physics News on Phys.org

Homework Helper
Gold Member
2018 Award
I think this one is simple: You have $\nabla \cdot H(r)=\rho_m$, but that is actually $\rho_m(r)$. Your previous equation with $\rho_m$ was $\rho_m(r')= -\nabla' \cdot M(r')$. You can't throw away the understood coordinate parameter that the $\rho_m$ carries with it. With the $\nabla \cdot H(r)$, that is $\rho_m(r)$ and not $\rho_m(r')$.

Last edited:

Another difficulty which arises is the following:

$\displaystyle \nabla \cdot \mathbf{H}(\mathbf{r})=\dfrac{d\Phi}{dV} =\dfrac{d\ \displaystyle\oint_{A} \mathbf{H}(\mathbf{r}) \cdot \mathbf{\hat{n}}\ dA }{dV}=\dfrac{dq'_m}{dV} \tag1$

But we should be getting $\nabla \cdot \mathbf{H}(\mathbf{r})=\dfrac{dq_m}{dV} \tag2$

Why are we getting $(1)$ instead of $(2)$?

#### vanhees71

Gold Member
I don't understand your notation. You cannot take a derivative with respect to a volume.

I guess, what you mean is (using Heaviside-Lorentz units)
$$\vec{\nabla} \cdot \vec{H}(\vec{r})=\frac{1}{4 \pi} \int_{\mathbb{R}^3} \mathrm{d}^3 r' \rho(\vec{r}') \vec{\nabla} \cdot \frac{\vec{r}-\vec{r}'}{|\vec{r}-\vec{r}'|^3}.$$
Now the nabla operator is with respect to $\vec{r}$, and
$$\vec{E}_{\text{coulomb}}(\vec{r})=\frac{1}{4 \pi} \frac{\vec{r}-\vec{r}'}{|\vec{r}-\vec{r}'|^3},$$
is the field of a unit point charge sitting at $\vec{r}'$, i.e.,
$$\vec{\nabla} \cdot \vec{E}(\vec{r})=\delta(\vec{r}-\vec{r}').$$
Thus you find
$$\vec{\nabla} \cdot \vec{H}(\vec{r})=\int_{\mathbb{R}^3} \mathrm{d}^3 r' \rho_m(\vec{r}') \delta^{(3)}(\vec{r}-\vec{r}')=\rho_m(\vec{r}),$$
as it should be.

You have to be more "pedantic" concerning clearly dinstinguishing betwee $\vec{r}$ and $\vec{r}'$ and more carefully observe, to which position vector your nabla oparator refers!

I don't understand your notation. You cannot take a derivative with respect to a volume.
In equation (1), I just used the formal definition of divergence.

By denoting the source charge with prime, I get flux through a closed surface $(\Phi)= \displaystyle\oint_{A} \mathbf{H}(\mathbf{r}) \cdot \mathbf{\hat{n}}\ dA =q'_m$

And now using the formal definition of divergence:

$\displaystyle \nabla \cdot \mathbf{H}(\mathbf{r})=\dfrac{d\Phi}{dV} = \dfrac{dq'_m}{dV} \tag3$

In order to get $\nabla \cdot \mathbf{H}(\mathbf{r})=\rho_m (\mathbf{r})$, we should be having:

$\nabla \cdot \mathbf{H}(\mathbf{r})=\dfrac{dq_m}{dV} \tag4$

instead of equation (3). Where am I going wrong?

#### vanhees71

Gold Member
As I said, you have to be more pedantic concerning your notation. The coordinate-independent definition of the divergence is as follows: The divergence of a vector field at point $\vec{r}$, $\vec{\nabla} \cdot \vec{V}(\vec{r})$ is given by the following limit
$$\vec{\nabla} \cdot \vec{V}(\vec{r}) = \lim_{\Delta V \rightarrow \{\vec{r} \}} \frac{1}{\Delta V} \int_{\partial \Delta V} \mathrm{d}^2 \vec{f}' \cdot \vec{V}(\vec{r}').$$
Here $\Delta V$ is some volume containing the point $\vec{x}$, $\partial \Delta V$ is its boundary surface, by convention oriented such that the surface-normal vectors along the surface all point out of the volume. The limit means to "contract" $\Delta V$ to the point $\vec{r}$. You can of course easily derive the differential form for any given set of coordinates. E.g., for Cartesian coordinates you get
$$\vec{\nabla} \cdot \vec{V}(\vec{r})=\sum_{j=1}^3 \frac{\partial}{\partial r^j} V^j(\vec{r}).$$

It is clear that the only free position variable is $\vec{r}$. You integrate over the $\vec{r}'$.

The notation $\mathrm{d q_m}{\mathrm{d} V}$ doesn't make any sense. I've shown, how to derive the correct formula
$$\vec{\nabla} \cdot \vec{H}(\vec{r})=\rho_m(\vec{r})$$
in my previous posting.

Of course, it's easier to derive directly from Maxwell's equations for the magnetostatic case, assuming that only magnetization, no current densities are present.
$$\vec{\nabla} \times \vec{H}=0, \quad \vec{\nabla} \cdot \vec{B}=\vec{\nabla} (\vec{H}+\vec{M})=0.$$
From the first equation you get that there exists a magnetostatic potential,
$$\vec{H}=-\vec{\nabla} \phi,$$
and from the 2nd equation
$$\vec{\nabla} \cdot \vec{H}=-\Delta \phi=-\vec{\nabla} \cdot \vec{M}=\rho_m.$$
The solution is known from electrostatics (or more formally by using the Green's function of the Laplace operator),
$$\phi(\vec{r})=\int_{\mathbb{R}} \mathrm{d}^3 r' \frac{\rho_m(\vec{r}')}{4 \pi |\vec{r}-\vec{r}'|}.$$

Thanks for showing another way to derive $\vec{\nabla} \cdot \vec{H}(\vec{r})=\rho_m(\vec{r})$. However I am eager to derive it using Gauss divergence theorem. Can you please show how to properly do it?

#### vanhees71

Gold Member
You always come from the local form of the Maxwell equations to their integral form by using the integral theorems. In this case from $\vec{\nabla} \cdot \vec{H}=\rho_m$ you get by using Gauss's integral theorem [corrected in view of #9]
$$q_{mV}=\int_V \mathrm{d}^3 r' \vec{\nabla}' \cdot \vec{H}(\vec{r}') = \int_{\partial V} \mathrm{d}^2 \vec{f}' \cdot \vec{H}(\vec{r}').$$
Now, assuming that $\rho_m$ is a sufficiently smooth function (particularly no surface-charge distribution or even a point-charge distribution which are generalized functions ("distributions" in the functional-analygiscal sense) rather then proper functions!). Then in making $V$ be a small volume $\Delta V$ around $\vec{r}$, you can approximate
$$q_{m \Delta V}=\Delta V \rho_m(\vec{r})$$
Then dividing the equation by $\Delta V$ and making $\Delta V \rightarrow \{\vec{r} \}$ you immediately get
$$\vec{\nabla} \cdot \vec{H}(\vec{r})=\rho_m(\vec{r}).$$
Of course in some sense, defining the divergence in this very clever coordinate-indpendent way via the surface integral and the limit process described, Gauss's theorem is merely a tautology!

Last edited:

Homework Helper
Gold Member
2018 Award
You always come from the local form of the Maxwell equations to their integral form by using the integral theorems. In this case from $\vec{\nabla} \cdot \vec{H}=\rho_m$ you get by using Gauss's integral theorem
$$q_{mV}=\int_V \mathrm{d}^3 r' \vec{\nabla}' \cdot \vec{V}(\vec{r}') = \int_{\partial V} \mathrm{d}^2 \vec{f}' \cdot \vec{H}(\vec{r}').$$
Now, assuming that $\rho_m$ is a sufficiently smooth function (particularly no surface-charge distribution or even a point-charge distribution which are generalized functions ("distributions" in the functional-analygiscal sense) rather then proper functions!). Then in making $V$ be a small volume $\Delta V$ around $\vec{r}$, you can approximate
$$q_{m \Delta V}=\Delta V \rho_m(\vec{r})$$
Then dividing the equation by $\Delta V$ and making $\Delta V \rightarrow \{\vec{r} \}$ you immediately get
$$\vec{\nabla} \cdot \vec{H}(\vec{r})=\rho_m(\vec{r}).$$
Of course in some sense, defining the divergence in this very clever coordinate-indpendent way via the surface integral and the limit process described, Gauss's theorem is merely a tautology!
One simple correction: I believe that needs to be a $\nabla' \cdot H(r')$ instead of a $\nabla' \cdot V(r')$ in the top middle equation above. Otherwise, an excellent proof !

Last edited:

#### vanhees71

Gold Member
Sure, I'll correct it immediately! Thanks!

"Why am I getting Maxwell's second equation wrong?"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving