Vector Calculus Theorems
Vector Calculus Theorems
Compare both sides of Green's theorem, Stokes' theorem, and the divergence theorem.
Solve Equation evaluates greens_theorem(-y,x,circle(0,0,1)). Green's theorem compares the circulation of F = (-y, x) around the unit circle with the double integral of ∂Q/∂x − ∂P/∂y over the disk. The curl is the constant 2 and the area is pi, so both sides equal 2*pi. The steps show each side and state that they agree. The boundary is counterclockwise.
The same card evaluates stokes_theorem(-y,x,0,disk(0,0,1)). curl F is (0, 0, 2), the upward normal is +k, and the flux through the disk is 2*pi, matching the boundary circulation. divergence_theorem(x,y,z,sphere(0,0,0,1)) is unchanged and equals 4*pi. A clockwise circle, a downward disk, a singularity inside the region, or an unsupported boundary is reported as a sign change or as an error rather than as an unverified number.
Equation
greens_theorem(-y,x,circle(0,0,1))
Graph preview
When a vector calculus theorem applies
Green's theorem says the circulation of a planar field F = (P, Q) around a positively oriented simple closed curve equals the double integral of ∂Q/∂x − ∂P/∂y over the enclosed region. Positive orientation is counterclockwise. The circulation and the double integral are computed separately. A value is returned only when those two sides agree. Clockwise orientation changes the sign of both sides. A circle, an ellipse, and a rectangle with x0 < x1 and y0 < y1 are accepted. A zero radius, a reversed rectangle, an unknown region, or a field that is singular inside the region is rejected.
Stokes' theorem says the circulation of F along the oriented boundary of an oriented surface equals the flux of curl F through the surface. The normal and the boundary follow the right-hand rule. An upward disk in a horizontal plane has normal +k and a counterclockwise boundary. Downward reverses both. A parametric surface uses r_u × r_v, and the boundary of the parameter rectangle is traversed so that it matches that normal. A surface whose partial derivatives are parallel has no normal. The divergence theorem is unchanged: outward flux through a closed sphere, ellipsoid, cylinder, or cube equals the triple integral of div F.
Reading the input
greens_theorem(-y,x,circle(0,0,1))— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Other versions of this example
These stay on this page so each version keeps the same explanation. Choose Try example to run a version in its Studio workflow, or copy it into the editable field below.
Green's theorem
Expected value 2*pi. The circulation and the double integral agree.
greens_theorem(-y,x,circle(0,0,1))
Stokes' theorem
Expected value 2*pi for the upward disk.
stokes_theorem(-y,x,0,disk(0,0,1))
Divergence theorem
Expected value 4*pi. This command is unchanged.
divergence_theorem(x,y,z,sphere(0,0,0,1))
Try a change
- Add clockwise to greens_theorem(-y,x,circle(0,0,1)). Both the circulation and the double integral change sign, and the value is -2*pi. Adding downward to stokes_theorem(-y,x,0,disk(0,0,1)) gives -2*pi.
- Try greens_theorem(-y/(x^2+y^2), x/(x^2+y^2), circle(0,0,1)). The origin is singular inside the disk, so Green's theorem is not applied.
- Try stokes_theorem(0,0,1,u,0,0,u,0,1,v,0,1). The partial derivatives are parallel, so the surface has no normal.
Solve Equation computes the circulation and the matching double integral or flux of curl F, shows both sides, and boxes the value only when they agree. Orientation, singularities, and unsupported regions are checked before a number is returned. The divergence theorem stays on its existing closed surfaces.