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