# Ampere's Law Confusion

I had this question recently in a test. Different methods are yielding different answers. Can someone point out the mistake?
We are given 4 infinite wires carrying current out of the plane as shown. Find $$\int_{-\infty}^{+\infty} \vec{B}\cdot\,\mathrm d\vec{x} ,$$ (along x axis) My logic for line integral along the infinity part being zero is that by using Biot-Savart law, the field produced by the current carrying wires would definitely tend to 0 at infinity.
The answer given is $$\bar u (-3)$$ , which seems like average of both the values. Can someone point out my mistake?

• Sorry for the trouble, its not a vector, i meant u• (meu not) at the end – Red Floyd Feb 9 '17 at 17:01

## 1 Answer

When you do the loop integral about one set of wires you are ignoring the other set of wires. Going from $-\infty$ to $+\infty$ around your first loop, you "collect" half of the B field due to one set of currents (the other half comes when you go back in the other direction - your assumption that it's zero "because you are far away" is wrong. You know it is, because a complete loop integral "at infinity" must give you the same value as if you were close).

The actual field is of course the sum of the fields due to the four wires. So you add the two loop integrals, and divide by two (because you only go halfway around the loops).

• I think I got the first part on why I am wrong. Can you explain the method to get correct answer more elaborately? If the line integral at infinite distance isn't zero, then how would you proceed? We have to add the complete integral. RHS is (-6)U° ... LHS is two integrals along different paths. I don't see how adding them would give 2×(required integral) as other terms would also be there when we break the integral – Red Floyd Feb 9 '17 at 17:06
• Take a straight line from - to + infinity, then a semicircle to get back. The integral of the semicircle is exactly half the integral if you went all the way around the circle. So you get a value of $+\frac32 \mu_0$ for the first integral (around the 1 and 2 A wires), and $-\frac92 \mu_0$ for the second. Their sum is $-3\mu_0$. – Floris Feb 9 '17 at 17:14