# How to use general expression of force between two circuits to find the force between two wires?

The general expression of the force between two circuits $1$ and $2$ with currents $i_1$ and $i_2$ and with line elements $\bf{dl_1}$ and $\bf{dl_2}$ (infinitesimal vectors pointing in the direction of current) is the following. The force exerted by $1$ on $2$ is :

$$\bf{F_{1,2}}= \mathrm{\frac{\mu_0 i_1 i_2}{4 \pi}} \oint_{1} \oint_{2} \frac{\hat{r_{1,2}} ( \bf{dl_1} \cdot \bf{dl_2})}{\mathrm{r^2_{1,2}}} \tag{1}$$

Where $\hat{r_{1,2}}$ is the unit vector going from $1$ to $2$ and $r_{1,2}$ is the distance between the two points of the circuits considered during integration.

I understand the formula, nevertheless I can't see how to use it to find the force per unit lenght between to parallel infinitly long wires with currents $i_1$ and $i_2$. The force exerted by $1$ on $2$ in that case is:

$$\frac{\bf{F_{1,2}}}{\mathit{l}}= \mathrm{\frac{\mu_0 i_1 i_2}{2 \pi \,\,\mathrm{r_{1,2}}}}\hat{r_{1,2}}\tag{2}$$

It is easy to find $(2)$ in other ways, but I would like to know how to use $(1)$ in this particular case.

There fore the question is: how to use $(1)$ to find $(2)$?

Attempt: here $\bf{dl_1} \cdot \bf{dl_2}= |dl_1|\,\,| dl_2|$ and both $\bf{\hat{r_{1,2}}}$ and $r_{1,2}$ are constant, so it should be just

$$\bf{F_{1,2}}= \mathrm{\frac{\mu_0 i_1 i_2}{4 \pi}} \frac{\hat{r_{1,2}} }{\mathrm{r^2_{1,2}}} \oint_{1} \mathrm{dl_1} \oint_{2} \mathrm{dl_2}= \mathrm{\frac{\mu_0 i_1 i_2}{4 \pi}} \frac{\hat{r_{1,2}} }{\mathrm{r^2_{1,2}}} \mathit{l^2} \tag{3}$$

Assuming that the lenght of the wire (approximated as infinitly long, is $l$). Nevertheless the result in $(3)$ is quite dirrenent from $(2)$ and I don't see where I'm wrong.

$r_{1,2}$ is the (running) distance of the infinitesimal line elements $l_1$ and $l_2$ (the latter we can interpret as positions on an axis defined by the direction on the wires), so we cannot drag it out of the integrals.

Say $R$ is the distance between the two wires. From Pythagoras we get the rule $$r_{1,2}^2 = R^2 + (l_2-l_1)^2.$$ Now first pull out $\mathbf {\hat R_{1,2}}$ as the overall unit vector, since we know that this will come out from "averaging" over all $l_1$, $l_2$: (I'm not too sure about this, though) $$\mathbf F_{1,2} = \frac{\mu_0 i_1 i_2}{4\pi} \mathbf { \hat R_{1,2} } \int_1 dl_1 \int_2 dl_2 \frac{1}{r_{1,2}^2}$$

now apply the substitution of $r_{1,2}$:

$$\mathbf F_{1,2} = \frac{\mu_0 i_1 i_2}{4\pi} \mathbf { \hat R_{1,2} } \int_1 dl_1 \int_2 dl_2 \frac{1}{R^2 + (l_2-l_1)^2}$$

solving the $l_2$ integral gives us an arcustangens:

$$\mathbf F_{1,2} = \frac{\mu_0 i_1 i_2}{4\pi} \mathbf { \hat R_{1,2} } \int_1 dl_1 \left( - \frac{1}{R} \arctan{\frac{l_1-l_2}{R}} \vert_{l_2=-\infty}^{+\infty} \right)$$

the arctan becomes $-\pi$ from $l_2$ limits evaluation; thus the result would be:

$$\frac{\mathbf F_{1,2}}{l} =\frac{\mu_0 i_1 i_2}{4R} \mathbf { \hat R_{1,2} }$$

This differs only by a factor of $2/\pi$ from the true solution. So I guess there is just one tiny issue that we have not considered. (For instance, are we really sure that the closed-circuit equation is applicable here?)