Electromagnetic Theory · Divergence Theorem and Stokes' Theorem

#07 Integral theorems connecting local divergence and curl to volume, surface, and line integrals

Connect local field behavior to flux and circulation across the boundary of a region.

Question

Lesson frame showing the Divergence and Stokes theorems, closed-surface flux, and closed-loop circulation.
The Divergence Theorem connects volume to a closed surface; Stokes' Theorem connects a surface to its closed boundary curve.

Explain the Divergence and Stokes theorems geometrically and physically, verify both sides with the unit-cube and circular-path examples, and connect them to Maxwell's equations.

Written solution and narration transcript(shows the full solution)

Below are all the lines written in the notebook together with the full narration transcript.

  1. 1. Move from local operators to integral theorems

    Lesson frame showing the Divergence and Stokes theorems, closed-surface flux, and closed-loop circulation.
    The Divergence Theorem connects volume to a closed surface; Stokes' Theorem connects a surface to its closed boundary curve.
    In lesson five, we learned the gradient, divergence, and curl operators.
    Divergence measures how much a vector field spreads out from a point.
    Curl measures the rotation of a vector field at a point.
    In lesson six, we mastered coordinate transformations and scale factors.
    Now we connect these operators to two powerful integral theorems: the Divergence Theorem and Stokes' Theorem.
    These theorems bridge local behavior — what happens at a single point — to global behavior — what happens over an entire region.

    Narration transcript

    In lesson five, we learned the gradient, divergence, and curl operators. Divergence measures how much a vector field spreads out from a point. Curl measures the rotation of a vector field at a point. In lesson six, we mastered coordinate transformations and scale factors. Now we connect these operators to two powerful integral theorems: the Divergence Theorem and Stokes' Theorem. These theorems bridge local behavior — what happens at a single point — to global behavior — what happens over an entire region.

  2. 2. Verify the Divergence Theorem with flux

    Lesson frame showing the Divergence and Stokes theorems, closed-surface flux, and closed-loop circulation.
    The Divergence Theorem connects volume to a closed surface; Stokes' Theorem connects a surface to its closed boundary curve.
    The Divergence Theorem (Gauss's Theorem): ∯S A·dS = ∭V (∇·A)dV.
    Think of it this way.
    Imagine a closed surface — a box, a sphere, any shape.
    The total flux flowing out through that surface equals the total source strength inside.
    If divergence is positive somewhere inside, that region is a source, pushing flux outward.
    If divergence is negative, it is a sink, pulling flux inward.
    You don't need to check every point inside.
    Just measure what comes out through the surface, and you know the total.
    Let us verify with an example.
    Let A = x²ex + y²ey + z²ez.
    We integrate over the unit cube from zero to one in each direction.
    First the right-hand side.
    The divergence is ∇·A = 2x + 2y + 2z.
    The volume integral over the unit cube: integral of 2x from 0 to 1 gives 1, similarly for 2y and 2z.
    Total: 3.
    Now the left-hand side.
    We evaluate the surface integral over all six faces.
    On the face x equals 1, the contribution is the integral of x squared over that face, which is 1.
    On x equals 0, the contribution is 0.
    Similarly for the y and z faces.
    Adding all six faces:
    1+0+1+0+1+0=3.\displaystyle 1 + 0 + 1 + 0 + 1 + 0 = 3.
    Both sides equal 3.
    The Divergence Theorem is verified.

    Narration transcript

    The Divergence Theorem, also called Gauss's Theorem, states: the surface integral of A dot dS over a closed surface S equals the volume integral of nabla dot A, dV, over the enclosed volume V. Think of it this way. Imagine a closed surface — a box, a sphere, any shape. The total flux flowing out through that surface equals the total source strength inside. If divergence is positive somewhere inside, that region is a source, pushing flux outward. If divergence is negative, it is a sink, pulling flux inward. You don't need to check every point inside. Just measure what comes out through the surface, and you know the total. Let us verify with an example. Let A equal x squared e hat x, plus y squared e hat y, plus z squared e hat z. We integrate over the unit cube from zero to one in each direction. First the right-hand side. The divergence of A is 2x plus 2y plus 2z. The volume integral over the unit cube: integral of 2x from 0 to 1 gives 1, similarly for 2y and 2z. Total: 3. Now the left-hand side. We evaluate the surface integral over all six faces. On the face x equals 1, the contribution is the integral of x squared over that face, which is 1. On x equals 0, the contribution is 0. Similarly for the y and z faces. Adding all six: 1 plus 0 plus 1 plus 0 plus 1 plus 0 equals 3. Both sides equal 3. The Divergence Theorem is verified.

  3. 3. Verify Stokes' Theorem with circulation

    Lesson frame showing the Divergence and Stokes theorems, closed-surface flux, and closed-loop circulation.
    The Divergence Theorem connects volume to a closed surface; Stokes' Theorem connects a surface to its closed boundary curve.
    Stokes' Theorem: ∮C A·dl = ∬S (∇×A)·dS.
    Think of it this way.
    Walk around a closed loop.
    The total circulation — how much the field pushes you along the path — equals the total curl passing through any surface stretched across that loop.
    The remarkable thing: it does not matter which surface you choose.
    A flat disk or a curved bowl — as long as the boundary is C, the result is the same.
    Let us verify with an example.
    Let A = −y ex + x ey.
    Take C to be a circle of radius R in the x y plane.
    First the right-hand side.
    The curl of A: the z component is partial x over partial x minus partial of minus y over partial y, which is 1 minus minus 1, giving 2 ez.
    Over the disk, ∬2ez·dS = 2πR².
    Now the left-hand side.
    Parametrize the circle:
    x=Rcost,y=Rsint.\displaystyle x = R \cos t, y = R \sin t.
    Then A·dl = −y dx + x dy = R²dt.
    Integrating from 0 to 2π gives 2πR².
    Both sides match.
    Stokes' Theorem is verified.

    Narration transcript

    Stokes' Theorem states: the line integral of A dot dl around a closed curve C equals the surface integral of curl A dot dS over any surface S bounded by C. Think of it this way. Walk around a closed loop. The total circulation — how much the field pushes you along the path — equals the total curl passing through any surface stretched across that loop. The remarkable thing: it does not matter which surface you choose. A flat disk or a curved bowl — as long as the boundary is C, the result is the same. Let us verify with an example. Let A equal minus y, e hat x, plus x, e hat y. Take C to be a circle of radius R in the x y plane. First the right-hand side. The curl of A: the z component is partial x over partial x minus partial of minus y over partial y, which is 1 minus minus 1, giving 2 e hat z. The surface integral of 2 e hat z dot dS over the disk: since dS points in the z direction, this is 2 times the area, which is 2 pi R squared. Now the left-hand side. Parametrize the circle: x equals R cosine t, y equals R sine t. Then A dot dl equals minus y dx plus x dy, which simplifies to R squared dt. Integrating from 0 to 2 pi gives 2 pi R squared. Both sides match. Stokes' Theorem is verified.

  4. 4. Compare the theorems and Maxwell links

    Lesson frame showing the Divergence and Stokes theorems, closed-surface flux, and closed-loop circulation.
    The Divergence Theorem connects volume to a closed surface; Stokes' Theorem connects a surface to its closed boundary curve.
    Let us compare these two theorems side by side.
    The Divergence Theorem converts a closed surface integral into a volume integral.
    The operator is divergence: ∇·A.
    It answers: how much flows out of a closed surface?
    Stokes' Theorem converts a closed line integral into a surface integral.
    The operator is curl: ∇×A.
    It answers: how much circulates around a closed curve?
    Notice the pattern.
    Both theorems relate an integral over a region to an integral over its boundary.
    The Divergence Theorem goes from 3D volume to 2D surface.
    Stokes' Theorem goes from 2D surface to 1D curve.
    These are not just mathematical tools.
    In electromagnetic theory, Gauss's law for the electric field is the Divergence Theorem applied to E.
    The flux of E through a closed surface equals the enclosed charge divided by epsilon zero.
    And Faraday's law is Stokes' Theorem applied to E: the circulation of E around a closed loop equals minus the rate of change of magnetic flux.
    So these two theorems are the mathematical backbone of Maxwell's equations.

    Narration transcript

    Let us compare these two theorems side by side. The Divergence Theorem converts a closed surface integral into a volume integral. The operator is divergence, nabla dot A. It answers: how much flows out of a closed surface? Stokes' Theorem converts a closed line integral into a surface integral. The operator is curl, nabla cross A. It answers: how much circulates around a closed curve? Notice the pattern. Both theorems relate an integral over a region to an integral over its boundary. The Divergence Theorem goes from 3D volume to 2D surface. Stokes' Theorem goes from 2D surface to 1D curve. These are not just mathematical tools. In electromagnetic theory, Gauss's law for the electric field is the Divergence Theorem applied to E. The flux of E through a closed surface equals the enclosed charge divided by epsilon zero. And Faraday's law is Stokes' Theorem applied to E: the circulation of E around a closed loop equals minus the rate of change of magnetic flux. So these two theorems are the mathematical backbone of Maxwell's equations.

  5. 5. Review the region-boundary relationship

    Lesson frame showing the Divergence and Stokes theorems, closed-surface flux, and closed-loop circulation.
    The Divergence Theorem connects volume to a closed surface; Stokes' Theorem connects a surface to its closed boundary curve.
    Let us review.
    The Divergence Theorem relates a closed surface integral to a volume integral through the divergence operator.
    Stokes' Theorem relates a closed line integral to a surface integral through the curl operator.
    Both convert between a region and its boundary.
    In the next lessons, we begin electrostatics, where these theorems become the foundation of Gauss's law and Faraday's law.

    Narration transcript

    Let us review. The Divergence Theorem relates a closed surface integral to a volume integral through the divergence operator. Stokes' Theorem relates a closed line integral to a surface integral through the curl operator. Both convert between a region and its boundary. In the next lessons, we begin electrostatics, where these theorems become the foundation of Gauss's law and Faraday's law.

Source video: Electromagnetic Theory (v2) #07 Divergence Theorem & Stokes' Theorem (5:43)