Chapter 5 Vector Calculus In the previous sections, we have studied real-valued multivariable functions, that is functions of the type f: or R2 ! R (x; y) 7! f (x; y) R3 ! R (x; y; z) 7! f (x; y; z) f: or in general f: Rn ! R (x1 ; x2 ; :::; xn ) 7! f (x1 ; x2 ; :::; xn ) In each case, the domain is a subset of R2 or R3 or in general Rn . The range is a subset of R, this is why these functions are called real-valued. We have also studied vector-valued functions, that is functions of the type f: or f: R ! R2 t 7! hx (t) ; y (t)i R ! R3 t 7! hx (t) ; y (t) ; z (t)i or in general f: R ! Rn t 7! hx1 (t) ; x2 (t) ; :::; xn (t)i In each case, the domain is a subset of R, the range is a subset of Rn for some integer n. This is why these functions are called vector-valued. In this chapter, we will concentrate our attention on functions of the type f: R2 ! R2 (x; y) 7! hP (x; y) ; Q (x; y)i 249 250 CHAPTER 5. VECTOR CALCULUS for some real-valued multivariable functions P and Q. We will also study functions of the type f: R3 ! R3 (x; y; z) 7! hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i These are multivariable functions, their domain is a subset of R2 or R3 . They are vector-valued functions, their range is a subset of R2 or R3 . Such functions will be called vector …elds. 5.1 5.1.1 Vector Fields De…nitions and Examples There are situations in which it is natural to attach a vector to each point in a given region. For example, we may want to know the velocity of the wind at each point in space. In this case, the vector at each point would represent the speed and direction of the wind at that point. Another example might be to know how gravity acts on each point in space. In this case, the vector at each point would represent the intensity and direction of the force due to gravity. A region in which each point is attached a vector is called a vector …eld. A more precise mathematical de…nition follows. De…nition 366 Let D be a set in R2 . A vector …eld on R2 is a function F that assigns to each point (x; y) of D a two dimensional vector F (x; y). In other words, it is a function of the form F: R2 ! R2 (x; y) 7! F (x; y) = hP (x; y) ; Q (x; y)i where P and Q are real-valued functions. P and Q are called the component functions. Instead of writing F (x; y) = hP (x; y) ; Q (x; y)i, we can also write F (x; y) = ! ! P (x; y) i + Q (x; y) j . De…nition 367 Let D be a set in R3 . A vector …eld on R3 is a function F that assigns to each point (x; y; z) of D a three dimensional vector F (x; y; z). In other words, it is a function of the form F: R3 ! R3 (x; y; z) 7! F (x; y; z) = hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i where P; Q and R are real-valued functions. P; Q and R are called the component functions. Instead of writing F (x; y; z) = hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i, we can ! ! ! also write F (x; y; z) = P (x; y; z) i + Q (x; y; z) j + R (x; y; z) k . Vector …elds are well known in physics. Some of the best examples include electrostatic …elds, magnetic …elds, and gravitational …elds. 5.1. VECTOR FIELDS 5.1.2 251 Plotting Vector Fields Let us …rst look at some examples. We visualize vector …elds by plotting the arrow representing F (x; y) at the point (x; y) or F (x; y; z) at each point (x; y; z). We obviously cannot do this for every point, so we do it for some representative points. We can also use Mathematical software to plot a vector …eld. The command to plot a vector …eld depends on whether it is a vector …eld on R2 or R3 . 1. To plot a vector …eld with Scienti…c Workplace or Notebook: (a) To plot F (x; y) = hP (x; y) ; Q (x; y)i, simply highlight the vector to plot (remember in Scienti…c Notebook, vector are written using parentheses or square brackets), then click on Compute then select Plot 2D then Vector Field. (b) To plot F (x; y; z) = hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i, simply highlight the vector to plot (remember in Scienti…c Notebook, vector are written using parentheses or square brackets), then click on Compute then select Plot 3D then Vector Field. 2. To plot a vector …eld with Maple: (a) To plot F (x; y) = hP (x; y) ; Q (x; y)i, use the command f ieldplot([P; Q] ; x = xmin ::xmax ; y = ymin ::ymax ; ARROW = option; grid = [numx; numy]) where option is one of LINE, THIN, SLIM, THICK, numx; numy are the number of sample points to use in the x and y directions. (b) To plot F (x; y; z) = hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i, use the command f ieldplot3d([P; Q; R] ; x = ARROW = xmin ::xmax ; y = ymin ::ymax ; z = zmin ::zmax ; option; grid = numx; numy; numz) Example 368 Describe the vector …eld given by F (x; y) = h y; xi We can …rst plot some of the vectors in the vector …eld. For this, we take some sample points (x; y), compute the vector F (x; y), then draw the vector F (x; y), starting at the point (x; y) (not origin like we usually draw vectors). Let’s do it for a few points. At (1; 0) : F (1; 0) = h0; 1i, So, from the point (1; 0) we draw the vector ! h0; 1i = j . 252 CHAPTER 5. VECTOR CALCULUS Figure 5.1: Vector …eld F (x; y) = h y; xi At (0; 1) : F (0; 1) = h 1; 0i = ! vector i . At ( 1; 0) : F ( 1; 0) = h0; 1i = ! i . So, starting at (0; 1), we draw the ! j. At (1; 1) : F (1; 1) = h 1; 1i By picking up enough points, we get a picture of the vector …eld which looks like …gure 5.1. This picture was generated by Maple.The picture seems to indicate a circular motion, each arrow being tangent to a circle centered at the origin, with speed increasing as we move away from the center of the circle. This can be easily veri…ed with simple computations. The position vector of a sample point is hx; yi. The vector …eld at that point is h y; xi. The dot product of the two is hx; yi h y; xi = = xy + xy 0 This indicates that F (x; y) is perpendicular to the position vector hx; yi and is therefore tangent to a circle centeredp at the origin, of radius khx; yik = p x2 + y 2 . Also, note that kF (x; y)k = x2 + y 2 . So, we see that the magnitude of F increases as the point moves away from the center of the circle. 5.1. VECTOR FIELDS 253 Figure 5.2: Vector …eld F (x; y; z) = h y; x; zi Example 369 Same question with F (x; y; z) = h y; x; zi. A Maple plot of this vector …eld is shown in …gure 5.2.This vector …eld seems to represent a circular motion around the z-axis along with a linear motion in the z direction. Which is easy to understand. From the previous example, the circular motion is caused by the …rst two coordinates of the vector …eld. The last one causes the motion in the z direction. Vector …elds abound in nature. Here are some examples of vector …elds you go through everyday. Example 370 Recall that an example of a vector is a force (it has both direction and magnitude). The earth gravity subjects every point not too far from the earth to a force, called the force of gravity. As such it is a vector …eld. If you have taken a physics class, you even know the formula for this vector …eld. It is given by F (x; y; z) = = * mM G ! 3 x k! xk mM Gx 3 (x2 + y 2 + z 2 ) 2 ; mM Gy 3 (x2 + y 2 + z 2 ) 2 ; mM Gz 3 (x2 + y 2 + z 2 ) 2 + where ! x = hx; y; zi, the position vector of a point (x; y; z). G is the gravitational constant, m is the mass of an object at (x; y; z) and M is the mass of the earth. A picture of this vector …eld is shown in …gure 5.3. 254 CHAPTER 5. VECTOR CALCULUS Figure 5.3: Gravitational vector …eld Example 371 A river ‡owing is another example of a vector …eld. As the water ‡ows, each molecule of the water is moving in a certain direction, at a certain speed. At each molecule, we could draw an arrow representing the speed and direction of motion. This is an example of a vector …eld. In fact, it is a di¢ cult mathematical problem to derive the vector …eld which describes the ‡ow of a moving liquid (or gas). Example 372 Similar to the previous example is the air which surrounds us. When there is wind, each molecule in the air is moving in a certain direction, at a certain speed. The vectors representing this motion at each point form a vector …eld. You may remember in the movie "twister", when the team studying the storm throws little balls which are carried by the funnel of the tornado. Each ball is equipped with a device which allows it to be tracked. Thus, as it is taken away by the tornado, we can capture its speed and direction. Thus, we can capture the vector …eld which describes the tornado. 5.1.3 Gradient Vector Fields If f (x; y) is a real-valued function of two variables, then you will recall that rf (x; y) = @f (x; y) @f (x; y) ; @x @y 5.1. VECTOR FIELDS 255 Similarly, if f (x; y; z) is a real-valued function of three variables, then rf (x; y; z) = @f (x; y; z) @f (x; y; z) @f (x; y; z) ; ; @x @y @z These are vector …elds. They are called gradient vector …elds. De…nition 373 Let f be a real-valued function. 1. If f is a function of two variables, then rf is a vector …eld on R2 . 2. If f is a function of three variables, then rf is a vector …eld on R3 . 3. In both cases, rf is called a gradient vector …eld. Example 374 Find the gradient vector …eld associated with f (x; y) = e3x cos 4y (x;y) (x;y) Since @f@x = 3e3x cos 4y and @f @y = 4e3x sin 4y, it follows that rf (x; y) = 3e3x cos 4y; 4e3x sin 4y De…nition 375 A vector …eld F is called a conservative vector …eld if it is the gradient of some real-valued function in other words if there exists some real-valued function f such that F = rf In this case, f is called a potential function for F . Remark 376 We can draw an analogy with functions of one variables. If we replace rf by f 0 (the derivative of f ), then saying that f is a potential function for F amounts to saying that f is an antiderivative of F . Not every vector …eld is conservative. However, many of the vector …elds which arise in physics are. An example is shown next. Example 377 Let f (x; y; z) = p mM G . x2 +y 2 +z 2 @f (x; y; z) @x = @f (x; y; z) @y = @f (x; y; z) @z = Then we have mM Gx 3 (x2 + y 2 + z 2 ) 2 mM Gy 3 (x2 + y 2 + z 2 ) 2 mM Gz 3 (x2 + y 2 + z 2 ) 2 So, rf = * mM Gx 3 (x2 + y 2 + z 2 ) 2 = F (x; y; z) ; mM Gy 3 (x2 + y 2 + z 2 ) 2 ; mM Gz 3 (x2 + y 2 + z 2 ) 2 + 256 CHAPTER 5. VECTOR CALCULUS where F is the gravitational …eld of example 370 on page 253. This means that the gravitational …eld is a conservative vector …eld. Its potential function is G f (x; y; z) = p mM . 2 2 2 x +y +z The following theorem gives a necessary and su¢ cient condition for a vector …eld in R2 to be a conservative vector …eld. A similar condition for R3 vector …elds will be given in the next subsection. Theorem 378 (Test for Conservative Vector Fields in the Plane) Suppose that P (x; y) and Q (x; y) have continuous …rst partial derivatives on an open disk D. The vector …eld F (x; y) = hP (x; y) ; Q (x; y)i is conservative if and only if @Q @P = @y @x Proof. Why the condition is su¢ cient is more di¢ cult to prove and will not be done here. It is easy to see why it is necessary. For F to be conservative, there must exist a function f such that F = rf . Therefore we must have hfx ; fy i = hP; Qi Under the conditions of the theorem, Clairaut’s theorem applies, thus the mixed @P . Similarly partials must be equal that is fxy = fyx . Since fx = P , fxy = @y @Q . since fy = Q, fyx = @x Example 379 Prove that F (x; y) = 2xy; x2 y is a conservative vector …eld and …nd a potential function for it. We use the theorem above. For this, we compute @P @y = = @ (2xy) @y 2x and @Q @x = = @ x2 y @x 2x Since the two partials are equal, by the theorem, we know our vector …eld is conservative. We can now …nd its potential function. We are looking for a function f such that F = rf that is hfx ; fy i = 2xy; x2 Thus we need to solve fx (x; y) = 2xy fy (x; y) = x2 y y 5.1. VECTOR FIELDS that is 257 R R f (x; y) R= fx (x; y) dx R= 2xydx f (x; y) = fy (x; y) dy = x2 y dy R Now to …nd 2xydx, we remember that we are looking for a function of x and R y. From di¤ erential calculus, you remember that 2xydx = yx2 + C. What is C? It is a constant. But when we integrate with respect to x, a function of y is also a constant. So, we see that Z f (x; y) = 2xydx = x2 y + g (y) Similarly f (x; y) = Thus, we see that g (y) = Z x2 y dy = x2 y y2 + C and h (x) = C. It follows that 2 f (x; y) = x2 y 5.1.4 y2 + h (x) 2 y2 +C 2 Curl and Divergence of a Vector Field De…nition 380 Consider the vector …eld in space F (x; y; z) = hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i. The curl of F , denoted curl F is de…ned to be curl F = = r F @R @y @Q @z ; @P @z @R @x ; @Q @x @P @y ! De…nition 381 If curl F = 0 , F is said to be irrotational. Remark 382 It is easy to derive the formula for curl F by using the determinant form of the cross product. ! ! ! i j k @ @ @ r F = @x @y @z P Q R Theorem 383 (Test for Conservative Vector Fields in Space) Suppose that P (x; y; z), Q (x; y; z), and R (x; y; z) have continuous …rst partial derivatives in an open sphere S in space. The vector …eld F (x; y; z) = hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i is conservative if and only if ! curl F = 0 that is if and only if @R @Q @P @R @Q @P = , = and = @y @z @z @x @x @y 258 De…nition 384 is CHAPTER 5. VECTOR CALCULUS 1. The divergence of a plane vector …eld F (x; y) = hP (x; y) ; Q (x; y)i div F (x; y) = r F (x; y) @P @Q = + @x @y 2. The divergence of a space vector …eld F (x; y; z) = hP (x; y; z) ; Q (x; y; z) ; R (x; y; z)i is div F (x; y; z) = r F (x; y; z) @Q @R @P + + = @x @y @z Remark 385 (Interpretation of curl and div) Think of a vector …eld v as the velocity …eld of some ‡uid. Then: 1. div v (x; y; z) gives us an indication of whether the ‡uid tends to accumulate near the point (x; y; z) (negative divergence) or tends to move away from the point (x; y; z) (positive divergence). 2. curl v (x; y; z) measure the rotational tendency of the ‡uid at the point (x; y; z). Example 386 Let and curl v. be a constant and set v (x; y; z) = h x; y; zi. Find div v div v = r v @ @ @ = ; ; h x; y; zi @x @y @z @x @y @z = + + @x @y @z = 3 curl v = r = = v ! j ! k @ @x @ @y @ @z x y z ! i 0 Figure 5.4 shows a plot of this vector …eld when = 1. We see that all the arrows converge toward the origin. Also, this vector …eld has no rotational tendency. 5.1. VECTOR FIELDS 259 4 -4 -2 z 2 4 y 2 -4 0 0 -2 0 -4 2 -2 x 4 Figure 5.4: Vector …eld h x y zi Example 387 Let F (x; y; z) = h y; x; zi. Find div F and curl F . div F curl F = r = = = F = r F @ @ @ = ; ; h y; x; zi @x @y @z @x @z @y + + = @x @y @z = 1 ! j ! k @ @x @ @y @ @z y x z @x @z ! i ! i @z @y ! 2k @z @y + @x @z = h0; 0; 2i A plot of this vector …eld is shown in …gure 387. ! j + @x @y + @x @y ! k 260 CHAPTER 5. VECTOR CALCULUS 4 -4 -4 2 -2 z -2 0 0 0 -2 y 2 -4 2x 4 4 Vector Field h y; x; zi 5.1.5 Assignment 1. Sketch the vector …elds below: (a) F (x; y) = 1 1 ; . 2 2 (b) F (x; y) = y; (c) F (x; y) = * 1 . 2 p x x2 + y 2 ;p y x2 + y 2 + . (d) F (x; y; z) = (sin x; y; z). 2. Match the vector …elds in R2 with the given plots. (a) F (x; y) = hy; xi. (b) F (x; y) = hx 2; x + 1i. (c) F (x; y) = h1; sin yi. (d) F (x; y) = y: 1 . x 5.1. VECTOR FIELDS 261 y 4 2 -4 -2 2 4 2 4 2 4 x -2 -4 (e) y 4 2 -4 -2 x -2 -4 (f) y 4 2 -4 -2 x -2 -4 (g) y 4 2 -4 -2 2 4 -2 -4 (h) 3. Match the vector …elds in R3 with the given plots. (a) F (x; y; z) = h1; 2; 3i. (b) F (x; y; z) = h1; 2; zi. (c) F (x; y; z) = hx; y; 3i. x 262 CHAPTER 5. VECTOR CALCULUS (d) F (x; y; z) = hx; y; zi. 4 2 -2 0 z 0 0 -2 -2 2-4 2 -4 4 y x -4 4 (e) 4 2 -2 0 z 0 0 -2 -2 2-4 2 -4 4 (f) y x -4 4 5.1. VECTOR FIELDS 263 4 2 -2 0 z 0 0 -2 -2 2-4 2 -4 4 y x -4 4 (g) 4 2 -2 0 z 0 0 -2 -2 2-4 2 -4 4 y x -4 4 (h) 4. Find the gradient vector …els of f for the functions below. (a) f (x; y) = ln (x + 2y). p (b) f (x; y; z) = x2 + y 2 + z 2 . x (c) f (x; y) = x e . 5. Find the curl and the divergence of the vector …elds below. (a) F (x; y; z) = xyz; 0; x2 y . (b) F (x; y; z) = h1; x + yz; xy x p zi. x (c) F (x; y; z) = he sin y; e cos y; zi. (d) F (x; y; z) = he x sin y; e y sin z; e z sin xi. 264 CHAPTER 5. VECTOR CALCULUS 6. Determine if the given vector …elds F are conservative. If they are, …nd a potential function for them, that is a function f such that F = rf . (a) F (x; y) = (1 + xy) exy ; ey + x2 exy . (b) F (x; y; z) = hex cos y + yz; xz (c) F (x; y; z) = hyz; xz; xyi. (d) F (x; y; z) = 2xy; x2 + 2yz; y 2 . (e) F (x; y; z) = hye x ;e x ; 2zi. ex sin y; xy + zi.