a. Let us assume a segment of wire `OC` at a point `P`, a distance `x` from the centre d length `dx` as shown in figure.
Magnetic field at `P` due to current in wires `A` and `B` will be in the directions perpendicular to `AP` and `BP` respectively as shown.
`|B|=(mu)/(2pi) I/(AP)`
therefore, net magnetic force at `P` will be along negative y-axis as shown below
`B_("net")=2|B|costheta`
`=2(mu_0/(2pi))I/(AP)(x/(AP))`
`B_("net")=(mu_0/pi)=(Ix)/((AP)^2)`
`B_("net")=(mu)/(pi)(Ix)/((a^2+x^2))`
Therefore, force on this element will be
`dF=I{(mu_0)/(pi)I(x)/(a^2+x^2)}dx` [in negative z-direction]
`:.` total force on the wire will be
`F=int_(x=0)^(x=L)` `dF(mu_0I^2)/piint_0^L(xdx)/(x^2+a^2)`
`=(mu_0I^2)/(2pi) ln (L^2+a^2)/(a^2)` [in negative z-axis]
Hence, `F=-(mu_0I^2)/(2pi) ln ((L^2+a^2)/a^2)hatk`
b. When direction of current in `B` is reversed net magnetic field is a along the current. Hence force is zero