← SciSim / Mathematics

Green's, Stokes' & Divergence Theorem

The three fundamental theorems of vector calculus — circulation = curl-flux, surface circulation = curl flux, volume flux = divergence integral.
🎓 Tier: Standard Undergraduate (Vector Calculus, Capstone)

📊 Section 1 — Interactive Simulation

Pick a field $\vec F$, pick a region or surface, and compare both sides of the theorem live. Watch how curl/divergence inside a small box matches the circulation/flux around its boundary.

Vector field + region
LHS (boundary)
RHS (region)
|LHS − RHS|
match?
field type
curl(F)·k̂ @ origin
div(F) @ origin
region size

Compute

Vector Field F

Region Shape

Surface (Stokes mode)

3D Volume (div3 mode)

Parameters

Display

Tips

• Try rotation field on disc: LHS=2πR², RHS=∬2dA=2·πR². ✓
• Try source field in div2 mode: flux = 2·area, div = 2 everywhere.
Stokes mode on hemisphere vs flat disk — both give same answer because they share a boundary.
• Sweep size — error should decay as $O(1/n^2)$.

🪜 Section 2 — The Idea, Step by Step

From "what goes in must come out" up to the single line that contains all three theorems — built gently, assuming no prior vector calculus.

Start here — balance the books at the edge

Picture a kiddie pool out in the rain. Drops sprinkle in across the whole surface, and water also dribbles out over the rim. If the pool is neither overflowing nor draining, those two totals have to match: all the rain landing inside equals all the water crossing the edge. That one accounting rule — whatever is happening throughout the interior is bookkept exactly by what crosses the boundary — is Green's, Stokes', and the Divergence theorem. Everything else is just choosing what "inside" and "edge" mean.

Build — name the pieces, put a number on it

Drop a tiny paddle wheel into a flowing field $\vec F$ and walk a small square around it, adding up how much the flow pushes you along your path. That running total is the circulation. Shrink the square and the circulation per unit area settles onto one number at that point — the curl, written $Q_x - P_y$ for $\vec F=(P,Q)$. Green's theorem says: add the curl over every tiny square tiling a region $D$, watch the shared inner edges cancel in pairs, and all that survives is the single loop around the outer boundary: $$\oint_{\partial D} P\dd{x}+Q\dd{y} \;=\; \iint_D (Q_x - P_y)\dd{A}.$$ Test it on the spinning field $\vec F=(-y,x)$ over the unit disc. The curl is $1-(-1)=2$ everywhere, so the right side is $2\times(\text{area }\pi)=2\pi$ — and walking the rim also gives $2\pi$. They agree because they must.

Deepen — the same idea, one dimension up

Trade "circulation around a curve" for "flux through a surface," and "curl" for "divergence," and you climb the ladder. The Divergence theorem says the net flux of $\vec F$ out of a closed surface $\partial V$ equals the total source strength $\divg\vec F=\partial_x F_1+\partial_y F_2+\partial_z F_3$ packed inside: $\oiint_{\partial V}\vec F\cdot d\vec S=\iiint_V \divg\vec F\dd{V}$. Stokes' is the curved-surface version of Green's: circulation around a rim equals the flux of $\curl\vec F$ through any surface that caps that rim. All three collapse to one line, $\int_{\partial M}\omega=\int_M d\omega$ — the boundary integral of a quantity $\omega$ equals the interior integral of its derivative. In the sim the R slider sets the region size, n chops the boundary for the LHS, and m chops the interior for the RHS; the two sides are computed completely independently, so when the readouts match you are watching the theorem, not a rigged demo.

Try this in the sim above

First, pick the rotation field on the disc in Green's mode and hit Compute — LHS and RHS both land on $2\pi R^2$ in exact agreement because the curl is the constant $2$. Next, switch to the source field $(x,y)$ in 2D Divergence mode: the divergence is $2$ everywhere, so the flux out of any region equals $2\times$ its area — grow R and watch both numbers scale together. Finally, in Stokes' mode compare the hemisphere against the flat disk: both report the same flux because they share the unit-circle boundary — exactly the "any cap works" claim. For a reality check, drag the boundary count n down near its minimum and watch $|\text{LHS}-\text{RHS}|$ swell as discretization error, then slide it back up and see the gap shrink like $O(1/n^2)$.

📐 Section 3 — Theory: The Big Three

All three theorems say the same thing in different dimensions: an integral over a boundary equals an integral of a derivative over the interior. They're special cases of the generalized Stokes theorem $\int_{\partial M}\omega = \int_M d\omega$.

Green's Theorem (2D, circulation form)

For a positively-oriented simple closed curve $C$ bounding a region $D\subset\R^2$, and $\vec F = (P, Q)$ with $P, Q\in C^1(\overline D)$: $$\oint_C P\dd{x} + Q\dd{y} \;=\; \iint_D \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right)\dd{A}.$$

The integrand on the right is the scalar curl (sometimes written $\curl\vec F\cdot\hat k$). Circulation around the boundary = total infinitesimal rotation inside.

Divergence Theorem (3D, also called Gauss')

For a solid region $V\subset\R^3$ with piecewise-smooth boundary $\partial V$ oriented outward, and $C^1$ vector field $\vec F$: $$\oiint_{\partial V}\vec F\cdot d\vec S \;=\; \iiint_V \divg\vec F\dd{V} \;=\; \iiint_V (\partial_x F_1 + \partial_y F_2 + \partial_z F_3)\dd{V}.$$

Flux through the boundary = total net source-strength inside. The 2D analogue: $\oint_C\vec F\cdot \vec n\dd{s} = \iint_D \divg\vec F\dd{A}$.

Stokes' Theorem (3D)

For an oriented piecewise-smooth surface $S\subset\R^3$ with boundary $\partial S$ (right-hand rule matches surface normal), and $C^1$ vector field $\vec F$: $$\oint_{\partial S}\vec F\cdot d\vec r \;=\; \iint_S (\curl\vec F)\cdot d\vec S.$$

Circulation around any boundary = flux of curl through any surface filling it. Two surfaces sharing the same boundary give the same answer.

Symbol Table

SymbolMeaningType
$\partial D$ Boundary of region $D$ (a curve in 2D, a surface in 3D) 1- or 2-manifold
$\curl\vec F$ Vector curl in 3D: $(\partial_y R - \partial_z Q, \partial_z P - \partial_x R, \partial_x Q - \partial_y P)$Vector field on $\R^3$
$\divg\vec F$ $\partial_x F_1 + \partial_y F_2 + \partial_z F_3$ Scalar field
$d\vec S$ Oriented surface element $\vec n\dd{S}$ Vector 2-form
$d\vec r$ Oriented line element Vector 1-form
$\omega, d\omega$ Differential form & its exterior derivative Form algebra

Why They're All One Theorem

Step 1 · Local circulation = curl
Consider a tiny rectangle of size $\Delta x \times \Delta y$ centered at $(x_0, y_0)$. Trace its boundary CCW: $\oint P\dd{x}+Q\dd{y} \approx [Q(x_0+\Delta x/2,y_0) - Q(x_0-\Delta x/2,y_0)]\Delta y - [P(x_0,y_0+\Delta y/2)-P(x_0,y_0-\Delta y/2)]\Delta x$ $= (Q_x - P_y)\Delta x\Delta y + O((\Delta x)^3)$.
Step 2 · Sum over the partition
Tile $D$ with tiny rectangles. Internal edges are traversed twice with opposite orientations, so their contributions cancel. Only outer-boundary edges survive — and these approximate $\oint_{\partial D}$.
Step 3 · Take the limit
LHS sum $\to \oint_{\partial D} P\dd{x}+Q\dd{y}$. RHS sum $\to \iint_D (Q_x - P_y)\dd{A}$. Done — that's Green's. The same cancellation-of-internal-faces argument works in 3D for Stokes' (faces of tiny squares cancel along internal edges) and Divergence (faces of tiny cubes cancel along shared faces).
Step 4 · The unifying form: generalized Stokes
For a $k$-form $\omega$ on an oriented $(k+1)$-manifold $M$ with boundary $\partial M$: $\int_{\partial M}\omega = \int_M d\omega$. Cases:
  • $\omega = f$ (0-form), $M = $ curve from $a$ to $b$: $f(b)-f(a) = \int_a^b f'$ — FTC.
  • $\omega = P\dd{x}+Q\dd{y}$ (1-form), $M = D\subset\R^2$: $d\omega = (Q_x - P_y)\dd{x}\wedge\dd{y}$ — Green's.
  • $\omega = F_1\dd{x}+F_2\dd{y}+F_3\dd{z}$, $M = $ surface in $\R^3$: $d\omega$ encodes curl — Stokes'.
  • $\omega = F_1\dd{y}\wedge\dd{z}+F_2\dd{z}\wedge\dd{x}+F_3\dd{x}\wedge\dd{y}$, $M = $ 3D volume: $d\omega = \divg\vec F\dd{V}$ — Divergence theorem.
Step 5 · Equivalent forms
Green's circulation form ↔ Green's flux form: replace $\vec F = (P,Q)$ with $(-Q, P)$, you go from curl integrand $Q_x - P_y$ to div integrand $P_x + Q_y$. The two Greens are the 2D versions of Stokes and Divergence — same theorem, rotated 90°.

Simulation ↔ Symbol Mapping

tab Green's 2D circulation form: LHS = $\oint P\dd{x}+Q\dd{y}$, RHS = $\iint(Q_x-P_y)\dd{A}$
tab 2D Div 2D flux form: LHS = $\oint\vec F\cdot\vec n\dd{s}$, RHS = $\iint\divg\vec F\dd{A}$
tab 3D Div $\oiint_{\partial V}\vec F\cdot d\vec S$ vs $\iiint_V\divg\vec F\dd{V}$
tab Stokes' $\oint_{\partial S}\vec F\cdot d\vec r$ vs $\iint_S\curl\vec F\cdot d\vec S$
readout LHS boundary integral (line/surface as appropriate)
readout RHS interior integral (curl/div over the region)
readout match? ✓ if LHS-RHS within numerical tolerance; otherwise indicates discretization error
graph conv LHS and RHS both as functions of region size — they should track each other

Worked Example — Green's on a Disc

$\vec F = (-y, x)$, $D$ = unit disc, $C = \partial D$.

LHS: $\oint_C -y\dd{x}+x\dd{y}$. Parametrize $x=\cos t, y=\sin t$, $\dd{x}=-\sin t\dd{t}, \dd{y}=\cos t\dd{t}$. Integrand $= -\sin t \cdot(-\sin t) + \cos t\cdot\cos t = 1$. $\oint = \int_0^{2\pi} 1\dd{t} = 2\pi$.

RHS: $Q_x - P_y = \partial_x(x) - \partial_y(-y) = 1 - (-1) = 2$. $\iint_D 2\dd{A} = 2\cdot\pi = 2\pi$. ✓ $\boxed{\text{LHS}=\text{RHS}=2\pi.}$

Worked Example — Divergence Theorem on the Unit Ball

$\vec F = (x, y, z)$, $V$ = unit ball, $\partial V$ = unit sphere.

LHS: $\oiint_{\partial V}\vec F\cdot d\vec S$. On the sphere, $\vec n = (x,y,z)$, so $\vec F\cdot\vec n = x^2+y^2+z^2 = 1$. $\oiint 1\dd{S} = 4\pi$.

RHS: $\divg\vec F = 1+1+1 = 3$. $\iiint_V 3\dd{V} = 3\cdot\frac{4\pi}{3} = 4\pi$. ✓ $\boxed{\text{Flux}=\text{Div-integral}=4\pi.}$

Worked Example — Stokes' for Two Surfaces Sharing a Boundary

$\vec F = (-y, x, 0)$ (rotation lifted to 3D). $\curl\vec F = (0, 0, 2)$. Boundary $C$ = unit circle in $xy$-plane.

Surface 1 (flat disk $z=0$): normal $\hat k$, $\curl\vec F\cdot\hat k = 2$. Flux $= 2\cdot\pi = 2\pi$.

Surface 2 (upper hemisphere): normal $= (x,y,z)$ on the sphere, $\curl\vec F\cdot\vec n = 2z$. Flux $= \iint_{\text{hemi}} 2z\dd{S}$. Parametrize: $z = \cos\phi$, $\dd{S}=\sin\phi\dd\phi\dd\theta$. Flux $= \int_0^{2\pi}\!\int_0^{\pi/2} 2\cos\phi\sin\phi\dd\phi\dd\theta = 2\pi\cdot 1 = 2\pi$.

Boundary integral (LHS): $\oint_C \vec F\cdot d\vec r = 2\pi$ (computed earlier in Topic #11). All three agree. $\boxed{\text{Different surfaces, same flux} = 2\pi.}$ This is the magic of Stokes.

Reference: Stewart, J. — Calculus: Early Transcendentals, 8th ed., §16.4–16.9; Marsden & Tromba — Vector Calculus, 6th ed., Ch. 8; Schey, H. M. — Div, Grad, Curl, and All That, 4th ed. (definitive physically-motivated treatment); Spivak — Calculus on Manifolds, Ch. 5 (generalized Stokes); Hubbard & Hubbard, Ch. 6; Bressoud, D. — Second Year Calculus: From Celestial Mechanics to Special Relativity, Springer.

❓ Section 4 — Frequently Asked Questions

🧮Conceptual What's the physical meaning of curl and divergence?

Divergence at a point is "net outflow per unit volume" — the rate at which the field is locally creating new field-flow. Positive divergence = source (water bubbling out); negative = sink (drain). By the divergence theorem, $\divg\vec F(\vec p) = \lim_{V\to\{\vec p\}} \frac{1}{\text{vol}(V)}\oiint_{\partial V}\vec F\cdot d\vec S$ — the local source density.

Curl at a point is the local "spin axis" — its direction is the rotation axis (right-hand rule), magnitude is twice the angular speed of an infinitesimal paddle wheel placed there. By Stokes', $(\curl\vec F)(\vec p)\cdot\vec n = \lim_{A\to\{\vec p\}}\frac{1}{\text{area}(A)}\oint_{\partial A}\vec F\cdot d\vec r$ — circulation per unit area, oriented by $\vec n$.

Key takeaway: $\divg$ measures local sourcing/sinking; $\curl$ measures local rotation. Both are limits of boundary integrals shrunk to a point.
🔬Simulation Why do LHS and RHS match exactly for some fields but only approximately for others?

The theorems are mathematically exact. Any visible mismatch in the simulation is numerical discretization error. For polynomial fields and smooth boundaries, Simpson-like rules can hit exact answers (no error). For non-polynomial fields (e.g.\ Gaussians, $1/r^2$) or near singularities, you get $O(1/n^2)$ midpoint error on both sides — increasing the grid size reduces it.

Watch out for: (i) sharp corners on the region — discretization can't capture them; (ii) singularities of the field inside the region (e.g.\ $\vec F = (-y,x)/(x^2+y^2)$ at the origin) — the integrands blow up and the theorem's hypotheses fail; (iii) boundary orientation flipped — gives sign error of exactly $-1$.

Key takeaway: theorem-side mismatches in the sim are always numerical, not mathematical. The exception is when the hypotheses (C¹ field, smooth boundary) fail.
🌍Applied Why does Gauss's law in EM follow from the divergence theorem?

Maxwell's first equation in differential form: $\divg\vec E = \rho/\varepsilon_0$ where $\rho$ is charge density. Integrate both sides over any volume $V$ and apply the divergence theorem on the left: $\oiint_{\partial V}\vec E\cdot d\vec S = \iiint_V \divg\vec E\dd{V} = \frac{1}{\varepsilon_0}\iiint_V\rho\dd{V} = \frac{Q_{\text{enc}}}{\varepsilon_0}.$

This is Gauss's law in integral form — total flux of $\vec E$ through a closed surface equals enclosed charge over $\varepsilon_0$. Same logic gives the integral form of $\divg\vec B = 0$: total magnetic flux through any closed surface is zero (no magnetic monopoles).

The same conversion takes Faraday's $\nabla\times\vec E = -\partial_t\vec B$ to its integral form $\oint\vec E\cdot d\vec r = -\frac{d}{dt}\iint\vec B\cdot d\vec S$ via Stokes' theorem, and Ampère-Maxwell to its integral form. All four Maxwell equations exist in both forms; the theorems are the conversion factory.

Key takeaway: Maxwell's equations come in pairs (differential, integral). Green/Stokes/Divergence theorems are the conversion. Physicists use whichever form is easier for the problem at hand.
💡Non-Obvious Why do two surfaces sharing a boundary give the same Stokes integral?

Suppose $S_1$ and $S_2$ both have boundary $C$, oriented consistently. Glue them along $C$: $S_1 \cup (-S_2)$ (flipping the orientation of $S_2$) forms a closed surface enclosing some volume $V$. By the divergence theorem applied to $\curl\vec F$: $\iint_{S_1}\curl\vec F\cdot d\vec S - \iint_{S_2}\curl\vec F\cdot d\vec S = \oiint_{S_1\cup(-S_2)}\curl\vec F\cdot d\vec S = \iiint_V\divg(\curl\vec F)\dd{V}.$

The key identity: $\divg(\curl\vec F) = 0$ for any $C^2$ field $\vec F$ (you can check by direct expansion — mixed partials cancel pairwise). So the right side is zero, hence $\iint_{S_1} = \iint_{S_2}$. Any surface filling $C$ works.

This is why in EM you can compute the flux of $\vec B$ through a coil using any convenient surface bounded by the coil — flat disk, dome, anything. The result is determined entirely by the coil.

Key takeaway: $\divg\curl = 0$ + divergence theorem ⇒ flux of a curl through a surface depends only on the boundary, not the surface.
📐Computational When is the divergence theorem a computational shortcut?

Two main scenarios. (1) Boundary is complicated, interior is simple. Example: compute $\oiint_{\partial V}\vec F\cdot d\vec S$ where $\partial V$ is six faces of a cube. Doing six surface integrals separately is painful. If $\divg\vec F = c$ constant, the answer is just $c\cdot\text{vol}(V)$ — one multiplication. (2) Interior is hard, boundary is simple. Less common but happens: a tricky volume integral becomes a manageable surface integral once you realize it's $\divg$ of something nicer.

Rule of thumb: write down both sides. The one with fewer terms or simpler region wins. For Stokes', the analogous trick: if a line integral is hard, look for a $\curl$ form on the inside that's easy to integrate over any filling surface.

Aerospace example: lift force on an airfoil. Direct surface integration of pressure × normal over the wing skin is hard. But the lift can be related (via Kutta-Joukowski) to circulation around the wing, computed once and used everywhere.

Key takeaway: pick the side with the simpler geometry or simpler integrand. The theorems give you the choice — use it.
🎓Deep / Advanced What is "generalized Stokes" and why is it considered the unifying theorem?

On an oriented smooth manifold $M$ of dimension $n$ with boundary $\partial M$, and a $(n-1)$-form $\omega$ on $M$, the generalized Stokes theorem says: $\int_{\partial M}\omega = \int_M d\omega$. That's it. One line. The vector-calculus theorems of $\R^3$ are specializations to particular $M$, $\omega$, and dimensions.

This abstraction unifies FTC (dim 1), Green's/2D-Divergence (dim 2), Stokes'/3D-Divergence (dim 3), and extends seamlessly to any dimension. In 4D-spacetime, it's how integral conservation laws (charge, energy-momentum) get written in relativistic field theory. In algebraic topology, it underlies de Rham cohomology: $H^k_{\text{dR}}(M) = \ker(d_k)/\text{img}(d_{k-1})$ — measures "holes" in $M$ via forms-mod-exact.

Stokes' theorem is the source of the duality between geometry (manifolds with boundary) and algebra (forms with exterior derivative). The fact that $d^2 = 0$ (exterior derivative squared is zero) is what makes "closed = exact on contractible domains" work, generalizing "curl-free ⇒ gradient" and "divergence-free ⇒ curl of something".

Key takeaway: generalized Stokes is one line: $\int_{\partial M}\omega = \int_M d\omega$. Every vector-calc theorem you've learned is a corollary in low dimensions.
🧮Conceptual When do these theorems fail, and what happens?

Three failure modes. (1) Field is not $C^1$ inside the region. If $\vec F$ has a singularity in $D$, the curl/divergence may not be integrable, or it's a delta function. The classic vortex $\vec F = (-y, x)/(x^2+y^2)$ has $\curl\vec F = 0$ everywhere except the origin, but $\oint_C\vec F\cdot d\vec r = 2\pi$ around the unit circle — the theorem says $\iint_D 0\dd{A} = 2\pi$, which is false. The resolution: $\curl\vec F$ contains a Dirac mass at the origin (in distributional sense), and $\iint_D \delta\dd{A} = 1$, giving the $2\pi$.

(2) Boundary is not piecewise smooth. Fractal boundaries (snowflake curves) lack a well-defined tangent or normal; the theorems need to be extended via measure theory.

(3) Orientation inconsistency. If the boundary orientation doesn't match the right-hand rule for the surface normal (or CCW for 2D regions), the theorem holds with the opposite sign. Always check orientation conventions in your textbook.

Key takeaway: smoothness hypotheses matter. Singularities in $\vec F$ are interpreted as distributional sources; orientation conventions must agree.
Best resource: 3Blue1Brown — "Divergence and curl: the language of Maxwell's equations"; Khan Academy — Multivariable Calculus, "Green's, Stokes', and Divergence theorems"; MIT OCW 18.02 Lec 30–35; Paul's Online Math Notes — Surface Integrals; Susan Lamon — "Generalized Stokes for undergraduates", College Math J.

⚠️ Section 5 — Misconceptions & Common Errors

A · Conceptual Misconceptions
❌ Misconception: "Green's theorem requires the region to be a disk or rectangle." ✅ Correction: It works for any region with a piecewise-smooth simple closed boundary. Triangles, L-shapes, regions with holes (with appropriate orientation of all boundary components — outer CCW, inner CW), and more. For multiply connected regions, the boundary integral is the sum over all boundary curves with consistent orientation. 📖 Reference: Stewart §16.4 (note about regions with holes); Marsden & Tromba §8.1.
❌ Misconception: "Stokes' theorem only applies to flat surfaces." ✅ Correction: Stokes' applies to any oriented piecewise-smooth surface with boundary. Hemispheres, parabolic dishes, twisted ribbons (with care about orientation — Möbius strip fails Stokes' because it's non-orientable). The key is that the surface has a well-defined unit normal field that varies continuously. 📖 Reference: Marsden & Tromba §8.4; Spivak, Calculus on Manifolds, §5.
❌ Misconception: "The divergence theorem is a 3D-only result." ✅ Correction: The divergence theorem exists in every dimension. In 2D it's the flux form of Green's: $\oint_C\vec F\cdot\vec n\dd{s} = \iint_D\divg\vec F\dd{A}$. In $n$ dimensions: $\int_{\partial V}\vec F\cdot d\vec S = \int_V\divg\vec F\dd{V}$. The generalized-Stokes view makes this uniformity obvious. 📖 Reference: Hubbard & Hubbard §6.10; do Carmo, Differential Forms and Applications, Ch. 5.
B · Common Procedural Errors
❌ Error: "$\oint_C P\dd{x}+Q\dd{y} = \iint_D (P_x + Q_y)\dd{A}$." ✅ Correct: $(Q_x - P_y)$, not $(P_x + Q_y)$. The right-hand integrand is the scalar curl. $(P_x + Q_y)$ is the divergence — that goes with the flux form: $\oint_C \vec F\cdot\vec n\dd{s} = \iint_D(P_x+Q_y)\dd{A}$. Mixing them is the most common Green's-theorem slip. 🔍 Why students do this: confuse the two equivalent statements of Green's theorem (circulation vs. flux forms).
❌ Error: "$\curl(x, y, z) = (1, 1, 1)$." ✅ Correct: $\curl(F_1, F_2, F_3) = (\partial_y F_3 - \partial_z F_2, \partial_z F_1 - \partial_x F_3, \partial_x F_2 - \partial_y F_1)$. For $\vec F = (x, y, z)$: each component depends only on its own variable, so all cross-partials vanish. $\curl = (0,0,0)$. The student is confusing $\curl$ with $\divg$ (which would be $1+1+1 = 3$). 🔍 Why students do this: memorize symbols ($\nabla\times$) without practicing the determinant expansion; confuse with $\divg = \nabla\cdot$.
❌ Error: "Divergence theorem on the unit sphere with $\vec F = (x^3, y^3, z^3)$: flux = $\iiint_V (3x^2+3y^2+3z^2)\dd{V} = 3\iiint_V\rho^2\dd{V} = 3\cdot\frac{4\pi}{5}$." ✅ Correct: In spherical, $\iiint_V \rho^2\dd{V} = \int_0^{2\pi}\!\int_0^\pi\!\int_0^1 \rho^2\cdot\rho^2\sin\phi\dd\rho\dd\phi\dd\theta = 2\pi\cdot 2\cdot\frac{1}{5} = \frac{4\pi}{5}$. So flux $= 3\cdot\frac{4\pi}{5} = \frac{12\pi}{5}$. The error in the wrong version is dropping the Jacobian $\rho^2\sin\phi$ — common when rushing. 🔍 Why students do this: substitute $x^2+y^2+z^2 = \rho^2$ but forget that $\dd{V}$ also transforms.
❌ Error: "Applying Stokes' to $\vec F = (-y,x,0)/(x^2+y^2)$ on the unit circle: $\curl\vec F = 0$, so $\oint_C\vec F\cdot d\vec r = 0$." ✅ Correct: $\curl\vec F = 0$ on $\R^3\setminus\{z\text{-axis}\}$, but the field has a singularity along the $z$-axis. Any surface filling the unit circle in the $xy$-plane must cross the $z$-axis — Stokes' hypotheses (smooth $\vec F$ on $S$) fail. The integral is actually $2\pi$ (by direct computation). The lesson: always check that $\vec F$ is $C^1$ on the entire filling surface before applying Stokes'. 🔍 Why students do this: apply theorems without checking domain hypotheses — especially for fields with singularities.
Education research: Knuth, E. — "Secondary school mathematics teachers' conceptions of proof", JRME 33 (2002); Schwarzenberger, R. — "Why calculus cannot be made easy", MathGazette 64 (1980); Bressoud, D. — "Calculus reordered", Princeton (2019); Carlson, M. — "Calculus students' difficulties in understanding fundamental ideas", RUME Conference (2002).