III. Magnetic field of a segment and of a square loop
(i) Consider segment of length a located at -a/2 < z < a/2
where flows a upward constant electric current I. Find the induced
magnetic field at any point in the plane z = 0 (Hint: Use cylindrical
coordinates).
(ii) Consider now a square loop with side length a, located on the
z = 0 plane, with vertex points ($\frac{a}{2}$,$\frac{a}{2}$,0), (-$\frac{a}{2}$,$\frac{a}{2}$,0), ($\frac{a}{2}$,-$\frac{a}{2}$,0),
and (-$\frac{a}{2}$,-$\frac{a}{2}$,0). A counterclockwise current I is flowing in the
loop. Using the result of (i), find the magnetic field created in any
point of the z-axis (Hint: make a figure to visualize the problem).
Answer: (i) $B = \frac{\mu_0 I}{2\pi r} \left\{\frac{a}{2} \left[r^2 + \left(\frac{a}{2}\right)^2\right]^{-1/2}\right\}e_\phi$
(ii) $B = \frac{\mu_0 I}{2\pi} \left\{a^2 \left[z^2 + \frac{a^2}{4}\right]^{-1} \left[z^2 + \frac{a^2}{2}\right]^{-1/2}\right\}e_z$.