This educational Demonstration, primarily for vector calculus students, presents a surface whose parametric equations are very similar to those of the unit sphere (but differ by a factor of in ). The divergence (Gauss) theorem holds for the initial settings, but fails when you increase the range value because the surface is no longer closed on the bottom. It becomes closed again for the terminal range value, but the divergence theorem fails again because the surface is no longer simple, which you can easily check by applying a cut.