# What is $dB/dx$ where $B$ is magnetic field and $x$ is the separation between two magnetic dipoles?

I came across a question regarding the force between two magnetic dipoles $$M_1$$ and $$M_2$$ separated by a distance $$x$$ .

Here in this text book I am given the solution is

$$B = \cfrac{\mu_0}{4 \pi} \cfrac{2M_1}{x^3}$$ which on differentiating with respect to distance $$x$$ gives

$$\frac{dB}{dx} =\cfrac{\mu_0}{4 \pi} \cfrac{6M_1}{x^4}$$ Further,

$$F = -M_2 \frac{dB}{dx} = \cfrac{\mu_0}{4 \pi} \cfrac{6M_1 M_2}{x^4}$$

What is correct explanation of relation of '$$\frac{dB}{dx}$$' with force here?

In school we learn that energy (or work) is given by $$E = -\int F \cdot dx$$. Hence, we can write $$dE = -F \cdot dx$$. From here you see, that $$F = -\frac{dE}{dx}$$. All you have to do is to compare your equation with mine, $$dE = M \cdot dB$$, and you realise, that the magnetic dipole moment times the B-field is an energy. The term $$dB/dx$$ is the "gradient of the magnetic field" (first derivative).
• I think you should say $dE=MdB$. You can't have a differential in only one side of the equation. – Ballanzor Jun 15 at 11:09