Niles
- 1,834
- 0
Homework Statement
Hi
The expression for the magnetic field from an infinite wire is
<br /> \boldsymbol B(r) = \frac{\mu_0I}{2\pi}\frac{1}{r} \hat\phi<br />
which points along \phi. I am trying to convert this into cartesian coordinates, and what I get is
<br /> \boldsymbol B(x, y) = \frac{\mu_0I}{2\pi}\frac{1}{\sqrt{x^2+y^2}} \hat\phi<br />
where
<br /> \hat\phi = -\sin\phi \hat x + \cos\phi \hat y<br />
I am trying to make a phase plot of this expression, so what I have done is to say that \phi = \arctan(y/x), so \hat\phi = -\sin(\arctan(y/x))\hat x + \cos(\arctan(y/x))\hat y. However I don't get the desired result. Have I missed something in my approach?