Magnetic Field of a Long Straight Wire
In many cases, we are interested in calculating the electric field of a long, straight wire. -Claimed by Arjun Patra
Calculation of Magnetic Field
Imagine orienting a wire on the y-axis and having a current run through the wire in the +y direction. We are interested in finding the magnetic field at some point along the z axis, say (0,0,z).
From here, it is an integral problem where you take an arbitrary piece of the rod and plug it into the generic formula for change in magnetic field: [math]\displaystyle{ \vec{B} =\frac{\mu_0}{4\pi} \frac{I(\vec{l} \times \hat{r})}{y^2+z^2} }[/math]
First, you can find the [math]\displaystyle{ \hat{r} }[/math]. The directional vector r is equal to (0,0,z) - (0,y,0) = (0,-y,z). You get this by doing final position - initial position. Next, you can find the magnitude of r, and you will get (x^2+y^2)^3/2. As a result, your [math]\displaystyle{ \hat{r} = \frac{(0,-y,z)/(x^2+y^2)^3/2} }[/math]