Ampere's Law and Gauss's Law for EXACT CENTER of Finite Wire: Mathematical Justification I have always seen it explained that:

Ampere's Law (in integral form) works whenever B is constant around a path, so that you can pull it out of the integral.
Similarly, if you can draw a surface over which E is constant, you can pull E out of the integral.

In the Gauss's Law case, it seems like I should (for a finite wire) be able to draw a surface of infinitesimal thickness and get the exact result. (The contributions through the sides of the cylinder cancel by symmetry).
In the Ampere's Law case, I know that it has to do with the current distribution not being a loop, but I don't know the mathematics behind it.
Could someone explain, in as mathematically rigorous way as possible why these things do not work?
Thanks!
 A: Gauss's Law states
$$\int\limits_{\partial V}\vec{E}\cdot\textrm{d}\vec{S}=\frac{1}{\epsilon_0}\int\limits_V\rho\textrm{d}V$$
Then by if the magnitude of the electric field is a constant along the surface $\partial V$, and theta is the angle between the unit normal to the surface and the electric field, you may calculate 
$$\int\limits_{\partial V}\|\vec{E}\|\cos\theta\textrm{d}S=\|\vec{E}\|\int\limits_{\partial V}\cos\theta\textrm{d}S=\frac{1}{\epsilon_0}\int\limits_V\rho\textrm{d}V\iff\|\vec{E}\|=\frac{\frac{1}{\epsilon_0}\int\limits_V\rho\textrm{d}V}{\int\limits_{\partial V}\cos\theta\textrm{d}S}$$
Non the less, for an finite wire you cannot achieve a reasonable surface for which the electromagnetic field is constant due to the wire having an edge which breaks the symetry. That's why you have to use gauss's law for infinitesimal particles (Which yields Coulomb's Law) and the principle of superposition (integrate over the wire). 
I didn't understand the question in the electromagnetic case, but I hope this helped.
