For the figure given below, the total magnetic induction at point O (due to curved and straight portion) will be
μ0i2πr(π−ϕ+tan ϕ)
Distance of the wire from point O, a=r cos ϕ
Now, Bnet=B1+B2=μ0i4πrθ+μ0i4πa(sin ϕ+sin ϕ)
=μ0i4πr(2π−2ϕ)+μ0i4πr cos ϕ(2 sin ϕ)
=μ0i2πr(π−ϕ+tan ϕ)