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

Example of closed line integral of conservative field

Example of taking a closed line integral of a conservative field. Created by Sal Khan.

Want to join the conversation?

  • blobby green style avatar for user connoryoung1993
    At couldn't g(y) be equal to any constant, not just zero? Surely g(y)=k will give the same result when you take the partial derivatives?
    (27 votes)
    Default Khan Academy avatar avatar for user
  • starky seedling style avatar for user Mohammad Alshaiji
    Let us assume that I did not check if f = grad F, does that mean that when I continue with the problem I will eventually get zero for an answer?
    (13 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Ashwin Raghavachari
    I'm getting a little lost in the intuition for this example. If a normal integral is the area under the curve, then what does this example represent?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • purple pi purple style avatar for user Murray
      As a random aside, I don't think there's really such a thing as a "normal" integral, at least not up to where the calculus playlist is so far. All the integrals (so far) have been fundamentally the same. For example, the 'normal' integrals you are talking about are really a special case of line integral through a one-dimensional scalar field, special in the sense that the parametric curve through the field is a straight line (as another aside you can parameterise your 'normal' integral w.r.t. dx to one w.r.t dt and integrate 'backwards' like how Khan showed a few videos ago using the a + b - t trick. The point is, normally our x(t) = t and so we tend to 'de-parameterise' it to the familiar dx integral). Whether or not we can interpret it as area depends on the units of our variables and the context in which we are applying the integration. That is, integration is a mathematical tool that does what it does rather abstractly, and it is up to the user to endow the results with a physically meaningful interpretation.

      I might have been taking an off-hand comment too far, but I hope my comment was mildly interesting.
      (17 votes)
  • orange juice squid orange style avatar for user Consilio
    Is there any obvious reason for the omission of the x and y unit vectors from integral form?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user MthiyaneNtuthuko
    just a bit confused, my lecturer told us to check if a force is conservative or not by calculating it its curl. He said if the curl = 0 that means the force is conservative, the curl of this function doesn't = 0 but the force is conservative, how come??
    (5 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user Carli Freeman
    At the video says that normally you can treat differentials (such as dt) as numbers and multiply them. What are some examples where you can't?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Fabien Ma
      I can think of one example – although I can't think of a specific problem in which this is the case off the top of my head – and that would be if your differential (such as dt) just so happens to have the value of 0. Then you would be dividing/multiplying by zero, which does not work.
      (6 votes)
  • mr pink red style avatar for user Georgi Nikolov
    Why don't we have a +C (constant) in F(x,y) in the end (on )?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Hans Stephensen
      Strictly speaking Sal made a mistake not including the constant in the funtion F(x,y). It's supposed to + C. This is true because you can add a constant to F, and finding the gradient will yield the same result regardless of the value of that constant. Also because my Physics math lecturer has been shouting us in the face multiple times not to forget that particular constant xD
      (3 votes)
  • piceratops sapling style avatar for user Stive
    At , the vector field must be equal to a scalar field. I don't quite understand the connection there. A scalar field is defined by magnitudes only, so how can it be that it equals a field that is defined by magnitude and direction on any point?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Jessie
    To determine the f vector is a conservative, it has to equal the gradient of a scalar field. I though the scalar field has to be pre-determined before you can solve this problem, otherwise it can be any scalar field you pick. Here Sal just take the anti-derivative of the f vector to obtain a scalar field, then of course the gradient of this derived scalar field will be equal to the f vector. If he put this scalar vector in the beginning of the question, I can understand this path is path independent according to this scalar field. But otherwise it can be any scalar field, and f vector is not conservative to just any scalar field. Am I getting this concept right? Thanks for any correction!
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user David Nutting
      If you are give vector field f and can find ANY scalar potential F where grad(F) = f, that is sufficient.

      Actually, if such an F exists, then it is unique up to a constant, so is, in a sense, pre-determined by f even if you haven't been told what it is.

      Note that there are many fields f for which no such F exists and which are therefore not conservative.

      E.g. wind velocity in a cyclone / tornado / typhoon - integrate round any path round the "eye" in a direction "with the wind" and all the components of the integral will be positive - and the result definitely not zero. In general wind velocity is not a conservative field.
      (4 votes)
  • blobby green style avatar for user Marcus
    I think something is wrong here. If you go to his video at http://www.khanacademy.org/math/calculus/v/partial-derivatives and go to time stamp he shows that the partial derivative of Z with respect to x of X = x^2 + Y is equal to 2x so in this example on this video at when he takes the partial derivative of X^2 + y^2 he gets 1/3x^3 + xy^2 is wrong as it should really be 2x. What he did was take the integration by accident. Correct?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Jt wat?
      He's not taking the partial derivative, he's taking the integral.

      So take the integral of x^2 + y^2 with respect to x

      we know the integral of x^2 with respect to x is (1/3)x^3

      The integral of y^2 with respect to x (assuming y is a function of some other variable, and for this problem it is) is just x * y^2
      (3 votes)

Video transcript

Let's see if we can apply some of our new tools to solve some line integrals. So let's say we have a line integral along a closed curve -- I'm going to define the path in a second -- of x squared plus y squared times dx plus 2xy times dy. And then our curve c is going to be defined by the parameterization. x is equal to cosine of t, and y is equal to sine of t. And this is valid for t between 0 and 2 pi. So this is essentially a circle, a unit circle, in the xy plane, and we know how to solve these. Let's see if we can use some of our discoveries in the last couple of videos to maybe simplify this process. So the first thing you might say, hey, this looks like a line integral, but you have a dx and dy, I don't see a dot dr here. It's not clear to me that this is some type of even a vector line integral. I don't see any of vectors. What I want to do first, and the reason why I wanted to show you this example, is just to show you that this is just another form of writing really a vector line integral. To show you that you just have to realize if I have some are r of t -- this is our curve. I don't even write these functions in there. I'm just going to write it's x of t times i plus y of t times j. We've seen several videos now that we can write dr dt as being equal to dx dt times i plus dy dt times j. We've seen this multiple times. And we've seen multiple times we want to get the differential dr, we can just multiply everything times dt. And normally I just put a dt here and a dt there and get rid of this dt. But if you multiply everything times dt, if you view the differentials as actual numbers, you can multiply and normally you can treat them like that. Then you just get rid of all of the dt's. So dr you could imagine is equal to dx times the unit vector i plus dy times the unit vector j. So put that aside, and you might already see a pattern here. So if we define our vector field f, f of xy, as being equal to x squared plus y squared, i plus 2xy j, what is this thing? What is this thing over here? Well, what is f dot dr going to be? Dot products, you just multiply the corresponding components of our vectors and then add them up. So it's going to be if you take this f and dot it with that dr you're going to get the i component, x squared plus y squared times that dx plus -- I'll do it in the pink again -- plus the y component, the j component 2xy times that dy. That's the dot product. And notice, this thing right here is identical to that thing right there. So our line integral, just to put it in a form that we're familiar with, this is the same exact thing as the line integral over this curve c, this closed curve c, of this f -- maybe I'll write it in that magenta color, or actually it's more of a purple or pink color -- f dot this dr. That's what this line integral is, it's just a different way of writing it. Now that you see it, in the future if you see in kind of this differential form, you'll immediately know OK, there's one vector field that this is its x component, this is its y component, dotting with the dr. This is the x component of dr or the i component, and this is the y component or the j component of the dr. So you immediately know what the vector field is that we're taking a line integral of. This is the x, that's the y. Now, let's ask ourselves a question. Is f conservative? So is f equal to the gradient of some scalar field, we'll call it capital F -- is this the case? So let's assume it is and see if we can solve for a scalar field whose grade it really is f. Then we know that f is conservative. And then if f is conservative, and this is the whole reason we want to do it, that means that any closed loop, any line integral over a closed curve of f is going to be equal to 0 and we'd be done. So if we can show this then the answer to this question or this question is going to be 0. We don't even have to mess with the cosine of t's and the sign of t's and all that. Actually, we don't even have to take antiderivatives. So let's see if we can find an f whose gradient is equal to that right there. So in order for f's gradient to be that, that means that the partial derivative of our capital F with respect to x has got to be equal to that right there. It's got to be equal to x squared plus y squared. And it also tells us that the partial derivative of capital F with respect to y has got to be equal to 2xy. And just as a review, if I have the gradient of any function, of any scalar field is equal to the partial of f with respect to x times i plus the partial of capital F with respect to y times j. So that's why I'm just pattern matching. I'm just saying well, gee, if this is the gradient of that, then this must be that, which I wrote down right here, and this must be that, which I wrote down here. So let's see if I can find an f that satisfies both of these constraints. So we could just take the antiderivative with respect to x on both sides -- remember, you just treat y like a constant or y squared like a constant -- it's just a number. So then we could say that f is equal to the antiderivative of x squared is x to the third over 3. And then the antiderivative of y squared -- remember, this is with respect to x. So you just treat it like a number. That could just be the number k, or this could be the number 5. So this is just going to be that times x. So plus x times y squared. And then there could be some function of y here. So plus some, I don't know, I'll call it g of y. Because there could have been some function of y here. If it's a pure function of y, when you take the derivative or the partial with respect to x, this would have disappeared. So it would reappear when we take the antiderivative. And just to be clear, let me make it clear that f is going to be a function of x and y. So we just have the, I guess you could say the antiderivative with respect to x. Let's see if we take the antiderivative with respect to y and then we can reconcile the two. So based on this, f of xy, f of xy is going to have to look like -- so let's take the antiderivative with respect to y here. So remember, you just treat x like it's just some number -- it could be a k, it could be an m, it could be a 5. It's just some number. So if x is just some -- the antiderivative of 2y is y squared. And if x is just a number there, the antiderivative of this with respect to y is just going to be xy squared. Don't believe me? Take the partial of this with respect to y. Treat x like a constant you'll get 2 times xy with no exponent there. And, of course, if you took the antiderivative with respect to x, there might be some function of x here. We were just basing it off of that information. Now given that, this information says f of xy is going to have to look something like this. This information tells us f of xy's going to have to look something like that. Let's see if there is an f of xy that looks like both of them essentially. So let's see. On this one we have xy squared here, we have an xy squared there. So good. That looks good. And it over here we have an f of x -- we have something that's a pure function of x. And here we have something that is a pure function of x. So these two things could be the same thing. Then here we have a pure function of y that might be there, but it didn't really show up anywhere over here. So we could just say hey, that's going to be 0. 0 is a pure function of y. You could have something called g of y is equal to 0. And then we get that capital F of xy is equal to x to the third over 3 plus xy squared. And the gradient of this is going to be equal to f. And we've already established that. But just to hit the point home, let's take the gradient of it. Just if you don't believe this little stuff that I did right there, let's take the gradient. The gradient of f is equal to, and sometimes people put a little vector there because you're getting a vector out of it. You could put a little vector on top of that gradient sign. The gradient of f is going to be what? The partial of this with respect to x times i. So the partial of this with respect to x. The derivative here is 3 divided by 3 is 1. So it's just x squared plus the derivative of this with respect to x is y squared times i plus the partial with respect to y. Well, the partial with respect to y of this 0, partial with respect to y of this is 2xy or 2xy to the first. So it's 2xy times j. And this is exactly equal to f, our f that we wrote up there. So we've established that f can definitely be written -- f is definitely the gradient of some potential scalar function there. So f is conservative, and that tells us that this closed loop integral, line integral, of f is going to be equal to 0. And we are done. We could even ignore the actual parameterization of the path.