MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf ·...

24
MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering Mathematics, 8th Edition, Wiley, 1999. Schey, H.: Div, grad, curl and all that, W.W.Norton, 1996. Finney & Thomas: Calculus and Analytic Geometry, Addison Wesley, 2000. 1. Introduction We are used to using calculus to describe how a scalar object changes in time. For example, when boiling some milk, the temperature of the milk is a scalar function of time, θ(t), say. Then, dθ dt says how rapidly the temperature of the milk is changing in time. The same ideas apply to vectors. For example, if you swing a ball tied to a piece of string around your head, the velocity of the ball is a vector. Moreover, it is a vector function of time because the direction in which it points is changing in time. t=t 1 t=t 2 v 1 v 2 > t 1 So v 1 6= v 2 since they are pointing in different directions. So, for this example dv dt 6= 0 as the vector is changing in time. Thus to understand complex dynamical motions, we need to be able to work out how vectors are changing in time and/or space. To do this, we need vector calculus. 1

Transcript of MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf ·...

Page 1: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus

Dr David Stevens

Books

Kreyszig, E.: Advanced Engineering Mathematics, 8th Edition, Wiley, 1999.

Schey, H.: Div, grad, curl and all that, W.W.Norton, 1996.

Finney & Thomas: Calculus and Analytic Geometry, Addison Wesley, 2000.

1. Introduction

We are used to using calculus to describe how a scalar object changes in time. For example,when boiling some milk, the temperature of the milk is a scalar function of time, θ(t), say.Then,

dt

says how rapidly the temperature of the milk is changing in time.

The same ideas apply to vectors. For example, if you swing a ball tied to a piece of stringaround your head, the velocity of the ball is a vector. Moreover, it is a vector function oftime because the direction in which it points is changing in time.

t=t1

t=t2v1

v2

> t1

So v1 6= v2 since they are pointing in different directions. So, for this example

dv

dt6= 0

as the vector is changing in time.

Thus to understand complex dynamical motions, we need to be able to work out how vectorsare changing in time and/or space. To do this, we need vector calculus.

1

Page 2: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

2. Basic concepts and gradient of a vector field

Definition: The position vector of a point P relative to an origin 0 of Cartesian coordinatesis denoted by the radius vector

r = xi + yj + zk

z

y

x

ji

krP

The length of the radius vector, OP , is denoted by r, where

r = |r| = (r.r)1/2 = (x2 + y2 + z2)1/2

We will be concerned with both scalar functions of position, f(x, y, z) = f(r) and alsovector functions of position,

v(x, y, z) = v1(x, y, zi + v2(x, y, z)j + v3(x, y, z)k

Definition: The vector differential operator, del (or sometimes nabla) is defined by

∇ ≡ ∂

∂xi +

∂yj +

∂zk.

The gradient vector, grad f or preferably ∇f , of a scalar function f(x, y, z) is a vectorfunction defined by

∇f ≡ ∂f

∂xi +

∂f

∂yj +

∂f

∂zk.

It has magnitude|∇f | = (f2

x + f2y + f2

z )1/2.

Note that we here use subscript notation fx to denote ∂f∂x etc.

Example: If f(x, y, z) = 2x+ yz − 3y2, then

∇f = 2i + (z − 6y)j + yk

2

Page 3: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

, with magnitude|∇f | = (4 + (z − 6y)2 + y2)1/2

.

A parametric curve

As a parameter t varies, the position vector of the point P , i.e.

r(t) = x(t)i + y(t)j + z(t)k

defines a curve C in space. The parameter t might represent time for example, and thepoint P a car moving along a road.

z

y

x

P

(x(t),y(t),z(t))r =

Example 1: A plane ellipse.r(t) = a cos t i + b sin t j.

[SKETCHofellipse]

Sox(t) = a cos t, y(t) = b sin t

and sox2

a2+y2

b2= 1,

which is the equation of an ellipse.

Example 2: A circular helix. For constants a, c, the circular helix is

r(t) = a cos t i + a sin t j + ct k.

Sox(t) = a cos t, y(t) = a sin t

and thus x2 + y2 = a2. So the helix is wrapped around the surface of a cylinder of radius a.

[SKETCHofhelix]

3

Page 4: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Tangent to a curve

In one dimension, we are used to finding the tangent to a curve by differentiating, so for afunction y(t), the gradient of the tangent to the curve at t is given by y ′(t). We find thisby considering two neighbouring points on the curve connected by a straight line and thendrawing the two points together. The same idea applies in higher dimensions.

Consider the neighbouring point, Q, on the curve at the parameter value t+ δt, where δt issmall,

Q : r(t+ δt) = x(t+ δt)i + y(t+ δt)j + z(t+ δt)k

(t+ t)δ

z

y

x

P

r(t)

Q

r

so that the vector

PQ

δt=δr

δt=

[x(t+ δt)− x(t)]

δti +

[y(t+ δt)− y(t)]

δtj +

[z(t+ δt)− z(t)]δt

k

is approximately tangent to the curve C at point P .

In the limit δt→ 0, we see that, since for example, by Taylor’s theorem,

x(t+ δt) = x(t) +dx

dtδt+O(δt2)

thendr

dt=

dx

dti +

dy

dtj +

dz

dtk

is the tangent vector to the curve C.

Example: Consider the circular helix introduced above:

r(t) = a cos ti + a sin tj + ctk.

A tangent vector isdr

dt= −a sin ti + a cos tj + ck

with magnitude ∣∣∣dr

dt

∣∣∣ = (a2 sin2 t+ a2 cos2 t+ c2)1/2

4

Page 5: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

= (a2 + c2)1/2.

A unit vector is obtained by dividing a vector by its magnitude. Thus the unit tangentvector to the circular helix is

t =dr

dt/∣∣∣dr

dt

∣∣∣ = − a sin t

(a2 + c2)1/2i +

a cos t

(a2 + c2)1/2j +

c

(a2 + c2)1/2k

Unit tangent

The unit tangent can be obtained directly by the same argument as above, with t replacedby s, the arc length along the curve. So now,

PQ

δs=δr

δs=

[x(s+ δs)− x(s)]

δsi +

[y(s+ δs)− y(s)]

δsj +

[z(s+ δs)− z(s)]δs

k

and in the limit δs→ 0, we have

dr

ds=

dx

dsi +

dy

dsj +

dz

dsk,

which is the unit tangent to the curve. To see why, first note that a small bit of differentialarc length ds satisfies

ds =√

(dx)2 + (dy)2 + (dz)2.

So,

ds =

√(dx

dt

)2+(dy

dt

)2+(dz

dt

)2dt,

andds

dt=

√(dx

dt

)2+(dy

dt

)2+(dz

dt

)2.

=∣∣∣dr

dt

∣∣∣.

From the chain rule,dr

dt=

dr

ds

ds

dt.

So,dr

dt=

dr

ds

∣∣∣dr

dt

∣∣∣.

Rearranging,dr

ds=

dr

dt/∣∣∣dr

dt

∣∣∣ = t,

and so dr/ds is the unit tangent, as claimed.

5

Page 6: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Summary: For a parametric curve,

dr

dtis the tangent (of generally non-unit magnitude),

dr

dsis the unit tangent.

Rate of change of a scalar

Suppose we wish to know how the scalar function of position f(x, y, z) varies as the pointr = (x, y, z) moves along the curve C. For example, how temperature varies as we movealong an isobar. Then we compute, using the chain rule,

df

dt=

∂f

∂x

dx

dt+∂f

∂y

dy

dt+∂f

∂z

dz

dt.

The key to continuing is to note that this can be expressed as the dot product of two vectors,

=(∂f∂x

i +∂f

∂yj +

∂f

∂zk)·(dx

dti +

dy

dtj +

dz

dtk).

And so,

df

dt= ∇f · dr

dt. (1)

The change in f between two points on the curve separated by the vector δr [draw littlepic] is expressed by the total differential

δf = ∇f · δr(

=∂f

∂xδx+

∂f

∂yδy +

∂f

∂zδz).

Definition: As a special case, let the curve C be the straight line through r in the directionof the unit vector a. Then the directional derivative of f(x, y, z) in the direction of a isdefined to be

d

dtf(r + ta).

Thus, using (1),

d

dtf(r + ta) = ∇f · d

dt(r + ta) = ∇f · a = a · ∇f.

This is the rate of change of f(x, y, z) in the direction a.

If γ is the angle between a and ∇f , then the directional derivative is:

a · ∇f = |∇f | cos γ (2)

6

Page 7: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

where

|∇f | =√(∂f

∂x

)2+(∂f∂y

)2+(∂f∂z

)2

is the magnitude of the gradient vector.

For a given function f(x, y, z), the directional derivative a ·∇f assumes its maximum valueif a is chosen to be parallel to ∇f (as then cos γ = cos 0 = 1 in equation 2).

The directional derivative a · ∇f vanishes for any vector a which is orthogonal to ∇f (asthen cos γ = cos π/2 = 0 in equation 2).

Example 1: Find the directional derivative of f(x, y, z) = 2x2 + 3y2 + z2 at the pointP : (2, 1, 3) in the direction of the vector a = i− 2k.

We have∇f = 4xi + 6yj + 2zk.

At P therefore,∇f = 8i + 6j + 6k.

Now |a| =√

5 and so

a =1√5

(i− 2k

).

The required directional derivative is then

a · ∇f =1√5

(i− 2k

)· (8i + 6j + 6k) = − 4√

5.

The minus sign indicates that f is decreasing at P in the direction of a.

Example 2: Find the directional derivative of f(x, y, z) = xz+yx+yz at the point P : (1, 0, 1)in the direction of the vector a = −3i + j + k.

We have∇f = (z + y)i + (x+ z)j + (x+ y)k.

At P therefore,∇f = i + 2j + k.

Now |a| =√

11 and so

a =1√11

(− 3i + j + k

).

The required directional derivative is then

a · ∇f =1√11

(−3i + j + k) · (i + 2j + k) =1√11

(−3 + 2 + 1) = 0.

So ∇f and a are orthogonal, and f does not change in the direction of a at the point P .

7

Page 8: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

The gradient as a surface normal vector

A surface S in space may be given in the form

f(x, y, z) = c

for some constant c.

Example: x2 + y2 + z2 = a2 represents a sphere of radius a centred on 0.

Suppose P is the point with position vector r on the surface S. For any neighbouring pointQ, the total differential gives

δf = ∇f · δr.If Q also lies on S then f = const., δf = 0 and so ∇f · δr = 0. This holds for any Q closeto P in the tangent plane to S at P . Thus ∇f must be orthogonal to all such δr. In otherwords, ∇f is parallel to the normal to the surface S at P .

[SKETCH NORMAL TO TANGENT PLANE]

Hence, the unit normal to the surface S at P is

n =∇f|∇f | =

fxi + fyj + fzk

(f2x + f2

y + f2z )1/2

Example 1: The plane x = 1. Obviously, the unit normal is i. To check, we can describethe surface as φ = x− 1, so

n =∇φ|∇φ| =

i

|i| = i,

as expected.

Example 2: Find the unit normal to the sphere x2 + y2 + z2 = a2, a > 0 at a general pointon its surface.

z

y

x

nr

a

P

Take φ = x2 + y2 + z2 − a2 = 0. So,

∇φ = 2xi + 2yj + 2zk

8

Page 9: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

with|∇φ| =

√4x2 + 4y2 + 4z2 = 2

√x2 + y2 + z2 = 2a

for a point on the sphere.

Then the unit normal is

n =∇φ|∇φ| =

1

2a(2xi + 2yj + 2zk) =

r

a= r,

where r denotes a unit vector parallel to r.

Level surfaces of φ(x, y, z)

Definition: The surfaces φ(x, y, z) = c, for different values of the constant c, are known aslevel surfaces of the function φ.

The unit normal to a level surface is

n =∇φ|∇φ|

evaluated at a point on the level surface.

The direction of the maximum rate of change of the directional derivative a · ∇φ is wherea = n, i.e in the direction normal to the level surface.

Properties of the gradient operator

If φ(x, y, z) and ψ(x, y, z) are any differentiable scalar fields and a, b any constants:

1. ∇(aφ+ bψ) = a∇φ+ b∇ψ. (since ∇ is a linear operator)

2. ∇(φψ) = φ∇ψ + ψ∇φ. (the product rule)

3. ∇F (φ) = F ′(φ)∇φ. (function of a function)

In (3), F (φ) is a scalar function with derivative F ′(φ) = dFdφ

.

Proof of (2)

∇(φψ) =∂(φψ)

∂xi +

∂(φψ)

∂yj +

∂(φψ)

∂zk

=(φ∂ψ

∂x+ ψ

∂φ

∂x

)i +(φ∂ψ

∂y+ ψ

∂φ

∂y

)j +(φ∂ψ

∂z+ ψ

∂φ

∂z

)k

= φ∂ψ

∂xi + φ

∂ψ

∂yj + φ

∂ψ

∂zk + ψ

∂φ

∂xi + ψ

∂φ

∂yj + ψ

∂φ

∂zk

= φ∇ψ + ψ∇φ.

9

Page 10: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

QED �.

Proof of (3)

∇F (φ) =( ∂∂x

i +∂

∂yj +

∂zk)F (φ),

= F ′(φ)∂φ

∂xi + F ′(φ)

∂φ

∂yj + F ′(φ)

∂φ

∂zk,

= F ′(φ)∇φ.

QED �.

3. Divergence of a vector field

Let v(x, y, z) = v1(x, y, z)i + v2(x, y, z)j + v3(x, y, z)k be a vector function of position r.(v1, v2, v3) are the components of v.

Definition: The scalar function

∇ · v =∂v1

∂x+∂v2

∂y+∂v3

∂z

is called the divergence of the vector function v.

Note: ∇ · v is sometimes just written as div v.

We see that

∇ · v =( ∂∂x

i +∂

∂yj +

∂zk)·(v1i + v2j + v3k

)

= i · ∂∂x

(v1i) + j · ∂∂y

(v2j) + k · ∂∂z

(v3k)

= i · i∂v1

∂x+ j · j∂v2

∂y+ k · k∂v3

∂z(∗)

=∂v1

∂x+∂v2

∂y+∂v3

∂z= div v.

NOTE: The step (∗) is possible since the unit vectors i, j, k are constant (they alwayspoint in the same direction and always have the same magnitude). The same is not true,for example, for polar coordinates, and more care needs to be exercised to compute thedivergence.

Important: ∇ · v is a scalar; ∇f is a vector

Example: If v = (x2 +xy)i +xyzj + (xy+ yz)k then ∇·v = 2x+ y+xz+ y = 2x+ 2y+xz.

10

Page 11: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Definition: The Laplacian of the scalar field f is the scalar

∇ · ∇f ≡ ∇2f (del squared f).

Now,

∇ · ∇f = ∇ ·(∂f∂x

i +∂f

∂yj +

∂f

∂zk)

=∂2f

∂x2+∂2f

∂y2+∂2f

∂z2

= fxx + fyy + fzz.

The Laplacian operator is defined by

∇2 ≡ ∂2

∂x2+

∂2

∂y2+

∂2

∂z2.

Laplace’s equation for f is∇2f = 0

i.e.∂2f

∂x2+∂2f

∂y2+∂2f

∂z2= 0.

Example: If f = x2 + y2 + z2 = r2 then

∇2f = fxx + fyy + fzz = 2 + 2 + 2 = 6.

Note: Another notation for ∇2 is the symbol 4, in which case Laplace’s equation for f iswritten

4f = 0.

Properties of the divergence

If u, v are vector fields, φ, ψ are scalar fields and a and b are constants, then:

1. ∇ · (au + bv) = a∇ · u + b∇ · v. (linearity)

2. ∇ · (φu) = φ∇ · u + u · ∇φ.

3. ∇ · (φ∇ψ)−∇ · (ψ∇φ) = φ∇2ψ − ψ∇2φ.

Proof of (2)

11

Page 12: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

∇ · (φu) =∂

∂x(φu1) +

∂y(φu2) +

∂z(φu3)

=∂φ

∂xu1 + φ

∂u1

∂x+∂φ

∂yu2 + φ

∂u2

∂y+∂φ

∂zu3 + φ

∂u3

∂z

=∂φ

∂xu1 +

∂φ

∂yu2 +

∂φ

∂zu3 + φ

(∂u1

∂x+∂u2

∂y+∂u3

∂z

)

= ∇φ · u + φ∇ · u.

QED �.Physical interpretation

What is the point of calculating the divergence of a vector field? In solid and fluid mechanics,for example, the divergence expresses local expansion of material at a point, or the localproduction of fluid, say, from a given source.

a b

In (a) fluid arrives through a pinhole, and the streamlines diverge; in this case the divergenceis positive. In (b) fluid exits through the pinhole and the divergence is negative.

4. Curl of a vector field

Definition: For the vector fieldv = v1i + v2j + v3k,

the curl of u is defined by

∇× u =

∣∣∣∣∣∣

i j k∂∂x

∂∂y

∂∂z

v1 v2 v3

∣∣∣∣∣∣

=(∂v3

∂y− ∂v2

∂z

)i +(∂v1

∂z− ∂v3

∂x

)j +(∂v2

∂x− ∂v1

∂y

)k.

Notes:

1. ∇× u is a vector field.

12

Page 13: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

2. ∇× u is sometimes written curl u.

Example: If v = yzi + 3zxj + zk then

∇× v =

∣∣∣∣∣∣

i j k∂∂x

∂∂y

∂∂z

yz 3zx z

∣∣∣∣∣∣= −3xi + yj + (3z − z)k

= −3xi + yj + 2zk.

Properties of curl

1. ∇× (au + bv) = a∇× u + b∇× v.

2. ∇× (fv) = ∇f × v + f∇× v.

3. ∇ · (u× v) = v · (∇× u)− u · (∇× v).

4. ∇ · (∇× u) = 0.

5. ∇× (∇f) = 0.

6. ∇× (∇× u) = ∇(∇ · u)−∇2u.

Note: In (6), ∇2u = (∇2u1)i + (∇2u2)j + (∇2u3)k is a vector Laplacian.

Proof of (2)

∇× (fv) =

∣∣∣∣∣∣

i j k∂∂x

∂∂y

∂∂z

fv1 fv2 fv3

∣∣∣∣∣∣

= i( ∂∂y

(fv3)− ∂

∂y(fv2)

)+ j( ∂∂z

(fv1)− ∂

∂x(fv3)

)+ k

( ∂∂x

(fv2)− ∂

∂y(fv1)

)

= i(∂f∂yv3 −

∂f

∂zv2 + f

∂v3

∂y− f ∂v2

∂z

)+ j(∂f∂zv1 −

∂f

∂xv3 − f

∂v3

∂x+ f

∂v1

∂z

)

+k(∂f∂xv2 −

∂f

∂yv1 + f

∂v2

∂x− f ∂v1

∂y

)

= i(fyv3 − fzv2

)+ j(fzv1 − fxv3

)+ k

(fxv2 − fyv1

)+ if

(∂v3

∂y− ∂v2

∂z

)+ jf

(∂v1

∂z− ∂v3

∂x

)

+kf(∂v2

∂x− ∂v1

∂y

)

=

∣∣∣∣∣∣

i j kfx fy fzv1 v2 v3

∣∣∣∣∣∣+ f

∣∣∣∣∣∣

i j k∂∂x

∂∂y

∂∂z

v1 v2 v3

∣∣∣∣∣∣= ∇f × v + f∇× v.

QED �.

13

Page 14: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Physical interpretation

What does the curl of a vector field signify? In a fluid, for example, the curl states howmuch fluid particles are locally rotating. Consider water flowing round in circles in the x, yplane, so that a single fluid particle has position vector

r = r cosωt i + r sinωt j.

Thus its velocity isv = rω(− sinωti + cosωtj)

= ω(−yi + xj).

So v is the velocity of a fluid particle at position (x, y). Now,

∇× v = 2ω k,

so the curl points upwards out of the x, y-plane. If we were to put a cork into the water ata point (x, y), it would start to spin round about an axis pointing in the k direction, whilestill moving round in a circle with the fluid. For a different fluid flow where ∇×v = 0, thecurl is zero and the cork will not spin.

The curl will also appear in Stokes’ theorem (see later).

14

Page 15: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

5. The divergence theorem

Let V be a volume in space bounded by the closed surface S with outward unit normalvector n. Let a be a sufficiently smooth vector field defined on V .

V

S

n

The divergence theorem (also known as Gauss’ theorem) states that

∫ ∫ ∫

V∇ · a dV =

∫ ∫

Sa · n dS.

Written out in the components of a = a1i + a2j + a3k and n = n1i + n2j + n3k, this is

∫ ∫ ∫

V

(∂a1

∂x+∂a2

∂y+∂a3

∂z

)dV =

∫ ∫

S

(a1n1 + a2n2 + a3n3

)dS.

Proof

Suppose that a line perpendicular to the z axis cuts S only twice, once in S1 : z = f1(x, y),the upper part, and once in S2 : z = f2(x, y), the lower part. Assume that both S1 and S2

project onto Sp in the x− y plane.

S z=f (x,y)1 1:

n1

n2

S2: z=f (x,y)2

Sp

y

z

x

15

Page 16: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Consider first∫ ∫ ∫

V

∂a3

∂zdV =

∫ ∫ ∫

V

∂a3

∂zdxdydz

=

∫ ∫

Sp

[ ∫ z=f1(x,y)

z=f2(x,y)

∂a3

∂zdz]

dxdy

=

∫ ∫

Sp

[a3(x, y, z)

]z=f1(x,y)

z=f2(x,y)dxdy

=

∫ ∫

Sp

[a3(x, y, f1(x, y))− a3(x, y, f2(x, y))

]dxdy.

But the projected surface elements

1dS cos k.n( )dS1= θ 1

θ

k

dS

θ

1

1n

dS1 cos θ = dx dy, dS1 cos θ = dx dy,

so thatdx dy = k · n1 dS1 or dx dy = −k · n2 dS2

and thus ∫ ∫

Sp

a3(x, y, f1(x, y)) dx dy =

∫ ∫

S1

a3 k · n1 dS1,

∫ ∫

Sp

a3(x, y, f2(x, y)) dx dy = −∫ ∫

S2

a3 k · n2 dS2,

So finally we have

∫ ∫

Sp

a3(x, y, f1(x, y))− a3(x, y, f2(x, y)) dxdy =

∫ ∫

S1

a3 k · n1 dS1 +

∫ ∫

S2

a3 k · n2 dS2

=

∫ ∫

Sa3 k · n dS.

Thus,

∫ ∫ ∫

V

∂a3

∂zdV =

∫ ∫

Sa3 k · n dS. (3)

16

Page 17: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Similarly,

∫ ∫ ∫

V

∂a1

∂xdV =

∫ ∫

Sa1 i · n dS. (4)

∫ ∫ ∫

V

∂a2

∂ydV =

∫ ∫

Sa2 j · n dS. (5)

Adding (3), (4), (5) we get

∫ ∫ ∫ (∂a1

∂x+∂a2

∂y+∂a3

∂z

)dV =

∫ ∫

S

(a1n1 + a2n2 + a3n3

)dS.

or ∫ ∫ ∫

V∇ · a dV =

∫ ∫

Sa · n dS.

QED �.

One use of the divergence theorem is to convert surface integrals into volume integrals (orvice versa) in order to obtain an easier expression to evaluate.

Example:

Evaluate

I =

∫ ∫

Sa · n dS

for the vector fielda = xi + yj + zk,

where S is the surface of the sphere x2 +y2 +z2 = c2, of volume V , and n is its unit outwardnormal.

Applying the divergence theorem,

I =

∫ ∫

Sa · n dS =

∫ ∫ ∫

V∇ · a dV .

Now ∇ · a = 1 + 1 + 1 = 3. So

I = 3

∫ ∫ ∫

VdV = 3.

4

3πc3 = 4πc3.

Definition: The flux of a vector field a across a surface S (not necessarily closed) is definedto be ∫ ∫

Sa · n dS,

17

Page 18: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

where n is the unit normal (directed outwards if S is closed).

Example: If fluid is pumped out of a source at the origin 0, so that u(x, y, z) represents thevelocity of a fluid at the point (x, y, z), and if S is the unit sphere x2 +y2 + z2−1 = 0, then

∫ ∫

Su · n dS

represents the flux or fluid flowing through the surface of the sphere, i.e. the amount offluid passing through the spherical surface in unit time.

By applying the divergence theorem to a small volume V , we obtain

∇ · a = limV→0

1

V

∫ ∫

Sa · n dS.

This gives an interpretation of the divergence at a point in terms of the flux of a out of asmall region V containing that point.

Definition: If ∇ · a = 0 throughout a region V then the flux of a out of any subregion of Vis zero. We say that the field is solenoidal or divergence free.

6. Two-sided surfaces and Stokes’ theorem

Let S be a two-sided surface bounded by a simple (i.e. non-intersecting) closed curve C.Let one side of S be arbitrarily designated the positive side. The unit normal to S on thepositive side is called the positive or outward unit normal to S.

A positive traversal of the boundary curve C is one in the direction which always keepsthe positive side of S to the left. Imagine walking along the curve C so that the surface isalways on your left.

S

n

C

We now introduce Stokes’ theorem, which relates surface and line integrals.

Stokes’ theorem

18

Page 19: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Let S be a two-sided surface bounded by a simple closed curve C and a be any smoothvector field defined on S and its boundary C. Stokes’ theorem states that

∫ ∫

S(∇× a) · n dS =

Ca · dr,

where n is a positive unit normal to S and C is traversed in the positive sense.

Note:∮

a · dr =∮a1 dx+ a2 dy + a3 dz.

Example: Use Stokes’ theorem to evaluate∫ ∫

S(∇× a) · n dS with a = (2x− y)i− yz2j− y2zk,

where S is the surface x2 +y2 +z2 = 1, z ≥ 0 with the circle C : x2 +y2 = 1 as its boundary.

x + y = 12 2

n

S

1C

From Stokes’ theorem,∫ ∫

S(∇× a) · n dS =

∮a · dr =

∮a1 dx+ a2 dy + a3 dz.

=

∮(2x− y) dx− yz2 dy − y2z dz =

∮(2x− y) dx,

Set x = cos t, y = sin t:

=

∫ 2π

0(2 cos t− sin t)(− sin t) dt

=

∫ 2π

0(− sin 2t+ sin2 t) dt =

∫ 2π

0

(− sin 2t+

1− cos 2t

2

)dt

=[cos 2t

2+t

2− sin 2t

4

]2π

0= π.

Definition: The circulation of a vector field a around a closed curve C is defined to be∮

a · dr.

19

Page 20: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

Stokes’ theorem states that the circulation of a around a closed curve C is equal to the fluxof ∇× a through S, ∫ ∫

S(∇× a) · n dS

where S is any surface with C as its boundary.

Note: To show that S may be any surface bounded by C, suppose that S1 and S2 are twosurfaces each bounded by C:

S1

S2

C

n

n

1

2

Consider the quantity

H =

∫ ∫

S1

(∇× a) · n1 dS1 −∫ ∫

S2

(∇× a) · n2 dS2

=

∫ ∫

S1

(∇× a) · n dS1 +

∫ ∫

S2

(∇× a) · n dS2

where n = n1 on S1 and n = −n2 on S2 taking n to be the outward normal. Then

H =

∫ ∫

S(∇× a) · n dS

where S = S1 ∪ S2. So

H =

∫ ∫ ∫

V∇ · (∇× a) dV by the divergence theorem

where V is the volume between S1 and S2. Hence

H = 0.

Equivalence of Stokes’ theorem and the divergence theorem in 2D

In two dimensions, Stokes’ theorem and the divergence theorem are equivalent. To showthis, we start with Stokes’ theorem for a vector function G(x, y),

∫ ∫

S(∇×G) · n dS =

∮G · dr, (6)

20

Page 21: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

b

n

t

C

S

where S is a two-dimensional patch in the x, y plane enclosed by the loop C.

n = k is the normal to the patch, pointing out of the plane, t is the unit tangent, and b isthe in-plane unit normal to C, known as the bi-normal. By definition,

b = t× n,

sob = t× k = −(k× t)

and b is orthogonal to both k and t.

Now, if l is the arc length around C,

dr =dr

dldl = t dl

so we can re-write (6) as

∫ ∫

S(∇×G) · k dS =

∮G · t dl, (7)

Introduce a new vector field F(x, y) such that

G = F× n = F× k.

Thus, if F = Ai +Bj, then G = Bi−Aj.

A useful vector identity states that, for any vector fields F and G,

∇× (F×G) = (G · ∇)F− (F · ∇)G + F(∇ ·G)−G(∇ · F).

Using this, we have

∇×G = ∇× (F× k) = F∇ · k− k∇ · F + (k · ∇)F− (F · ∇)k.

21

Page 22: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

But ∇ · k = 0 and (F · ∇)k = 0 since k is constant, and

(k · ∇)F =∂

∂zF(x, y) = 0.

So,∇×G = ∇× (F× k) = −k∇ · F.

Noting thatG · t = (F× k) · t = F · (k× t) = −b · F,

then (7) becomes

−(k · k)

∫ ∫

S∇ · F dS = −

∮F · b dl.

Thus, ∫ ∫

S∇ · F dS =

∮F · b dl,

which is the expression of the divergence theorem in two dimensions.

Hence Stokes’ theorem and the divergence theorem are just the same thing in 2D.

7. Irrotational vector fields

If a vector field a(x, y, z), defined in a simple, closed, bounded region V of (x, y, z) space,satisfies

∇× a = 0 everywhere in V

then a is said to be irrotational.

Theorem: The field a is irrotational in a region V if∮

a · dr = 0

for any simple, closed curve C lying entirely within V (i.e. if the circulation of a aroundany simple, closed curve C within V vanishes).

Proof

Let S be any two-sided surface which spans C (i.e. is bounded by C). Then by Stokes’theorem ∮

a · dr =

∫ ∫

S(∇× a) · n dS = 0,

since a is irrotational. QED �.

Theorem: Let a(x, y, z) be a smooth irrotational vector field defined in a simple, closed,bounded region V . Then there exists a smooth scalar field φ(x, y, z), defined in V , suchthat

a = ∇φ

22

Page 23: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

throughout V .

Proof∇× a = 0 in V implies

∂a3

∂y− ∂a2

∂z= 0, (8)

∂a3

∂x− ∂a1

∂z= 0, (9)

∂a2

∂x− ∂a1

∂y= 0. (10)

Set

a1 =∂

∂xE(x, y, z). (11)

Then (10) implies∂a2

∂x− ∂2E

∂x∂y= 0.

Integrating,

a2 =∂E

∂y+∂H(y, z)

∂y, (12)

where H(y, z) is an arbitrary function of integration. Also, (9) implies

∂a3

∂x− ∂2E

∂x∂z= 0.

Integrating,

a3 =∂E

∂z+∂G(y, z)

∂z, (13)

where G(y, z) is an arbitrary function of integration.

Now substitute (12) and (13) into (8) to get:

∂2E

∂y∂z+

∂2G

∂y∂z− ∂2E

∂y∂z− ∂2H

∂y∂z= 0.

So,∂2G

∂y∂z=

∂2H

∂y∂z.

Integrating,∂G

∂z=∂H

∂z+

dF (z)

dz,

23

Page 24: MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David ...dps/mth2b71/vector.pdf · MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus Dr David Stevens Books Kreyszig, E.: Advanced Engineering

where the function F (z) is arbitrary. Integrating once more,

G(y, z) = H(y, z) + F (z) + I(y).

From (13),

a3 =∂E

∂z+∂G

∂z=∂E

∂z+∂H

∂z+

dF (z)

dz. (14)

From (11), (12), (14), we have

a = a1i + a2j + a3k

= Exi + [Ey +Hy]j + [Ez +Hz + Fz]k

= ∇E(x, y, z) +∇H(y, z) +∇F (z)

= ∇φ

where φ = E +H + F . QED �.Example: Verify that the vector field

a = (2xy − yz)i + (x2 + 2yz − xz)j + (y2 − xy)k

is irrotational and find a scalar field φ such that a = ∇φ.

Now,

∇× a =

∣∣∣∣∣∣

i j k∂∂x

∂∂y

∂∂z

2xy − yz x2 + 2yz − xz y2 − xy

∣∣∣∣∣∣= [2y − x− (2y − x)] i− [−y − (−y)] j + [2x− z − (2x− z)] k

= 0,

and thus a is irrotational. Thus there exists φ such that a = ∇φ, i.e.

∂φ

∂x= 2xy − yz, ∂φ

∂y= x2 + 2yz − xz, ∂φ

∂z= y2 − xy.

Integrating each of these,

φ = x2y − xyz + f(y, z),

φ = x2y + y2z − xyz + g(x, z),

φ = y2z − xyz + h(x, y)

for arbitrary functions of integration f , g, h. We need to choose f , g, h so that all theseexpressions for φ give the same thing. So we take f = y2z + const., g = const. andh = x2y + const.

Thus,φ = x2y − xyz + y2z + const.

24