# Line integral example 1 | Line integrals and Green’s theorem | Multivariable Calculus | Khan Academy 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
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
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.

### 96 thoughts on “Line integral example 1 | Line integrals and Green’s theorem | Multivariable Calculus | Khan Academy”

• February 25, 2010 at 8:20 pm

thanx. day wat **

• February 26, 2010 at 4:43 pm

Woo Sal!!! Yay!!

Keep the calculus/differential equations coming.

It's pretty much because of you that I am at this level now and you and, although Its just has to be done – reading proper materials and doing practice questions – getting your take on the concepts is invaluable.

• March 1, 2010 at 4:21 pm

If anyone wants to visualize vector and potential fields I suggest you to go to falstadcom. There is a java applet on this page which can generate these fields.

• April 26, 2010 at 10:39 am

when i graduate college and make my fortune, i will donate a gazillion dollars to khan academy. sal is my favorite edumacator.

• May 3, 2010 at 12:25 am

wow when I retire, I think I am going to join khanacademy

• June 28, 2010 at 11:25 am

Thank you so much, these videos are about to save my education. I was struggling with line and surface integrals, and some physics electromagnetic stuff, The past few videos were great, and I really get the stuff now. It is really a great thing you are doing for people.

• November 1, 2010 at 8:22 pm

When you plot x(t) and y(t) on the 3d graphic, the quarter circle should begin and end on the x dimension extremity and the y dimension extremity of the cube, as in the function z=xy those extremities represent x=1 and y=1.

• November 1, 2010 at 8:23 pm

@pmcmena1 no because he reordered the bounds to fit the u function; at the end of the video it wasn't "from t=0 to t=π/2", but rather "from u=0 to u=1".

• December 3, 2010 at 7:30 am

@pmcmena1 basic stuff

• January 14, 2011 at 9:10 am

hanks a lot. Great explanation and example. Your teaching skill is great.

• January 14, 2011 at 9:11 am

Thanks a lot. Great explanation and example. Your teaching skill is great.

• October 17, 2011 at 8:40 am

You Sir, are awesome.

• October 27, 2011 at 8:51 pm

You have a real gift for teaching.
Very rare

• November 19, 2011 at 1:27 pm

I had to pause the video saying that this is amazing!!!

• January 2, 2012 at 12:59 pm

Thanku very much sir for this and so many other videos..u are a great teacher..

• January 18, 2012 at 9:26 pm

this video explains how radon transform work in ct scan…
thanks a ton..u made such a complicated thing as easy as it can be…

• January 19, 2012 at 3:07 am

your waaaaayyyy too slow, people aint watching to learn how to integrate, they're watching to learn about line integral, but the explanations are superb, very intuitive 😛

• April 26, 2012 at 10:24 am

Yes

• July 5, 2012 at 6:11 pm

tip: try to hold shift while drawing a line to make it straight!
it should work on all drawing applications…

you are a master of teaching!

• July 18, 2012 at 6:35 pm

Thanks Man (Morocco)

• July 19, 2012 at 2:01 am

Thankyou ever so much sir. This whole YouTube teaching programme of yours is extremely benevolent. Thankyou.

• July 19, 2012 at 2:02 am

I learn a lot from it.:)

• October 15, 2012 at 5:58 pm

It seems strange to me but even when I feel sleepy and I see his lectures I can understand even then!

• October 25, 2012 at 5:10 am

I followed everything until the end – why didn't you replace u with sin(t) at the end of your u substitution and keep your bounds of integration in terms of t?

• November 7, 2012 at 8:21 pm

I hope when my teacher eventually sees these videos he realizes that he's a incompetent union protected lower and commits hari kari

• November 13, 2012 at 4:57 am

tell u the truth..i studied this in 1975 and am now 59…Now I understand the damn line integral.

• November 27, 2012 at 4:04 am

I love it when the subtitles say "UNINTELLIGIBLE" in all caps.

• December 8, 2012 at 8:18 pm

@ the end, let me do it in a darker color… chooses light purple

lol

• January 6, 2013 at 8:06 pm

Wow…that's great

• January 27, 2013 at 11:10 pm

What do the colors in the 3-D plane stand for?

• February 7, 2013 at 2:39 am

pretty sure they represent slopes…

• May 4, 2013 at 3:07 pm

Why not mention that the factor you replace ds with is actually the length of c'(t) ?

• May 31, 2013 at 3:34 pm

I used that method as well.

sin(t) cos(t) can be integrated to -1/2(cos(t))^2 or 1/2(sin(t))^2. The answer comes out the same both ways.

• July 13, 2013 at 12:03 am

if i consider a non parameterized function….like say i simply have y=x^2 ……should i parameterize it??

• October 4, 2013 at 12:42 am

what software or device is used to make this videos?

• November 15, 2013 at 7:13 pm

I wish my professors would teach like this!

• November 28, 2013 at 10:13 am

Thank thank

• December 11, 2013 at 12:30 am

You make wonderful curly brackets!

• January 5, 2014 at 11:12 am

I'm counting on your videos to get a 7 on calculus

• February 11, 2014 at 6:10 pm

Thank you Sir.

• May 15, 2014 at 2:18 am

Thank you very much. That was very well explained.

• May 19, 2014 at 10:37 pm

befor i finish the video thnx realy it helped

• June 9, 2014 at 10:35 am

I LOVE YOU MAN!!!!!!!!!!!!(writing in a couple of hours!!!

• June 15, 2014 at 12:54 pm

If only I watched these videos before I started cramming for finals… Learning is so much easier when you aren't stressed haha

• August 22, 2014 at 4:31 pm

x=cost haha

• November 7, 2014 at 11:14 pm

"Ill go switch back to that color I dont like" LOL

• December 17, 2014 at 1:43 pm

Do contour integration

• January 6, 2015 at 9:42 pm

😀

• March 11, 2015 at 6:01 pm

hueuha

• May 5, 2015 at 5:30 pm

you can also integrate sint*cost dt by converting it to 1/2*sin(2t) dt right?  I did and got the same answer.

• May 24, 2015 at 1:56 am

Thanks!

• August 5, 2015 at 2:10 am

Excellent video ! For those who are familiar with Matlab or GNU Octave , here is a simple script that will help you to actually see the "curtain" that he refers to .

clear all;
clc;
t=[0:0.001:pi/2];
x=sin(t);
y=cos(t);
z=(x.*y);
stem3(x,y,z);
xlabel("sin(t)");
ylabel("cos(t)");
zlabel("f(x,y)");

• September 24, 2015 at 5:09 pm

thank you so much Sal…

• November 30, 2015 at 7:54 pm

Thank you <3

• December 13, 2015 at 10:27 pm

Sal….u just saved my exam which is 3hrs from now…thanks a bunch 🙂

• January 19, 2016 at 5:02 pm

ALL WE DID TO GET A FUCKING 1/2……..THAT IS SOMETHING THAT PISSES ME OFF

• January 19, 2016 at 5:03 pm

ANYWAY…..SUPERB WAY OF EXPLAINING STUFF IN A SIMPLE AND LUCIS MANNER

• March 30, 2016 at 11:53 am

hi to everyone
sir just I want to know how you got this limits and how can I find it in other examples ?thanks

• May 7, 2016 at 4:28 pm

i love you

• May 9, 2016 at 5:41 am

I like the software you used in the video very much, can you give me the name of it?

• July 16, 2016 at 3:02 pm

at 10:53 , for small method we can multiply and divide by 2. so integral part will be 2sint*cost that is equal to sin2t.then integration of sin2t= -cos2t/2 .

• December 25, 2016 at 4:45 pm

pretty neat

• January 8, 2017 at 2:29 pm

.. So what is Green's theorem?

• February 13, 2017 at 8:38 am

We just performed a line integral! F*ck yeah! 😀

• May 1, 2017 at 7:10 am

Once again, Sal was able to teach me in 10 minutes what my college professor failed to in 2 hours.

• May 12, 2017 at 4:04 pm

awesome…visualization

• May 18, 2017 at 5:04 am

thank very much, you are an amazing teacher

• May 18, 2017 at 5:10 am

It's fantastic how you summarize a one hour lecture in 15 minutes

• June 24, 2017 at 7:43 am

Amazing job. I haven't even started calc 3 yet but I like to jump ahead. Very nicely done it managed to click and I have a very good understanding in line integrals now!

• September 8, 2017 at 11:34 am

Why you dont resubstutute sint in place of u

• September 8, 2017 at 1:13 pm

Sal. It seems you plugged the equation for the curve into where I thought you said the equation for the ceiling should be. I thought you said the ceiling was x times y but you've made it the exact equation for the floor.What if you have a problem where the equation for the ceiling is completely different than the floor? In other words, the f(x,y) (ceiling) should only be x times y not cos t times sin of t. What am I missing here, please? You cannot define the ceiling as a function of t, only the floor curve.

• November 7, 2017 at 8:16 am

What happened to Grant?

• November 7, 2017 at 7:43 pm

12:18 I don't understand why the du gets dropped

• December 5, 2017 at 5:21 am

9:45 giant OH moment

• January 3, 2018 at 11:38 pm

• January 21, 2018 at 11:17 am

kindly sir write on white board….its not understandable for everyone

• February 7, 2018 at 2:43 pm

can anyone tell me what software he used to trace the f(x;y) curve please?

• February 11, 2018 at 4:32 pm

What I don't get is how you get a plane from a line. All those green and yellow rectangles on the plane where never even on the line to begin with. Please help someone.

• March 21, 2018 at 10:52 pm

How can we virtualized the line integral if f(x,y) is a 2d vector, example Electric field vector

• April 21, 2018 at 2:42 am

The Khan academy drinking game: every time he says something about "not too rigorous" or "hand waving" you throw back a shot.

• May 2, 2018 at 10:02 am

2:08 Sal said sqrt(2),sqrt(2) but meant sqrt(3)/2,sqrt(3)/2

• May 13, 2018 at 1:10 pm

Been doing line surface and volume integrals for 2 months now only to realize now that the line integral is the area of the surface about the line. Face palm?

• July 17, 2018 at 7:07 am

I understand the concept, proof of the formula and the results. But my question is, how is this useful in real life applications?

• November 17, 2018 at 7:07 pm

could you recommend any book that I can practice solving more problems

• December 13, 2018 at 9:54 am

amazing…….

• December 20, 2018 at 4:50 pm

Why did he use substitution instead of the product rule for the integrations of sin(t) *cos(t)

• December 29, 2018 at 12:47 pm

or you could just call it sin2t/2.

• April 10, 2019 at 12:26 pm

I find it quite difficult to visualise

• April 11, 2019 at 3:17 pm

why don't we just use double integral? looks like it can give the same area too

• April 19, 2019 at 2:36 pm

dS (differential arc)is fundamentally non linear in the picture but it being infinitesimally small, it can safely be assumed to be linear thus allowing its approximation by Pythagoras theorem. Is this point of view correct?

• April 24, 2019 at 5:52 pm

you are the best I wish 60 years ago my teacher can do this

• July 22, 2019 at 4:46 am

Can't we use the dot product between the function and ds? It will make it more simpler, isn't it?

• October 10, 2019 at 7:02 pm

If you switch the variables back to t’s after the substitution you get -1/2, why’s that?

• October 19, 2019 at 6:14 pm

Can you help me with this question?
The value of the integral of the function g(x,y)=4
x^3+10y^4 along the straight line segment from the point (0,0) to the point (1,2) in the xy-plane is?

My answer with your method is coming 33*(5^0.5). ds part is coming as 5^0.5.
The correct answer is being shown as 33 only.
Need help?????

• January 5, 2020 at 10:15 am
• 