Loading

# Multivariable Calculus: Vector Fields

## Vector Fields

Transcript: OK. Today we have a new topic, and we are going to start to learn about vector fields and line integrals. Last week we had been doing double integrals. For today we just forget all of that, but don't actually forget it. Put it away in a corner of your mind. It is going to come back next week, but what we do today will include line integrals. And these are completely different things, so it helps, actually, if you don't think of double integrals at all while doing line integrals.

Anyway, let's start with vector fields. What is a vector field? Well, a vector field is something that is of a form, while it is a vector, but while M and N, the components, actually depend on x and y,on the point where you are. So, they are functions of x and y. What that means, concretely, is that every point in the plane you have a vector. In a corn field, every where you have corn. In a vector field, everywhere you have a vector. That is how it works. A good example of a vector field, I don't know if you have seen these maps that show the wind, but here are some cool images done by NASA.

Actually, that is a picture of wind patterns off the coast of California with Santa Ana winds, in case you are wondering what has been going on recently. You have all of these vectors that show you the velocity of the air basically at every point. I mean, of course you don't draw it every point, because if you drew a vector at absolutely all the points of a plane then you would just fill up everything and you wouldn't see anything.

So, choose points and draw the vectors at those points. Here is another cool image, which is upside down. That is a hurricane off the coast of Mexico with the winds spiraling around the hurricane. Anyway, it is kind of hard to see. You don't really see all the vectors, actually, because the autofocus is having trouble with it. It cannot really do it, so I guess I will go back to the previous one. Anyway, a vector field is something where at each point --

-- in the plane we have vector F that depends on x and y. This occurs in real life when you look at velocity fields in a fluid. For example, the wind. That is what these pictures show. At every point you have a velocity of a fluid that is moving. Another example is force fields. Now, force fields are not something out of Star Wars. If you look at gravitational attraction, you know that if you have a mass somewhere, well, it will be attracted to fall down because of the gravity field of the earth, which means that at every point you have a vector that is pointing down. And, the same thing in space, you have the gravitational field of planets, stars and so on.

That is also an example of a vector field because, wherever you go, you would have that vector. And what it is depends on where you are. The examples from the real world are things like velocity in a fluid or force field where you have a force that depends on the point where you are. We are going to try to study vector fields mathematically. We won't really care what they are most of the time, but, as we will explore with them defined quantities and so on, we will very often use these motivations to justify why we would care about certain quantities. The first thing we have to figure out is how do we draw a vector field, you know, how do you generate a plot like that?

Let's practice drawing a few vector fields. Well, let's say our very first vector field will be just 2i j. It is kind of a silly vector field because it doesn't actually depend on x and y. That means it is the same vector everywhere. I take a plane and take vector <2,1>. I guess it points in that direction. It is two units to the right and one up. And I just put that vector everywhere. You just put it at a few points all over the place. And when you think you have enough so that you understand what is going on then you stop. Here probably we don't need that many. I mean here I think we get the picture. Everywhere we have a vector <2,1>.

Now, let's try to look at slightly more interesting examples. Let's say I give you a vector field x times i hat. There is no j component. How would you draw that? Well, first of all, we know that this guy is only in the i direction so it is always horizontal. It doesn't have a j component. Everywhere it would be a horizontal vector. Now, the question is how long is it? Well, how long it is depends on x. For example, if x is zero then this will actually be the zero vector. x is zero here on the y-axis. I will take a different color.

If I am on the y-axis, I actually have the zero vector. Now, if x becomes positive small then I will have actually a small positive multiple of i so I will be going a little bit to the right. And then, if I increase x, this guy becomes larger so I get a longer vector to the right. If x is negative then my vector field points to the left instead. It looks something like that. Any questions about that picture? No. OK. Usually, we are not going to try to have very accurate, you know, we won't actually take time to plot a vector field very carefully. I mean, if we need to, computers can do it for us. It is useful to have an idea of what a vector field does roughly.

Whether it is getting larger and larger, in what direction it is pointing, what are the general features? Just to do a couple of more, actually, you will see very quickly that the examples I use in lecture are pretty much always the same ones. We will be playing a lot with these particular vector fields just because they are good examples. Let's say I give you xi yj. That one has an interesting geometric significance. If I take a point (x, y), there I want to take a vector x, y. How do I do that? Well, it is the same as a vector from the origin to this point. I take this vector and I copy it so that it starts at one point. It looks like that. And the same thing at every point.

It is a vector field that is pointing radially away from the origin, and its magnitude increases with distance from the origin. You don't have to draw as many as me, but the idea is this vector field everywhere points away from the origin. And its magnitude is equal to the distance from the origin. If these were, for example, velocity fields, well, you would see visually what is happening to your fluid. Like here maybe you have a source at the origin that is pouring fluid out and it is flowing all the way away from that.

Let's do just a last one. Let's say I give you minus y, x. What does that look like? That is an interesting one, actually. Let's say that I have a point (x, y) here. This vector here is . But the vector I want is <- y, x>. What does that look like? It is perpendicular to the position to this vector. If I rotate this vector, let me maybe draw a picture on the side, and take vector x, y.

A vector with components negative y and x is going to be like this. It is the vector that I get by rotating by 90 degrees counterclockwise. And, of course, I do not want to put that vector at the origin. I want to put it at the point x, y. In fact, what I will draw is something like this. And similarly here like that, like that, etc. And if I am closer to the origin then it looks a bit the same, but it is shorter. And at the origin it is zero. And when I am further away it becomes even larger. See, this vector field, if it was the motion of a fluid, it would correspond to a fluid that is just going around the origin in circles rotating at uniform speed.

This is actually the velocity field for uniform rotation. And, if you figure out how long it takes for a particle of fluid to go all the way around, that would be actually 2(pi) because the length of a circle is 2(pi) times the radius. That is actually at unit angular velocity, one radiant per second or per unit time. That is why this guy comes up quite a lot in real life. And you can imagine lots of variations on these. Of course, you can also imagine vector fields given by much more complicated formulas, and then you would have a hard time drawing them. Maybe you will use a computer or maybe you will just give up and just do whatever calculation you have to do without trying to visualize the vector field. But if you have a nice simple one then it is worth doing it because sometimes it will give you insight about what you are going to compute next.

Any questions first about these pictures? No. OK. Oh, yes? You are asking if it should be y, negative x. I think it would be the other way around. See, for example, if I am at this point then y is positive and x is zero. If I take y, negative x, I get a positive first component and zero for the second one. So, y, negative x would be a rotation at unit speed in the opposite direction. And there are a lot of tweaks you can do to it. If you flip the sides you will get rotation in the other direction. Yes?

How do know that it is at unit angular velocity? Well, that is because if my angular velocity is one then that means the actually speed is equal to the distance from the origin. Because the arch length on a circle of a certain radius is equal to the radius times the angle. If the angle varies at rate one then I travel at speed equal to the radius. That is what I do here. The length of this vector is equal to the distance of the origin. I mean, it is not obvious on the picture. But, really, the vector that I put here is the same as this vector rotated so it has the same length. That is why the angular velocity is one. It doesn't really matter much anyway.

What are we going to do with vector fields? Well, we are going to do a lot of things but let's start somewhere. One thing you might want to do with vector fields is I am going to think of now the situation where we have a force. If you have a force exerted on a particle and that particles moves on some trajectory then probably you have seen in physics that the work done by the force corresponds to the force dot product with the displacement vector, how much you have moved your particle.

And, of course, if you do just a straight line trajectory or if the force is constant that works well. But if you are moving on a complicated trajectory and the force keeps changing then, actually, you want to integrate that over time. The first thing we will do is learn how to compute the work done by a vector field, and mathematically that is called a line integral. Physically, remember the work done by a force is the force times the distance. And, more precisely, it is actually the dot product between the force as a vector and the displacement vector for a small motion.

Say that your point is moving from here to here, you have the displacement delta r. It is just the change in the position vector. It is the vector from the old position to the new position. And then you have your force that is being exerted. And you do the dot product between them. That will give you the work of a force during this motion. And the physical significance of this, well, the work tells you basically how much energy you have to provide to actually perform this motion. Just in case you haven't seen this in 8.01 yet. I am hoping all of you have heard about work somewhere, but in case it is completely mysterious that is the amount of energy provided by the force.

If a force goes along the motion, it actually pushes the particle. It provides an energy to do it to do that motion. And, conversely, if you are trying to go against the force then you have to provide energy to the particle to be able to do that. In particular, if this is the only force that is taking place then the work would be the variation in kinetic energy of a particle along the motion. That is a good description for a small motion.

But let's say that my particle is not just doing that but it's doing something complicated and my force keeps changing. Somehow maybe I have a different force at every point. Then I want to find the total work done along the motion. Well, what I have to do is cut my trajectory into these little pieces. And, for each of them, I have a vector along the trajectory. I have a force, I do the dot product and I sum them together. And, of course, to get the actual answer, I should actually cut into smaller and smaller pieces and sum all of the small contributions to work. So, in fact, it is going to be an integral. Along some trajectory, let's call C the trajectory for curve.

It is some curve. The work adds up to an integral. We write this using the notation integral along C of F dot dr. We have to decode this notation. One way to decode this is to say it is a limit as we cut into smaller and smaller pieces of the sum over each piece of a trajectory of the force of a given point dot product with that small vector along the trajectory. Well, that is not how we will compute it. To compute it, we do things differently. How can we actually compute it? Well, what we can do is say that actually we are cutting things into small time intervals.

The way that we split the trajectory is we just take a picture every, say, millisecond. Every millisecond we have a new position. And the motion, the amount by which you have moved during each small time interval is basically the velocity vector times the amount of time. In fact, let me just rewrite this. You do the dot product between the force and how much you have moved, well, if I just rewrite it this way, nothing has happened, but what this thing is, actually, is the velocity vector dr over dt. What I am trying to say is that I can actually compute by integral by integrating F dot product with dr / dt over time.

Whatever the initial time to whatever the final time is, I integrate F dot product velocity dt. And, of course, here this F, I mean F at the point on the trajectory at time t. This guy depends on x and y before it depends on t. I see a lot of confused faces, so let's do an example. Yes? Yes. Here I need to put a limit as delta t to zero. I cut my trajectory into smaller and smaller time intervals. For each time interval, I have a small motion which is, essentially, velocity times delta t, and then I dot that with a force and I sum them. Let's do an example. Let's say that we want to find the work of this force. I guess that was the first example we had.

It is a force field that tries to make everything rotate somehow. Your first points along these circles. And let's say that our trajectory, our particle is moving along the parametric curve. x = t, y = t^2 for t going from zero to one. What that looks like -- Well, maybe I should draw you a picture. Our vector field. Our trajectory. If you try to plot this, when you see y is actually x squared, so it a piece of parabola that goes from the origin to (1, 1). That is what our curve looks like.

We are trying to get the work done by our force along this trajectory. I should point out; I mean if you are asking me how did I get this? That is actually the wrong question. This is all part of the data. I have a force and I have a trajectory, and I want to find what the work done is along that trajectory. These two guys I can choose completely independently of each other. The integral along C of F dot dr will be --

Well, it is the integral from time zero to time one of F dot the velocity vector dr over dt times dt. That would be the integral from zero to one. Let's try to figure it out. What is F? F, at a point (x, y), is <- y, x>. But if I take the point where I am at time t then x is t and y is t squared. Here I plug x equals t, y equals t squared, and that will give me negative t squared, t. Here I will put negative t squared, t dot product. What is the velocity vector? Well, dx over dt is just one, dy over dt is 2t.

So, the velocity vector is 1, 2t dt. Now we have to continue the calculation. We get integral from zero to one of, what is this dot product? Well, it is negative t squared plus 2t squared. I get t squared. Well, maybe I will write it. Negative t squared plus 2t squared dt. That ends up being integral from zero to one of t squared dt, which you all know how to integrate and get one-third. That is the work done by the force along this curve. Yes?

Well, I got it by just taking the dot product between the force and the velocity. That is in case you are wondering, things go like this. Any questions on how we did this calculation? No. Yes? Why can't you just do F dot dr? Well, soon we will be able to. We don't know yet what dr means or how to use it as a symbol because we haven't said yet, I mean, see, this is a d vector r. That is kind of strange thing to have. And certainly r is not a usual variable. We have to be careful about what are the rules, what does this symbol mean? We are going to see that right now.

And then we can do it, actually, in a slightly more efficient way. I mean r is not a scalar quantity. R is a position vector. You cannot integrate F with respect to r. We don't know how to do that. OK. Yes? The question is if I took a different trajectory from the origin to that point (1, 1), what will happen? Well, the answer is I would get something different. For example, let me try to convince you of that. For example, say I chose to instead go like this and then around like that, first I wouldn't do any work because here the force is perpendicular to my motion.

And then I would be going against the force all the way around. I should get something that is negative. Even if you don't see that, just accept it at face value that I say now. The value of a line integral, in general, depends on how we got from point a to point b. That is why we have to compute it by using the parametric equation for the curve. It really depends on what curve you choose. Any other questions. Yes?

What happens when the force inflects the trajectory? Well, then, actually, you would have to solve a differential equation telling you how a particle moves to find what the trajectory is. That is something that would be a very useful topic. And that is probably more like what you will do in 18.03, or maybe you actually know how to do it in this case. What we are trying to develop here is a method to figure out if we know what the trajectory is what the work will be. It doesn't tell us what the trajectory will be. But, of course, we could also find that. But here, see, I am not assuming, for example, that the particle is moving just based on that force.

Maybe, actually, I am here to hold it in my hand and force it to go where it is going, or maybe there is some rail that is taking it in that trajectory or whatever. I can really do it along any trajectory. And, if I wanted to, if I knew that was the case, I could try to find the trajectory based on what the force is. But that is not what we are doing here. Let's try to make sense of what you asked just a few minutes ago, what can we do directly with dr? dr becomes somehow a vector. I mean, when I replace it by dr over dt times dt, it becomes something that is a vector with a dt next to it. In fact --

Well, it is not really new. Let's see. Another way to do it, let's say that our force has components M and N. I claim that we can write symbolically vector dr stands for its vector whose components are dx, dy. It is a strange kind of vector. I mean it is not a real vector, of course, but as a notion, it is a pretty good notation because it tells us that F of dr is M dx plus N dy. In fact, we will very often write, instead of F dot dr line integral along c will be line integral along c of M dx plus N dy.

And so, in this language, of course, what we are integrating now, rather than a vector field, becomes a differential. But you should think of it, too, as being pretty much the same thing. It is like when you compare the gradient of a function and its differential, they are different notations but have the same content. Now, there still remains the question of how do we compute this kind of integral? Because it is more subtle than the notation suggests.

Because M and N both depend on x and y. And, if you just integrate it with respect to x, you would be left with y's in there. And you don't want to be left with y's. You want a number at the end. See, the catch is along the curve x and y are actually related to each other. Whenever we write this, we have two variables x and y, but, in fact, along the curve C we have only one parameter. It could be x. It could be y.

It could be time. Whatever you want. But we have to express everything in terms of that one parameter. And then we get a usual single variable integral. How do we evaluate things in this language? Well, we do it by substituting the parameter into everything. The method to evaluate is to express x and y in terms of a single variable. And then substitute that variable. Let's, for example, redo the one we had up there just using these new notations. You will see that it is the same calculation but with different notations.

In that example that we had, our vector field F was negative <-y, x>. What we are integrating is negative y dx plus x dy. And, see, if we have just this, we don't know how to integrate that. I mean, well, you could try to come up with negative x, y or something like that. But that actually doesn't make sense. It doesn't work. What we will do is we will actually have to express everything in terms of a same variable, because it is a single integral and we should only have on variable. And what that variable will be, well, if we just do it the same way that would just be t.

How do we express everything in terms of t? Well, we use the parametric equation. We know that x is t and y is t squared. We know what to do with these two guys. What about dx and dy? Well, it is easy. We just differentiate. dx becomes dt, dy becomes 2t dt. I am just saying, in a different language, what I said over here with dx over dt equals one, dy over dt equals 2t. It is the same thing but written slightly differently. Now, I am going to do it again. I am going to switch from one board to the next one. My integral becomes the integral over C of negative y is minus t squared dt plus x is t times dy is 2t dt.

And now that I have only t left, it is fine to say I have a usual single variable integral over a variable t that goes from zero to one. Now I can say, yes, this is the integral from zero to one of that stuff. I can simply it a bit and it becomes t squared dt, and I can compute it, equals one-third. I have negative t squared and then I have plus 2t squared, so end up with positive t squared. It is the same as up there. Any questions? Yes?

dy is the differential of y, y is t squared, so I get 2t dt. I plug dt for dx, I plug 2t dt for dy and so on. And that is the general method. If you are given a curve then you first have to figure out how do you express x and y in terms of the same thing? And you get to choose, in general, what parameter we use. You choose to parameterize your curve in whatever way you want. The note that I want to make is that this line integral depends on the trajectory C but not on the parameterization.

You can choose whichever variable you want. For example, what you could do is when you know that you have that trajectory, you could also choose to parameterize it as x equals, I don't know, sine theta, y equals sine square theta, because y is x squared where theta goes from zero to pi over two. And then you could get dx and dy in terms of d theta. And you would be able to do it with a lot of trig and you would get the same answer. That would be a harder way to get the same thing. What you should do in practice is use the most reasonable way to parameterize your curve.

If you know that you have a piece of parabola y equals x squared, there is no way you would put sine and sine squared. You could set x equals, y equals t squared, which is very reasonable. You could even take a small shortcut and say that your variable will be just x. That means x you just keep as it is. And then, when you have y, you set y equals x squared, dy equals 2x dx, and then you will have an integral over x. That works.

So, this one is not practical. But you get to choose. Now let me tell you a bit more about the geometry. We have said here is how we compute it in general, and that is the general method for computing a line integral for work. You can always do this, try to find a parameter, the simplest one, express everything in terms of its variable and then you have an integral to compute. But sometimes you can actually save a lot of work by just thinking geometrically about what this all does. Let me tell you about the geometric approach. One thing I want to remind you of first is what is this vector dr?

Well, what is vector delta r? If I take a very small piece of the trajectory then my vector delta r will be tangent to the trajectory. It will be going in the same direction as the unit tangent vector t. And what is its length? Well, its length is the arc length along the trajectory, which we called delta s. Remember, s was the distance along the trajectory. We can write vector dr equals dx, dy, but that is also T times ds. It is a vector whose direction is tangent to the curve and whose length element is actually the arc length element.

I mean, if you don't like this notation, think about dividing everything by dt. Then what we are saying is dr over dt, which is the velocity vector. Well, in coordinates, the velocity vector is dx over dt, dy over dt. But, more geometrically, the direction of a velocity vector is tangent to the trajectory and its magnitude is speed ds over dt. So, that is really the same thing. If I say this, that means that my line integral F to dr, well, I say I can write it as integral of M dx plus N dy. That is what I will do if I want to compute it by computing the integral.

But, if instead I want to think about it geometrically, I could rewrite it as F dot T ds. Now you can think of this, F dot T is a scalar quantity. It is the tangent component of my force. I take my force and project it to the tangent direction to a trajectory and the I integrate that along the curve. They are the same thing. And sometimes it is easier to do it this way. Here is an example. This is bound to be easier only when the field and the curve are relatively simple and have a geometric relation to each other. If I give you an evil formula with x cubed plus y to the fifth or whatever there is very little chance that you will be able to simplify it that way.

But let's say that my trajectory is just a circle of radius a centered at the origin. Let's say I am doing that counterclockwise and let's say that my vector field is xi yj. What does that look like? Well, my trajectory is just this circle. My vector field, remember, xi plus yj, that is the one that is pointing radially from the origin. Hopefully, if you have good physics intuition here, you will already know what the work is going to be. It is going to be zero because the force is perpendicular to the motion.

Now we can say it directly by saying if you have any point of a circle then the tangent vector to the circle will be, well, it's tangent to the circle, so that means it is perpendicular to the radial direction, while the force is pointing in the radial direction so you have a right angle between them. F is perpendicular to T. F dot T is zero. The line integral of F dot T ds is just zero. That is much easier than writing this is integral of x over dx plus y over dy. What do we do? Well, we set x equals a cosine theta, y equals a sine theta.

We get a bunch of trig things. It cancels out to zero. It is not much harder but we saved time by not even thinking about how to parameterize things. Let's just do a last one. That was the first one. Let's say now that I take the same curve C, but now my vector field is the one that rotates negative yi plus xj. That means along my circle the tangent vector goes like this and my vector field is also going around. So, in fact, at this point the vector field will always be going in the same direction.

Now F is actually parallel to the tangent direction. That means that the dot product of F dot T, remember, if it is the component of F in this direction that will be the same of the length of F. But what is the length of F on this circle if this length is a? It is just going to be a. That is what we said earlier about this vector field. At every point, this dot product is a. Now we know how to integrate that quite quickly.

Because it becomes the integral of a ds, but a is a constant so we can take it out. And now what do we get when we integrate ds along C? Well, we should get the total length of the curve if we sum all the little pieces of arc length. But we know that the length of a circle of radius a is 2pi a, so we get 2(pi)a squared. If we were to compute that by hand, well, what would we do? We would be computing integral of minus y dx plus x dy. Since we are on a circle, we will probably set x equals a times cosine theta, y equals a times sine theta for theta between zero and 2pi. Then we would get dx and dy out of these. So, y is a sine theta, dx is negative a sine theta d theta, if you differentiate a cosine, plus a cosine theta times a cosine theta d theta.

Well, you will just end up with integral from zero to 2pi of a squared time sine squared theta plus cosine square theta times d theta. That becomes just one. And you get the same answer. It took about the same amount of time because I did this one rushing very quickly, but normally it takes about at least twice the amount of time to do it with a calculation. That tells you sometimes it is worth thinking geometrically.