>>10885140It's not a coincidence at all! This is very closely related to something called the Generalized Stokes Theorem (In 1d, it's the fundamental theorem of calculus. In 2d, it's Green's Theorem, in 3D it's Stokes or Divergence Theorem).
What it tells you is that the integral of a function over some (sufficiently nice) surface is equal to the integral of the derivative of the function (in some sense) over the domain contained by the surface.
For instance, in 1d. If we define the integral appropriately, one could call the integral of a function f over just the points a and b to be f(b) - f(a). Why? Well, it makes more sense if you learn some differential geometry. But if we do this, then that "integral" is the same as the integral of the derivative of f over the segment between a and b.
In 2d and 3d, things are very similar but you have to be careful with how you define "integral" and "derivative". You learn this stuff in Multivariable Calc.
Now, let's consider a circle or a sphere. What is the function we should use to find the perimeter or the surface area? First of all, our function will send points to other points (instead of to numbers) because of how Stokes works. This sort of function is just called a vector field. You can think of it like there being an arrow at each point in space, telling the point which direction it goes. Well, we could make our function point perpendicularly outside of the surface/curve if we wanted, all our arrows with length 1. If we take the "flux integral" around the curve/surface now, that is, we sum up how much our vector field points outside of the curve/surface, we'll get the perimeter/surface area.
Cont.