Main content

### Course: Multivariable calculus > Unit 4

Lesson 1: Line integrals for scalar functions# Line integral example 1

Concrete example using a line integral. Created by Sal Khan.

## Want to join the conversation?

- I'm confused about the dS part. When I think a infinitely small change in arc length, that makes me think of dt, why is dS not dt?(17 votes)
- dS is a small change in arc length. s is traditionally used in physics for displacement. dt is a small change in the parameter t. most of the time, this is time. t is a parameter of x and y. so dt is a small change in that parameter. dS is a piece of the curve that x and y map out. so dS is a small change along that path.(52 votes)

- What is an Arc length?(3 votes)
- In this case Arc length can be thought of as the length of a curve between two chosen points. When Sal mentions 'small arc lengths' around04:57, he means to take a tiny (infinitesimal) segment of the curve which is usually labelled 'ds'. If it helps, then think of 'ds' as the same as 'dx' or 'dy', but instead of being a small change along a coordinate axis, you are now taking a small change along the curve itself. Hope that helps.(17 votes)

- 04:34What if we were to find the volume under the curve ? What would we do? Thanks in Advance.(3 votes)
- You would probably want to do a double integral of f(x,y) from y = 0 to y = sqrt(1-x^2) and x = 0 to x = 1.(4 votes)

- Is not it be better use dS=sqrt(1+(dy/dx)^2)dx instead of dS=sqrt((dx/dt)^2+(dy/dt)^2)dt in that way we have not use parametric curves.(2 votes)
- dS=sqrt(1+(dy/dx)^2)dx would only work if everything was in terms of x, which would complicate matters immensely (since everything is already in terms of t). You would have to find y in terms of x, which for this example is y = sin(arccos(x)) and then find dy/dx, which is dy/dx = -x/sqrt(1-x^2). This is much more difficult, albeit possible, method for finding the arc length of the curve. But I think it's impossible to define f(x,y) is terms of just x, since that would be defining a three-dimensional graph in terms of just one variable. It might be possible (?) but I don't see how.(4 votes)

- At2:53, is the graph z=xy? I googled the image and it looks different. z should be max at max(x) & max(y) and min(x) & min(y). This is so confusing :( Thanks in advance!(2 votes)
- Yes, this is the graph z=xy. However, Googling the image will give you different values of min(x), min(y), max(x), and max(y). In Sal's graph, min(x) and min(y) are both zero. In most graphs that you get, you will have a min(x) and a min(y) of something like -5.(4 votes)

- Is it possible to calculate this if we're not given a parametric equation for the curve? (just a regular y = f(x) equation)(1 vote)
- Getting a parametric equation out of that is easy: set x = t, y = f(t).(6 votes)

- Why is the final answer 1? shouldn't you substitute sin ( t ) back into the final equation 1/2(u)^2 - 1/2(u)^2? it should come out to .35 or something, or am I wrong?(1 vote)
- Sal updated the integration limits, from variable
`t`

to variable`u`

, by doing that there is no need to go back to the definition of`u`

after integrating. If you don't update the limits of integration, then you do have to substitute back and use the old integration limits over`t`

. Since the result of the integration was:`1/2 u²`

substituting back the`u`

you get:`1/2 sin²t`

and this you have to evaluate from`0`

to`π/2`

, so you get:`1/2 [sin²(π/2) - sin²(0) ]`

And that gives you the same result:`1/2`

(5 votes)

- Does he have the proof for sin(x)^2+cos(x)^2=1?(0 votes)
- Sal seems to be using words expressions path integral and line integral almost interchangeably. My Vector Calc book has fairly different definitions for them (one dealing with functions, another with vector fields). How crucial is the difference?(0 votes)
- The difference is not very crucial. If you say path integral when you are integrating over a vector field, most people are going to know that you meant line integral.(4 votes)

- So, all of this is to find the are of a curtain?(1 vote)

## Video transcript

The last video was very
abstract in general, and I used you know, f of x
and g of t, and h of t. What I want to do in this video
is do an actual example. Let's say I have f of xy. Let's say that f of
xy is equal to xy. And let's say that we have
a path in the xy plane, or a curve in the xy plane. And I'm going to define my
curve by x being equal to cosine of t, and y being
equal to sine of t. And we're going to go from--
you know, we have to define what are our boundaries in our
t --and we're going to go from t is equal to 0-- or t is going
to be greater than or equal to 0 --and then less
than or equal to. We're going to deal in
radians, pi over 2. If this was degrees, that
would be 90 degrees. So that's our curve. And immediately you might
already know what this type of a curve looks like. And I'm going to draw that
really fast right here in and we'll try to visualize this. I've actually drafted
ahead of time so that we can visualize this. So this curve right here, if I
were to just draw it in the standard xy plane-- do that in
a different color so we can make the curve green; let's say
that is y, and this is right here x --so when t is equal
to 0, x is going to be equal to cosine of 0. Cosine of 0 is 1, y is going to
be equal to sine of 0, which is 0, so t is equal to 0. We're going to be at x equal to
1, that's cosine of 0, and y is sine of 0, or y is going to
be 0, so we're going to be right there. That's what t is equal
to; t is equal to 0. When t is equal to pi of 2,
what's going to happen? Cosine of pie over 2--
that's the angle; cosine of pi over 2 --is 0. Sine of pi over 2 is 1. We're going to be
at the point 0, 1. So this is when we're at
t is equal to pi over 2. You might recognize what we're
going to draw is actually the first quadrant of the unit
circle; when t is equal to pi over 4, or 45 degrees, we're
going to be at square root of 2, square root of 2. You can try it out for
yourself, but we're just going to have a curve
that looks like this. It's going to be the
top right of a circle, of the units circle. It's going to have radius 1. And we're going to go in that
direction, from t is equal to 0, to t is equal to pi over 2. That's what this
curve looks like. But our goal isn't here just to
graph a parametric equation. What we want to do is raise a
fence out of this kind of base and rise it to this surface. So let's see if we can do that
or at least visualize it first, and then we'll use the tools
we used in the last video. So right here I've graphed this
function, and I've rotated it a little bit so you can
see [UNINTELLIGIBLE] case. This right here-- let me get
some dark colors out --that right there is the x axis, that
in the back is the y axis, and the vertical axis
is the z axis. And this is actually 2, this
is 1 right here, y equal 1 is right there, so this
is graphed that way. So if I were to graphs this
contour in the xy plane, it would be under this graph and
it would go like something like this--- let me see if I can
draw it --it would look something like this. This would be on the xy plane. This is the same exact graph,
f of x is equal to xy. This is f of x; f of
xy is equal to xy. That's both of these,
I just rotated it. In this situation that right
there is now the x axis. I rotated to the left,
you can kind of imagine. That right there is the x axis,
that right there is the y axis-- it was rotated closer
to me --that's the z axis. And then this curve, if I were
to draw in this rotation, is going to look like this: when t
is equal to 0, we're at x is equal to 1, y is equal to 0,
and it's going to form a unit circle, or half or quarter
of a unit circle like that. And when t is equal to pi over
2, we're going to get there. And what we want to do
is find the area of the curtain that's defined. So let's see, let's raise
a curtain from this curve up to f of xy. So if we keep raising walls
from this up to xy, we're going to have a wall looks
something like that. Let me shade it in, color
it in so it looks a little bit more substantive. So a wall that looks
something like that. If I were to try to do it here
this would be under the ceiling, but the wall
look something like that right there. We want to find
the area of that. We want to find the area of
this right here where the base is defined by this curves, and
then the ceiling is defined by this surface here, xy, which I
graphed and I rotated in two situations. Now in the last video we came
up with a, well, you could argue whether it's simple, but
the is, well, let's just take small arc lengths-- change in
arc lengths, and multiply them by the height at that point. And those small change in arc
lengths, we called them ds, and then the height is just
f of xy at that point. And we'll take an infinite sum
of these, from t is equal to 0 to t will equal pi over 2, and
then that should give us the area of this wall. So we said is, well, to figure
out the area of that we're just going to take the integral from
t is equal to o to t is equal to pi over 2-- it doesn't make
a lot of sense when I write it like this --of f of xy times--
or let me even better, instead of writing f of xy, let me just
write the actual function. Let's get a little
bit more concrete. So f of xy is xy times-- so the
particular xy --times the little change in our arc
length at that point. I'm going to be very
hand-wavy here. This is all a little bit
review of the last video. And we figured out in the last
video this change in arc length right here, ds, we figured out
that we could rewrite that as the square root of the dx
versus-- or the derivative of x with respect to t squared
--plus the derivative of y with respect to t squared, and
then all of that times dt. So I'm just rebuilding
the formula that we got in the last video. So this expression can be
rewritten as the integral from t is equal to 0 to t is
equal to pi over 2 times xy. But you know what? Right from the get go we
want everything eventually be in terms of t. So instead of writing x
times y, let's substitute the parametric form. So instead of x let's
write cosine of t. That is x. x is equal to cosine
of t on this curve. That's how we define x, in
terms of the parameter t. And then times y, which
we're saying is sine of t. That's our y; all I
did is rewrote xy in terms of t times ds. ds is this; it's the square
root of the derivative of x with respect to t squared plus
the derivative of y with respect to t squared. All of that times dt. And now we just have to find
these two derivatives. And it might seem really hard,
but it's very easy for us to find the derivative of x with
respect to t and the derivative of y with respect to t. I can do it right or down here. Let me lose our graphs
for a little bit. We know that the derivative of
x with respect to t is just going to be: what's the
derivative of cosine of t? Well, it's minus sine of t. And the derivative of
y was respect to t? Derivative of a sine of
anything is the cosine of that anything. So it's cosine of t. And we can substitute these
back into this equation. So remember, we're just trying
to find the area of this curtain that has our curve here
as kind of its base, and has this function, this
surface as it's ceiling. So we go back down here,
and let me rewrite this whole thing. So this becomes the integral
from t is equal to o to t is equal to pi over 2-- I don't
like this color --of cosine of t, sine of t, cosine times
sine-- that's just the xy --times ds, which is this
expression right here. And now we can write this as--
I'll go switch back to that color I don't like --the
derivative of x with respect to t is minus sine of t, and we're
going to square it, plus the derivative of y with respect to
t, that's cosine of t, and we're going to square it-- let
me make my radical a little bit bigger --and then all
of that times dt. Now this still might seem like
a really hard integral until you realize that this right
here, and when you take a negative number and you squared
it, this is the same thing. Let me rewrite, do this
in the side right here. Minus sine of t squared plus
the cosine of t squared, this is equivalent to sine of t
squared plus cosine of t squared. You lose the sign information
when you square something; it just becomes a positive. So these two things
are equivalent. And this is the most
basic trig identity. This comes straight out of the
unit circle definition: sine squared plus cosine squared,
this is just equal to 1. So all this stuff under
the radical sign is just equal to 1. And we're taking the square
root of 1 which is just 1. So all of this stuff right
here will just become 1. And so this whole crazy
integral simplifies a good bit and just equals the square root
of t equals 0 to t is equal to pi over 2 of-- and I'm going to
switch these around just because it will make it a
little easier in the next step --of sine of t times
cosine of t, dt. All I did, this whole thing
equals 1, got rid of it, and I just switched
the order of that. It'll make the next up a
little bit easier to explain. Now this integral-- You say
sine times cosine, what's the antiderivative of that? And the first thing you should
recognize is, hey, I have a function or an expression here,
and I have its derivative. The derivative of
sine is cosine of t. So you might be able to a u
substitution in your head; it's a good skill to be
able to do in your head. But I'll do it very
explicitly here. So if you have something
that's derivative, you define that something as u. So you say u is equal to sine
of t and then du, dt, the derivative of u with respect
to t is equal to cosine of t. Or if you multiply both sides
by the differential dt, if we're not going to be too
rigorous, you get du is equal to cosine of t, dt. And notice right
here I have a u. And then cosine of t, dt,
this thing right here, that thing is equal to d of u. And then we just have to
redefine the boundaries. When t is equal to 0-- I mean
so this thing is going to turn into the integral --instead of
t is equal to 0, when t is equal to 0 what is u equal to? Sine of 0 is 0, so this
goes from u is equal to 0. When t is pie over 2
sine of pi over 2 is 1. So when t is pi over
2, u is equal to 1. So from is equal to 0
to u is equal to 1. Just redid the boundaries
in terms of u. And then we have instead
of sign of t, I'm going to write u. And instead of cosine of t, dt,
I'm just going to write du. And then this is a super-easy
integral in terms of u. This is just equal to: the
antiderivative of u is u 1/2 times u squared-- we just
raised the exponent and then divided by that raised exponent
--so 1/2 u squared, and we're going to evaluate
it from 0 to 1. And so this is going to be
equal to 1/2 times 1 squared minus 1/2 times 0 squared,
which is equal to 1/2 times 1 minus 0, which is equal to 1/2. So we did all that work and
we got a nice simple answer. The area of this a curtain-- we
just performed a line integral --the area of this curtain
along this curve right here is-- let me do it in a
darker color --on 1/2. You know, if this was in
centimeters, it would be 1/2 centimeters squared. So I think that was you know,
a pretty neat application of the line integral.