DGS Studio

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

Graph preview of greens_theorem(-y,x,circle(0,0,1))
A static sample of this expression. The studio draws the full interactive result.

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

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

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.

Edit and generate

Solve Equation opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples