Vector Calculus
Vector calculus studies fields, flow, circulation, and flux. It connects line integrals over curves, double integrals over regions, and surface integrals over surfaces through the Fundamental Theorem for Line Integrals, Green's Theorem, Stokes' Theorem, and the Divergence Theorem.
These theorems are higher-dimensional versions of the Fundamental Theorem of Calculus. They say that an integral over a boundary can often be computed from information inside the region, or that an integral over a region can be converted to a boundary integral when that is easier.
Definitions
A vector field in the plane has form
In space,
A scalar line integral along a curve is
A vector line integral along , , is
If , then is conservative and is a potential function.
Divergence is
Curl is
For a plane field , the scalar curl component is
Flux measures flow through a curve or surface. Circulation measures flow along a curve.
Key results
The Fundamental Theorem for Line Integrals says that if and goes from point to point , then
The proof is the chain rule:
Green's Theorem states that for a positively oriented simple closed curve bounding region ,
Stokes' Theorem states
where is the oriented boundary of .
The Divergence Theorem states
where is a closed outward-oriented surface bounding solid .
For a plane field on a simply connected domain, a common test for conservativeness is
The domain condition matters. A field may pass the partial derivative test on a domain with a hole but fail to have a global potential.
Orientation is part of every theorem. Green's Theorem uses counterclockwise orientation for positive boundary direction. Stokes' Theorem uses the right-hand rule between the surface normal and boundary orientation. The Divergence Theorem uses outward normals on closed surfaces.
A line integral of a vector field computes accumulated tangential component. Along a parametrized curve , the term
measures the part of the field pointing along the motion, scaled by speed. This is why vector line integrals model work.
Flux integrals compute normal component. For a parametrized surface , an oriented surface element is
Then
The sign depends on the chosen normal orientation.
Divergence has a source interpretation. Positive divergence means the field has net outward flow near a point; negative divergence means net inward flow. Curl has a rotation interpretation. In a fluid analogy, curl measures the tendency of a small paddle wheel to spin.
The big theorems form a hierarchy. Green's Theorem is a two-dimensional curl theorem. Stokes' Theorem generalizes circulation-curl relationships to surfaces in space. The Divergence Theorem relates flux through a closed surface to source strength in the enclosed volume. Each theorem requires smoothness and orientation hypotheses that should be checked before use.
Conservative fields are path independent. If , the work between two endpoints depends only on the endpoints. Equivalently, every closed-loop integral is zero:
On a simply connected domain, this is closely related to curl being zero. On domains with holes, a field can have zero curl where it is defined but still fail to be globally conservative.
Green's Theorem has two common forms. The circulation form is
The flux form is
Both compare boundary behavior with a region integral, but one uses tangential circulation and the other uses outward normal flux.
The Divergence Theorem is especially useful when a direct surface integral would require several surface pieces. If a closed surface is made from a cylinder plus caps, direct flux requires each piece. The divergence theorem may replace all pieces with one triple integral over the enclosed solid.
Stokes' Theorem is useful because many different surfaces can have the same boundary curve. If orientation is handled consistently, the surface integral of curl is the same over any convenient surface spanning the boundary. Choosing a flat disk instead of a curved cap can turn a difficult integral into an easy one.
Visual
| Theorem | Boundary integral | Interior integral | Main idea |
|---|---|---|---|
| FTC for line integrals | work along path | potential difference | conservative fields |
| Green | circulation around plane curve | double integral of curl | 2D boundary to region |
| Stokes | circulation around space curve | surface integral of curl | boundary to surface |
| Divergence | flux through closed surface | triple integral of divergence | surface to volume |
Worked example 1: work in a conservative field
Problem. Let
Find the work done along any path from to .
Method.
- Look for a potential function with
- Integrate with respect to :
- Differentiate with respect to :
- Match :
- A potential is
- Apply the Fundamental Theorem for Line Integrals:
- Evaluate:
Checked answer. The work is . The path does not matter because the field is conservative.
Worked example 2: Green's Theorem around the unit circle
Problem. Evaluate
where is the positively oriented unit circle.
Method.
- Identify
- Compute partial derivatives:
- The curl scalar is
-
The unit circle bounds the disk of area .
-
Apply Green's Theorem:
- Evaluate:
Checked answer. The circulation is . The positive orientation is counterclockwise, matching Green's Theorem.
A direct parametrization check gives the same value. Let
Then
and
The dot product is , so the line integral is
The direct computation also confirms the orientation. The parametrization moves counterclockwise, so it matches the positive orientation assumed by Green's Theorem.
If the circle were traversed clockwise, the same computation would give . The region integral from Green's Theorem would still be , but the theorem's positive-orientation hypothesis would be violated, so a negative sign would be needed.
For flux, the analogous orientation choice is the normal direction. On a closed surface, "outward" is the standard convention. On an open surface, the problem must specify or imply a normal direction, and the boundary orientation for Stokes' Theorem must match that choice by the right-hand rule.
The safest workflow is to name the theorem, state the orientation, rewrite the integral in the theorem's notation, and only then compute. This prevents mixing a circulation integral with a flux theorem or applying a closed-surface theorem to an open surface by accident during setup and checking work later on.
That workflow keeps geometry and algebra aligned throughout the computation and final interpretation clearly enough for checking answers carefully.
Code
from math import cos, sin, pi
def line_integral_circle(n=10000):
total = 0.0
dt = 2*pi / n
for i in range(n):
t = (i + 0.5) * dt
x, y = cos(t), sin(t)
dx_dt, dy_dt = -sin(t), cos(t)
p, q = -y, x
total += (p * dx_dt + q * dy_dt) * dt
return total
print(line_integral_circle())
Common pitfalls
- Ignoring orientation. Reversing a curve reverses circulation.
- Checking for a conservative field without checking domain conditions.
- Confusing flux with circulation. Flux uses normal direction; circulation uses tangent direction.
- Applying the Divergence Theorem to a surface that is not closed without adding missing pieces or using another method.
- Forgetting that Stokes' Theorem requires compatible boundary and normal orientations.
- Treating and as interchangeable. Divergence measures source strength; curl measures rotational tendency.
Connections
- Vector Functions and Motion: line integrals use parametrized curves.
- Partial Derivatives and the Gradient: gradient, divergence, and curl are built from partial derivatives.
- Multiple Integrals: Green's and Divergence Theorems convert boundary integrals to multiple integrals.
- Vectors and Geometry of Space: orientation, normals, dot products, and cross products support the big theorems.