How is the third case obeying integral form of Maxwell's second equation?

Let $$m$$ denote pole strength. In the diagrams:

(1) Sky blue: Closed Gaussian surface (2) Red: North pole of magnet (3) Green: South pole of magnet (4) Yellow: Part of magnet cutting Gaussian surface

Case 1: When both poles lie inside Gaussian surface $$\iint_S \vec{B}.\vec{dS}=4 \pi\ m+4 \pi\ (-m)=0$$

Case 2: When one pole lies inside Gaussian surface and other outside $$\iint_S \vec{B}.\vec{dS}= 4 \pi\left( \iint_S \vec{H}.\vec{dS}+\iint_S \vec{M}.\vec{dS} \right)=4 \pi\ m+4 \pi\ (-m)=0$$

Case 3: When one pole lies on the Gaussian surface and other inside Due to the inverse square nature of magnetic field intensity , $$4 \pi\ \vec{H}$$ at a point on the north pole due to that pole must be infinite. Therefore flux due to positive pole must be infinite. On the other hand flux due to negative pole is finite ($$-4 \pi\ m$$). Hence net flux must be infinite.

But it should be zero. Where have I gone wrong?

• Why are you assuming that the magnetic field on the surface is constant? But in any case you are assuming infinite charge density. If the object has finite size you do not deal with point charges, but with a charge density. The charge at any specific point is infinitesimal. – Wolphram jonny Nov 2 '18 at 18:25
• Ok.. Please show how the surface integral of magnetic field would be zero in the third case. – N.G.Tyson Nov 3 '18 at 3:43
• I am not assuming that $\vec{B}$ or $\vec{H}$ is constant. Can you please explain your understanding a bit more? – N.G.Tyson Nov 3 '18 at 4:09
• Isn't flux over any closed surface due to a point charge $4 \pi\ q$? Similarly in case 1, flux over any closed surface is $4 \pi m + 4 \pi (-m)=0$ – N.G.Tyson Nov 3 '18 at 4:35
• oh, I see, I was completely missinterpreting you – Wolphram jonny Nov 3 '18 at 4:42

If you use point charges the field is not well defined at the position of the charge, not only becomes infinite, but it points in all directions. The infinity should not be a problem, because the field is infinite in only one point, and the product $$\vec{B}.\vec{dS}$$ should remain finite. To see this imagine the point charge close to the surface. You can make the field as large as you want by puting the charge as close to the surface as you want, but the integral will remain finite because it affects only a small area, the field will become tangential to the surface faster as we get far from the charge.
If instead of a point charge you assume that the charge is distributed in a volume, let's say a small sphere with charge density $$\rho=\frac{3Q}{4\pi r^3}$$, then the field is well defined on all points in space. If the Gaussian surface cuts through the volume the flux will be the charge left inside, which is also well defined because the charge on the gaussian surface will be infinitesimally small.