For the first figure, the magnetic field at the centre P is the vector sum of the magnetic fields due to two semi-infinite straight wires and one semicircular arc.
The magnetic field due to the top semi-infinite wire at P is B1a=4πrμ0I directed into the plane.
The magnetic field due to the bottom semi-infinite wire at P is B1b=4πrμ0I directed into the plane.
The magnetic field due to the semicircular arc at P is B1c=4rμ0I=4πrπμ0I directed into the plane.
The total magnetic field at P is B1=B1a+B1b+B1c=4πrμ0I(1+1+π)=4πrμ0I(2+π).
For the second figure, the magnetic field at the centre Q is the vector sum of the magnetic fields due to one horizontal semi-infinite wire, one semicircular arc, and one vertical semi-infinite wire.
The magnetic field due to the horizontal semi-infinite wire at Q is B2a=4πrμ0I directed into the plane.
The magnetic field due to the semicircular arc at Q is B2c=4rμ0I=4πrπμ0I directed into the plane.
Since the arc is semicircular, it ends at a point directly below Q. The vertical semi-infinite wire starts from this point and extends downwards, meaning its line of action passes through Q. Therefore, the magnetic field due to this vertical wire at Q is B2b=0.
The total magnetic field at Q is B2=B2a+B2b+B2c=4πrμ0I(1+0+π)=4πrμ0I(1+π).
The ratio of the magnetic fields is B2B1=4πrμ0I(1+π)4πrμ0I(2+π)=1+π2+π.
Answer: 1+π2+π
