# Magnetic field current loop

Determine the magnetic field (in terms of I, a, and d) at the origin due to the current loop shown in Figure P30.14 (Use $mu_0$ for µ0, $pi$ for pi, a, d, and I)

The field of the vertical sections of the wire cancels each other since they are symmetrical from the origin and have opposing currents. it remains only the horizontal portion of the wire.

$B=mu_0*I/(4*pi*d)*(cos(theta_1) +cos(theta_2))$

here $theta_{1,2}$ are the angles under which the the point O is seen from the ends of the wire.

$cos(theta1)=cos(theta2) =a/sqrt{(a^2+d^2)}$

Hence

$B = mu_0*I/(4*pi*d)*2*a/sqrt{(a^2+d^2)}$