## Wednesday, March 2, 2016

### Average of a magnetic field in D dimensions

I solve problem 5.57 in Griffiths, Introduction to Electrodynamics. This problem asks to calculate the average of a magnetic field over a ball; I solve it in $D \ge 3$ space dimensions.
The average of the magnetic field over a ball $B$ with radius $R$ is \begin{equation*} F_{ij\ \mathrm{av}} = \frac{1}{|B|} \int_{r \le R}\!\! dx\ F_{ij} \end{equation*} with $|B|$ the volume of the ball. Hence, \begin{equation*} F_{ij\ \mathrm{av}} = \frac{1}{|B|} \int_{r \le R}\!\! dx\ \partial_i A_j - (i \leftrightarrow j) \end{equation*} In $D$ dimensions, the potential is given by $$\label{eq:20160302a} A(x) = \frac{1}{\mathcal{A}} \int \frac{J(y)}{|| x-y||^{D-2}} dy$$ with $\mathcal{A}$ the area of the sphere $S^{D-1}$ with radius $1$. Therefore \begin{align*} F_{ij\ \mathrm{av}} &= \frac{1}{\mathcal{A} |B|} \int\! dy\ J_j (y) \int_{r \le R}\!\! dx\ \dfrac{\partial}{\partial x_i} \frac{1}{|| x-y||^{D-2}}- (i \leftrightarrow j) \\ &= \frac{1}{\mathcal{A} |B|} \int\! dy\ J_j (y) \int_{r = R}\!\! dx\ \frac{\vec n(x) }{|| x-y||^{D-2}}- (i \leftrightarrow j) \\ \end{align*} with $\vec n$ the unit vector perpendicular on the sphere pointing outwards. I calculated the latter integral in a previous blog post $$\label{eq:20160302b} \int_{r = R} dx\ \frac{\vec n(x)}{|| y - x ||^{D-2} } = \begin{cases}\dfrac{D-2}{D} \mathcal{A} y &\text{if }\quad ||y||\le R \\[5mm] \dfrac{D-2}{D} \mathcal{A} \dfrac{y R^D}{|| y ||^D}&\text{if }\quad ||y||\ge R \\ \end{cases}$$
Case 1: suppose all current is inside the ball with radius $R$
Then $||y || \le R$ for all $y$ and therefore \begin{equation*} F_{ij\ \mathrm{av}} = \frac{1}{\mathcal{A} |B|} \int\! dy\ J_j (y) \dfrac{D-2}{D} \mathcal{A} y_i - (i \leftrightarrow j) = \dfrac{D-2}{D} \frac{2}{|B|} M_{ij} \end{equation*} with the magnetic moment defined as \begin{equation*} M_{ij} = \int dx\ x_i J_j \end{equation*} Case 2: suppose all current is outside the ball with radius $R$
Then $||y || \ge R$ for all $y$ and therefore \begin{equation*} F_{ij\ \mathrm{av}} =\frac{1}{\mathcal{A} |B|} \int\! dy\ J_j (y) \dfrac{D-2}{D} \mathcal{A} \dfrac{y_i\ R^D}{|| y ||^D}- (i \leftrightarrow j) \end{equation*} The Biot-Savart law in $D$ dimensions is \begin{equation*} F_{ij}(x) = \frac{1}{\mathcal{A}} \int\! dy\ J_j (y) \frac{(-)(D-2)}{|| x-y||^D} (x_i - y_i) - (i \leftrightarrow j) \end{equation*} thus \begin{equation*} F_{ij}(0) = \frac{D-2}{\mathcal{A}} \int\! dy\ \frac{y_i J_j (y)}{||y||^D} - (i \leftrightarrow j) \end{equation*} thus \begin{equation*} F_{ij\ \mathrm{av}} = \frac{1}{|B|} \frac{\mathcal{A}}{D} F_{ij}(0) R^D \end{equation*} and finally \begin{equation*} F_{ij\ \mathrm{av}} = F_{ij}(0) \end{equation*} All in all the result is thus $$\label{eq:20160302c} F_{ij\ \mathrm{av}} = \begin{cases}\dfrac{D-2}{D} \dfrac{2}{|B|} M_{ij}&\text{if all current is inside the ball} \\[5mm] F_{ij}(0) &\text{if all current is outside the ball} \\ \end{cases}$$
Remarks
This calculation does not provide much insight. I think there should be a quicker way to obtain the short final result. What I do not like is that on the one hand, I use an explicit solution \eqref{eq:20160302a} of Maxwell's equation, and on the other hand, I calculate the integral \eqref{eq:20160302b} by solving a partial differential equation which is quite similar to Maxwell's equations (see previous blog post). I think that it should be possible to obtain the result \eqref{eq:20160302c} only using Maxwell's equations, not using explicit solutions of Maxwell's equations and messy integrals. Please leave a comment if you know a shorter method to obtain \eqref{eq:20160302c}.