Electromagnetism – Griffiths E&M Example 6.1 Questions

electromagnetismhomework-and-exercisesmagnetic fieldsmagnetic-moment

enter image description here

enter image description here

I understand why $K_b = M\mbox{sin}\theta \hat{\phi}$ but when I try to use this to calculate the magnetic field, I keep coming up with an integral that cancels itself out and I don't understand how Griffiths computes the integral. I think I may be setting it up wrong or something is missing conceptually. Here is my logic:
\begin{equation}
A(r) = \frac{\mu_0}{4\pi}\int \frac{K(r')}{|r-r'|}da'
\end{equation}

Since $K(r') = M\mbox{sin}\theta \hat{\phi}$ in order to integrate this we have to express this with respect to cartesian unit vectors. Using $\hat{\phi} = -\mbox{sin}\phi \hat{x}+ \mbox{cos}\phi \hat{y}$, we have,
\begin{equation}
K_b = -M\mbox{sin}\theta\mbox{sin}\phi\hat{x} + M\mbox{sin}\theta\mbox{cos}\phi \hat{y}
\end{equation}

Moreover, in spherical coordinates, $|r-r'| = \sqrt{R^2+r^2-2Rr\mbox{cos}\theta}$, where $R$ is the radius of the sphere. And the integration thingy is $R^2\mbox{sin}\theta d\phi d\theta$. Then the potential is,

\begin{equation}
A(r) = \frac{\mu_0}{pi}\int \frac{-M\mbox{sin}\theta\mbox{sin}\phi\hat{x}}{\sqrt{R^2+r^2-2Rr\mbox{cos}\theta}}R^2\mbox{sin}\theta d\phi d\theta + \frac{\mu_0}{\pi}
\int \frac{M\mbox{sin}\theta\mbox{cos}\phi \hat{y}}{\sqrt{R^2+r^2-2Rr\mbox{cos}\theta}}R^2\mbox{sin}\theta d\phi d\theta
\end{equation}

\begin{equation}
= \frac{\mu_0}{4\pi}\int_0^{\pi}\frac{-M\mbox{sin}\theta\hat{x}}{\sqrt{R^2+r^2-2Rr\mbox{cos}\theta}}R^2\mbox{sin}\theta d\theta \int_0^{2\pi}\mbox{sin}\phi d\phi +
\frac{\mu_0}{4\pi}\int_0^{\pi}\frac{M\mbox{sin}\theta\hat{y}}{\sqrt{R^2+r^2-2Rr\mbox{cos}\theta}}R^2\mbox{sin}\theta d\theta \int_0^{2\pi}\mbox{cos}\phi d\phi
\end{equation}

But then
\begin{equation}
\int_0^{2\pi} \mbox{sin}\phi d\phi = \int_0^{2\pi} \mbox{cos}\phi d\phi =0
\end{equation}

So this would mean $A(r) = 0$, which can't be the case since $B = \nabla \times A$.

If anyone could point to where I went wrong that would be greatly appreciated!

Best Answer

You have \begin{equation*} \mathbf{A}(\mathbf{r}) = \frac{\mu_{0}}{4\pi} \iint \frac{\mathbf{K}(\mathbf{r'})}{|\mathbf{r} - \mathbf{r'}|} \text{d}^{2}S' \end{equation*}

I'll only write the $x$ component. \begin{equation*} A_{x}(\mathbf{r}) = \frac{\mu_{0}}{4\pi} \iint \frac{-M\sin(\theta')\sin(\phi')} {|\mathbf{r} - \mathbf{r'}|} {R}^{2} \sin(\theta') \text{d}\theta'\text{d}\phi' \end{equation*}

where \begin{align*} |\mathbf{r} - \mathbf{r'}| &= \sqrt{ \left[ r\cos(\phi)\sin(\theta) - R\cos(\phi')\sin(\theta')\right]^{2} + \left[ r\sin(\phi)\sin(\theta) - R\sin(\phi')\sin(\theta')\right]^{2} + \left[r\cos(\theta) - R\cos(\theta')\right]^{2}} \\ &= \sqrt{r^{2} + {R}^{2} - 2rR \left[ \cos(\theta)\cos(\theta') + \sin(\theta)\sin(\theta') \left(\cos(\phi)\cos(\phi') + \sin(\phi)\sin(\phi')\right) \right]} \end{align*}

Your denominator is the result of evalutating $\theta = 0$ on this complete denominator. It is indeed true that the vector potential vanishes on the $z$ axis \begin{equation*} \mathbf{A}(r,\theta = 0, \phi) = \mathbf{A}(x = 0, y = 0, z) = \mathbf{0} \, , \end{equation*} but you need the vector potential in all space in order to compute the rotor.

This integral may not have an analitic solution, that might be the reason why Griffiths followed another approach.