Line Integrals

A line integral takes the ordinary integral ∫abf(x) dx\int_a^b f(x)\,\mathrm{d}x — a sum along a straight piece of the real line — and bends the line into an arbitrary curve threading through space. You still chop the domain into tiny pieces, weight the field by the size of each, and sum in the limit of vanishing pieces; only now the pieces are little arcs of a curve CC, and the weight is either their unsigned length or their directed displacement. That single choice splits the subject in two. The scalar line integral ∫Cf ds\int_C f\,\mathrm{d}s weights a scalar field by arc length — the mass of a bent wire. The vector line integral ∫CF⋅dr\int_C \mathbf{F}\cdot\mathrm{d}\mathbf{r} weights a vector field by directed displacement, projecting it onto the tangent — the work integral of mechanics and the circulation integral of fluids and electromagnetism. The whole machine runs on one trick: choose any smooth parametrisation r(t)\mathbf{r}(t), and the line integral collapses to an ordinary one-variable integral in tt. What makes it the load-bearing wall of vector calculus is a question with no analogue on the real line — does the answer depend on the route, or only on the endpoints? When the field is a gradient, F=∇ϕ\mathbf{F}=\nabla\phi, the work integral forgets the path and returns ϕ(B)−ϕ(A)\phi(B)-\phi(A); otherwise the path matters, closed loops enclose nonzero circulation, and that failure is measured exactly by the curl through Green's and Stokes' theorems. Mechanical work, voltage, Ampère's law, and fluid vorticity are all this one integral.

Key takeaways
  • A line integral accumulates a field along a curve CC; parametrise by r(t)\mathbf{r}(t), t∈[a,b]t\in[a,b], and it becomes an ordinary integral in tt.
  • Scalar integral ∫Cf ds\int_C f\,\mathrm{d}s uses the unsigned ds=∣r′∣ dt\mathrm{d}s=|\mathbf{r}'|\,\mathrm{d}t; vector (work) integral ∫CF⋅dr\int_C \mathbf{F}\cdot\mathrm{d}\mathbf{r} uses the directed dr=r′ dt\mathrm{d}\mathbf{r}=\mathbf{r}'\,\mathrm{d}t, keeping only the tangential part of F\mathbf{F}.
  • The canonical meaning of the vector integral is work: W=∫CF⋅drW=\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r} is the energy a force delivers along a path.
  • A conservative field F=∇ϕ\mathbf{F}=\nabla\phi makes the integral path-independent and equal to ϕ(B)−ϕ(A)\phi(B)-\phi(A) (gradient theorem); its loop integral vanishes.
  • Non-conservative fields carry circulation: Green's and Stokes' theorems tie a closed line integral to the curl over any spanning region or surface.
  • Curl-free is not conservative unless the domain is simply connected — the angle field gives ∮=2π\oint=2\pi around a hole.
  • Key idea: Pick a parametrisation r(t)\mathbf{r}(t), t∈[a,b]t\in[a,b]; then ∫Cf ds=∫abf(r(t)) ∣r′(t)∣ dt\int_C f\,\mathrm{d}s=\int_a^b f(\mathbf{r}(t))\,|\mathbf{r}'(t)|\,\mathrm{d}t and ∫CF⋅dr=∫abF(r(t))⋅r′(t) dt\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=\int_a^b\mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\,\mathrm{d}t. The value is independent of the parametrisation (scalar) or independent up to an orientation sign (vector).
The core insight

Pick a parametrisation r(t)\mathbf{r}(t), t∈[a,b]t\in[a,b], of the curve; then both flavours become ordinary tt-integrals, ∫Cf ds=∫abf(r(t)) ∣r′(t)∣ dt\int_C f\,\mathrm{d}s=\int_a^b f(\mathbf{r}(t))\,|\mathbf{r}'(t)|\,\mathrm{d}t and ∫CF⋅dr=∫abF(r(t))⋅r′(t) dt\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=\int_a^b\mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\,\mathrm{d}t, whose value is independent of the parametrisation you choose (scalar) or independent up to a sign fixed by orientation (vector).

Where this lives today

The line integral is the operational definition of quantities measured every day. In electromagnetism it is two Maxwell equations in integral form: Faraday's law ∮CE⋅dr=−dΦB/dt\oint_C\mathbf{E}\cdot\mathrm{d}\mathbf{r}=-\mathrm{d}\Phi_B/\mathrm{d}t is what an EMF meter reads around a coil, and Ampère's law ∮CB⋅dr=μ0Ienc\oint_C\mathbf{B}\cdot\mathrm{d}\mathbf{r}=\mu_0 I_{\text{enc}} gives a solenoid's field. In aerodynamics the circulation Γ=∮Cv⋅dr\Gamma=\oint_C\mathbf{v}\cdot\mathrm{d}\mathbf{r} around a wing sets its lift through Kutta–Joukowski, L′=ρUΓL'=\rho U\Gamma, and Kelvin's theorem (that Γ\Gamma is conserved for an ideal fluid) explains the starting vortex shed behind an accelerating aerofoil. Promoted to a phase integral ∮p⋅dq\oint\mathbf{p}\cdot\mathrm{d}\mathbf{q}, the same object is Bohr–Sommerfeld quantisation and, in quantum matter, the Berry phase ∮CA⋅dk\oint_C\mathbf{A}\cdot\mathrm{d}\mathbf{k} around a loop in momentum space — whose 2π2\pi-quantised values (the same non-simply-connected physics as the angle field) underlie the Aharonov–Bohm effect and quantum-Hall topological invariants. Whenever a measured number accumulates a field along a path, a line integral is doing the accounting.

The physical picture

Imagine hiking a trail CC while a wind F\mathbf{F} blows. At each footstep dr\mathrm{d}\mathbf{r} the wind helps or hinders you by F⋅dr\mathbf{F}\cdot\mathrm{d}\mathbf{r} — its component along your step, times the step length. A crosswind does no work, a tailwind positive, a headwind negative. Add these over the whole trail and you get the total work the wind does; that running sum is the vector line integral. The scalar version is even more tangible: bend a wire into the shape of CC with linear mass density ff; multiply density by each length ds\mathrm{d}s and sum, and you have weighed the wire. Here only the length of each piece counts, never its direction — which is why ds\mathrm{d}s is unsigned and the scalar integral does not care which way you walk.

Figure
A curve C traversed from A to B and chopped into directed steps dr: the vector line integral sums the tangential projection F ⋅ T̂ along the way, so a crosswind does no work while the along-curve component of F is what accumulates
W = ∫ F ⋅ dr — only the tangential component F ⋅ T̂ accumulates along the curve A B curve C T̂ F T̂ F T̂ F dr = r′(t) dt F ⋅ dr = (F ⋅ T̂) ds ds = speed × dt

Whether the work integral depends on the route is the central drama of the subject, with no counterpart on the real line. For a conservative field the wind is the downhill direction of a hidden landscape ϕ\phi; the total work is the elevation change between start and finish, so any two routes with the same endpoints agree and a loop does zero net work. For a non-conservative field the answer genuinely depends on the route — a longer or twistier path changes the total, and a closed loop can accumulate nonzero circulation. The cleanest way to see this is to compute the same work along two curves with the same endpoints, watch the numbers disagree, and then watch the gap turn out to equal an enclosed area.

Figure
Path dependence made concrete for F = (y, 2x): the straight line O→P gives work 3/2 while the parabola y = x² gives 5/3, and the gap 5/3 − 3/2 = 1/6 is exactly the shaded area enclosed, because ∂Q/∂x − ∂P/∂y = 2 − 1 = 1 in Green's theorem
Two paths, same endpoints, different work — and the gap equals the enclosed area x y O (0,0) P (1,1) line y = x W = 3/2 parabola y = x² W = 5/3 enclosed area = 1/6 ∮ F ⋅ dr = 5/3 − 3/2 = 1/6 = ∬ (∂Q/∂x − ∂P/∂y) dA, curl = 1

The core equations

The scalar line integral generalises the ordinary integral directly: weight a scalar field ff by the length of each tiny arc and sum. Parametrising CC turns the arc-length element into ds=∣r′(t)∣ dt\mathrm{d}s=|\mathbf{r}'(t)|\,\mathrm{d}t — speed times parameter step — and the whole thing becomes an ordinary tt-integral.

∫Cf ds=∫abf(r(t)) ∣r′(t)∣ dt(1)\int_C f\,\mathrm{d}s = \int_a^b f(\mathbf{r}(t))\,\bigl|\mathbf{r}'(t)\bigr|\,\mathrm{d}t \qquad (1)

where: ff — scalar field defined on the curve; r(t)\mathbf{r}(t) — parametrisation of CC for t∈[a,b]t\in[a,b]; ds\mathrm{d}s — unsigned arc-length element, ds=∣r′(t)∣ dt\mathrm{d}s=|\mathbf{r}'(t)|\,\mathrm{d}t; ∣r′(t)∣|\mathbf{r}'(t)| — speed along the parametrisation. Reading: the answer is the field averaged along the wire, weighted by how much wire sits at each point. The vector line integral instead weights the field by the directed displacement dr\mathrm{d}\mathbf{r}, keeping only the component of F\mathbf{F} along the curve. Substituting dr=r′(t) dt\mathrm{d}\mathbf{r}=\mathbf{r}'(t)\,\mathrm{d}t again reduces it to one ordinary integral — the object physicists call work or circulation.

∫CF⋅dr=∫abF(r(t))⋅r′(t) dt(2)\int_C \mathbf{F}\cdot\mathrm{d}\mathbf{r} = \int_a^b \mathbf{F}(\mathbf{r}(t))\cdot \mathbf{r}'(t)\,\mathrm{d}t \qquad (2)

where: F\mathbf{F} — vector field (e.g. a force); dr\mathrm{d}\mathbf{r} — directed displacement element, r′(t) dt\mathbf{r}'(t)\,\mathrm{d}t; r′(t)\mathbf{r}'(t) — velocity/tangent vector. Reading: project F\mathbf{F} onto the direction of travel and add up, keeping the sign. The two integrals are linked through the unit tangent T^=r′/∣r′∣\hat{\mathbf{T}}=\mathbf{r}'/|\mathbf{r}'|: the vector integral is the scalar integral of the tangential component F⋅T^\mathbf{F}\cdot\hat{\mathbf{T}}, which makes plain why a field everywhere perpendicular to the curve does no work.

∫CF⋅dr=∫C(F⋅T^) ds(3)\int_C \mathbf{F}\cdot\mathrm{d}\mathbf{r} = \int_C \bigl(\mathbf{F}\cdot\hat{\mathbf{T}}\bigr)\,\mathrm{d}s \qquad (3)

where: T^\hat{\mathbf{T}} — unit tangent, T^=r′/∣r′∣\hat{\mathbf{T}}=\mathbf{r}'/|\mathbf{r}'|; F⋅T^\mathbf{F}\cdot\hat{\mathbf{T}} — scalar tangential component. In Cartesian components the same integral becomes a sum of differentials — the form used when a curve is given by xx, yy, zz relations.

∫CF⋅dr=∫C(Fx dx+Fy dy+Fz dz)(4)\int_C \mathbf{F}\cdot\mathrm{d}\mathbf{r}=\int_C \bigl(F_x\,\mathrm{d}x + F_y\,\mathrm{d}y + F_z\,\mathrm{d}z\bigr) \qquad (4)

where: Fx,Fy,FzF_x,F_y,F_z — Cartesian components of F\mathbf{F}; dx,dy,dz\mathrm{d}x,\mathrm{d}y,\mathrm{d}z — components of dr\mathrm{d}\mathbf{r}. Reading: a differential 1-form integrated over the curve — the language in which Green's and Stokes' theorems are stated. The single most important special case is a gradient field. When F=∇ϕ\mathbf{F}=\nabla\phi, the chain rule turns the integrand into a total derivative and the integral collapses to the endpoint difference — no parametrisation needed, no dependence on the route.

∫C∇ϕ⋅dr=ϕ(B)−ϕ(A)(5)\int_C \nabla\phi\cdot\mathrm{d}\mathbf{r} = \phi(B)-\phi(A) \qquad (5)

where: ϕ\phi — scalar potential with F=∇ϕ\mathbf{F}=\nabla\phi; A,BA,B — start and end points of CC. Reading: the fundamental theorem of calculus, promoted to any curve; conservative fields are exactly the gradients. In the plane a closed line integral converts to a double integral over the enclosed region by Green's theorem — the bridge between circulation and the scalar curl ∂xQ−∂yP\partial_xQ-\partial_yP.

∮C(P dx+Q dy)=∬R(∂Q∂x−∂P∂y)dA(6)\oint_C \bigl(P\,\mathrm{d}x + Q\,\mathrm{d}y\bigr) = \iint_R \left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\mathrm{d}A \qquad (6)

where: P,QP,Q — components of F=(P,Q)\mathbf{F}=(P,Q); RR — region enclosed by the simple closed curve CC; ∮C\oint_C — integral around CC counter-clockwise. Its three-dimensional generalisation is Stokes' theorem, equating the circulation around a loop to the flux of the curl through any spanning surface.

∮CF⋅dr=∬S(∇×F)⋅dS(7)\oint_C \mathbf{F}\cdot\mathrm{d}\mathbf{r} = \iint_S (\nabla\times\mathbf{F})\cdot\mathrm{d}\mathbf{S} \qquad (7)

where: SS — any surface spanning the loop CC; ∇×F\nabla\times\mathbf{F} — curl; dS\mathrm{d}\mathbf{S} — oriented surface element. Finally, orientation: reversing the direction of travel flips the sign of the vector integral but leaves the scalar integral untouched, since arc length is unsigned.

∫−CF⋅dr=−∫CF⋅dr,∫−Cf ds=∫Cf ds(8)\int_{-C}\mathbf{F}\cdot\mathrm{d}\mathbf{r} = -\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r},\qquad \int_{-C} f\,\mathrm{d}s = \int_C f\,\mathrm{d}s \qquad (8)

where: −C-C — the curve CC traversed in reverse. Reading: work is signed and orientation-sensitive; mass and length are not.

Derivation AFrom Riemann sum to parameter integral

The goal is to build the line integral from its definition as a limit of sums and to show that the seemingly magical step — replacing a curve integral by an ordinary integral in a parameter tt — is nothing more than the chord of a smooth curve being well approximated by its tangent. We partition the curve, project the field onto each chord, insert a parametrisation, and take the limit to reach equation (2); the same argument with unsigned lengths gives equation (1). This is what makes every later computation legitimate.

Step 1. Partition the curve CC into NN small arcs by points r0,r1,…,rN\mathbf{r}_0,\mathbf{r}_1,\dots,\mathbf{r}_N and form the Riemann sum ∑iF(ri)⋅Δri\sum_i \mathbf{F}(\mathbf{r}_i)\cdot\Delta\mathbf{r}_i, where Δri=ri−ri−1\Delta\mathbf{r}_i=\mathbf{r}_i-\mathbf{r}_{i-1} is the chord of the ii-th arc. Why: this is the literal meaning of "sum the tangential push over the path" — each term is a field value dotted into a genuine displacement, so units and geometry are correct before any calculus enters.

Step 2. Introduce a smooth parametrisation r(t)\mathbf{r}(t), t∈[a,b]t\in[a,b], with r(ti)=ri\mathbf{r}(t_i)=\mathbf{r}_i. For a differentiable curve the chord equals the tangent times the parameter step to leading order, Δri≈r′(ti) Δti\Delta\mathbf{r}_i \approx \mathbf{r}'(t_i)\,\Delta t_i, with an error of order (Δti)2(\Delta t_i)^2. Why: this is the one approximation in the construction, and smoothness is the hypothesis that makes it exact in the limit.

Step 3. Substitute to get ∑iF(r(ti))⋅r′(ti) Δti\sum_i \mathbf{F}(\mathbf{r}(t_i))\cdot\mathbf{r}'(t_i)\,\Delta t_i and let max⁡Δti→0\max\Delta t_i\to 0; by definition this is the Riemann integral ∫abF(r(t))⋅r′(t) dt\int_a^b \mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\,\mathrm{d}t. Why: the curve integral has become a textbook one-variable integral — the entire practical payoff.

Step 4. Repeat with ∣Δri∣≈∣r′(ti)∣ Δti|\Delta\mathbf{r}_i|\approx|\mathbf{r}'(t_i)|\,\Delta t_i to get the scalar integral ∫abf(r(t)) ∣r′(t)∣ dt\int_a^b f(\mathbf{r}(t))\,|\mathbf{r}'(t)|\,\mathrm{d}t, equation (1). Because ∣r′∣|\mathbf{r}'| is a length it is unsigned, so reversing the traversal cannot change it — the orientation asymmetry of (8) is visible right here. Why: the two flavours differ only in whether the weight is the vector chord or its length. *Verified: reparametrising t→τ(t)t\to\tau(t) with dt=(dt/dτ) dτ\mathrm{d}t=(\mathrm{d}t/\mathrm{d}\tau)\,\mathrm{d}\tau leaves ∫F⋅r′ dt\int \mathbf{F}\cdot\mathbf{r}'\,\mathrm{d}t unchanged for orientation-preserving maps and negates it for orientation-reversing maps, consistent with equation (8).*

Go deeper · Derivation B · 1 minThe gradient theorem and why conservative fields forget the path
Derivation BThe gradient theorem and why conservative fields forget the path

The goal is to prove the fundamental theorem for line integrals, equation (5): when the field is a gradient the integral depends only on the endpoints. The proof is short but its consequences organise the entire subject — it explains why potential energy and voltage are well defined, why conservative loops vanish, and, read backwards, why a field with a potential must be curl-free. We take F=∇ϕ\mathbf{F}=\nabla\phi, feed it into equation (2), recognise a total derivative by the chain rule, and apply the ordinary fundamental theorem of calculus.

Step 1. With F=∇ϕ\mathbf{F}=\nabla\phi the integrand of equation (2) is ∇ϕ(r(t))⋅r′(t)\nabla\phi(\mathbf{r}(t))\cdot\mathbf{r}'(t). By the multivariable chain rule this is the total tt-derivative ddt ϕ(r(t))\dfrac{\mathrm{d}}{\mathrm{d}t}\,\phi(\mathbf{r}(t)). Why: a gradient dotted into a velocity is the rate of change of the scalar along the motion, so the integrand is secretly a derivative.

Step 2. Integrate with the fundamental theorem of calculus: ∫abddtϕ(r(t)) dt=ϕ(B)−ϕ(A)\int_a^b \dfrac{\mathrm{d}}{\mathrm{d}t}\phi(\mathbf{r}(t))\,\mathrm{d}t = \phi(B)-\phi(A). Why: only the endpoint values survive, so the interior of the path — its shape, length, detours — drops out entirely.

Step 3. Specialise to a closed curve, A=BA=B: then ∮C∇ϕ⋅dr=0\oint_C\nabla\phi\cdot\mathrm{d}\mathbf{r}=0. Why: a conservative field does zero net work around any loop — the content of energy conservation and of "voltage around a circuit sums to zero".

Step 4. Read the theorem in reverse: if F=∇ϕ\mathbf{F}=\nabla\phi with ϕ\phi twice continuously differentiable, then ∇×F=∇×∇ϕ=0\nabla\times\mathbf{F}=\nabla\times\nabla\phi=\mathbf{0}, since mixed partials commute. Why: every conservative field is curl-free — but the converse needs a simply connected domain, the subtlety in the warning below. *Verified: for ϕ=x2y\phi=x^2y, ∇ϕ=(2xy, x2)\nabla\phi=(2xy,\,x^2); integrating from (0,0)(0,0) to (1,2)(1,2) along any path gives ϕ(1,2)−ϕ(0,0)=12⋅2−0=2\phi(1,2)-\phi(0,0)=1^2\cdot2-0=2, matching a direct straight-line computation.*

Go deeper · Derivation C · 1 minWork done by a central inverse-square force
Derivation CWork done by a central inverse-square force

The goal is to show that the archetypal force of physics — gravity and the Coulomb force, both of the form F=−(k/r2)r^\mathbf{F}=-(k/r^2)\hat{\mathbf{r}} — does work depending only on the starting and ending radii, never on the path between, and to extract its potential. This is the concrete engine behind conservation of orbital energy and the very notion of gravitational and electrostatic potential energy. We exploit that only the radial part of a displacement survives the dot product with r^\hat{\mathbf{r}}, collapsing an integral over an arbitrary space curve into a one-dimensional radial integral.

Step 1. For any displacement, r^⋅dr=dr\hat{\mathbf{r}}\cdot\mathrm{d}\mathbf{r}=\mathrm{d}r, the change in radial distance, because the angular parts of dr\mathrm{d}\mathbf{r} are orthogonal to r^\hat{\mathbf{r}} and drop out. Why: a central force only feels how much closer or farther you got, not how you swung around, so angular motion is invisible to the work.

Step 2. Substitute into the work integral: W=∫C−kr2 (r^⋅dr)=−k∫rArBdrr2W=\int_C -\dfrac{k}{r^2}\,(\hat{\mathbf{r}}\cdot\mathrm{d}\mathbf{r})=-k\displaystyle\int_{r_A}^{r_B}\dfrac{\mathrm{d}r}{r^2}, an ordinary integral in the single variable rr. Why: once the integrand depends only on rr, the path is reduced to its radial shadow, so any two paths with the same endpoint radii agree.

Step 3. Integrate: −k∫rArBdrr2=−k[−1r]rArB=k(1rB−1rA)-k\displaystyle\int_{r_A}^{r_B}\dfrac{\mathrm{d}r}{r^2}=-k\Bigl[-\dfrac1r\Bigr]_{r_A}^{r_B}=k\left(\dfrac{1}{r_B}-\dfrac{1}{r_A}\right). Only rAr_A and rBr_B appear, confirming path-independence and identifying the potential ϕ=k/r\phi=k/r with F=−∇ϕ\mathbf{F}=-\nabla\phi. Why: the field is conservative, and its potential energy is the familiar ∓k/r\mp k/r of the Kepler and hydrogen problems, recovered purely from the line integral. *Verified: −∇(k/r)=+(k/r2)r^-\nabla(k/r)=+(k/r^2)\hat{\mathbf{r}} has the opposite sign to F\mathbf{F}, so F=−∇(k/r)\mathbf{F}=-\nabla(k/r) and W=−Δϕ=−(k/rB−k/rA)W=-\Delta\phi=-\bigl(k/r_B-k/r_A\bigr)… reorder to k(1/rB−1/rA)k(1/r_B-1/r_A), consistent with Arfken and the Kepler energy.*

Limiting cases

Special cases strip the definition down to its skeleton and show what each ingredient controls.

CaseResultMeaning
Conservative fieldF=∇ϕ⇒∫CF⋅dr=ϕ(B)−ϕ(A)\mathbf{F}=\nabla\phi \Rightarrow \int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=\phi(B)-\phi(A)Path-independent; every closed-loop integral vanishes (gradient theorem).
Closed curve, curl-free, simply connected∮CF⋅dr=0\oint_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=0By Stokes' theorem, ∇×F=0\nabla\times\mathbf{F}=\mathbf{0} inside CC forces zero circulation.
Constant field, straight segment∫CF⋅dr=F⋅Δr\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=\mathbf{F}\cdot\Delta\mathbf{r}Collapses to the elementary dot product: work equals force times displacement.
Uniform scalar density∫Cf ds=fL, L=∫Cds\int_C f\,\mathrm{d}s=fL,\ L=\int_C\mathrm{d}sA constant ff factors out, leaving the arc length LL of the curve.
Field perpendicular to curve∫CF⋅dr=0\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=0F⋅T^=0\mathbf{F}\cdot\hat{\mathbf{T}}=0 everywhere; a pure crosswind does no work.
Reversed orientation∫−CF⋅dr=−∫CF⋅dr\int_{-C}\mathbf{F}\cdot\mathrm{d}\mathbf{r}=-\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}Vector integral flips sign; the scalar integral is unchanged.

Worked examples

1 · Path dependence and Green's theorem in one shot (fully worked)

Take the non-conservative field F=(y, 2x)\mathbf{F}=(y,\,2x). Compute the work from O=(0,0)O=(0,0) to P=(1,1)P=(1,1) along (a) the straight line y=xy=x and (b) the parabola y=x2y=x^2, show they differ, and confirm the difference against Green's theorem.

Step 1. Check it is non-conservative: with P=yP=y, Q=2xQ=2x, the scalar curl is ∂xQ−∂yP=2−1=1≠0\partial_x Q-\partial_y P=2-1=\mathbf{1}\neq0, so we expect the two paths to disagree.

Step 2. Straight line, r(t)=(t,t)\mathbf{r}(t)=(t,t), t∈[0,1]t\in[0,1]: then r′=(1,1)\mathbf{r}'=(1,1) and F(r(t))=(t, 2t)\mathbf{F}(\mathbf{r}(t))=(t,\,2t), so F⋅r′=t+2t=3t\mathbf{F}\cdot\mathbf{r}'=t+2t=3t. Integrate: Wline=∫013t dt=32=1.5W_{\text{line}}=\int_0^1 3t\,\mathrm{d}t=\tfrac32=\mathbf{1.5}.

Step 3. Parabola, r(t)=(t,t2)\mathbf{r}(t)=(t,t^2), t∈[0,1]t\in[0,1]: then r′=(1,2t)\mathbf{r}'=(1,2t) and F(r(t))=(t2, 2t)\mathbf{F}(\mathbf{r}(t))=(t^2,\,2t), so F⋅r′=t2+2t⋅2t=5t2\mathbf{F}\cdot\mathbf{r}'=t^2+2t\cdot2t=5t^2. Integrate: Wparab=∫015t2 dt=53≈1.667W_{\text{parab}}=\int_0^1 5t^2\,\mathrm{d}t=\tfrac53\approx\mathbf{1.667}. The two answers differ — the field is path-dependent, as promised.

Step 4. Now close the loop: go out along the parabola, back along the line. This traces the boundary of the region between the curves counter-clockwise, so ∮C=Wparab−Wline=53−32=16\oint_C=W_{\text{parab}}-W_{\text{line}}=\tfrac53-\tfrac32=\tfrac16. Green's theorem predicts ∮C=∬R(∂xQ−∂yP) dA=∬R1 dA=area between y=x and y=x2\oint_C=\iint_R(\partial_xQ-\partial_yP)\,\mathrm{d}A=\iint_R 1\,\mathrm{d}A=\text{area between }y=x\text{ and }y=x^2, which is ∫01(x−x2) dx=12−13=16\int_0^1(x-x^2)\,\mathrm{d}x=\tfrac12-\tfrac13=\tfrac16. The gap in the work, 1/61/6, equals the enclosed area, 1/61/6 — path dependence and curl are the same fact.

2 · Mass of a helical wire (scalar line integral, fully worked)

A wire is bent into one turn of the helix r(t)=(cos⁡t,sin⁡t,t)\mathbf{r}(t)=(\cos t,\sin t,t), t∈[0,2π]t\in[0,2\pi], with linear mass density f(x,y,z)=zf(x,y,z)=z. Find its total mass.

Step 1. Arc-length element: r′(t)=(−sin⁡t,cos⁡t,1)\mathbf{r}'(t)=(-\sin t,\cos t,1), so ∣r′(t)∣=sin⁡2t+cos⁡2t+1=2|\mathbf{r}'(t)|=\sqrt{\sin^2t+\cos^2t+1}=\sqrt{2}. The helix is traced at constant speed, so ds=2 dt\mathrm{d}s=\sqrt2\,\mathrm{d}t.

Step 2. Density on the curve: f(r(t))=z=tf(\mathbf{r}(t))=z=t, since the third coordinate is tt.

Step 3. Assemble equation (1): M=∫Cf ds=∫02πt 2 dt=2[t22]02π=2⋅(2π)22=22 π2M=\int_C f\,\mathrm{d}s=\int_0^{2\pi} t\,\sqrt2\,\mathrm{d}t=\sqrt2\Bigl[\tfrac{t^2}{2}\Bigr]_0^{2\pi}=\sqrt2\cdot\dfrac{(2\pi)^2}{2}=2\sqrt2\,\pi^2. So M=22 π2≈27.92M=2\sqrt2\,\pi^2\approx 27.92 in the wire's mass units.

Step 4. Sanity check equation (8): since ds=∣r′∣ dt\mathrm{d}s=|\mathbf{r}'|\,\mathrm{d}t stays positive under reversal, the mass is unchanged — a wire weighs the same walked either way, exactly as a scalar line integral must.

3 · Circulation of the angle field (the hole that matters)

Evaluate ∮CF⋅dr\oint_C\mathbf{F}\cdot\mathrm{d}\mathbf{r} for F=(−y, x)/(x2+y2)\mathbf{F}=\bigl(-y,\,x\bigr)/(x^2+y^2) counter-clockwise around the unit circle.

Step 1. Parametrise r(t)=(cos⁡t,sin⁡t)\mathbf{r}(t)=(\cos t,\sin t), r′(t)=(−sin⁡t,cos⁡t)\mathbf{r}'(t)=(-\sin t,\cos t), t∈[0,2π]t\in[0,2\pi]; on the circle x2+y2=1x^2+y^2=1, so the denominators are all 11.

Step 2. Field on the path: F(r(t))=(−sin⁡t, cos⁡t)\mathbf{F}(\mathbf{r}(t))=(-\sin t,\,\cos t), so F⋅r′=sin⁡2t+cos⁡2t=1\mathbf{F}\cdot\mathbf{r}'=\sin^2t+\cos^2t=1 identically.

Step 3. Integrate: ∮CF⋅dr=∫02π1 dt=2π\oint_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=\int_0^{2\pi}1\,\mathrm{d}t=\mathbf{2\pi}. Nonzero — even though ∇×F=0\nabla\times\mathbf{F}=\mathbf{0} wherever F\mathbf{F} is defined — because the enclosed disc contains the forbidden origin, so Stokes' theorem does not apply. This is the concrete face of the warning above and of the complex-analysis winding number.

Physics of the portrait

Line integrals are the language of the integral theorems of vector calculus, and no one did more to invent that language from nothing than a self-taught miller from Nottingham.

Origins · 1 minGeorge Green and how this was discovered
GG
George Green
1793–1841 · potential theory and the integral theorems of vector calculus

George Green is the most improbable figure in mathematical physics: the son of a Nottingham miller, with barely a year of formal schooling, he worked the family windmill for most of his life, yet in 1828 he privately published An Essay on the Application of Mathematical Analysis to the Theories of Electricity and Magnetism. Far ahead of its time, it introduced the word potential for the scalar function whose gradient is the force field, and stated the integral identity now called Green's theorem — the bridge between a line integral around a closed curve and a double integral over the region it encloses. Green taught himself the continental calculus of Laplace and Poisson from a Nottingham subscription library; his Essay drew only 51 subscribers. He did not enter Cambridge as an undergraduate until 1833, aged forty, and died eight years later, almost unknown. His work was rescued by William Thomson (Lord Kelvin), who found a copy in 1845, grasped its importance at once, and had it reprinted in Crelle's Journal, spreading Green's identities to Stokes, Maxwell, and the founders of field theory. Every time a physicist writes ∮CF⋅dr=∬R(∂xQ−∂yP) dA\oint_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}=\iint_R(\partial_xQ-\partial_yP)\,\mathrm{d}A or computes a potential difference as a path-independent integral, they are speaking Green's language. The line integral is, through his theorem, the very hinge on which classical field theory turns.

History
1828
— Green's Essay introduces the potential function and the identity now called Green's theorem
1845
— William Thomson rediscovers Green's Essay and recognises its importance
1850
— Thomson states the curl (Stokes) theorem in a letter to Stokes
1854
— Stokes sets his theorem as a Smith's Prize examination question at Cambridge, taken by Maxwell
1869
— Thomson (Kelvin) proves his circulation theorem for ideal fluid flow

Going further

Texts. Stone & Goldbart, Mathematics for Physics, §10–11 (vector calculus and line integrals) · Arfken & Weber, Mathematical Methods for Physicists, 7th ed., §3.2 · Hassani, Mathematical Physics, Ch. 13 (vector analysis) · Nakahara, Geometry, Topology and Physics, §5–6 (differential forms and integration on manifolds) · Byron & Fuller, Mathematics of Classical and Quantum Physics, Ch. 1 · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., §11.1.

Provenance. The definitions and theorems are standard vector calculus (Stone & Goldbart §10–11; Arfken & Weber §3.2; Riley-Hobson-Bence §11.1). A verifier should recompute: (1) Wline=3/2W_{\text{line}}=3/2 versus Wparab=5/3W_{\text{parab}}=5/3 for F=(y,2x)\mathbf{F}=(y,2x), and the gap 1/61/6 equalling the enclosed area ∫01(x−x2) dx=1/6\int_0^1(x-x^2)\,\mathrm{d}x=1/6 (curl =1=1); (2) the helix mass M=22 π2≈27.92M=2\sqrt2\,\pi^2\approx27.92; (3) the angle-field circulation ∮=2π\oint=2\pi and its vanishing curl off the origin; (4) the central-force work W=k(1/rB−1/rA)W=k(1/r_B-1/r_A); (5) ϕ(1,2)−ϕ(0,0)=2\phi(1,2)-\phi(0,0)=2 for ϕ=x2y\phi=x^2y.

Prerequisites. Scalar and Vector Fields · The Gradient Operator · The Directional Derivative. Leads to. Green's Theorem in the Plane · Stokes' Theorem · The Curl of a Vector Field.

Ask the tutor: Give me any curve and field and I will parametrise it, work the line integral both ways, and show you whether the answer depends on the path.

What is the difference between the scalar and vector line integral, really?

They differ in how you weight each tiny piece of the curve. The scalar integral ∫Cf ds\int_C f\,\mathrm{d}s weights the field by the unsigned length ds=∣r′∣ dt\mathrm{d}s=|\mathbf{r}'|\,\mathrm{d}t — good for mass, charge, or length, which do not care about direction. The vector integral ∫CF⋅dr\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r} weights it by the directed displacement dr=r′ dt\mathrm{d}\mathbf{r}=\mathbf{r}'\,\mathrm{d}t, keeping only the component of F\mathbf{F} along the curve — good for work and circulation, which flip sign on reversal. A quick tell: if reversing your walk should flip the sign (work against a force becomes work with it), use the vector integral; if it should not (the wire weighs the same either way), use the scalar one.

How do I choose a parametrisation, and does the answer depend on it?

Choose any smooth, one-to-one map r(t)\mathbf{r}(t) tracing the curve once; the natural choice comes from the curve's own equation (a circle wants (cos⁡t,sin⁡t)(\cos t,\sin t), a graph y=g(x)y=g(x) wants (t,g(t))(t,g(t))). For the scalar integral the value is completely independent of the parametrisation — any speed, any starting point gives the same number, because ds\mathrm{d}s is intrinsic to the curve. For the vector integral it is independent up to the sign fixed by orientation: same-direction parametrisations agree, reversing negates the answer. So pick whatever is convenient; only the direction of travel can affect the vector result.

Why does a conservative field give a path-independent integral?

Because a conservative field is a gradient, F=∇ϕ\mathbf{F}=\nabla\phi, and a gradient dotted into the velocity is the rate of change of ϕ\phi along the path — a total derivative. Integrating it from AA to BB collapses, by the fundamental theorem of calculus, to ϕ(B)−ϕ(A)\phi(B)-\phi(A), which mentions only the endpoints; the interior of the path never appears. Physically ϕ\phi is a landscape (potential energy per unit charge or mass), and moving through a landscape changes your "height" by an amount set only by where you start and stop. This is why gravitational potential energy and electrostatic voltage are well-defined numbers attached to points.

If a field is curl-free, isn't it automatically conservative?

Only if its domain has no holes — is simply connected. Curl-free is a local condition (point by point) while conservative is global (it constrains large loops), and topology can drive a wedge between them. The standard example is the angle field F=(−y,x)/(x2+y2)\mathbf{F}=(-y,x)/(x^2+y^2): its curl is zero wherever it is defined, yet its integral around a loop encircling the missing origin is 2π2\pi. Stokes' theorem does not save you because no surface spans that loop without piercing the forbidden origin. On a simply connected domain — where every loop shrinks to a point without leaving the domain — curl-free does imply conservative.

What does Green's theorem have to do with the difference between two paths?

They are two views of one number. The work along two different paths from AA to BB differs by the work around the closed loop formed by going out on one and back on the other, and Green's theorem rewrites that loop integral as the double integral of the curl ∂xQ−∂yP\partial_xQ-\partial_yP over the enclosed region. So the amount by which two paths disagree equals the total curl trapped between them. In Worked Example 1 the paths differed by 1/61/6 and the enclosed area (with curl 11) was exactly 1/61/6. When the curl is zero throughout a simply connected region between the paths, the difference vanishes and the field is path-independent.

Where do line integrals actually show up in physics?

Almost everywhere a quantity is accumulated along a path: mechanical work W=∫CF⋅drW=\int_C\mathbf{F}\cdot\mathrm{d}\mathbf{r}; potential difference VB−VA=−∫ABE⋅drV_B-V_A=-\int_A^B\mathbf{E}\cdot\mathrm{d}\mathbf{r}; Faraday's and Ampère's laws; fluid circulation Γ=∮Cv⋅dr\Gamma=\oint_C\mathbf{v}\cdot\mathrm{d}\mathbf{r}; the arc length and mass of curved objects; the Bohr–Sommerfeld and Berry phase integrals. The recurring theme: a closed line integral measures a source or topological content enclosed by the loop — current, vorticity, or a phase winding — which is why line integrals are inseparable from Green's and Stokes' theorems.

Before this

Where this leads