Upload
others
View
12
Download
0
Embed Size (px)
Citation preview
MTH-2B71/ENV-2A21/MTH-2B81 Vector Calculus
Dr Emilian Parau
Books
Kreyszig, E.: Advanced Engineering Mathematics, 8th Edition, Wiley, 1999.
Finney & Thomas: Calculus and Analytic Geometry, Addison Wesley, 2000.
Schey, H.: Div, grad, curl and all that, W.W.Norton, 1996.
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 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=t2
v1
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
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
k
rP
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, z)i + 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
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
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 at the point t is given by y′(t). We find this by considering twoneighbouring points on the curve connected by a straight line and then drawing the twopoints 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)]
δtk
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
= (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)]
δsk
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 for a two-dimensional curve(in Oxy plane) satisfies
ds =√
(dx)2 + (dy)2
by Pythagoras’ theorem.
ds
dx
dy
So,
ds =
√
(dx
dt
)2+
(dy
dt
)2dt,
andds
dt=
√
(dx
dt
)2+
(dy
dt
)2.
=∣
∣
∣
dr
dt
∣
∣
∣.
From the chain rule,dr
dt=
dr
ds
ds
dt.
5
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.Now, using a similar technique if the curve is in three dimensions, a small bit of differ-
ential arc length ds for a two-dimensional curve 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 ruledr
dt=
dr
ds
ds
dtRearranging,
dr
ds=
dr
dt/∣
∣
∣
dr
dt
∣
∣
∣= t,
and so dr/ds is the unit tangent
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
∂xi +
∂f
∂yj +
∂f
∂zk)
·(dx
dti +
dy
dtj +
dz
dtk)
.
6
And so,
df
dt= ∇f · dr
dt. (2.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 (2.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.2)
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.2).
The directional derivative a · ∇f vanishes for any vector a which is orthogonal to ∇f (asthen cos γ = cos π/2 = 0 in equation 2.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.
7
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 .
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]
8
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
n
r
a
P
Take φ = x2 + y2 + z2 − a2 = 0. So,
∇φ = 2xi + 2yj + 2zk
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 =∇φ|∇φ|
9
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
= φ∇ψ + ψ∇φ.
QED ⋄.
Proof of (3)
∇F (φ) =( ∂
∂xi +
∂
∂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.
10
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 =( ∂
∂xi +
∂
∂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.
Definition: The Laplacian of the scalar field f is the scalar
∇ · ∇f ≡ ∇2f (del squared f).
Now,
∇ · ∇f = ∇ ·(∂f
∂xi +
∂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.
11
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 △, in which case Laplace’s equation for f iswritten
△f = 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)
∇ · (φ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.
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.
12
a b
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.
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)
13
∇× (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 fz
v1 v2 v3
∣
∣
∣
∣
∣
∣
+ f
∣
∣
∣
∣
∣
∣
i j k∂∂x
∂∂y
∂∂z
v1 v2 v3
∣
∣
∣
∣
∣
∣
= ∇f × v + f∇× v.
QED ⋄.
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
5. Line integrals. Surface integrals
Line integrals are integrals of functions over curves.
Definition: Suppose that f(x, y, z) is a continuous scalar field defined on the curve Cgiven by r = x(t)i + y(t)j + z(t)k, where a ≤ t ≤ b. The integral of f over C is given by
∫
Cfds =
∫ b
af(x(t), y(t), z(t))
∣
∣
∣
∣
dr
dt
∣
∣
∣
∣
dt,
where we assumed that r is smooth and |drdt | 6= 0.
Example: Evaluate∫
C fds, where C is given by r = ti + (1 − t)j + k, 0 ≤ t ≤ 1, andf(x, y, z) = x− y + z − 2.
We calculate first drdt = i− j, so |drdt | =
√12 + 12 + 02 =
√2. Now
∫
Cfds =
∫ 1
0f(x(t), y(t), z(t))|dr
dt|dt =
∫ 1
0(t− (1 − t) + 1 − 2)
√2dt =
=
∫ 1
0(2t− 2)
√2dt = (t2 − 2t)
√2|10 = −
√2.
Now we introduce surface integrals. Let S be surface and R a “shadow” of S, or aprojection of S onto a plane beneath it.
Definition: Suppose g(x, y, z) is a continuous scalar field on the surface S defined bythe equation f(x, y, z) = c. The integral of g over S is
∫ ∫
SgdS =
∫ ∫
Rg(x, y, z)
dA
| cos γ| =
∫ ∫
Rg(x, y, z)
|∇f ||∇f · p|dA,
where p is a unit normal vector to R, γ angle between ∇f and p and ∇f · p 6= 0. Theintegral itself is called a surface integral.
Example: Evaluate∫ ∫
S gdS, where g(x, y, z) = xyz and the surface S is the surface ofthe cube 0 ≤ x ≤ 1,0 ≤ y ≤ 1, 0 ≤ z ≤ 1.
We integrate over each of the six sides and add the results.
[SKETCHofcube]
But xyz = 0 on the three sides that lie on the coordinate planes, so there will be only3 integrals to evaluate
∫ ∫
SxyzdS =
∫ ∫
sideAxyzdS +
∫ ∫
sideBxyzdS +
∫ ∫
sizeCxyzdS.
15
Side A is the surface f(x, y, z) = z = 1, which has the shadow on the Oxy plane R = 0 ≤x ≤ 1, 0 ≤ y ≤ 1. So we have
p = k, ∇f = k, |∇f | = 1, |∇f · p| = 1
and∫ ∫
sideAxyzdS =
∫ ∫
Rxydxdy =
∫ 1
0
∫ 1
0xydxdy = 1/4.
By symmetry, the integrals over sides B and C are also 1/4, hence
∫ ∫
SxyzdS = 1/4 + 1/4 + 1/4 = 3/4.
6. The divergence theorem
Let V be a volume in space bounded by the closed surface S with outward unit normalvector n. Let v be a sufficiently smooth vector field defined on V .
V
S
n
The divergence theorem (also known as Gauss’ theorem) states that
∫ ∫ ∫
V∇ · v dV =
∫ ∫
Sv · n dS.
Written out in the components of v = v1i + v2j + v3k and n = n1i + n2j + n3k, this is
∫ ∫ ∫
V
(∂v1∂x
+∂v2∂y
+∂v3∂z
)
dV =
∫ ∫
S
(
v1n1 + v2n2 + v3n3
)
dS.
Proof
Suppose that a line parallel to the z axis cuts S only twice, once in S1 : z = f1(x, y), theupper 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.
16
S z=f (x,y)1 1:
n1
n2
S2: z=f (x,y)
2
Sp
y
z
x
Consider first∫ ∫ ∫
V
∂v3∂z
dV =
∫ ∫ ∫
V
∂v3∂z
dxdydz
=
∫ ∫
Sp
[
∫ z=f1(x,y)
z=f2(x,y)
∂v3∂z
dz]
dxdy
=
∫ ∫
Sp
[
v3(x, y, z)]z=f1
z=f2
dxdy
=
∫ ∫
Sp
[
v3(x, y, f1) − v3(x, y, f2)]
dxdy.
But the projected surface elements
1dS cos k.n( )dS1= θ 1
θ
k
dS
θ
1
1n
dS1 cos θ = dx dy, −dS2 cos θ = dx dy,
so thatdx dy = k · n1 dS1 or dx dy = −k · n2 dS2
and thus∫ ∫
Sp
v3(x, y, f1(x, y)) dx dy =
∫ ∫
S1
v3 k · n1 dS1,
17
∫ ∫
Sp
v3(x, y, f2(x, y)) dx dy = −∫ ∫
S2
v3 k · n2 dS2,
So finally we have
∫ ∫
Sp
v3(x, y, f1) − v3(x, y, f2) dxdy =
∫ ∫
S1
v3 k · n1 dS1 +
∫ ∫
S2
v3 k · n2 dS2
=
∫ ∫
Sv3 k · n dS.
Thus,
∫ ∫ ∫
V
∂v3∂z
dV =
∫ ∫
Sv3 k · n dS. (6.1)
Similarly,
∫ ∫ ∫
V
∂v1∂x
dV =
∫ ∫
Sv1 i · n dS. (6.2)
∫ ∫ ∫
V
∂v2∂y
dV =
∫ ∫
Sv2 j · n dS. (6.3)
Adding (6.1), (6.2), (6.3) we get
∫ ∫ ∫
(∂v1∂x
+∂v2∂y
+∂v3∂z
)
dV =
∫ ∫
S
(
v1n1 + v2n2 + v3n3
)
dS.
or∫ ∫ ∫
V∇ · v dV =
∫ ∫
Sv · 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 =
∫ ∫
Sv · n dS
for the vector fieldv = xi + yj + zk,
where S is the surface of the sphere x2+y2+z2 = c2, of volume V , and n is its unit outwardnormal.
18
Applying the divergence theorem,
I =
∫ ∫
Sv · n dS =
∫ ∫ ∫
V∇ · v dV .
Now ∇ · v = 1 + 1 + 1 = 3. So
I = 3
∫ ∫ ∫
VdV = 3.
4
3πc3 = 4πc3.
Definition: The flux of a vector field v across a surface S (not necessarily closed) is definedto be
∫ ∫
Sv · n dS,
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
∇ · v = limV →0
1
V
∫ ∫
Sv · n dS.
This gives an interpretation of the divergence at a point in terms of the flux of v out of asmall region V containing that point.
Definition: If ∇ · v = 0 throughout a region V then the flux of v out of any subregion of Vis zero. We say that the field is solenoidal or divergence free.
Let V be a volume in space bounded by the closed surface S, with n the outward unit
normal vector on S. Let∂f
∂n= ∇f · n be the derivative of a scalar f in the direction of n.
This derivative is called the normal derivative of f on S.
Green’s identities.
Now, if we assume that f and g are two smooth scalars, then we can apply the divergencetheorem to v = f∇g and we obtain
∫ ∫
S(f∇g) · n dS =
∫ ∫ ∫
V∇ · (f∇g) dV .
19
But∫ ∫
S(f∇g) · n dS =
∫ ∫
Sf(∇g · n) dS =
∫ ∫
Sf∂g
∂ndS
and∫ ∫ ∫
V∇ · (f∇g) dV =
∫ ∫ ∫
V(f∇2g + ∇f · ∇g) dV ,
so∫ ∫
Sf∂g
∂ndS =
∫ ∫ ∫
V(f∇2g + ∇f · ∇g) dV
which is called Green’s first formula.
If we apply now the divergence theorem for v = g∇f , we have
∫ ∫
Sg∂f
∂ndS =
∫ ∫ ∫
V(g∇2f + ∇g · ∇f) dV
and subtracting the last two formula we find Green’s second formula
∫ ∫
S
(
f∂g
∂n− g
∂f
∂n
)
dS =
∫ ∫ ∫
V(f∇2g − g∇2f) dV .
7. 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.
20
Stokes’ theorem
Let S be a two-sided surface bounded by a simple closed curve C and v be any smoothvector field defined on S and its boundary C. Stokes’ theorem states that
∫ ∫
S(∇× v) · n dS =
∮
Cv · dr,
where n is a positive unit normal to S and C is traversed in the positive sense.
Note:∮
v · dr =∮
v1 dx+ v2 dy + v3 dz.
Example: Use Stokes’ theorem to evaluate
∫ ∫
S(∇× v) · n dS with v = (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
1
C
From Stokes’ theorem,
∫ ∫
S(∇× v) · n dS =
∮
v · dr =
∮
v1 dx+ v2 dy + v3 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= π.
21
Definition: The circulation of a vector field v around a closed curve C is defined to be∮
v · dr.
Stokes’ theorem states that the circulation of v around a closed curve C is equal to the fluxof ∇× v through S,
∫ ∫
S(∇× v) · n dS
where S is any surface with C as its boundary.
Example: Let f(x, y, z) = (x2 + y2 + z2)−1/2 and v = ∇f . We can show that thecirculation of the field v · dr around the circle C : x2 + y2 = a is zero either by directcomputation or by applying the Stokes’ theorem
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
(∇× v) · n1 dS1 −∫ ∫
S2
(∇× v) · n2 dS2
=
∫ ∫
S1
(∇× v) · n dS1 +
∫ ∫
S2
(∇× v) · n dS2
where n = n1 on S1 and n = −n2 on S2 taking n to be the outward normal. Then
H =
∫ ∫
S(∇× v) · n dS
where S = S1 ∪ S2. So
H =
∫ ∫ ∫
V∇ · (∇× v) dV by the divergence theorem
22
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, (7.1)
where S is a two-dimensional patch in the x, y plane enclosed by the loop C.
b
n
t
C
S
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 (7.1) as∫ ∫
S(∇× G) · k dS =
∮
G · t dl, (7.2)
Introduce a new vector field F(x, y) such that
G = F × n = F × k.
23
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.
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.2) 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.
8. Irrotational vector fields
If a vector field v(x, y, z), defined in a simple, closed, bounded region V of (x, y, z) space,satisfies
∇× v = 0 everywhere in V
then v is said to be irrotational.
Theorem: If the field v is irrotational in a region V then∮
v · dr = 0
for any simple, closed curve C lying entirely within V (i.e. the circulation of v around anysimple, closed curve C within V vanishes).
Proof
24
Let S be any two-sided surface which spans C (i.e. is bounded by C). Then by Stokes’theorem
∮
v · dr =
∫ ∫
S(∇× v) · n dS = 0,
since v is irrotational. QED ⋄.
Theorem: Let v(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
v = ∇φthroughout V .
Proof∇× v = 0 in V implies
∂v3∂y
− ∂v2∂z
= 0, (8.1)
∂v3∂x
− ∂v1∂z
= 0, (8.2)
∂v2∂x
− ∂v1∂y
= 0. (8.3)
Set
v1 =∂
∂xE(x, y, z). (8.4)
Then (8.3) implies∂v2∂x
− ∂2E
∂x∂y= 0.
Integrating,
v2 =∂E
∂y+∂H(y, z)
∂y, (8.5)
where H(y, z) is an arbitrary function of integration. Also, (8.2) implies
∂v3∂x
− ∂2E
∂x∂z= 0.
Integrating,
v3 =∂E
∂z+∂G(y, z)
∂z, (8.6)
where G(y, z) is an arbitrary function of integration.
25
Now substitute (8.5) and (8.6) into (8.1) 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,
where the function F (z) is arbitrary. Integrating once more,
G(y, z) = H(y, z) + F (z) + I(y).
From (8.6),
v3 =∂E
∂z+∂G
∂z=∂E
∂z+∂H
∂z+
dF (z)
dz. (8.7)
From (8.4), (8.5), (8.7), we have
v = v1i + v2j + v3k
= 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
v = (2xy − yz)i + (x2 + 2yz − xz)j + (y2 − xy)k
is irrotational and find a scalar field φ such that v = ∇φ.
Now,
∇× v =
∣
∣
∣
∣
∣
∣
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 v is irrotational. Thus there exists φ such that v = ∇φ, i.e.
∂φ
∂x= 2xy − yz,
∂φ
∂y= x2 + 2yz − xz,
∂φ
∂z= y2 − xy.
26
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.
Path independent line integrals
Definition: Suppose that a vector field F = F(r) is defined within a region V . We say thatthe line integral
∫
rB
rA
F · dr
is path independent if its value depends only on the start point rA and end point rB , andnot on the path C which connects them.
Thus, for a path independent line integral,
rB
rA
C1
C2
∫
C1
F · dr =
∫
C2
F · dr (8.8)
for any choice of C1, C2 connecting rA and rB .
Denote by −C2 the path C2 traversed in the opposite sense (i.e. the opposite direction).By the properties of line integrals,
∫
−C2
F · dr = −∫
C2
F · dr.
Let the closed path C consist of C1 followed by −C2. Then∮
CF · dr =
∫
C1
F · dr +
∫
−C2
F · dr
27
rB
rA
C1
C2
=
∫
C1
F · dr−∫
C2
F · dr = 0
if the line integral is path independent, by (8.8).
Now, if the line integral is path independent then (8.8) holds for all choices of rA, rB insideV . In this case
∮
CF · dr = 0
for all simple, closed curves C lying entirely within V .
But from Stokes’ theorem,∫ ∫
S(∇× F) · n dS = 0
for all two-sided surfaces spanning the closed curve C. Thus
∇× F = 0 within V
and it follows that there is a scalar φ(r) such that
F = ∇φ.
With F = ∇φ, the original line integral becomes
∫
rB
rA
F · dr =
∫
rB
rA
∇φ · dr
=
∫
rB
rA
∂φ
∂xdx+
∂φ
∂ydy +
∂φ
∂zdz
=
∫
rB
rA
dφ =[
φ(r)]
rB
rA
= φ(rA) − φ(rB),
which clearly depends only on the end-points rA and rB, and not on the path of integrationconnecting them.
Thus, for any function φ(r),
∫
rB
rA
∇φ · dr is path independent.
28