The magnetic field from each section of wire is into the page, which you can easily verify with your right-hand (with your thumb in the direction of current, your fingers curl in the direction of the ...The magnetic field from each section of wire is into the page, which you can easily verify with your right-hand (with your thumb in the direction of current, your fingers curl in the direction of the resulting magnetic field). #Determine the magnetic field from the coils at those values of z #The coil at z=-R/2: B1 = (mu0*I)/2 * R**2/((R**2+(z+R/2)**2)**(3/2)) #The coil at z=+R/2: B2 = (mu0*I)/2 * R**2/((R**2+(z-R/2)**2)**(3/2)) #The sum: B = B1 + B2