Main content

## Multivariable calculus

### Course: Multivariable calculus > Unit 4

Lesson 1: Line integrals for scalar functions# Line integral example 2 (part 2)

Part 2 of an example of taking a line integral over a closed path. Created by Sal Khan.

## Want to join the conversation?

- I thought parametrization for C2 and C3 may be a overkill. C2 would be bounded by y axis (0 to 2) and curve z=y^2. So the area of this portion of curtain would be def Int (y^2) for these bounds (0-2) -this would be 8/3. For area of C3, the curtain area will be bounded by a line z=x and the x axis (from 0-2); For this portion one does not even need calculus as it is a right angled triangle with base of 2 and height of 2 units and area will be 2. But it is satisfying to see the math is consistent-well that is why it is math!(26 votes)
- Why is the direction of the curve/contour so important?

(So important that Sal needs to preserve it by using y=2-t instead of the simple y=t)(7 votes)- In this case it isn't, but it's good practice for vector fields.(10 votes)

- Please help. I am confused about the parameters for C2 and C3. I don't understand why y=2-t and

x=t. Could y=t and x=2-t? I hope this is not a stupid question.(3 votes)- I know this is a late reply 8 years after, but you will still get the same result if you set it as y = t. The reason why he uses 2-t is because the contour is going backward.(1 vote)

- Would it not just be easier to take the integrals of curves 2 and 3 with respect to y and x respectively? Seems an awful lot of hassle to go through parameterising them in terms of t.(4 votes)
- Some integrals are easier to do than others. Transforming the variables is sometimes necessary to get an integral which is solvable symbolically.(1 vote)

- At2:55, is there a particular reason, conceptual or otherwise, to parametrize the equation as x=0, y=2-t, 0≦t≦2? Why shouldn't we integrate y^2 from 0 to 2? Would this mess us up in later maths?(2 votes)
- no in this they are conceptually doing the same thing(1 vote)

- would someone please explain why when on the y axis 2-t is y but when along the x axis x=t is it(2 votes)
- Sal moves around the walls in a counter clockwise fashion: He starts at (2,0) follows the semi circle to (0,2) moves down the y axis to (0,0) then along the x axis back to (2,0). Since the movement down the y axis is in the negative direction, he uses negative t.(1 vote)

- here is the problem i noticed .i understand the different parameters for C2 however the directions are switched .as shown in sal's example letting y=2-t yields a final area of 8/3 .however when one uses the parameters y=t where t goes from 2 to 0 ,the integral yields an answer of -8/3 .so these two approaches are clearly not equivalent ,unless we are simply interested in the absolute values ,which makes sense for this example .but in more abstract problems this would obviously lead to different answers .so my question is which approach best avoids this problem? .when is direction important in other words ?(2 votes)
- I came here to post this exact same question. I solved this using the integral when x=0 and y=t, t starting at 2 and going to 0, and obviously got a negative area for the "wall". I'm confused about what this means.(1 vote)

- At3:30is the derivative of y equal to -1 because 2-1=-1, or because the derivative of 2 is 0 and the deriving of t is 1?(1 vote)
- The second thought is correct, it is because the derivative of 2 is 0 and the derivative of -t is -1.(3 votes)

- How would you find the area of the top part of the shape?(1 vote)
- Why does direction matter with parameterization? If all we're doing is finding the area, isn't direction irrelevant?(1 vote)
- With line integrals, we are not finding areas. We are finding displacement along a curve. If we go one direction, that displacement is negative. If we go the other direction, that displacement is positive.(2 votes)

## Video transcript

In the last video, we set out
to figure out the surface area of the walls of this
weird-looking building, where the ceiling of the walls was
defined by the function f of xy is equal to x plus y squared,
and then the base of this building, or the contour of its
walls, was defined by the path where we have a circle of
radius 2 along here, then we go down along the y-axis, and then
we take another left, and we go along the x-axis, and
that was our building. And in the last video, we
figured out this first wall's surface area. In fact, you can think of it,
our original problem is, we wanted to figure out the line
integral along the closed path, so it was a closed line
integral, along the closed path c of f of xy, and we're always
multiplying f of xy times a little bit, a little, small
distance of our path, ds. We're writing this in the
most abstract way possible. And what we saw in the last
video is, the easiest way to do this is to break this up into
multiple paths, or into multiple problems. So you can imagine, this whole
contour, this whole path we call c, but we could call this
part, we figured out in the last video, c1. This part we can call, let me
make a pointer, c2, and this point right here is c3. So we could redefine, or we can
break up, this line integral, this closed-line integral, into
3 non-closed line integrals. This will be equal to the line
integral along the path c1 of f of xy ds, plus the line
integral along c2 of f of x y ds plus the line integral, you
might have guessed it, along c3 of f of xy ds, and in the last
video, we got as far as figuring out this first part,
this first curvy wall all right here. Its surface area, we figured
out, was 4 plus 2 pi. Now we've got to figure
out the other 2 parts. So let's do C2, let's do
this line integral next. And in order to do it,
we need to do another parameterization of x and y. It's going to be different than
what we did for this part. We're no longer along
this circle, we're just along the y-axis. So as long as we're there,
x is definitely going to be equal to 0. So that's my parameterization,
x is equal to 0. If we're along the y-axis, x
is definitely equal to 0. And then y, we could say it
starts off at y is equal to 2. Maybe we'll say y is equal to 2
minus t, for t is between 0, t is greater than or equal to
0, less than or equal to 2. And that should work. When t is equal to 0, we're at
this point right there, and then as t increases towards 2,
we move down the y-axis, until eventually when t is equal
to 2, we're at that point right there. So that's our parameterization. And so let's evaluate this
line, and we could do our derivatives, too, if we like. What's the derivative,
I'll write it over here. What's dx dt? Pretty straightforward. Derivative of 0 is 0, and
dy dt is equal to the derivative of this. It's just minus 1, right? 2 minus t, derivative of
minus t, is just minus 1. And so let's just break it up. So we have this thing right
here, so we have the integral along c2. But let's, instead of writing
c2, I'll leave c2 there, but we'll say were going from t is
equal to 0 to 2 of f of xy. f of xy is this thing right
here, is x plus y squared, and then times ds. And we know from the last
several videos, ds can be rewritten as the square root of
dx dt squared, so 0 squared, plus dy dt squared, so minus 1
squared is 1, all of that times dt. And obviously, this is
pretty nice and clean. This is 0 plus 1, square
root, this just becomes 1. And then what is x? x, if we write it in terms of
our parameterization, is always going to be equal to 0, and
then y squared is going to be 2 minus is t squared. So this is going to be
2 minus t squared. So this whole crazy thing
simplified to, we're going to go from t is equal to 0 to t is
equal to 2, the x disappears in our parameterization, x just
stays 0, regardless of what t is, and then you have y
squared, but y is the same thing as 2 minus t, so 2 minus
t squared, and then you have your dt sitting out there. This is pretty straightforward. I always find it easier when
you're finding an antiderivative of this,
although you can do this in your head, I like to
just actually multiply out this binomial. So this is going to be equal to
the antiderivative from t is equal to 0 to t is equal to 2
of 4 minus 2 minus 4t plus t squared, plus t squared,
just like that dt. And this is pretty
straightforward. This is going to be, the
antiderivative of this is 4 t minus 2 t squared, right? When you take the derivative,
there's 2 times minus 2 is minus 4 t, and then you have
plus 1/3 t to the third, right? These are just simple
antiderivatives, and we need to evaluate it from 0 to 2. And so let's evaluate it at 2. 4 times 2 is 8, let
me pick a new color. 4 times 2 is 8, minus 2 times 2
squared, so 2 times 4, so minus 8, plus 1/3 times 2
to the third power. So 1/3 times 8. So these cancel out. We have 8 minus 8, and
we just have 8/3. So this just becomes 8/3. And then we have to put a 0 in,
minus 0 evaluate here, but it's just going to be 0. We have 4 times 0, two times 0,
all of these are going to be 0. So minus 0. So just like that, we
found our surface area of our second wall. This turned out being,
this right here is 8/3. And now we have our last
wall, and then we can just add them up. So we have our last wall. I'll do another
parameterization. I want to have the graph there. Well, maybe I can
paste it again. Edit. So there's the graph again. And now we're going
to do our last wall. So our last wall is this one
right here, which is, we could write it, you
know, this was c3. Let me switch colors here. So this is c, we're going to go
along contour c3 of f of xy ds, which is the same thing as,
let's do a parameterization. Along this curve, if we just
say, x is equal to t, very straight forward, for t is
greater than or equal to 0, less than or equal to 2, and
this whole time that we're along the x-axis, y is
going to be equal to 0. That's pretty straightforward
parameterization. So this is going to be equal
to, we're going to go from t is equal to 0 to t is equal to 2
of f of xy, which is, I'll write in terms of x right now,
x and y, x plus y squared times ds. Now, what is dx-- well, let
me write ds right here. Times ds. That's what we're dealing with. Now we know what ds is. ds is equal to the square
root of dx dt squared plus dy dt squared times dt. We proved that in
the first video. Or we didn't rigorously prove
it, but we got the sense of why this is true. And what's the derivative
of x with respect to t? Well, that's just 1, so this
is just going to be a 1, 1 squared, same thing. And the derivative of y
with respect to z is 0. So this is is 0, 1 plus 0 is
1, square root of 1 is 1. So this thing just becomes dt. ds is going to be equal
to dt, in this case. So this just becomes a dt. And then our x is going to be
equal to a t, that's part of our definition of our
parameterization, and y is zero, so we can ignore it. So this was a
super-simple integral. So this simplified down to,
we're going to go from 0 to 2 of t dt, which is equal to the
antiderivative of t is just 1/2 t squared, and we're going to
go 0 to 2, which is equal to 1/2 times 2 squared. 2 squared is 4, times 1/2
is 2, and then minus 1/2 times 0 squared, minus 0. So this third wall's area
right there is just 2. Pretty straightforward. So that right there, the
area there, is just 2. And so to answer our question,
what was this line integral evaluated over this
closed path of f of xy? Well, we just add
up these numbers. We have 4 plus 2 pi plus 8/3
plus 2, well, what is this. 8/3 is same thing as 2 and 2/3,
so we have 4 plus 2 and 2/3 is 6 and 2/3, plus another 2 is 8
and 2/3, so this whole thing becomes 8 and 2/3, if we
write it as a mixed number, plus 2 pi. And we're done! And we're done. Now we can start trying to
do line integrals with vector-valued functions.