The magnetic field at O due to current in the infinite wire forming a loop as shown in figure is
μ0I4πd cos ϕ1 + cos ϕ2
μ04π Id tan ϕ1 + tan ϕ2
μ04π Id sin ϕ1 + sin ϕ2
μ04π Id cos ϕ1 + sin ϕ2
B=μ0I4πd sinθ1 + sinθ2But θ1=900-φ1 and θ2=900 -φ2sin θ1 = sin 900 − ϕ1 = cos ϕ1Similarly sin θ2 = cos ϕ2 .Magnetic field on the axis of a current carrying conductor is zero B=μ0I4πd cos ϕ1 + cos ϕ2