I have just learnt Ampere's Law, useful for calculating the magnetic field in situations having a high degree of symmetry. However, I have some conceptual doubts regarding it:
Before I begin, I would like to point out an important fact regarding Gauss Law, which is usually overlooked. Gauss Law states that the integral of E.dS over a closed surface equals the (charge enclosed)/€0. It is mentioned everywhere that 'E' appearing on the left side should be the NET field due to all charges(inside or outside) the surface. However, even if 'E' only includes the field created by those charges enclosed by the surface, the equation still holds true, though it is not particularly useful in this form. The simple reason behind this is that the total electric flux due to any external charge through the closed surface turns out to be zero. Thus it doesn't make a difference whether we consider their contribution or not. And if we can ignore the flux, we can ignore the field as well IN THE EQUATION. Even then, to make best use of Gauss Law, we include the field contribution by ALL charges.
Having established this, I have a doubt about Ampere's Law. Ampere's Law states that the integral of B.dl along a closed loop equals u0 times the net current that penetrates any surface for which the chosen loop acts as a periphery.
(I) Just like in Gauss Law, is the integral B.dl due to any current NOT piercing the surface always zero?
(II) If this is the case, I have another doubt. Consider a wire of finite length carrying a current I. Now, consider any point P which lies on the perpendicular bisector of this wire, at a distance R from it. The field at this point can be easily calculated using Biot Savart law. But, using Ampere's Law and symmetry arguments, we get an incorrect answer, u0I/2*pi*r, which is what we should get for an infinitely long wire. Fortunately, my book(Halliday and Resnick) has an answer for this: The wire mentioned has to be part of some closed circuit. In presence of this circuit, the integral of B.dl will turn out to be u0I, but B cannot be factored out of the integral. So here is my question. When we say that the integral for a current NOT PIERCING the surface is zero, what kind of currents do we mean? Technically speaking, can't the rest of the circuit be regarded as a current external to the loop? How will the inclusion of the entire circuit make a difference to the value of the integral?
In other words, where should a particular wire or a section of a wire be "positioned" in order to have a non zero contribution to integral of B.dl?