If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Using a line integral to find work

Using a line integral to find the work done by a vector field example. Created by Sal Khan.

Want to join the conversation?

  • blobby green style avatar for user varuns1325
    If a particle return back to same initial point then displacement is 0, thus workdone is 0(work done =force*displacement)...



    for any close path displacement is 0 thus the work done is also 0... but in the above vedio we got -2pi. how it is possible?? can u pls explain me.



    thanks in advance.
    (11 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Riley
      What work really depends on is the field. If you have a conservative field, then you're right, any movement results in 0 net work done if you return to the original spot. With most vector valued functions however, fields are non-conservative. In a non-conservative field, you will always have done work if you move from a rest point.

      In the video, the field is non-conservative, because as Sal showed, moving around a circle nets you some work.
      (21 votes)
  • blobby green style avatar for user Roei Mayo
    why did the i and j (unit vectors) disappeared after the dot product at ?
    (15 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Graeme McCrory
    So when we say the work done was -2pi, that is the work done by the field. Would the work done by us to keep the particle moving in that path then be 2pi?
    (8 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Kent Fischer
      Like you stated, if the field does -2pi units of work, then the force pushing against the field must do +2pi units of work. Pavle, the logic you use is slightly skewed. Recall, work is force times distance (and as we have learned now, it is actually the tangential component of force in the direction we are moving times the distance moved), so if the particle doesn't move, then there is no work done by anything, the field or us.
      If the field did -2pi units of work, then the particle definitely moved. the amount of work the field "absorbed" (negative) is the same amount that we "put in" (positive).

      Pavle, you would be correct in saying that the particle does not move if we applied the same Force as the vector field but in the negative direction (in this case -yi+xj), but remember force is different than work.

      Another way to think about it is through the law of conservation of energy, energy can not be created or destroyed, just change forms. Therefore, if the field does negative work to us (take energy from us) then we must do positive work to the field (supply energy to it). So yes, if the field does -2pi units of work, then we do +2pi units of work. If the field does positive work, then we do the same amount of negative work, etc.
      (assuming that we are the ones moving the particle in this instance)
      (10 votes)
  • blobby green style avatar for user Demetria Packwood
    Is it possible to evaluate the line integral without using a parameter?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user jeanieofthelamp
    At , how is he graphing the vectors? at , how does he know whether it's clockwise or counterclockwise? thanks
    (5 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam blue style avatar for user Ethan Dlugie
    Why does Sal not write the integral sign with the circle at ? It is a closed loop.
    (5 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user antony.nithesh
    Doesn't r(t) = cos(t) i + sin(t) j point outward, rather than tangentially along the circular path?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Biniamin
    How are you sure that it's a counter clockwise curve?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Andrew Gloster
      If we take the 1st quadrant (where x and y are positive), we see that as t gets larger the cos will get smaller, so x starts at 1 when t=0 and moves to 0 when t=pi/2. We also see that as t gets larger sin gets larger, thus y=0 when t=0 and y=1 when t=pi/2. If we graph these as points (x,y) marking a new point for each value of t we see that a quarter of a circle is drawn in the counter clockwise direction. Extending this to the other 3 quadrants we see it's a counter clockwise curve.
      (3 votes)
  • blobby green style avatar for user Chuck Sampson
    So if you integrate over C and C is the circumference of the circle, then the limits of integration should be 2*pi*r, where r is the radius of the circle in meters. So in this case it is 1 meter to make it simple, so r =1 meter. And the force opposing the movement of the particle is in N, so you get 2 pi Nm. Correct? The reason I mention this is if you replace the 1 with a variable r, then the answer is generalized for all Work done by a particle moving CCW in a CW field, that is - 2 pi r. So you could use this formula instead of going through the derivation each time.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf red style avatar for user burton sonel
    What are the units of 2 pi in the answer?
    (2 votes)
    Default Khan Academy avatar avatar for user

Video transcript

Let's apply what we learned in the last video into a concrete example of the work done by a vector field on something going through some type of path through the field. So let's say that I have a vector field. It's defined over r2 for the x-y plane. So it's a function of x and y. It associates a vector with every point on the plane. And let's say my vector field is y times the unit vector i minus x times the unit vector j. And so you can imagine if we were to draw-- let's draw our x- and y-axes. I'll do it over here. If we were to draw our x- and y-axes, this associates a vector, a force vector-- let's say this is actually a force vector-- with every point in our x-y plane. So this is x and this is y. So if we're at the point, for example, 1, 0, what will the vector look like that's associated with that point? Well, at 1, 0, y is 0, so this will be 0, i minus 1, j. Minus 1, j looks like this. So minus 1, j will look like that. At x is equal to 2-- I'm just picking points at random, ones that'll be -- y is still 0, and now the force vector here would be minus 2, j. So it would look something like this. Minus 2, j. Something like that. Likewise, if we were to go here, where y is equal to 1 and x is equal to is 0, when y is equal to 1, we have 1, i minus 0, j, so then our vector is going to look like that at this point. If we're to go to 2-- you could get the picture. You can keep plotting these points. You just want to get a sense of what it looks like. If you go here, the vector's going to look like that. If you go maybe at this point right here, the vector's going to look like that. I think you get the general idea. I could keep filling in the space for this entire field all over. You know, just to make it symmetric, if I was here, the vector is going to look like that. You get the idea. I could just fill in all of the points if I had to. Now, in that field, I have some particle moving, and let's say its path is described by the curve c, and the parameterization of it is x of t is equal to cosine of t, and y of t is equal to sine of t. And the path will occur from t-- let's say, 0 is less than or equal to t is less than or equal to 2pi. You might already recognize what this would be. This parameterization is essentially a counterclockwise circle. So the path that this guy is going to go is going to start here. Well, you can imagine, t in this case, you could almost imagine is just the angle of the circle, but you can also imagine t is time. So at time equals 0, we're going to be over here. Then at time of pi over 2, we're going to have traveled a quarter of the circle to there, so we're moving in that direction. And then at time after pi seconds, we would have gotten right there. And then all the way after 2pi seconds, we would have gotten all the way around the circle. So our path, our curve, is one counterclockwise rotation around the circle, so to speak. So what is the work done by this field on this curve? So the work done. So the work, we learned in the previous video, is equal to the line integral over this contour of our field, of our vector field, dotted with the differential of our movement, so dotted with the differential of our movement dr. Well, I haven't even defined r yet. I mean, I kind of have just the parameterization here, so we need to have a vector function. We need to have some r that defines this path. This is just a standard parameterization, but if I wanted to write it as a vector function of t, we would write that r of t is equal to x of t, which is cosine of t times i plus y of t times j, which is just sine of t times j. And likewise, this is for 0 is less than or equal to t, which is less than or equal to 2pi. And this are equivalent. The reason why I took the pain of doing this is so now I can take its vector function derivative, and can figure out its differential, and then I can actually take the dot product with this thing over here. So let's do all of that and actually calculate this line integral and figure out the work done by this field. One thing might already pop in your mind. We're going in a counterclockwise direction, but at every point where we're passing through, it looks like the field is going exactly opposite the direction of our motion. For example, here we're moving upwards. The field is pulling us backwards. Here we're moving to the top left. The field is moving us to the bottom right. Here we're moving exactly to the left. The field is pulling us to the right. So it looks like the field is always doing the exact opposite of what we're trying to do. It's hindering our ability to move. So I'll give you a little intuition. This'll probably deal with negative work. For example, if I lift something off the ground, I have to apply force to fight gravity. I'm doing positive work, but gravity's doing negative work on that. We're just going to do the math here just to make you comfortable with this idea, but it's interesting to think about what's exactly going on even here. The field is-- the field I'm doing in that pink color, so let me stick to that. The field is pushing in that direction, so it's always going opposite the motion. But let's just do the math to make everything in the last video a little bit more concrete. So a good place to start is the derivative of our position vector function with respect to t. So we have a dr/dt, which we could also write as r prime of t. This is equal to the derivative of x of t with respect to t, which is minus sine of t times i plus the derivative of y of t with respect to t. Derivative of sine of t is just cosine of t. Cosine of t times j. And if we want the differential, we just multiply everything times dt, so we get to dr is equal to-- we could write it this way. We could actually even just put the d-- well, let me just do it. So it's minus sine of t dt-- I'm just multiplying each of these terms by dt, distributive property-- times the unit vector i plus cosine of t dt times the unit vector j. So we have this piece now. And now we want to take the dot product with this over here, but let me rewrite our vector field in terms of in terms of t, so to speak. So what's our field going to be doing at any point t? We don't have to worry about every point. We don't have to worry, for example, that over here the vector field is going to be doing something like that because that's not on our path. That force never had an impact on the particle. We only care about what happens along our path. So we can find a function that we can essentially substitute y and x for, their relative functions with respect to t, and then we'll have the force from the field at any point or any time t. So let's do that. So this guy right here, if I were to write it as a function of t, this is going to be equal to y of t, right? y is a function of t, so it's sine of t, right? that's that. Sine of t times i plus-- or actually minus x, or x of t. x is a function of t. So minus cosine of t times j. And now all of it seems a little bit more straightforward. If we want to find this line integral, this line integral is going to be the same thing as the integral-- let me pick a nice, soothing color. Maybe this is a nice one. The integral from t is equal to 0 to t is equal to 2pi of f dot dr. Now, when you take the dot product, you just multiply the corresponding components, and add it up. So we take the product of the minus sign and the sine of t-- or the sine of t with the minus sine of t dt, I get-- you're going to get minus sine squared t dt, and then you're going to add that to-- so you're going to have that plus. Let me write that dt a little bit. That was a wacky-looking dt. dt, and then you're going to have that plus these two guys multiplied by each other. So that's-- well, there's a minus to sign here so plus. Let me just change this to a minus. Minus cosine squared dt. And if we factor out a minus sign and a dt, what is this going to be equal to? This is going to be equal to the integral from 0 to 2pi of, we could say, sine squared plus-- I want to put the t -- sine squared of t plus cosine squared of t. And actually, let me take the minus sign out to the front. So if we just factor the minus sign, and put a minus there, make this a plus. So the minus sign out there, and then we factor dt out. I did a couple of steps in there, but I think you got it. Now this is just algebra at this point. Factoring out a minus sign, so this becomes positive. And then you have a dt and a dt. Factor that out, and you get this. You could multiply this out and you'd get what we originally have, if that confuses you at all. And the reason why I did that: we know what sine squared of anything plus cosine squared of that same anything is. That falls right out of the unit circle definition of our trig function, so this is just 1. So our whole integral has been reduced to the minus integral from 0 to 2pi of dt. And this is-- we have seen this before. We can probably say that this is of 1, if you want to put something there. Then the antiderivative of 1 is just-- so this is just going to be equal to minus-- and that minus sign is just the same minus sign that we're carrying forward. The antiderivative of 1 is just t, and we're going to evaluate it from 2pi to 0, or from 0 to 2pi, so this is equal to minus-- that minus sign right there-- 2pi minus t at 0, so minus 0. So this is just equal to minus 2pi. And there you have it. We figured out the work that this field did on the particle, or whatever, whatever thing was moving around in this counterclockwise fashion. And our intuition held up. We actually got a negative number for the work done. And that's because, at all times, the field was actually going exactly opposite, or was actually opposing, the movement of, if we think of it as a particle in its counterclockwise direction. Anyway, hopefully, you found that helpful.