TExcelTAD
Home › Calculus in Depth › Summary of Vector Calculus

Summary of Vector Calculus

All the main theorems of vector calculus are versions of one statement: integrating a derivative over a region gives the same result as integrating the original function over the region's boundary. This page puts the operators, identities and theorems of the chapter side by side as a reference, gives a short guide for choosing the right tool, and checks the key identities with SymPy and on a discrete grid.

The three operators

With ∇=⟨∂/∂x,∂/∂y,∂/∂z⟩\nabla = \langle \partial/\partial x, \partial/\partial y, \partial/\partial z \rangle, a scalar field ff and a vector field F=⟨P,Q,R⟩\mathbf{F} = \langle P, Q, R \rangle:

Operator Input → output Formula Meaning
grad⁡f=∇f\operatorname{grad} f = \nabla f scalar → vector ⟨fx,fy,fz⟩\langle f_x, f_y, f_z \rangle direction of steepest increase; directional derivatives
curl⁡F=∇×F\operatorname{curl} \mathbf{F} = \nabla \times \mathbf{F} vector → vector ⟨Ry−Qz,Pz−Rx,Qx−Py⟩\langle R_y - Q_z, P_z - R_x, Q_x - P_y \rangle circulation per unit area; local spin
div⁡F=∇⋅F\operatorname{div} \mathbf{F} = \nabla \cdot \mathbf{F} vector → scalar Px+Qy+RzP_x + Q_y + R_z outward flux per unit volume; sources and sinks
Laplacian ∇2f=div⁡grad⁡f\nabla^2 f = \operatorname{div} \operatorname{grad} f scalar → scalar fxx+fyy+fzzf_{xx} + f_{yy} + f_{zz} how ff differs from its local average

Details and examples are in Curl and Divergence and, for a first look, Divergence and Curl.

Identities

Identity Consequence
curl⁡(∇f)=0\operatorname{curl}(\nabla f) = \mathbf{0} gradient fields are irrotational
div⁡(curl⁡F)=0\operatorname{div}(\operatorname{curl} \mathbf{F}) = 0 curl fields are incompressible (no sources)
∇(fg)=f∇g+g∇f\nabla(fg) = f\nabla g + g\nabla f product rule for gradients
div⁡(fF)=fdiv⁡F+∇f⋅F\operatorname{div}(f\mathbf{F}) = f \operatorname{div} \mathbf{F} + \nabla f \cdot \mathbf{F} product rule for divergence
curl⁡(fF)=fcurl⁡F+∇f×F\operatorname{curl}(f\mathbf{F}) = f \operatorname{curl} \mathbf{F} + \nabla f \times \mathbf{F} product rule for curl
curl⁡(curl⁡F)=∇(div⁡F)−∇2F\operatorname{curl}(\operatorname{curl} \mathbf{F}) = \nabla(\operatorname{div} \mathbf{F}) - \nabla^2 \mathbf{F} used to derive wave equations; ∇2F\nabla^2 \mathbf{F} is applied componentwise
On a simply connected region: curl⁡F=0  ⟺  F=∇f\operatorname{curl} \mathbf{F} = \mathbf{0} \iff \mathbf{F} = \nabla f test for a conservative field

The theorems: derivative inside = function on the boundary

Theorem Region (dimension) Boundary Statement
Fundamental Theorem of Calculus interval [a,b][a, b] (1) two points ∫abF′(x) dx=F(b)−F(a)\int_a^b F'(x)\,dx = F(b) - F(a)
Fundamental Theorem for Line Integrals curve CC from AA to BB (1) two points ∫C∇f⋅dr=f(B)−f(A)\int_C \nabla f \cdot d\mathbf{r} = f(B) - f(A)
Green's theorem, circulation form plane region DD (2) closed curve, counter-clockwise ∬D(Qx−Py) dA=∮CP dx+Q dy\iint_D (Q_x - P_y)\,dA = \oint_C P\,dx + Q\,dy
Green's theorem, flux form plane region DD (2) closed curve, outward normal ∬D(Px+Qy) dA=∮CF⋅n ds\iint_D (P_x + Q_y)\,dA = \oint_C \mathbf{F} \cdot \mathbf{n}\,ds
Stokes' theorem oriented surface SS (2) closed curve, right-hand rule ∬Scurl⁡F⋅dS=∮CF⋅dr\iint_S \operatorname{curl} \mathbf{F} \cdot d\mathbf{S} = \oint_C \mathbf{F} \cdot d\mathbf{r}
Divergence theorem solid EE (3) closed surface, outward ∭Ediv⁡F dV=∯SF⋅dS\iiint_E \operatorname{div} \mathbf{F}\,dV = \oiint_S \mathbf{F} \cdot d\mathbf{S}

Two quick consequences: the flux of curl⁡F\operatorname{curl} \mathbf{F} through a closed surface is 0 (no boundary curve), and the circulation of ∇f\nabla f around a closed curve is 0 (the two endpoints coincide). These are the integral forms of the first two identities.

Which tool when

text
Line integral ∫_C F · dr
  ├─ curl F = 0 on a simply connected region → find f with ∇f = F, use f(B) − f(A)
  ├─ C closed, planar → Green's theorem
  ├─ C closed, in space → Stokes: span C with the simplest surface (often flat)
  └─ otherwise → parametrise C and integrate
Flux ∬_S F · dS
  ├─ S closed → divergence theorem (watch for singularities inside, e.g. r/|r|³)
  ├─ S open but F = curl G → Stokes: only the boundary of S matters
  ├─ S open, closing it with a simple lid helps → divergence theorem minus the lid's flux
  └─ otherwise → parametrise S: ∬_D F(r(u, v)) · (r_u × r_v) dA

Checking the identities symbolically

SymPy's sympy.vector module knows grad, curl and div. With completely arbitrary functions ff, gg, PP, QQ, RR of (x,y,z)(x, y, z), the identities must simplify to zero.

python · try it yourself
import sympy as sp
from sympy.vector import CoordSys3D, gradient, curl, divergence

N = CoordSys3D('N')
x, y, z = N.x, N.y, N.z
f = sp.Function('f')(x, y, z)
P, Q, R = [sp.Function(name)(x, y, z) for name in 'PQR']
F = P * N.i + Q * N.j + R * N.k

print("curl(grad f)        =", curl(gradient(f)))
print("div(curl F)         =", sp.simplify(divergence(curl(F))))
lhs = divergence(f * F)
rhs = f * divergence(F) + gradient(f).dot(F)
print("div(fF) - [f div F + grad f · F] =", sp.simplify(lhs - rhs))

lap = lambda h: sp.diff(h, x, 2) + sp.diff(h, y, 2) + sp.diff(h, z, 2)
cc = curl(curl(F))
right = gradient(divergence(F)) - (lap(P) * N.i + lap(Q) * N.j + lap(R) * N.k)
print("curl curl F - (grad div F - ∇²F) =", [sp.simplify((cc - right).dot(e)) for e in (N.i, N.j, N.k)])
curl(grad f)        = 0
div(curl F)         = 0
div(fF) - [f div F + grad f · F] = 0
curl curl F - (grad div F - ∇²F) = [0, 0, 0]

Every identity rests on the equality of mixed partials (Clairaut's theorem from Partial Derivatives): in div⁡(curl⁡F)\operatorname{div}(\operatorname{curl} \mathbf{F}) the terms come in pairs like Ryx−RxyR_{yx} - R_{xy}.

The identities survive discretisation

Fluid solvers rely on a discrete version of div⁡(curl⁡)=0\operatorname{div}(\operatorname{curl}) = 0. In 2D, store a stream function ψ\psi at the grid corners, and define the face velocities u=∂ψ/∂yu = \partial\psi/\partial y and v=−∂ψ/∂xv = -\partial\psi/\partial x by differences along each face. The net outflow of every cell is then a sum of corner values that cancels exactly, whatever ψ\psi is:

python · try it yourself
import numpy as np

rng = np.random.default_rng(7)
n, h = 64, 1.0 / 64
psi = rng.normal(size=(n + 1, n + 1))            # random stream function at corners [i, j] = (x_i, y_j)

u = (psi[:, 1:] - psi[:, :-1]) / h               # on vertical faces:   d(psi)/dy
v = -(psi[1:, :] - psi[:-1, :]) / h              # on horizontal faces: -d(psi)/dx
div = (u[1:, :] - u[:-1, :]) / h + (v[:, 1:] - v[:, :-1]) / h
print("cells:", div.size)
print("largest |div| :", f"{float(np.abs(div).max()):.1e}")
print("largest |u|   :", f"{float(np.abs(u).max()):.1e}")
cells: 4096
largest |div| : 3.6e-12
largest |u|   : 3.5e+02

Velocities of size hundreds, yet every cell has zero net flux up to rounding: the discrete operators commute exactly as the continuous ones do, which is why staggered "MAC" grids are the standard layout for incompressible flow.

In software

  • Fluid simulation: projection makes div⁡v=0\operatorname{div} \mathbf{v} = 0; vorticity (curl⁡v\operatorname{curl} \mathbf{v}) drives swirl effects; staggered grids keep the identities exact.
  • AI steering and navigation: potential fields ff give forces −∇f-\nabla f; curl-free means no loop can gain energy, and adding a small curl term makes agents circle obstacles instead of getting stuck.
  • Lighting: irradiance is a flux; the solid-angle formula behind area lights and inside/outside tests comes from the divergence theorem applied to r/∣r∣3\mathbf{r}/\lvert \mathbf{r} \rvert^3.
  • Geometry: shoelace area (Green), mesh volume and inertia (divergence theorem), vertex normals (ru×rv\mathbf{r}_u \times \mathbf{r}_v).

Exercises

Exercise 1: Classify the fields

For each field decide whether its curl and its divergence are zero: (a) ⟨y,x,0⟩\langle y, x, 0 \rangle, (b) ⟨−y,x,0⟩\langle -y, x, 0 \rangle, (c) ⟨x,y,z⟩\langle x, y, z \rangle.

Answer

(a) curl 0\mathbf{0}, div 0. (b) curl ⟨0,0,2⟩\langle 0, 0, 2 \rangle, div 0. (c) curl 0\mathbf{0}, div 3.

Solution
(a) curl⁡=⟨0,0,1−1⟩=0,div⁡=0+0+0=0(=∇(xy), and harmonic)(b) curl⁡=⟨0,0,1−(−1)⟩=⟨0,0,2⟩,div⁡=0(pure rotation)(c) curl⁡=0,div⁡=1+1+1=3(pure expansion, =∇(∣r∣2/2))\begin{aligned} &\text{(a) } \operatorname{curl} = \langle 0, 0, 1 - 1 \rangle = \mathbf{0}, \quad \operatorname{div} = 0 + 0 + 0 = 0 && (= \nabla(xy), \text{ and harmonic}) \\ &\text{(b) } \operatorname{curl} = \langle 0, 0, 1 - (-1) \rangle = \langle 0, 0, 2 \rangle, \quad \operatorname{div} = 0 && \text{(pure rotation)} \\ &\text{(c) } \operatorname{curl} = \mathbf{0}, \quad \operatorname{div} = 1 + 1 + 1 = 3 && (\text{pure expansion, } = \nabla(\lvert \mathbf{r} \rvert^2/2)) \end{aligned}

Exercise 2: Can it be a curl?

Is there a field G\mathbf{G} with curl⁡G=⟨x2,y2,z2⟩\operatorname{curl} \mathbf{G} = \langle x^2, y^2, z^2 \rangle?

Answer

No.

Solution

If F=curl⁡G\mathbf{F} = \operatorname{curl} \mathbf{G} then div⁡F=0\operatorname{div} \mathbf{F} = 0. Here div⁡F=2x+2y+2z\operatorname{div} \mathbf{F} = 2x + 2y + 2z, which is not identically zero, so no such G\mathbf{G} exists.

Exercise 3: Choose the theorem

Compute ∮CF⋅dr\oint_C \mathbf{F} \cdot d\mathbf{r} for F=⟨2xy+z,x2,x⟩\mathbf{F} = \langle 2xy + z, x^2, x \rangle around any closed curve CC.

Answer
Solution
curl⁡F=⟨0−0,1−1,2x−2x⟩=0, on all of R3 (simply connected)F=∇(x2y+xz)  →  every closed-loop integral is 0\begin{aligned} \operatorname{curl} \mathbf{F} &= \langle 0 - 0, 1 - 1, 2x - 2x \rangle = \mathbf{0}, \text{ on all of } \mathbb{R}^3 \text{ (simply connected)} \\ \mathbf{F} &= \nabla(x^2y + xz) \;\to\; \text{every closed-loop integral is 0} \end{aligned}

Exercise 4: Close the surface (code)

Find the upward flux of F=⟨x,y,1⟩\mathbf{F} = \langle x, y, 1 \rangle through the paraboloid z=1−x2−y2z = 1 - x^2 - y^2, z≥0z \ge 0, by closing it with the unit disc at z=0z = 0 and using the divergence theorem. Check with the graph formula in SymPy.

Answer

2π2\pi.

Solution
div⁡F=2;solid volume=∫02π∫01(1−r2) r dr dθ=π/2;total outward flux=πbottom disc, outward normal −k: F⋅(−k)=−1,flux=−πparaboloid=π−(−π)=2π\begin{aligned} &\operatorname{div} \mathbf{F} = 2; \quad \text{solid volume} = \int_0^{2\pi} \int_0^1 (1 - r^2)\,r\,dr\,d\theta = \pi/2; \quad \text{total outward flux} = \pi \\ &\text{bottom disc, outward normal } -\mathbf{k}\text{: } \mathbf{F} \cdot (-\mathbf{k}) = -1, \quad \text{flux} = -\pi \\ &\text{paraboloid} = \pi - (-\pi) = 2\pi \end{aligned}
python · try it yourself
import sympy as sp
r, t = sp.symbols('r t', nonnegative=True)
x, y = r * sp.cos(t), r * sp.sin(t)
integrand = x * (2 * x) + y * (2 * y) + 1        # -P g_x - Q g_y + R with g_x = -2x, g_y = -2y
print(sp.integrate(sp.simplify(integrand) * r, (r, 0, 1), (t, 0, 2 * sp.pi)))
2*pi

Test yourself

Which statement is the integral form of the identity div⁡(curl⁡F)=0\operatorname{div}(\operatorname{curl} \mathbf{F}) = 0?

  1. The circulation of a gradient around a loop is 0
  2. The flux of curl⁡F\operatorname{curl} \mathbf{F} through any closed surface is 0
  3. Green's theorem in flux form
  4. ∇2f=div⁡∇f\nabla^2 f = \operatorname{div} \nabla f

To compute ∫CF⋅dr\int_C \mathbf{F} \cdot d\mathbf{r} along an open curve, the first thing worth checking is…

  1. whether div⁡F=0\operatorname{div} \mathbf{F} = 0
  2. whether curl⁡F=0\operatorname{curl} \mathbf{F} = \mathbf{0} on a simply connected region, so F\mathbf{F} has a potential
  3. whether CC is planar
  4. whether F\mathbf{F} is constant

All the main theorems share which pattern?

  1. integral of a derivative over a region = integral of the function over its boundary
  2. every field is a gradient
  3. flux equals circulation
  4. volume equals surface area