Lecture 26 - Line integrals

LECTURE 29 - LINE INTEGRALS
CHRIS JOHNSON
Abstract. In this lecture we’ll learn about line integrals, originally focusing on the line integral of a function over a curve with
respect to arclength. We’ll extend this to line integrals of vector
fields which will be our main focus and application for line integrals.
1. Intuition
The Riemann integral of a function f (x, y) over an interval [a, b] is
defined as a limit of Riemann sums where we cut the interval [a, b] up
into n pieces (let’s say the pieces are of equal size, ∆x) and pick a point
x∗i in each piece, add up the products f (x∗i )∆x, and then take a limit,
Z b
n
X
f (x) dx = lim
f (x∗i )∆x.
a
n→∞
i=1
Suppose we wanted to do something similar, but instead of integrating
over a subinterval of the real line, we decide to integrate over a curve.
That is, suppose C is some curve in the plane,
Date: April 7, 2014.
1
2
CHRIS JOHNSON
And suppose that f (x, y) is a function whose domain includes the curve
C. Let’s cut C up into a bunch of pieces C1 , ..., Cn .
Pick a point (x∗i , yi∗ ) inside of the i-th piece of the curve.
Now evaluate the function at these points, f (x∗i , yi∗ ), multiplying by
the arclength of the Ci piece of the curve – call this value ∆si – and
add up all of these terms:
n
X
i=1
f (x∗i , yi∗ )∆si .
LECTURE 29 - LINE INTEGRALS
3
Taking the limit as n goes to infinity (really, as each Ci piece gets
arbitrarily short), we have the line integral of f over C:
Z
n
X
f (x, y)dx = lim
f (x∗i , yi∗ )∆si .
C
n→∞
i=1
Just to give this idea a geometric interpretation, suppose that f (x, y) ≥
0 for all points (x, y) on the curve C. We could then define curve
in 3-space by “lifting” the curve C to the surface z = f (x, y). If C
is parametrized by hx(t), y(t)i, then this curve in 3-space would be
parametrized by hx(t), y(t), f (x(t), y(t))i. If we filled in all the space
between this curve on the surface z = f (x, y) and the curve in the plane
we’d have a surface. (Imagine hanging a sheet from the surface along
the curve and letting that sheet hang down to the xy-plane.) The line
integral would represent the area of this surface.
We will see that line integrals have many applications and interpretations, so don’t get too hung up on this particular interpretation:
it’s just a quick way to help you see one possible application of line
integrals.
2. Integration with respect to arclength
As is always the case with integration, the “limit of Riemann sums”
definition makes some intuitive sense, but it is usually very difficult to
make calculations with this definition. To make life a little simpler,
we’d like to somehow relate these line integrals back to integrals we
4
CHRIS JOHNSON
already know how to calculate. To get started with this, let’s suppose
the curve C we are integrating over has a parametrization
~r(t) = hx(t), y(t)i
for a ≤ t ≤ b. Then when we plug in points (x, y) on the curve C into
f (x, y), we can just use f (x(t), y(t)). Now recall that the length of the
curve C is given by
Z bp
`(C) =
x0 (t)2 + y 0 (t)2 dt.
a
We can similarly define a function s(t) which gives the arclength of
the curve from its initial point (the point ~r(a) = hx(a), y(a)i) to some
other point ~r(t). This is given by
Z a+t p
s(t) =
x0 (t)2 + y 0 (t)2 dt.
a
Notice by the fundamental theorem of calculus,
p
s0 (t) = x0 (t)2 + y 0 (t)2 ,
and so we may write the differential ds as
ds = s0 (t) dt
p
= x0 (t)2 + y 0 (t)2 dt
We can now use this to simplify our definition of the line integral:
Z b
Z
p
f (x(t), y(t)) x0 (t)2 + y 0 (t)2 dt.
f (x, y)ds =
C
a
As an example, let’s calculate the value
Z
y 3 ds
C
where C is the curve parametrized by ~r(t) = ht3 , ti for 0 ≤ t ≤ 2.
Z
Z 2
p
3
y ds =
y(t)3 x0 (t)2 + y 0 (t)2 dt
C
0
Z 2 p
=
t3 (3t2 )2 + 1 dt
0
Z 2
1/2
=
t3 9t4 + 1
dt
0
LECTURE 29 - LINE INTEGRALS
5
Now performing the substitution
u = 9t4 + 1
du = 36t3 dt
The integral becomes
Z
Z
3
145
y ds =
C
1
√
udu
36
145
2u3/2 =
108 1
1
1453/2 − 1 .
=
54
Writing a line integral as
Z
Z b
p
f (x, y) ds =
f (x(t), y(t)) x0 (t)2 + y 0 (t)2 dt
C
a
0
0
only works if x (t) and y (t) are defined, but we may want to integrate
over curves where these values aren’t defined. (For example, consider a
curve with a sharp corner.) Recall that curves where ~r 0 (t) is defined everywhere, and is never zero, are called smooth. The above substitution
for our line integral only applies if we integrate over a smooth curve.
We can integrate over curves that are not smooth as well, provided we
we can break the curve up into smooth pieces. Such a curve is called
piecewise smooth.
If we could break the curve into, say, n smooth pieces – say C1 through
Cn – then to integrate a function f (x, y) over the curve, we just integrate over each piece and add these integrals together.
Z
n Z
X
f (x, y) ds =
f (x, y) ds.
C
i=1
Ci
6
CHRIS JOHNSON
Example 1. Suppose that C is a curve which breaks into two pieces,
C1 which is parametrized by ht, t2 i for 0 ≤ t ≤ 1; and C2 which is
parametrized by h1, ti for 1 ≤ t ≤ 2. And suppose that we want to
integrate f (x, y) = 2x over this curve.
Z
Z
Z
2x ds =
2x ds +
2x ds
C
C1
1
Z
=
C2
Z
√
2
2t 1 + 4t dt +
0
Z
=
2
√
2 02 + 12 dt
1
1
2t(1 + 4t2 )1/2 dt + 2
0
Using the substitution u = 1 + 4t2 , du = 8t dt, this becomes
Z 5
Z
1 1/2
2x ds =
u du + 2
1 4
C
5
1 2
= · u3/2 1 + 2
4 3
1 3/2
5 −1 +2
=
6√
5 5 + 11
=
.
6
To give all of this a physical interpretation, suppose that C gives the
shape of a wire
R and ρ(x, y) is the density of the write at a point (x, y)
on C, then C ρ(x, y) ds is the mass of the wire.
3. Integration with respect to the other variables
In our original definition of the line integral, we defined
Z
#P
X
f (x, y) ds = lim
f (x∗i , yi∗ ) ∆si
C
kPk→0
i=1
where ∆si denotes the arclength of a small piece of the curve. There
are times, however, where we will instead want to replace the ∆si ’s
with something else, such as ∆xi or ∆yi . (This will become important
when we describe line integrals of vector fields later.)
We define the line integral of f (x, y) over the curve C with respect
to x as the value
Z
#P
X
f (x, y) dx = lim
f (x∗i , yi∗ )∆xi .
C
kPk→0
i=1
LECTURE 29 - LINE INTEGRALS
7
Assuming C is parametrized by ~r(t) = hx(t), y(t)i with a ≤ t ≤ b, this
integral may be written as
Z
Z b
f (x(t), y(t))x0 (t) dt.
f (x, y) dx =
a
C
Of course, we can also do this integration with respect to y:
Z
Z b
f (x, y) dy =
f (x(t), y(t))y 0 (t) dt.
C
a
These sorts of integrals will appear together often, and so we’ll adopt
a notation short-hand:
Z
Z
Z
P (x, y) dx + Q(x, y) dy.
Q(x, y) dy =
P (x, y) dx +
C
C
C
As an example, let’s integrate
Z
sin(πy) dy + yx2 dx
C
where C is given by the parametrization h1 − t, 4 − 2ti with 0 ≤ t ≤ 1.
Z
Z
Z
2
yx2 dx
sin(πy) dy +
sin(πy) dy + yx dx =
C
C
C
Z 1
Z 1
(4 − 2t)(1 − t)2 (−1)dt
sin (π(4 − 2t)) (−2)dt +
=
0
0
Z 1
Z 1
sin (4π − 2πt) dt −
−2t3 + 8t2 − 10t + 4 dt
= (−2)
0
4 0 3
1
1
t
8t
1
2
= − cos(4π − 2πt) 0 − − +
− 5t + 4t 0
π
2
3
1
1 8
= − (1 − 1) − − + − 5 + 4
π
2 3
8 1
=1− +
3 2
6 − 16 + 3
=
6
−7
=
6
Just as we have line integrals of functions of two variables over curves
in two-dimensional space, we have line integrals of functions of three
variables.
8
CHRIS JOHNSON
Our definition is just like the two-dimensional case,
#P
X
Z
f (x, y, z) ds = lim
kPk→0
C
f (x∗i , yi∗ , zi∗ ) ∆si
i=1
and if the curve C is parametrized by ~r(t) = hx(t), y(t), z(t)i over
a ≤ t ≤ b, this becomes
Z b
Z
p
f (x, y, z) ds =
f (x(t), y(t), z(t)) x0 (t)2 + y 0 (t)2 + z 0 (t)2 dt.
C
a
Remark. Note that the arclength of the curve C is given by integrating
the constant function 1, with respect to arclength, over C:
Z bp
Z
ds =
x0 (t)2 + y 0 (t)2 dt.
`(C) =
a
C
Line integrals with respect to x, y, or z are defined similarly to the
two-dimensional case:
Z
P (x, y, z) dx = lim
kPk→0
C
Z
#P
X
P (x∗i , yi∗ , zi∗ ) ∆xi
i=1
b
P (x(t), y(t), z(t))x0 (t) dt
=
a
Z
Q(x, y, z) dy = lim
kPk→0
C
Z
#P
X
Q (x∗i , yi∗ , zi∗ ) ∆yi
i=1
b
Q(x(t), y(t), z(t))y 0 (t) dt
=
a
Z
R(x, y, z) dz = lim
kPk→0
C
Z
#P
X
R (x∗i , yi∗ , zi∗ ) ∆zi
i=1
b
=
R(x(t), y(t), z(t))z 0 (t) dt
a
Example 2. Calculate the line integral
Z
xyz ds
C
LECTURE 29 - LINE INTEGRALS
9
where C is parametrized by h2 sin(t), t, −2 cos(t)i with 0 ≤ t ≤ π.
Z
Z π
q
xyz ds =
2 sin(t) · t · (−2 cos(t)) 4 cos2 (t) + 1 + 4 sin2 (t) dt
C
0
Z π
√
(−4)t sin(t) cos(t) 4 + 1 dt
=
0
√ Z π
= −4 5
t sin(t) cos(t) dt.
0
Now we can use the trig identity
sin(2θ) = 2 sin θ cos θ
sin(2θ)
2
=⇒ sin θ cos θ =
Now we rewrite this integral as
Z
√ Z
xyz ds = −2 5
C
π
t sin(2t) dt.
0
Now we do integration by parts with
u=t
du = dt
dv = sin(2t) dt
cos(2t)
v=−
2
to get
√
Z π
π √
xyz ds = 5t cos(2t) 0 − 5
cos(2t) dt
C
0
√
√ Z π
= 5π cos(2π) − 5
cos(2t) dt
0
√
sin(2t) π
= 5 π−
0
2
√
sin(2π) sin(0)
= 5 π−
+
2
2
√
= π 5.
Z
4. Work
Recall that if a force of magnitude F pushes an object a distance d,
then the work done by the force is W = F d.
10
CHRIS JOHNSON
This calculation makes two key assumptions: the force is constant,
and in the direction of motion. We know that if the force is not in
the direction of motion we can use dot products to calculate the work.
If our force is given a vector F~ and the displacement of the object is
~ this works out to be
given by d,
~ cos θ
W = F~ · d~ = kF~ k kdk
~
where θ is the angle between F~ and d.
Here we are still supposing that the force being applied is constant,
but now we’d like to consider the case of a force which changes.
Suppose the force being applied at a point (x, y, z) is
F~ (x, y, z) = hP (x, y, z), Q(x, y, z), R(x, y, z)i .
Suppose also that we’ve moving an object along a curve C in R3 . Then
to approximate the work done, we’ll cut the curve into several pieces:
say C1 , C2 , ..., Cn . We’ll suppose that the force is constant on each
Ci piece of the curve, and let’s denote the arclength of the curve by
∆si . To estimate the force, we’ll pick some point (x∗i , yi∗ , zi∗ ) ∈ Ci and
suppose the force along the curve Ci is given by F~ (x∗i , yi∗ , zi∗ ).
So we have a force, F~ (x∗i , yi∗ , zi∗ ), we also have a length ∆si , but we
don’t have a direction. To get a direction we’ll use the tangent vector of
the curve at (x∗i , yi∗ , zi∗ ). Recall that the unit tangent vector is denoted
T~ (x∗i , yi∗ , zi∗ ). However, this a unit vector, and we’re assuming the force
is constant on all of Ci which has length ∆si . Thus we’ll take our
displacement vector to be ∆si T~ (x∗i , yi∗ , zi∗ ). Hence our approximation
LECTURE 29 - LINE INTEGRALS
11
for the work done over Ci is simply
F~ (x∗i , yi∗ , zi∗ ) · ∆si T~ (x∗i , yi∗ , zi∗ .
Since ∆si is just a scalar, we can move it around to rewrite this as
F~ (x∗i , yi∗ , zi∗ ) · T~ (x∗i , yi∗ , zi∗ ∆si .
Summing up these approximations for each piece, we approximate the
total work to be
n
X
W ≈
F~ (x∗i , yi∗ , zi∗ ) · T~ (x∗i , yi∗ , zi∗ )∆si .
i=1
Of course, we want to take the limit as our pieces become arbitrarily
small to get the “best” approximation:
W = lim
kPk→0
#P
X
F~ (x∗i , yi∗ , zi∗ ) · T~ (x∗i , yi∗ , zi∗ )∆si .
i=1
Notice, however, that this is just the line integral over F~ (x, y, z) ·
T~ (x, y, z) over C:
Z
W =
F~ (x, y, z) · T~ (x, y, z) ds,
C
which we’ll usually abbreviate to be
Z
W =
F~ · T~ ds.
C
Supposing our curve is parametrized by
~r(t) = hx(t), y(t), z(t)i
for a ≤ t ≤ b, our unit tangent vectors are simply
~r 0 (t)
T~ (t) = 0
~r (t)
and the ds is simply
ds = k~r 0 (t)k dt.
Writing F~ (~r(t)) as short-hand for F~ (x(t), y(t), z(t)), our integral becomes
Z b
~r 0 (t)
W =
F~ (~r(t)) · 0
k~r 0 (t)k dt
k~r (t)k
a
Z b
=
F~ (~r(t)) · ~r 0 (t) dt
a
12
CHRIS JOHNSON
and this is often abbreviated
Z
F~ · d~r.
C
The idea of work is our motivation, but in can define the line integral
of any continuous vector field F~ over a smooth curve C, parametrized
by ~r(t) for a ≤ t ≤ b, as
Z
Z
Z b
~
~
~
F~ (~r(t)) · ~r 0 (t) dt.
F · T ds =
F · d~r =
C
C
a
Example 3. As an example, suppose that F~ is the vector field
F~ (x, y, z) = x + y, y − z, z 2
3
2
and C is the curve
R parametrized by ~r(t) = ht , −t , ti for 0 ≤ t ≤ 1 and
let’s calculate C F~ · d~r.
First note that ~r 0 (t) = h3t2 , −2t, 1i, and F~ (~r(t)) = ht3 − t2 , −t2 − t, t2 i,
and so our integral is
Z
Z 1
~
F · d~r =
F~ (~r(t)) · ~r 0 (t) dt
C
0
Z 1
3
=
t − t2 , −t2 − t, t2 · 3t2 , −2t, 1 dt
0
Z 1
=
3t2 (t3 − t2 ) − 2t(−t2 − t) + t2 dt
0
Z 1
=
3t5 − 3t4 + 2t3 + 2t2 + t2 dt
0
Z 1
=
3t5 − 3t4 + 2t3 + 3t2 dt
0 6
3t
3t5 2t4 3t3 1
=
−
+
+
0
6
5
4
3
1 3 1
= − + +1
2 5 2
3
=2−
5
7
= .
5
This seems like a lot of work to do, but we can actually simplify
things a little bit. Suppose that
F~ (x, y, z) = hP (x, y, z), Q(x, y, z), R(x, y, z)i
LECTURE 29 - LINE INTEGRALS
13
and that C is parametrized by ~r(t) = hx(t), y(t), z(t)i with a ≤ t ≤ b.
Then
Z b
Z
~
F~ (~r(t)) · ~r 0 (t) dt
F · d~r =
a
C
Z b
=
hP (~r(t)), Q(~r(t)), R(~r(t))i · hx0 (t), y 0 (t), z 0 (t)i dt
a
Z b
(P (~r(t))x0 (t) + Q(~r(t))y 0 (t) + R(~r(t))z 0 (t)) dt
=
a
Z b
Z b
Z b
0
0
R(~r(t))z 0 (t) dt
Q(~r(t))y (t) dt +
P (~r(t))x (t) dt +
=
a
Z
Z a
Za
R(x, y, z) dz
Q(x, y, z) dy +
P (x, y, z) dx +
=
C
C
C
Z
=
P (x, y, z) dx + Q(x, y, z) dy + R(x, y, z) dz
C
14
CHRIS JOHNSON
5. Exercises
Exercise 1. Calculate the line integral
Z
xy ds
C
where C is the curve parametrized by ~r(t) = ht2 , 2ti with 0 ≤ t ≤ 1.
Exercise 2. Calculate the line integral
Z
y dx + z dy + x dz
C
√
where C is parametrized by
t, t, t2 with 1 ≤ t ≤ 4.