2d curl formula
So after introducing the idea of fluid rotation in a vector field like this, let's start tightening up our grasp on this intuition to get something that we can actually apply formulas to.
A vector field like the one that I had there, that's two-dimensional, is given by a function that has a two-dimensional input and a two-dimensional output. It's common to write the components of that output as the functions p and q. So each one of those p and q takes in two different variables as its input, p and q. What I want to do here is talk about this idea of curl, and you might write it down as just curl, curl of v, the vector field, which takes in the same inputs that the vector field does.
Because this is the two-dimensional example, I might write just to distinguish it from three-dimensional curl, which is something we'll get later on: 2d curl of v. So you're kind of thinking of this as a differential thing in the same way that you have, you know, a derivative um, d dx. It's going to take in some kind of function, and you give it a function and it gives you a new function.
The derivative here, you think of this 2d curl as like an operator. You give it a function, a vector field function, and it gives you another function, which in this case will be scalar valued. The reason a scalar value is because at every given point, you want it to give you a number. So if I, you know, look back at the vector field that I have here, we want that at a point like this where there's a lot of counterclockwise rotation happening around it, for the curl function to return a positive number.
But at a point like this, where there's some counter—where there's a clockwise rotation happening around it, we want the curl to return a negative number. So let's start thinking about what that should mean. A good way to understand this two-dimensional curl function and start to get a feel for it is to imagine the quintessential 2d curl scenario where, let's say, you have a point. This here is going to be our point x, y, sitting off somewhere in space, and let's say there's no vector attached to it, as in the values p and q at x and y are zero.
Then let's say that to the right of it, you have a vector pointing straight up above it. In the vector field, you have a vector pointing straight to the left, to its left, you have one pointing straight down, and below it, you have one pointing straight to the right. So in terms of the functions, what that means is this vector to its right, whatever point it's evaluated at, that's going to be q is greater than zero.
So this function q that corresponds to the y component, the up and down component of each vector, when you evaluate it at this point to the right of our xy point, q is going to be greater than zero, whereas if you evaluate it to the left over here, q would be less than zero. Less than zero in our kind of perfect curl will be positive example.
Then these bottom guys, if you start thinking about what this means for you, you'd have a rightward vector below and a leftward vector above. The one below it, whatever point you're evaluating that at, p, which gives us the kind of left-right component of these vectors since it's the first component of the output, would have to be positive. Then above it, above it here, when you evaluate p at that point, it would have to be negative, whereas p, if you did it on the left and right points, would be equal to zero because there's kind of no x component.
Similarly, q, if you did it on the top and bottom points, since there's no up and down component of those vectors, would also be zero. So this is just the very specific, almost contrived scenario that I'm looking at.
I want to say, hey, if this should have positive curl, maybe if we look at the information, the partial derivative information, to be specific about p and q in a scenario like this, it'll give us a way to quantify the idea of curl. First, let's look at p. So p starts positive, and then as y increases, as the y value of our input increases, it goes from being positive to zero to negative.
So we would expect that the partial derivative of p with respect to y, so as we change that y component moving up in the plane and look at the x component of the vectors, that should be negative. That should be negative in circumstances where we want positive curl.
So all of this, we're looking at cases, you know, the quintessential case where curl is positive. Evidently, this is a fact that corresponds to positive curl, whereas q, let's take a look at q. It starts negative when you're at the left and then becomes zero, then it becomes positive. So here, as x increases, q increases.
So we're expecting that the partial derivative of q with respect to x should be positive, or at the very least that situations where the partial derivative of q with respect to x is positive corresponds to positive two-dimensional curl. In fact, it turns out these guys tell us all you need to know.
We can say, is a formula that the 2d curl, 2d curl of our vector field v as a function of x and y is equal to the partial derivative of q with respect to x, partial derivative of q with respect to x, and then I'm going to subtract off the partial of p with respect to y because I want when this is negative for that to correspond with more positive 2d curl.
So I'm going to subtract off partial of p with respect to y, and this right here is the formula for two-dimensional curl, which basically you can think of it as a measure. At any given point, you're asking how much does the surrounding information to that point look like this setup, like this perfect counterclockwise rotation setup.
The more it looks like this setup, the more this value will be positive. And if it was the opposite of this, if each of the vectors was turned around and you have clockwise rotation, each of these values would become the negative of what it had been before. So 2d curl would end up being negative, and in the next video, I'll show some examples of what it looks like to use this formula.