You are on page 1of 15

Vector Calculus

Lilia Ferrario

Semester 1, 2016

Based on notes written by Lilia Ferrario and Linda Stals

1
Contents
1 Curl and Divergence 2
1.1 Divergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Gradient Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4 First Vector Form of Greens Theorem . . . . . . . . . . . . . . . 13
1.5 Second Vector Form of Greens Theorem . . . . . . . . . . . . . . 14

1
+

y A
+

(x,y)

Figure 1: Rate at which the fluid leaves the rectangle A.

1 Curl and Divergence


1.1 Divergence
Divergence

Definition 1 (Divergence) If F = P i + Qj + Rk is a vector field on R3 and


P/x, Q/y and R/z exist, the divergence of F is the function of three
variables defined by
P Q R
div F = + + = F.
x y z
Observe that curl F is a vector field and div F is a scalar field.
If div F = 0, F is said to be incompressible.

Physical interpretation of divergence in 2D


Suppose F (x, y) = P (x, y)i + Q(x, y)j is the velocity field of a fluid flowing
in the plane and the first partial derivatives of P and Q are continuous at each
point of a region R. Let (x, y) be a point in R and let A be a small rectangle
with on corner at (x, y). See Figure 1.
Assume that P and Q do not change sign in A.
The rate at which fluid leaves the rectangle across the bottom edge is ap-
proximately
F (x, y) (j)x = Q(x, y)x.
This is a scalar component of the velocity at (x, y) in the direction of the outward
normal times the length of the segment.
We approximate the net flow rate across the rectangular boundary of A by
summing the flow rates across each edge;

2
Top: F (x, y + y) jx = Q(x, y + y)x.
Bottom: F (x, y) (j)x = Q(x, y)x.
Right: F (x + x, y) iy = P (x + x, y)y.
Left: F (x, y) (i)y = P (x, y)y.
Summing opposite pairs gives
 
Q
Top and Bottom: (Q(x, y + y) Q(x, y)) x y y x.

P

Right and Left: (P (x + x, y) P (x, y)) y x x y.
So, the net effect of the flow rates are
 
Q P
Flux across rectangle boundary + yx.
y x
Or  
Flux across rectangle boundary Q P
+ .
Rectangle area y x
Finally, if we let the area of A approach zero we get the 2D formula for divergence
(or flux density)
P Q
div F = + .
x y

Example 1 (Uniform Expansion - Divergence) The vector field of F (x, y) =


cxi + cyj (c > 0 is a constant) shown in Figure 2 represents the velocity of a
gas flowing in the xy-plane. Find the divergence of the vector field and interpret
its physical meaning.

div F = (cx) + (cy) = 2c > 0.
x y
The gas is undergoing uniform expansion. Note that if c < 0, the gas is under-
going uniform compression.
The Matlab code used to produce Figure 2 is given below

% s e t the a x i s range
a x i s ([ 5 5 5 5 ] )

% d e f i n e t h e p o i n t s where t h e g r a d i e n t s h o u l d be -
calculated
[ x , y ] = meshgrid ( [ 5 : 1 : 5 ] ) ;
c = 1;

% p l o t the s o l u t i o n

3
Uniform Expansion
6

0
y

6
6 4 2 0 2 4 6
x

Figure 2: A vector field plot of F (x, y) = cxi + cyj, where c > 0.

q u i v e r ( x , y , cx , cy , 0 . 5 )

% t i d y up t h e p l o t
t i t l e ( ' Uniform Expansion ' )
xlabel ( 'x ' )
ylabel ( 'y ' )

Example 2 (Uniform Rotation - Divergence) The vector field of F (x, y) =


cyi + cxj (c > 0 is a constant) shown in Figure 3 represents the velocity of a
gas flowing in the xy-plane. Find the divergence of the vector field and interpret
its physical meaning.

div F = (cy) + (cx) = 0.
x y
The gas is neither expanding nor compressing. It is an incompressible gas.
The Matlab code used to produce Figure 3 is given below

% s e t the a x i s range
a x i s ([ 5 5 5 5 ] )

% d e f i n e t h e p o i n t s where t h e g r a d i e n t s h o u l d be -
calculated
[ x , y ] = meshgrid ( [ 5 : 1 : 5 ] ) ;

4
Uniform Rotation
6

0
y

6
6 4 2 0 2 4 6
x

Figure 3: A vector field plot of F (x, y) = cyi + cxj, where c > 0.

c = 1;

% p l o t the s o l u t i o n
q u i v e r ( x , y , cy , cx , 0 . 5 )

% t i d y up t h e p l o t
t i t l e ( ' Uniform R o t a t i o n ' )
xlabel ( 'x ' )
ylabel ( 'y ' )

Example 3 (Shearing Flow - Divergence) The vector field of F (x, y) = yi


shown in Figure 4 represents the velocity of a gas flowing in the xy-plane. Find
the divergence of the vector field and interpret its physical meaning.

(y) +
div F = (0) = 0.
x y
The gas is neither expanding nor compressing. It is an incompressible gas.
The Matlab code used to produce Figure 4 is given below

% s e t the a x i s range
a x i s ([ 5 5 5 5 ] )

% d e f i n e t h e p o i n t s where t h e g r a d i e n t s h o u l d be -
calculated

5
Shearing Flow
6

0
y

6
6 4 2 0 2 4 6
x

Figure 4: A vector field plot of F (x, y) = yi.

[ x , y ] = meshgrid ( [ 5 : 1 : 5 ] ) ;

% p l o t the s o l u t i o n
q u i v e r ( x , y , y , 0x , 0 . 5 )

% t i d y up t h e p l o t
t i t l e ( ' S h e a r i n g Flow ' )
xlabel ( 'x ' )
ylabel ( 'y ' )

Example 4 (Whirlpool Effect - Divergence) The vector field of F (x, y) =


y/(x2 + y 2 )i + x/(x2 + y 2 )j shown in Figure 5 represents the velocity of a gas
flowing in the xy-plane. Find the divergence of the vector field and interpret its
physical meaning.
   
y x
div F = + = 0.
x x2 + y 2 y x2 + y 2
The gas is neither expanding nor compressing. It is an incompressible gas.
The Matlab code used to produce Figure 5 is given below

% s e t the a x i s range
a x i s ([ 5 5 5 5 ] )

6
Whirlpool Effect
6

0
y

6
6 4 2 0 2 4 6
x

Figure 5: A vector field plot of F (x, y) = y/(x2 + y 2 )i + x/(x2 + y 2 )j.

% d e f i n e t h e p o i n t s where t h e g r a d i e n t s h o u l d be -
calculated
[ x , y ] = meshgrid ( [ 5 : 1 : 5 ] ) ;

% p l o t the s o l u t i o n
r = x . x+y . y ;
r ( r==0) = 1 ; %( a v o i d 0 / 0 )
q u i v e r ( x , y , y . / r , x . / r , 0 . 5 )

% t i d y up t h e p l o t
t i t l e ( ' Whirlpool E f f e c t ' )
xlabel ( 'x ' )
ylabel ( 'y ' )

Calculating the Divergence

Example 5 (Divergence) If F (x, y, z) = xzi + xyzj y 2 k find div F .

By the definition of divergence we have


P Q R
div F = + + = z + xz.
x y z

7
1.2 Curl
Curl Definition

Definition 2 (Curl) If F = P i + Qj + Rk is a vector field on R3 and the


partial derivatives of P , Q and R exist, then the curl of F is
     
R Q P R Q P
curl F = i+ j+ k.
y z z x x y

Curl as a Cross Product


Recall vector differential operator del is defined as

= i+ j+ k.
x y z
 

If we think of as a vector with components = x , y , z then we
can also define the curl using the cross product of with the vector field F as
follows

i j k

F = x y z
P Q R
     
R Q R P Q P
= i j+ k
y z x z x y
= curl F .

Example

Example 6 (Calculating the Curl) If F (x, y, z) = xzi + xyzj y 2 k find


curl F .


i j k

curl F = x y z
xz xyz y 2
y 2 y 2
     
xyz xz xyz xz
= i j+ k
y z x z x y
= (2y xy) i (0 x) j + (yz 0) k
= y(2 + x)i + xj + yzk.

Example 7 (Calculating the Curl) If F (x, y, z) = y 2 zi x3 j + xyk find


curl F .

8
y A

(x,y)

Figure 6: Rate at which the fluid circulates around the rectangle A.


i j k

curl F =
x y z
y 2 z x3 xy
xy x3 xy y 2 z
   
= + i j
y z x z
x3 y 2 z
 
+ k
x y
(x 0) i y y 2 j + 3x2 2yz k
 
=
= xi (y y 2 )j (3x2 + 2yz)k.

Physical interpretation of curl in 2D


Suppose F (x, y) = P (x, y)i + Q(x, y)j is the velocity field of a fluid flowing
in the plane and assume P and Q have the same properties as in the discussion
of the divergence in Section 1.1. Consider the rectangle A in Figure 6.
The circulation rate of F around the boundary of A is the sum of flow rates
along the sides in the tangential direction.
The rate for the bottom edge is approximately
F (x, y) (i)x = P (x, y)x.
This is a scalar component of the velocity at (x, y) in the tangential direction i
times the length of the segment.
We approximate the net flow rate around the rectangular boundary of A by
summing the flow rates around each edge;
Top: F (x, y + y) (i)x = P (x, y + y)x.
Bottom: F (x, y) ix = P (x, y)x.

9
Right: F (x + x, y) jy = Q(x + x, y)y.
Left: F (x, y) (j)y = Q(x, y)y.
Summing opposite pairs gives
 
P
Top and Bottom: (P (x, y + y) P (x, y)) x y y x.
 
Q
Right and Left: (Q(x + x, y) Q(x, y)) y x x y.

So, the net effect of the flow rates are


 
Q P
Flow rate around rectangle boundary yx.
x y

Or  
Flow rate around rectangle boundary Q P
.
Rectangle area x y
Finally, if we let the area of A approach zero we get the k-component of the
curl (or circulation density)

Q P
(curl F ) k = .
x y

Example 8 (Uniform Expansion - Curl) The vector field of F (x, y) = cxi+


cyj (c > 0 is a constant) shown in Figure 2 represents the velocity of a gas flow-
ing in the xy-plane. Find the curl of the vector field and interpret its physical
meaning.

(curl F ) k = (cy) (cx) = 0.
x y
The gas is not circulating at very small circles.

Example 9 (Uniform Rotation - Curl) The vector field of F (x, y) = cyi+


cxj (c > 0 is a constant) shown in Figure 3 represents the velocity of a gas flow-
ing in the xy-plane. Find the curl of the vector field and interpret its physical
meaning.

(curl F ) k = (cx) (cy) = 2c.
x y
The constant circulation density indicates rotation at every point. As c > 0,
the rotation is counterclockwise.

Example 10 (Shearing Flow - Curl) The vector field of F (x, y) = yi shown


in Figure 4 represents the velocity of a gas flowing in the xy-plane. Find the
curl of the vector field and interpret its physical meaning.

10

(curl F ) k = (y) = 1.
y
The constant circulation density indicates rotation at every point. As c < 0,
the rotation is clockwise.

Example 11 (Whirlpool Effect - Curl) The vector field of F (x, y) = y/(x2 +


y 2 )i + x/(x2 + y 2 )j shown in Figure 5 represents the velocity of a gas flowing in
the xy-plane. Find the divergence of the vector field and interpret its physical
meaning.
   
x y
(curl F ) k = = 0.
x x2 + y 2 y x2 + y 2
The circulation density is zero (where the vector field is undefined and the
whirlpool effect is taking place). This is because the rotational velocity drops
off linearly with the circumference of the circle.

Curl of the Gradient


Recall that the gradient of a function f of three variables is a vector field on
R3 . So, we can compute its curl.

Theorem 1 (Curl of the Gradient) If f is a function of three variables that


has continuous second-order partial derivatives, then

curl(f ) = 0.


i j k


curl(f ) = x y z
f f f
x y z
 2
2f
 2
2f
 
f f
= i j
yz zy xz zx
 2
2f

f
+ k
xy yx
= 0.

(by Clairauts Theorem).


A conservative vector field is one for which F = f . So by the previous
theorem curl F = 0 if F is conservative.

Conservative Vector Fields - Example

Example 12 (Conservative Vector Fields) Show that the vector field F (x, y, z) =
xzi + xyzj y 2 k is not conservative.

11
In Example 6, we showed that curl F = y(2 + x)i + xj + yzk 6= 0. So, F
is not conservative.

Theorem 2 (Conservative Vector Fields) If F is a vector field defined on


all of R3 whose component functions have continuous partial derivatives and
curl F = 0, then F is a conservative vector field.

Example 13 (Conservative Vector Fields) Show that F (x, y, z) = y 2 z 3 i +


2xyz 3 j + 3xy 2 z 2 k is a conservative vector field and find a function f such that
f = F .

Firstly,

i j k


curl F = x y z


y 2 z 3 3
2xyz 3xy z 2 2

6xyz 2 6xyz 2 i + 3y 2 z 3y 2 z j + 2yz 3 2yz 3 k


  
=
= 0

so F is conservative.
Now, we have fx = y 2 z 3 , fy = 2xyz 3 and fz = 3xy 2 z 2 .
Integrating fx with respect to x gives f (x, y, z) = xy 2 z 3 + g(y, z). Differen-
tiating this with respect to y shows fy (x, y, z) = 2xyz 3 + gy (y, z).
Comparison with fy = 2xyz 3 gives gy (y, z) = 0.
Thus, g(y, z) = h(z) and fz (x, y, z) = 3xy 2 z 2 + h0 (z). Comparison with
fz = 3xy 2 z 2 shows h0 (z) = 0.
Thus
f (x, y, z) = xy 2 z 3 + K.

Irrotational Curl
If curl F = 0 at a point P , the fluid is free from rotations at P . F is called
irrotational at P . That is, there is no whirlpool or eddy at P .
If curl F = 0, a tiny paddle wheel moves with the fluid but does not rotate
about its axis.
If curl F 6= 0, the paddle wheel rotates about its axis.

div curl
If F is a vector field on R3 , then curl F is also a vector field on R3 . As such,
we can compute its divergence.

Theorem 3 If F = P i + Qj + Rk is a vector field on R3 and P , Q, and R


have continuous second-order partial derivatives, then

div curl F = 0.

12
By the definitions of divergence and curl,
      
R Q P R Q P
div curl F = div i+ j+ k
y z z x x y
     
R Q P R Q P
= + +
x y z y z x z x y
2R 2Q 2P 2R 2Q 2P
= + +
xy xz yz yx zx zy
= 0.

The terms cancel in pairs by Clairauts Theorem.


Note the analogy with the scalar triple product a (a b) = 0.

1.3 Gradient Vector Fields


Gradient Vector Fields
Another differential operator occurs when we compute the divergence of a
gradient vector field

2f 2f 2f
div(f ) = (f ) = 2
+ 2 + 2.
x y z

This expression occurs so often that we abbreviate it as 2 f .

Definition 3 (Laplace Operator) The operator 2 is called the Laplace op-


erator due to its relation to Laplaces equation

2f 2f 2f
2 f = 2
+ 2 + 2.
x y z
We can also apply the Laplace operator to a vector field F = P i + Qj + Rk
in terms of its components

2 F = 2 P i + 2 Qj + 2 Rk.

1.4 First Vector Form of Greens Theorem


Greens Theorem in Vector Form
The curl and divergence operators allow us to rewrite Greens Theorem in
vector form, useful later on.
Recall that if the plane region D, its boundary curve C, and the functions
P and Q satisfy the hypotheses of Greens Theorem, then
I ZZ   ZZ
dQ dP
P dx + Q dy = dA = (curl F ) k dA.
C dx dy
D D

13
Theorem 4 (First Vector Form of Greens Theorem) Hence, we can now
rewrite the equation in Greens Theorem in the vector form as
I I ZZ
F dr = P dx + Q dy = (curl F ) k dA.
C C
D

1.5 Second Vector Form of Greens Theorem


Second Vector Form of GreensR Theorem
RR
The equation just derived C F dr = (curl F ) k dA expresses the line
D
integral of the tangential component of F along C as the double integral of the
vertical component of curl F over the region D enclosed by C.
We now derive a similar formula involving the normal component of F in
order to obtain a second vector form of Greens Theorem.
If C is given by the vector equation r(t) = x(t)i + y(t)j , a t b then the
unit tangent vector is
x0 (t) y 0 (t)
T (t) = 0 i+ 0 j.
|r (t)| |r (t)|
And the outward unit normal vector to C is
y 0 (t) x0 (t)
n(t) = 0
i 0 j.
|r (t)| |r (t)|

Theorem 5 (Second vector form of Greens Theorem)


I ZZ
F n ds = div F (x, y) dA.
C
D

Because the normal component leads to the flow across C, the value of this
integral is the flux of F across C.

14

You might also like