Math Core

Lesson 5.3 · Vector Calculus

The fundamental theorem for line integrals

The Fundamental Theorem of Calculus says ∫abF′(x) dx=F(b)−F(a)\int_a^b F'(x)\,dx = F(b) - F(a): to integrate a derivative, you only need the values at the endpoints. Line integrals have an exact analogue. When a vector field is a gradient, its line integral depends only on where the curve starts and ends, not on the path in between. This lesson proves that, shows how to recognize such fields, and shows how to find the function they are the gradient of.

The theorem

Recall that F\mathbf{F} is conservative if F=∇f\mathbf{F} = \nabla f for some scalar function ff, called a potential function for F\mathbf{F}.

Fundamental Theorem for Line Integrals

Let CC be a smooth curve given by r(t)\mathbf{r}(t), a≤t≤ba \le t \le b, and let ff have continuous partial derivatives on an open set containing CC. Then

∫C∇f⋅dr=f(r(b))−f(r(a)).\int_C \nabla f\cdot d\mathbf{r} = f\big(\mathbf{r}(b)\big) - f\big(\mathbf{r}(a)\big).

The proof is one line of the chain rule. Along the curve,

∇f(r(t))⋅r′(t)=fxdxdt+fydydt=ddt[f(r(t))],\nabla f\big(\mathbf{r}(t)\big)\cdot\mathbf{r}'(t) = f_x\frac{dx}{dt} + f_y\frac{dy}{dt} = \frac{d}{dt}\Big[f\big(\mathbf{r}(t)\big)\Big],

so the line integral is ∫abddtf(r(t)) dt\displaystyle\int_a^b \frac{d}{dt}f(\mathbf{r}(t))\,dt, and the ordinary Fundamental Theorem finishes the job. The same argument works in three dimensions, and for curves made of several smooth pieces.

Worked example: Endpoints are all you need

Let f(x,y)=x2y+y3f(x, y) = x^2y + y^3. Evaluate ∫C∇f⋅dr\displaystyle\int_C \nabla f\cdot d\mathbf{r}, where CC is any smooth curve from (1,0)(1, 0) to (2,1)(2, 1).

No parametrization needed:

∫C∇f⋅dr=f(2,1)−f(1,0)=(4+1)−0=5.\int_C \nabla f\cdot d\mathbf{r} = f(2, 1) - f(1, 0) = (4 + 1) - 0 = 5.

Path independence

Two consequences follow immediately for a conservative field F\mathbf{F}:

  • Path independence. If C1C_1 and C2C_2 have the same initial point and the same terminal point, then ∫C1F⋅dr=∫C2F⋅dr\int_{C_1}\mathbf{F}\cdot d\mathbf{r} = \int_{C_2}\mathbf{F}\cdot d\mathbf{r}.
  • Closed curves give zero. If CC is closed (it ends where it starts), then ∮CF⋅dr=0\oint_C \mathbf{F}\cdot d\mathbf{r} = 0.

These two statements are equivalent to each other: going out along C1C_1 and back along −C2-C_2 makes a closed loop. The converse is also true on an open connected region: if every closed-loop integral of F\mathbf{F} is zero, then F\mathbf{F} is conservative. Physically, a conservative force (like gravity) does zero net work around any round trip, which is why mechanical energy is conserved under such forces.

Testing whether a field is conservative

If F=⟨P,Q⟩=∇f\mathbf{F} = \langle P, Q\rangle = \nabla f, then P=fxP = f_x and Q=fyQ = f_y. By Clairaut's Theorem, Py=fxy=fyx=QxP_y = f_{xy} = f_{yx} = Q_x. So equal cross-partials are necessary. They are also sufficient when the domain has no holes.

Test for conservative fields in the plane

Let F=⟨P,Q⟩\mathbf{F} = \langle P, Q\rangle have continuous first partial derivatives on a simply connected open region DD (connected, with no holes). Then

F is conservative on D⟺∂P∂y=∂Q∂x throughout D.\mathbf{F}\ \text{is conservative on } D \quad\Longleftrightarrow\quad \frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x}\ \text{throughout } D.

Finding a potential function

Once the test passes, recover ff by integrating one component and matching the other.

Worked example: Test, find f, evaluate

Let F(x,y)=⟨2xy+3, x2+4y⟩\mathbf{F}(x, y) = \langle 2xy + 3,\ x^2 + 4y\rangle. Show that F\mathbf{F} is conservative, find a potential, and evaluate ∫CF⋅dr\displaystyle\int_C \mathbf{F}\cdot d\mathbf{r} from (0,0)(0, 0) to (1,2)(1, 2).

Test. Py=2xP_y = 2x and Qx=2xQ_x = 2x, and the domain is all of R2\mathbb{R}^2, so F\mathbf{F} is conservative.

Integrate PP in xx. f=∫(2xy+3) dx=x2y+3x+g(y)f = \displaystyle\int (2xy + 3)\,dx = x^2y + 3x + g(y). The "constant" of integration can depend on yy.

Match QQ. fy=x2+g′(y)f_y = x^2 + g'(y) must equal x2+4yx^2 + 4y, so g′(y)=4yg'(y) = 4y and g(y)=2y2g(y) = 2y^2. Therefore f(x,y)=x2y+3x+2y2f(x, y) = x^2y + 3x + 2y^2.

Evaluate. f(1,2)−f(0,0)=(2+3+8)−0=13f(1, 2) - f(0, 0) = (2 + 3 + 8) - 0 = 13.

In three dimensions the process is the same with one more matching step. (The three-dimensional test uses the curl, which appears two lessons from now.)

Worked example: A potential in space

Evaluate ∫CF⋅dr\displaystyle\int_C \mathbf{F}\cdot d\mathbf{r} for F=⟨yz, xz, xy+2z⟩\mathbf{F} = \langle yz,\ xz,\ xy + 2z\rangle along any path from (0,0,0)(0, 0, 0) to (1,2,3)(1, 2, 3).

Integrate PP in xx: f=xyz+g(y,z)f = xyz + g(y, z). Then fy=xz+gy=xzf_y = xz + g_y = xz, so gg depends on zz only. Next fz=xy+g′(z)=xy+2zf_z = xy + g'(z) = xy + 2z, so g(z)=z2g(z) = z^2. Hence f=xyz+z2f = xyz + z^2, and

∫CF⋅dr=f(1,2,3)−f(0,0,0)=6+9=15.\int_C \mathbf{F}\cdot d\mathbf{r} = f(1, 2, 3) - f(0, 0, 0) = 6 + 9 = 15.

When the domain has a hole

Consider F=⟨−yx2+y2, xx2+y2⟩\mathbf{F} = \left\langle \dfrac{-y}{x^2 + y^2},\ \dfrac{x}{x^2 + y^2}\right\rangle, defined everywhere except the origin. A quick calculation shows Py=Qx=y2−x2(x2+y2)2P_y = Q_x = \dfrac{y^2 - x^2}{(x^2 + y^2)^2}. Yet around the unit circle, r(t)=⟨cos⁡t,sin⁡t⟩\mathbf{r}(t) = \langle\cos t, \sin t\rangle gives F⋅r′=sin⁡2t+cos⁡2t=1\mathbf{F}\cdot\mathbf{r}' = \sin^2 t + \cos^2 t = 1, so

∮CF⋅dr=2π≠0.\oint_C \mathbf{F}\cdot d\mathbf{r} = 2\pi \ne 0.

The field is not conservative on its domain. There is no contradiction: the punctured plane is not simply connected, so the test does not apply.

Common mistake

Equal cross-partials Py=QxP_y = Q_x prove a field is conservative only on a simply connected region. If the field blows up at a point inside the loop you care about, check the loop integral directly.

Tip

After finding ff, check it by computing ∇f\nabla f and comparing with F\mathbf{F}. It takes seconds and catches a forgotten g(y)g(y).

Practice

Practice 1

Let f(x,y)=xeyf(x, y) = xe^y. Evaluate ∫C∇f⋅dr\displaystyle\int_C \nabla f\cdot d\mathbf{r}, where CC is any curve from (1,0)(1, 0) to (3,ln⁡2)(3, \ln 2).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Which vector field is conservative on R2\mathbb{R}^2?

Practice 3

Find the potential function ff for F(x,y)=⟨2x+y, x+2y⟩\mathbf{F}(x, y) = \langle 2x + y,\ x + 2y\rangle that satisfies f(0,0)=0f(0, 0) = 0.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 4

Evaluate ∫C(2x+y) dx+(x+2y) dy\displaystyle\int_C (2x + y)\,dx + (x + 2y)\,dy, where CC is any path from (0,0)(0, 0) to (2,−1)(2, -1).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Let F(x,y)=⟨ycos⁡x, sin⁡x+ey⟩\mathbf{F}(x, y) = \langle y\cos x,\ \sin x + e^y\rangle. Evaluate ∫CF⋅dr\displaystyle\int_C \mathbf{F}\cdot d\mathbf{r} along any path from (0,0)(0, 0) to (π2,1)\left(\tfrac{\pi}{2}, 1\right).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Let F(x,y,z)=⟨y2, 2xy+z, y⟩\mathbf{F}(x, y, z) = \langle y^2,\ 2xy + z,\ y\rangle. Evaluate ∫CF⋅dr\displaystyle\int_C \mathbf{F}\cdot d\mathbf{r} along any path from (0,0,0)(0, 0, 0) to (2,1,3)(2, 1, 3).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

F(x,y)=⟨2xy, x2−3y2⟩\mathbf{F}(x, y) = \langle 2xy,\ x^2 - 3y^2\rangle. Evaluate ∮CF⋅dr\displaystyle\oint_C \mathbf{F}\cdot d\mathbf{r}, where CC is the ellipse x2+4y2=4x^2 + 4y^2 = 4 traversed once counterclockwise.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

For F=⟨−yx2+y2, xx2+y2⟩\mathbf{F} = \left\langle \dfrac{-y}{x^2 + y^2},\ \dfrac{x}{x^2 + y^2}\right\rangle, Py=QxP_y = Q_x wherever F\mathbf{F} is defined, yet ∮CF⋅dr=2π\oint_C \mathbf{F}\cdot d\mathbf{r} = 2\pi around the unit circle. Why doesn't this contradict the test for conservative fields?