17  Line & Surface Integrals

We’ve learned so far to integrate multivariate functions over a line or over regions in R2 or R3. Here we extend our knowledge to consider integrals over a curve or a surface in space. Such integrals appear in many mathematical and physical contexts, and in particular turn out to be rather important in our final unit, dealing with vector fields.

17.1 Line Integrals

A better name for this object would be a curve integral as the goal is to allow the integration of a multivariable function f over some general curve C. We already know how to do this if C is a straight line parallel to the x or y axes, as this is just a slice, representing the net area above that slice, or the total amount of f on that slice:

This picture caries over directly when C is an arbitrary curve. The area under f above the curve C (or the total amount of f along C, depending on your interpretation) is the line integral over C

We can denote the domain C as a subscript just like we do for double and triple integrals, and write

Cfds

Where ds represents an infinitesimal bit of arclength along the curve. When C is a closed curve one may optionally modify the integral sign to denote this, writing Cfds. Our first goal is to try and figure out how to compute this in terms of integrals we know how to do. First: recall that we can represent a curve C by parameterizing it, writing it as the image of a function c(t)=(x(t),y(t)) in the plane, or c(t)=(x(t),y(t),z(t)) in 3 dimensions. We saw back in the chapter on curves how to express a small bit of arclength along a parametric curve:

ds=dx2+dy2=dx2dt2dt2+dy2dt2dt2=x(t)2+y(t)2dt=c(t)dt

To evaluate a function f(x,y,z) along the curve c(t)=(x(t),y(t)), we simply plug the curve into the function. This gives a concrete quantity to integrate:

Cfds=abf(c(t))c(t)dt

Note the simplest line integrals are just when f=1. This is the integral just adding up the infinitesimal arclengths Cds=cdt. We already met this integral long ago - this gives the arclength of the curve!

Example 17.1 The slices we have been computing are special cases of line integrals: for a fixed x=a we can parameterize a slice in the y direction by the curve c(t)=(x,t) which has velocity c=(0,1) and speed c=1, so arclength ds=cdy=1dy. Plugging our curve into the function yields f(c(t))=f(x,t) and thus an integral f(x,t)dt The variable has a different name (because we decided to parameterize our curve with t) but this is nothing other than the integral in the y direction, holding x fixed!

Example 17.2 Find Cxyds for C the diagonal of the unit square going from (0,0) to (1,1).

Example 17.3 Evaluate C(2+x2y)ds for C the top half of the unit circle parameterized counterclockwise.

Example 17.4 Evaluate Cx2ds for C the circle of radius 2, traversed clockwise.

This tells us what to do anytime we can write C as a differentiable curve: but what if we can’t? Sometimes a curve C might be piecewise, and has a corner where the edges join up. In this case, we evaluate the line integral by doing each segment of the curve separately, and adding the results:

C1C2fds=C1fds+C2fds

We just have to be sure to parameterize the two curves so that C1 ends where C2 starts, so that together they continuously trace the entire curve.

Example 17.5 Find the line integral of x along the curve C which traces out the triangle with vertices (0,0), (1,0) and (0,1), starting at the origin and going clockwise.

We break this into three curves: c1(t)=(t,0)c2(t)=(1t,t)c3(t)=(0,1t) Each is segment is traced from t=0 to t=1. We then just compute the line integral along each and add up the results.

Its no difficulty to generalize this to doing integrals along space curves instead of in the plane:

Example 17.6 Compute the line integral Cfds for f(x,y,z)=ysinz and C the helix x=cost, y=sint and z=t for t[0,2π].

17.2 Surface Integrals

We are now interested in extending this notion to integrals over a surface instead of a curve. If that surface S is a 2D region inside of the xy plane, we already know how to do this: its just the double integral SfdA, where dA is an infinitesimal piece of area on the plane. So, what we are interested in here instead is when S is a surface in 3 dimensional space and f(x,y,z) is a scalar function on 3 dimensional space

These integrals will add up the total amount of f which lies on the surface S. This is useful for many things: if f is a density this gives the mass of the object. If f is a charge density this would give the total charge on the surface: a computation that is useful inside of batteries, where the anode and cathode may be tightly coiled surfaces. These integrals can also be used to help find the average value of a function: dividing the surface integral of f over S by the surface area of S. We will denote such an integral as

SfdS

Where we think of dS as an infinitesimal piece of surface area. A lot of the work in computing surface integrals is just finding the right form for dS to use, to convert int into a double integral we know how to do. So we begin by looking at some special cases: we actually know how to write the infinitesimal areas on a cylinder or sphere from our work with coordinates!

The Surface of a Cylinder

In cylindrical coordinates we convert two of x,y,z to polar r,θ and leave the other alone. The resulting volume element was dV=dzrdrdθ

We can use this to find the area element on a cylinder, realizing this simply means that r is held fixed and z,θ are allowed to vary:

Definition 17.1 The area element along a cylinder of fixed radius r is dS=rdθdz

Thus, to compute a surface integral of f on a portion of a cylinder, we can convert f to cylindrical coordinates and then use the cylinders’s area element:

Example 17.7 Compute Sx3dS$ for S the cylinder of radius 2 centered on the z-axis between z=1 and z=3.

Here x=2cosθ y=2sinθ and z remains the same, giving dS=2dθdz and x3=(2cosθ)3=8cos3θ. The bounds on the cylinder are 0θ2π and z[1,3]. Putting this all together gives Sx3dS=1302π8cos3θdθdz

This is a double integral we can easily evaluate, using the trick cos3θ=(1sin2θ)cosθ and a u-substitution.

Example 17.8 Compute SxdS for S the cylinder of radius 1 centered on the x axis from x=0 to x=2.

Here the cylinder is along the x axis so we instead have y,z being the polar coordinates. The cylinders bounds are θ[0,2π] and x[0,2], with dS=dθdx since r=1. Plugging all this in yields

SxdS=0202πxdxdθ

The Surface of a Sphere On a sphere we already have spherical coordinates for which we computed a nice volume element dV=ρ2sinϕdρdϕdθ

If we wish to look at the area of a sphere we just need to fix ρ to some constant value (its radius), and then consider only small changes in ϕ and θ (we are not changing ρ as we wish to stay on the surface!)

Definition 17.2 The infinitesimal area element on a sphere of radius r is dS=r2sinϕdϕdθ

Thus, to compute a surface integral of f on a portion of a sphere, we can convert f to spherical coordinates and then use the sphere’s area element:

Example 17.9 Compute SzdS for S the upper hemisphere of the sphere of radius 2.

In spherical coordinates z=ρcosϕ, and here the radius is fixed at 2 so z=2cosϕ. The spherical coordinate bounds for the upper hemisphere have ϕ[0,π/2] and θ[0,2π], so plugging these in with the area element dS=4sinϕdϕdθ yields

SzdS=02π0π/2(2cosϕ)(4sinϕ)dϕdθ=802π0π/2cosϕsinϕdϕdθ

This integral is easily evaluated with a u-sub u=sinϕ.

Example 17.10 Compute S(x2+y2+z2)dS for S the sphere of radius 3 centered at the origin.

The Graph of a Function

What about when our surface isnt something simple like this that we already know the answer to? Let’s start with the case that our surface is the graph of a function z=g(x,y).

How do we describe an infinitesimal area element on this surface? Recalling back to our earlier study of functions and their graphs, we can easily find two tangent vectors to our graph by writing it as a parametric surface (x,y,g(x,y)) and then taking the partial derivatives. This gives a vector vx in the x direction and vy in the y direction

vx=x(x,y,g(x,y))=1,0,gxvy=y(x,y,g(x,y))=1,0,gy

These two vectors span an infinitesimal parallelogram, whose area is the area element we seek. How do we find the area of a small parallelogram again? The cross product! Thus, the area element is simply dS=vx×vydxdy

Computing this cross product and taking the magnitude gives our answer

vx×vy=|ijk10gx01gy|=i(gx)j(gy)+k(1)=gx,gy,1 vx×vy=(gx)2+(gy)2+12=1+gx2+gy2

Definition 17.3 The area element along the graph of a function z=g(x,y) is given by dS=1+gx2+gy2dxdy

This gives us a means to evaluate surface integrals along such objects: we simply evaluate f at points along the graph, and integrate with respect to this dS.

Example 17.11 Find the area of the paraboloid z=x2+y2 that lies below the plane z=9.

Example 17.12 Find SydS for S the surface z=x+y2 for 0x1 and 0y2.

Ans: 1323.

Just like for Line Integrals, surface integrals can be computed over regions bounded by two or more surfaces joined together by computing each part separately and adding the results:

Example 17.13 Let S denote the closed surface defined by z=2x2y2 and the plane z=1. Compute the surface integral Sx+zdS$

General Surface Integrals

The cases above actually cover many useful examples, so we will not often need the general case. But we’ve come so far we might as well spell it out precisely. Let’s say we have a surface S in space described by a parametric equation r(u,v)=(x(u,v),y(u,v),z(u,v)). Its easy to evaluate a scalar function f(x,y,z) on the surface, we just plug in this parameterization f(r(u,v))=f(x(u,v),y(u,v),z(u,v))

To get an infinitesimal surface area element, we can follow the trick that worked for graphs: if we can find two tangent vectors at a point we can find the area of the infintiesimal parallelogram they span using the cross product.

Here the tangent vectors are the u and v derivatives of the parameterization

ru=ru=xu,yu,zurv=rv=xv,yv,zv

The normal vector to the surface at this point is the cross product n=ru×rv and its magnitude is the infinitesimal area element:

dS=ru×rvdudv

This converts everything into an explicit double integral

SfdS=Df(r(u,v))ru×rvdudv

Where D is the domain of the parameterization (its u bounds and v bounds).

Example 17.14 Compute SxyzdS for S the cone parameterized by x=ucosv, y=usinv and z=u for u[0,1] and v[0,2π].

Example 17.15 Compute Sx2+y2dS for S the surface with parameteric equation r(u,v)=(2uv,u2v2,u2+v2) where (u,v) lies in the unit disk u2+v21.

17.3 Video Resources

17.3.1 Line Integrals

17.3.2 Surface Integrals