According to biot-savart law, magnetic field caused due to a current carrying element is given by:
→dB=μI→dl×^r4πr2
Consider the loop given in the attached figure.
At first, lets focus a small element dl along the loop at A. For this, element, applying Biot-Savart Law,
→dBA=μoI×(dl^k)×(x^i−a^j)(a2+x2)3/2
Similarly, magnetic field due to a current element of same small element at B is:
→dBB=μoI×(−dl^k)×(x^i+a^j)(a2+x2)3/2
If we add these two components, then first term of each cross product will be cancelled. Hence, we need to integrate only the second term.
So, net magnetic field is:
→B=∫2πa0μoIadl4π(a2+x2)3/2^i
→B=μoIa22(a2+x2)3/2^i
From the figure,
x=acotϕ
→B=μoIsin3ϕ2a^i