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

Second example of line integral of conservative vector field

Using path independence of a conservative vector field to solve a line integral. Created by Sal Khan.

Want to join the conversation?

  • female robot grace style avatar for user tyersome
    At , it looks like you could solve this by:
    1) substituting x = cos(t), y = sin(t), dx = -sin(t)•dt, dy = cos(t)•dt
    2) integrate from t=0 to t=pi

    Anyone know of a reason why that wouldn't be valid?
    (9 votes)
    Default Khan Academy avatar avatar for user
    • old spice man green style avatar for user Michael Eve
      Yes, that is correct. It's the same method used in earlier videos. I suggest starting with the "Line Integrals and vector fields" video here and viewing all of them. He is really just showing an alternate method of solving the integral here, a method which in some cases may actually be quicker.
      (6 votes)
  • leaf green style avatar for user Benjamin.S.Kjaer
    When he says the only solution for the potential is x^3/3+xy^2, shouldn´t he put on a constant, c?
    (7 votes)
    Default Khan Academy avatar avatar for user
  • male robot johnny style avatar for user Engineering#1
    im just thinking couldnt we just simply define our own path from 0 to pi like a straight line to bypass dealing with sine's and cosine, i know finding capital F and evaluating at endpoints is more simple but just wondering if defining a simpler path is also a method for solving
    (4 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user Sean
      You could define your own path as long as you know the vector field is conservative. Conservative vector fields are path independent meaning you can take any path from A to B and will always get the same result.
      Showing that capital F exists is the way you find out if the vector field is conservative. So it is a necessary step. If there is no capital F that exists for that vector field, then your vector field is not conservative so you can't define your own path. You will get the wrong answer.

      Hope I helped.
      p.s. There are other ways to show the vector field is conservative. For example if curl(f) = 0
      (4 votes)
  • blobby green style avatar for user Ramy Farid
    In checking wether there exists that function F .. can't we use the method we learnt in ODE exact equations .. I mean can't we get Mx and Ny and if they are equal we can say that this function F ( or psi in ODE part ) exists ? Am I right or the situation is different ?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user SanFranGiants
    Why is it that f being written as del F makes the path conservative?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Yamanqui García Rosales
      What is conservative is not the path, but the vector field. And actually that is the definition "A vector field that can be written as the gradient of a scalar field is called 'conservative'".

      As you are currently studying, conservative fields have some very nice mathematical shortcuts, and that is why it's very nice to work with conservative fields, this is because, as they can be represented by a scalar field, you don't have to deal with vector calculus, which removes a dimension of work.

      It also means that conservative fields are "simpler" than non-conservative ones, (again because they can be represented as scalar fields).
      (4 votes)
  • blobby green style avatar for user shgo1548
    Around . Isn't the nabla an operator, so the vector arrow should be over F, right?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user lakern
      Here F is not a vector field because it outputs just one number, so we would not write an arrow over it. It's not standard notation to write an arrow over the nabla operator when it is a gradient, but some people do to highlight that the result will be a vector. Hope this helps :)
      (4 votes)
  • leaf green style avatar for user fabus.marco
    What is the significance of the answer being negative, if any? Thanks for replies.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • winston default style avatar for user John Shahki
    Just wondering, would it be possible to evaluate this like if it were a normal line integral and not a vector line integral?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user matthias.estner
    Another method to solve this in polar coordinates:
    (say i^= i-hat unit vector and p = phi)
    f = r^2*i^ + 2*cos(p)*sin(p)*j^
    dr_vector = r*d_p*p^ (p^ = unit vector in phi direction (azimutal angle)

    you cant write the phi unit vector as: -sin(p)*i^+cos(p)*j^
    now dot product f with dr gives you:

    -sin(p)*d_p+2*cos^2(p)*sin(p)d_p
    integrate from 0 to pi with respect to p (phi):

    [cos(p)] + [-2/3*cos^3(p)] all from 0 to pi

    this is: (-1 -1) - 2/3(-1-1) = -2 + 4/3 = -2/3
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user orestisg1997
    If a vector field has components Q(x,y) and P(x,y) in the i,j direction correspondingly, then if Q(x,y) and P(x,y) are continuous functions in space R, can't we tell for sure that the specific vector field is the gradient of a scalar valued function F(x,y), so it is conservative?
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

Let's do another problem. Very similar to the last one, but with a subtle difference. And that subtle difference will make a big difference. Let's say we take the line integral over some curve c-- I'll define the curve in a second-- of x squared plus y squared dx plus 2xy dy-- and this might look very familiar. This was very similar to what we saw last time, except last time we had a closed line integral. This is not a closed line integral. And our curve, c, the parameterization is x is equal to cosine of t, y is equal to sine of t. So far-- it looks like sit. Let me write sine of t-- so far, it looks very similar to the closed line integral example we did in the last video, but instead of t going from 0 to 2 pi, we're going to have t go from 0 to pi. t is greater than or equal to 0, is less than or equal to pi. So now we're essentially, our path-- if I were to draw it on the x-y plane-- so that is my y-axis, that is my x-axis. So now our path isn't all the way around the unit circle. Our path-- our curve c now-- just starts at t is equal to 0. You can imagine t is almost the angle. t is equal to 0, and we're going to go all the way to pi. So that's what our path is right now, in this example. So it's not a curved path. It's not a closed path. So we can't just show that f, in this example-- and we're going to re-look at what f looks like-- hey, if that's a conservative vector field, if it's a closed loop that equals 0, this isn't a closed loop. So we can't apply that. But let's see if we can apply some of our other tools. So like we saw in the last video, this might look a little bit foreign to you. But if you say that f is equal to that times i, plus that times j, then it might look a little bit more familiar. If we say that f of xy-- the vector field f is equal to x squared plus y squared times i plus 2xy times j and dr-- I don't even have to look at this right now. dr, you can always write it as dx times i plus dy times j. You'll immediately see, if you take the dot product of these 2 things, if you take f dot dr-- they're both vector valued, vector valued differential, vector valued field, or vector valued function-- if you take f dot dr, you'll get this right here. You'll get what we have inside of the interval. You'll get that right there, right? That times that-- you take the product of the i terms-- that times that is equal to that, and add it to the product of the j terms. 2xy times dy. Write like that. So our integral, we can rewrite it as this. Along this curve of f dot dr, where this is our f. Now, we still might want to ask ourselves, is this a conservative field? Or does it have a potential? Is f equal to the gradient of some function, capital F? I guess I could write the gradient like that, because it creates a vector. This is a vector, too. Is this true? And we saw in the last video, it is. I'll redo it a little bit fast this time. Because if this is true, we can't say this is a closed loop and say, oh, it's just going to be equal to 0. But if this is true, then we know that this-- that the integral is path independent. And we'll know that this is going to be equal to capital F, if we say that t is going from-- well, in this case t is going from 0 to pi-- we could say that this is going to be equal to capital F of pi minus capital F of 0. Or if we want to write it in terms of x and y-- because f is going to be a function of x and y-- we could write-- and this right here, these are t's. We could also write that this is equal to f of x of pi, y of pi, minus f of x of 0, y of 0. That's what I mean when I say f of pi. If we were to write f purely as a function of t. But we know that this capital F is going to be a function. It's a scalar function defined on xy. So we could say f of x of pi, y of pi. These are the t's now. These are all equivalent things. So if it is path dependent, we can find our f. We can just evaluate this thing by just taking our f, evaluating it at these two points. At this point, and at that point right there. Because it would be path independent. If this is a conservative, if this has a potential function, if this is the gradient of another scalar field, then this is a conservative vector field, and its line integral is path independent. It's only dependent on that point and that point. So let's see if we can find our f. So I'm going to do exactly what we did in the last video. If you watch that last video, it might be a little bit monotonous. But I'll do it a little bit faster here. So we know that the partial of f with respect to x is going to have to be equal to this right here. So that's x squared plus y squared. Which tells us, if we take the antiderivative, with respect to x, then f of xy is going to have to be equal to x to the third over 3 plus xy squared-- right? y squared is just a constant in terms of x-- plus f of y. There might be some function of y that, when you take the partial with respect to x, it just disappears. And then we know that the partial of f with respect to y has got to be equal to that thing or that thing. We're saying that this is the gradient of f. So this has to be the partial with respect to y. 2xy. And you might want to watch the other video. I go through this just a little bit slower in that one. So the antiderivative of this with respect to y-- so we get f of xy-- would be equal to xy squared plus some function of x. Now we did this in the last video. These 2 things have to be the same thing, in order for the gradient of capital F to be lowercase f. And we have xy squared, xy squared. We have a function of x, we have a function purely of x. And then we don't have a function purely of y here, so this thing right here must be 0. So we've solved. Our capital F of xy must be equal to x to the 3 over 3 plus xy squared. So we know that lowercase f is definitely conservative. It is path independent. It has its potential. It is the gradient of this thing right here. And so to solve our integral-- this was a 0-- to solve our integral, we just have to figure out x of pi, y of pi, x of 0, y of 0. Evaluate the bullet points, and then subtract the 2. So let's do that. So x was cosine of t, y is sine of t. Let me rewrite it down here. So x is equal to cosine of t. y is equal to sine of t. So x of 0 is equal to cosine of 0, which is equal to 1. x of pi is equal to cosine of pi, which is equal to minus 1. y of 0 is sine of 0, which is 0. y of pi, which is equal to sine of pi, which is equal to 0. So f of x of pi, y of pi-- this is the same thing, so let me rewrite this. Our integral is simplified to-- our integral along that path of f dot dr-- is going to be equal to capital F of x of pi. x of pi is minus 1. y of pi is equal to 0. Minus capital F of x of 0 is 1, comma y of 0 is 0. And so what is this equal to? Just remember, this right here is the same thing is that right there. That is x of pi. That is y of pi. That term right there. You can imagine this whole f of minus 1, 0-- that's the same thing as f of pi, if you think in terms of just t. That could be a little confusing, so I want to make that clear. So this is just straightforward to evaluate. What is f of minus 1, 0? x is minus 1. y is 0. So it's going to be minus 1 to the third power-- right, that's our x-- over 3. So it's minus 1/3. It's going to be minus 1/3 plus minus 1 times 0 squared. So that's just going to be a 0. In both cases, the y is 0. So this term is going to disappear. So we can ignore that. And then we have minus f of 1, comma 0. We put a 1 here. 1 to the third over 3. That is 1/3 plus 1 times 0 squared. That's just 0. So this is going to be equal to minus 1/3. Minus 1/3 is equal to minus 2/3. And we're done. And once again, because this is a conservative vector field, and it's path independent, we really didn't have to mess with the cosine of t's and sines of t's when we actually took our antiderivative. We just have to find the potential function and evaluate it at the 2 end points to get the answer of our integral, of our line integral, minus 2/3.