# Magnetic Field in Spherical Coordinate

1. Jun 20, 2015

### roam

1. The problem statement, all variables and given/known data

I am trying to use the equation $B_{dip} (r) = \nabla \times A$ to find the magnetic field due to a dipole at the origin pointing in the z direction (where A is the magnetic vector potential).

$B_{dip} (r) = \frac{\mu_0 m}{4 \pi r^3} \ (2 cos \theta \ \hat{r} + sin \theta \ \hat{\theta})$​

But I'm unable to get this expression. I can't see how they got the part in the bracket.

2. Relevant equations

In spherical coordinates:

$A_{dip} (r) = \frac{\mu_0}{4 \pi} \frac{m sin \theta}{r^2} \hat{\phi}$ .... (1)

Curl:

.... (2)

3. The attempt at a solution

So we only need to use the $\hat{\phi}$ term from the curl equation. Substituting (1) into (2), we obtain:

$\nabla \times A= \frac{1}{r}\left( \left( \frac{\partial}{\partial r} \left( \frac{r \mu_0 m \ sin \theta}{4 \pi r^2} \right) \right) - \left( \frac{\partial}{\partial \theta} \left( \frac{\mu_0 m \ sin \theta}{4 \pi r^2} \right) \right) \right)$​

$=\frac{1}{r} (- \frac{\mu_0 m \ sin \theta}{\pi r^2} - \frac{\mu_0 m}{4 \pi r^2} cos \theta)$​

$\therefore \ B_{dip} (r) = \frac{\mu_0 m}{4 \pi r^3} (-sin \theta - cos \theta)$​

So how did they get from "-sinθ - cosθ" to "2 cosθ + sinθ"? Have I made a mistake somewhere?

Any explanation would be greatly appreciated.

Last edited: Jun 20, 2015
2. Jun 21, 2015

### blue_leaf77

This is the reason why you got wrong answer. Although the vector potential only has $\phi$ component, that doesn't mean its curl will also has only $\phi$ component. What you need to heed to in the expression of the curl of A is:
$A_r \rightarrow r$ component of vector potential
$A_\theta \rightarrow \theta$ component of vector potential
$A_\phi \rightarrow \phi$ component of vector potential
Now the vector potential does not have the $r$ and $\theta$ components, so any differential operation acting on these components should vanish. The differential acting on the $\phi$ component should, in general, not vanish depending on which variable it's differentiated against.

Last edited: Jun 21, 2015
3. Jun 21, 2015

### roam

What do you mean? The answer for $B(r)$ has a $\hat{r}$ and $\hat{\theta}$ component. How did they get that?

If all the partial derivatives with respect to θ and r vanish, then I must only use the $\partial/\partial \phi$ terms. Namely:

$\frac{1}{sin \theta} \left( \frac{-\partial A_\phi}{\partial \phi} \right) + \frac{1}{r} \left( \frac{1}{sin \theta} \frac{\partial A_r}{\partial \phi} \right)$

But since I do not have any ϕ variables this also vanishes...

4. Jun 21, 2015

### blue_leaf77

Ok if I rewrite the vector potential to $A_{dip} (r) = \frac{\mu_0}{4 \pi} \frac{m sin \theta}{r^2} \hat{\phi} = A_{\phi}(r,\theta) \hat{\phi}$, will you know which terms in the curl should vanish, which one should not?
If you calculate the fourth therm in the curl $\frac{1}{r} \frac{(\partial rA_{\phi})} {\partial r}$, will it be zero?

Last edited: Jun 21, 2015
5. Jun 21, 2015

### roam

Thank you so much for the explanation, it makes perfect sense now. I got the right answer using the first and the fourth term. Thank you!