Force between two parallel current carrying wires :
To calculate the force between two infinite parallel current carrying wires separated by a distance r , we take an arbitrary point ‘ P ‘ on the second wire, the magnetic field at this point due to other wire is
$ \displaystyle \vec{B} = \frac{\mu_0}{4\pi}\frac{2I_1}{r} (-\hat{k})$
Force on elementary length of the second wire is
$ \displaystyle \vec{dF} = (I_2 dl\hat{j}) \times \frac{\mu_0}{4\pi}\frac{2I_1}{r} (-\hat{k}) $
$ \displaystyle \frac{\vec{dF}}{dl} = \frac{\mu_0}{4\pi}\frac{2 I_1 I_2}{r} (-\hat{i})$
We note that wires carrying current in the same direction attract each other. (Verify using Fleming’s left hand rule).