1 \begin{problem*}{30.18}
2 Two long, parallel wires carry currents of $I_1=3.00\U{A}$ and
3 $I_2=5.00\U{A}$ in the directions indicated in
4 Figure~P30.18. \Part{a} Find the magnitude and direction of the
5 magnetic field at a point midway between the wires. \Part{b} Find the
6 magnitude and direction of the magnetic field at point $P$, located
7 $d=20.0\U{cm}$ above the wire carrying the $5.00\U{A}$ current.
19 Vector Ia = Current(a, phi=90, "$I_1$");
21 Vector Ib = Current(b, phi=90, "$I_2$");
23 Distance ab = Distance(a, b, "$d$", offset=18pt);
25 Distance bP = Distance(b, P, "$d$", offset=18pt);
35 Using the formula for magnetic field from a long straight wire, the
36 total magnetic field at each point is the sum of the contributions
37 from each source wire. Selecting \emph{up} as the positive direction,
39 B_M = \frac{\mu_0 I_1}{2\pi\frac{d}{2}} - \frac{\mu_0 I_2}{2\pi\frac{d}{2}}
40 = \frac{\mu_0}{\pi d} (I_1-I_2)
41 = \ans{-4.00\U{$\mu$T}} \;,
43 so the magnetic field at $M$ points \ans{down} with a magnitude of
47 This time we have to use vector addition.
50 &= \frac{\mu_0 I_1}{2\pi(\sqrt{2}d)}\cdot\frac{-\ihat+\jhat}{\sqrt{2}}
51 + \frac{\mu_0 I_2}{2\pi d}\cdot(-\ihat)
52 = \frac{\mu_0}{2\pi d}
53 \cdot \p[{\frac{I_1}{2} \cdot (-\ihat+\jhat) - I_2\ihat}]
54 = \frac{\mu_0}{2\pi d}
55 \cdot \p[{-\p({\frac{I_1}{2}+I_2})\ihat + \frac{I_1}{2}\jhat}]
56 = (-6.50\ihat + 1.50\jhat)\U{$\mu$T} \\
57 |\vect{B}_P| &= \sqrt{(-6.50)^2 + 1.50^2}\U{$\mu$T}
58 = \ans{6.67\U{$\mu$T}} \\
59 \theta_P &= \arctan\p({\frac{1.50}{-6.50}})
62 where we used the backside $180\dg$ rule to adjust the output from
63 $\arctan$. You could also use \verb+atan2(y, x)+ and let your
64 calculator handle the backside $180\dg$ automatically if your
65 calculator supports that function.