Vector Calculus For Engineers Coursera
Vector Calculus For Engineers Coursera
Vector Calculus For Engineers Coursera
Jeffrey R. Chasnov
The Hong Kong University of Science and Technology
Department of Mathematics
Clear Water Bay, Kowloon
Hong Kong
Copyright ○
c 2019 by Jeffrey Robert Chasnov
This work is licensed under the Creative Commons Attribution 3.0 Hong Kong License. To view a copy of this
license, visit http://creativecommons.org/licenses/by/3.0/hk/ or send a letter to Creative Commons, 171 Second
Street, Suite 300, San Francisco, California, 94105, USA.
Preface
View the promotional video on YouTube
These are the lecture notes for my online Coursera course, Vector Calculus for Engineers. Students
who take this course are expected to already know single-variable differential and integral calculus to
the level of an introductory college calculus course. Students should also be familiar with matrices,
and be able to compute a three-by-three determinant.
I have divided these notes into chapters called Lectures, with each Lecture corresponding to a
video on Coursera. I have also uploaded all my Coursera videos to YouTube, and links are placed at
the top of each Lecture.
There are some problems at the end of each lecture chapter. These problems are designed to
exemplify the main ideas of the lecture. Students taking a formal university course in multivariable
calculus will usually be assigned many more problems, some of them quite difficult, but here I follow
the philosophy that less is more. I give enough problems for students to solidify their understanding
of the material, but not so many that students feel overwhelmed. I do encourage students to attempt
the given problems, but, if they get stuck, full solutions can be found in the Appendix. I have also
included practice quizzes as an additional source of problems, with solutions also given.
Jeffrey R. Chasnov
Hong Kong
October 2019
iii
Contents
I Vectors 1
1 Vectors 5
2 Cartesian coordinates 7
3 Dot product 9
4 Cross product 11
8 Vector identities 23
II Differentiation 29
10 Partial derivatives 33
12 Chain rule 37
v
vi CONTENTS
15 Gradient 45
16 Divergence 47
17 Curl 49
18 Laplacian 51
21 Electromagnetic waves 59
24 Polar coordinates 73
25 Central force 75
28 Cylindrical coordinates 83
IV Fundamental Theorems 97
Appendix 127
Vectors
1
3
In this week’s lectures, we learn about vectors. Vectors are line segments with both length and direc-
tion, and are fundamental to engineering mathematics. We will define vectors, how to add and subtract
them, and how to multiply them using the scalar and vector products (dot and cross products). We
use vectors to learn some analytical geometry of lines and planes, and introduce the Kronecker delta
and the Levi-Civita symbol to prove vector identities. The important concepts of scalar and vector
fields are discussed.
4
Lecture 1
Vectors
View this lecture on YouTube
We define a vector in three-dimensional Euclidean space as having a length (or magnitude) and a
direction. A vector is depicted as an arrow starting at one point in space and ending at another point.
All vectors that have the same length and point in the same direction are considered equal, no matter
where they are located in space. (Variables that are vectors will be denoted in print by boldface, and
in hand by an arrow drawn over the symbol.) In contrast, scalars have magnitude but no direction.
Zero can either be a scalar or a vector and has zero magnitude. The negative of a vector reverses its
direction. Examples of vectors are velocity and acceleration; examples of scalars are mass and charge.
Vectors can be added to each other and multiplied by scalars. A simple example is a mass m acted
on by two forces 𝐹1 and 𝐹2 . Newton’s equation then takes the form m𝑎 = 𝐹1 + 𝐹2 , where 𝑎 is the
acceleration vector of the mass. Vector addition is commutative and associative:
𝐴 + 𝐵 = 𝐵 + 𝐴, (𝐴 + 𝐵 ) + 𝐶 = 𝐴 + (𝐵 + 𝐶 );
k(𝐴 + 𝐵 ) = k𝐴 + k𝐵.
Multiplication of a vector by a positive scalar changes the length of the vector but not its direction.
Vector addition can be represented graphically by placing the tail of one of the vectors on the head of
the other. Vector subtraction adds the first vector to the negative of the second. Notice that when the
tail of 𝐴 and 𝐵 are placed at the same point, the vector 𝐵 − 𝐴 points from the head of 𝐴 to the head
of 𝐵, or equivalently, the tail of −𝐴 to the head of 𝐵.
B−A
A B
A+B=B+A
A
B
B
A
5
6 LECTURE 1. VECTORS
2. Using vectors, prove that the line segment joining the midpoints of two sides of a triangle is parallel
to the third side and half its length.
Cartesian coordinates
View this lecture on YouTube
To solve a physical problem, we usually impose a coordinate system. The familiar three-dimensional
x-y-z coordinate system is called the Cartesian coordinate system. Three mutually perpendicular
lines called axes intersect at a point called the origin, denoted as (0, 0, 0). All other points in three-
dimensional space are identified by their coordinates as ( x, y, z) in the standard way. The positive
directions of the axes are usually chosen to form a right-handed coordinate system. When one points
the right hand in the direction of the positive x-axis, and curls the fingers in the direction of the
positive y-axis, the thumb should point in the direction of the positive z-axis.
A vector has a length and a direction. If we impose a Cartesian coordinate system and place the
tail of a vector at the origin, then the head points to a specific point. For example, if the vector 𝐴 has
head pointing to ( A1 , A2 , A3 ), we say that the x-component of 𝐴 is A1 , the y-component is A2 , and
the z-component is A3 . The length of the vector 𝐴, denoted by |𝐴|, is a scalar and is independent of
the orientation of the coordinate system. Application of the Pythagorean theorem in three dimensions
results in q
|𝐴| = A21 + A22 + A23 .
We can define standard unit vectors 𝑖, 𝑗 and 𝑘, to be vectors of length one that point along the
positive directions of the x-, y-, and z-coordinate axes, respectively. Using these unit vectors, we can
write
𝐴 = A1 𝑖 + A2 𝑗 + A3 𝑘.
With also 𝐵 = B1 𝑖 + B2 𝑗 + B3 𝑘, vector addition and scalar multiplication can be expressed component-
wise and is given by
The position vector, 𝑟, is defined as the vector that points from the origin to the point ( x, y, z), and is
used to locate a specific point in space. It can be written in terms of the standard unit vectors as
𝑟 = x𝑖 + y𝑗 + z𝑘.
A displacement vector is the difference between two position vectors. For position vectors 𝑟1 and 𝑟2 ,
the displacement vector that points from 𝑟1 to 𝑟2 is given by
7
8 LECTURE 2. CARTESIAN COORDINATES
b) Newton’s law of universal gravitation states that two point masses attract each other along the
line connecting them, with a force proportional to the product of their masses and inversely
proportional to the square of the distance between them. The magnitude of the force acting on
each mass is therefore
m1 m2
F=G ,
r2
where m1 and m2 are the two masses, r is the distance between them, and G is the gravitational
constant. Let the masses m1 and m2 be located at the position vectors 𝑟1 and 𝑟2 . Write down the
vector form for the force acting on m1 due to its gravitational attraction to m2 .
Dot product
View this lecture on YouTube
We define the dot product (or scalar product) between two vectors 𝐴 = A1 𝑖 + A2 𝑗 + A3 𝑘 and
𝐵 = B1 𝑖 + B2 𝑗 + B3 𝑘 as
𝐴 · 𝐵 = A1 B1 + A2 B2 + A3 B3 .
One can prove that the dot product is commutative, distributive over addition, and associative with
respect to scalar multiplication; that is,
A geometric interpretation of the dot product is also possible. Given any two vectors 𝐴 and 𝐵,
place the vectors tail-to-tail, and impose a coordinate system with origin at the tails such that 𝐴 is
parallel to the x-axis and 𝐵 lies in the x-y plane, as shown in the figure. The angle between the two
vectors is denoted as θ.
𝐴 · 𝐵 = |𝐴|𝐵 | cos θ,
|B|
y
9
10 LECTURE 3. DOT PRODUCT
a) 𝐴 · 𝐵 = 𝐵 · 𝐴;
b) 𝐴 · (𝐵 + 𝐶 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶;
2. Determine all the combinations of dot products between the standard unit vectors 𝑖, 𝑗, and 𝑘.
3. Let 𝐶 = 𝐴 − 𝐵. Calculate the dot product of 𝐶 with itself and thus derive the law of cosines.
Cross product
View this lecture on YouTube
We define the cross product (or vector product) between two vectors 𝐴 = A1 𝑖 + A2 𝑗 + A3 𝑘 and
𝐵 = B1 𝑖 + B2 𝑗 + B3 𝑘 as
𝑖 𝑗 𝑘
𝐴 × 𝐵 = A1 A2 A3 = ( A2 B3 − A3 B2 )𝑖 + ( A3 B1 − A1 B3 )𝑗 + ( A1 B2 − A2 B1 )𝑘.
B1 B2 B3
Use of the three-by-three determinant is a useful mnemonic to remember the formula. One can prove
that the cross product is anticommutative, distributive over addition, and associative with respect to
scalar multiplication; that is
|B| sin θ
|B|
y
A geometric interpretation of the cross product is also possible. Given two vectors 𝐴 and 𝐵 with
angle θ between them, impose a coordinate system so that 𝐴 is parallel to the x-axis and 𝐵 lies in the
x-y plane. Then 𝐴 = |𝐴|𝑖, 𝐵 = |𝐵 | cos θ𝑖 + |𝐵 | sin θ𝑗, and 𝐴 × 𝐵 = |𝐴||𝐵 | sin θ𝑘. The coordinate-
independent relationship is
|𝐴 × 𝐵 | = |𝐴||𝐵 | sin θ,
where θ lies between zero and 180◦ . Furthermore, the vector 𝐴 × 𝐵 points in the direction perpendic-
ular to the plane formed by 𝐴 and 𝐵, and its sign is determined by the right-hand rule.
11
12 LECTURE 4. CROSS PRODUCT
a) 𝐴 × 𝐵 = −𝐵 × 𝐴;
b) 𝐴 × (𝐵 + 𝐶 ) = 𝐴 × 𝐵 + 𝐴 × 𝐶;
2. Determine all the combinations of cross products between the standard unit vectors 𝑖, 𝑗, and 𝑘.
3. Show that the cross product is not in general associative. That is, find an example using unit vectors
such that
𝐴 × (𝐵 × 𝐶 ) 6= (𝐴 × 𝐵 ) × 𝐶.
a) 𝐴 · 𝐵 = 𝐵 · 𝐴
b) 𝐴 + (𝐵 + 𝐶 ) = (𝐴 + 𝐵 ) + 𝐶
c) 𝐴 × (𝐵 × 𝐶 ) = (𝐴 × 𝐵 ) × 𝐶
d) 𝐴 · (𝐵 + 𝐶 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶
a) a2 b3 − a3 b2
b) a3 b1 − a1 b3
c) a1 b2 − a2 b1
d) a1 b3 − a3 b1
a) 𝑖 × (𝑗 × 𝑘 )
b) (𝑖 × 𝑗 ) × 𝑘
c) (𝑖 × 𝑖) × 𝑗
d) 𝑖 × (𝑖 × 𝑗 )
13
14 LECTURE 4. CROSS PRODUCT
Lecture 5
In two dimensions, the equation for a line in slope-intercept form is y = mx + b, and in point-slope
form is y − y1 = m( x − x1 ). In three dimensions, a line is most commonly expressed as a parametric
equation.
Suppose that a line passes through a point with position vector 𝑟0 and in a direction parallel to
the vector 𝑢. Then, from the definition of vector addition, we can specify the position vector 𝑟 for any
point on the line by
𝑟 = 𝑟0 + 𝑢t,
x = x0 + u1 t, y = y0 + u2 t, z = z0 + u3 t;
Example: Find the parametric equation for a line that passes through the points (1, 2, 3) and (3, 2, 1). Determine
the intersection point of the line with the z = 0 plane.
To find a vector parallel to the direction of the line, we first compute the displacement vector between
the two given points:
𝑢 = (3 − 1)𝑖 + (2 − 2)𝑗 + (1 − 3)𝑘 = 2𝑖 − 2𝑘.
Choosing a point on the line with position vector 𝑟0 = 𝑖 + 2𝑗 + 3𝑘, the parametric equation for the
line is given by
The line crosses the z = 0 plane when 3 − 2t = 0, or t = 3/2, and ( x, y) = (4, 2).
15
16 LECTURE 5. ANALYTIC GEOMETRY OF LINES
A plane in three-dimensional space is determined by three non-collinear points. Two linearly indepen-
dent displacement vectors with direction parallel to the plane can be formed from these three points,
and the cross-product of these two displacement vectors will be a vector that is orthogonal to the
plane. We can use the dot product to express this orthogonality.
So let three points that define a plane be located by the position vectors 𝑟1 , 𝑟2 , and 𝑟3 , and construct
the two displacement vectors 𝑠1 = 𝑟2 − 𝑟1 and 𝑠2 = 𝑟3 − 𝑟2 . A vector normal to the plane is given by
𝑁 = 𝑠1 × 𝑠2 , and for any point in the plane with position vector 𝑟, and for one of the given position
vectors 𝑟i , we have 𝑁 · (𝑟 − 𝑟i ) = 0. With 𝑟 = x𝑖 + y𝑗 + z𝑘, 𝑁 = a𝑖 + b𝑗 + c𝑘 and d = 𝑁 · 𝑟i , the
equation for the plane can be written as 𝑁 · 𝑟 = 𝑁 · 𝑟i , or
ax + by + cz = d.
Notice that the coefficients of x, y and z are the components of the normal vector to the plane.
Example: Find an equation for the plane defined by the three points (2, 1, 1), (1, 2, 1), and (1, 1, 2). Determine
the equation for the line in the x-y plane formed by the intersection of this plane with the z = 0 plane.
To find two vectors parallel to the plane, we compute two displacement vectors from the three points:
The intersection of this plane with the z = 0 plane forms the line given by y = − x + 4.
17
18 LECTURE 6. ANALYTIC GEOMETRY OF PLANES
a) t𝑖 + (1 + t)𝑗 + (1 + 2t)𝑘
b) t𝑖 + (1 − t)𝑗 + (1 + 2t)𝑘
c) t𝑖 + (1 + t)𝑗 + (1 − 2t)𝑘
d) t𝑖 + (1 − t)𝑗 + (1 − 2t)𝑘
a) y = x
b) y = x + 1
c) y = x − 1
d) y = 1
19
20 LECTURE 6. ANALYTIC GEOMETRY OF PLANES
Lecture 7
We define the Kronecker delta δij to be +1 if i = j and 0 otherwise, and the Levi-Civita symbol
eijk to be +1 if i, j, and k are a cyclical permutation of (1, 2, 3), −1 if a noncyclical permutation, and 0
if an index repeats. More formally,
1, if i = j;
δij =
0, if i 6= j;
and
+1, if (i, j, k) is (1, 2, 3), (2, 3, 1), or (3, 1, 2);
eijk = −1, if (i, j, k) is (3, 2, 1), (1, 3, 2), or (2, 1, 3);
0, if i = j, or j = k, or k = i.
For convenience, we will use the Einstein summation convention when working with these symbols,
where a repeated index implies summation over that index. For example, δii = 3, where we have
summed over i; and eijk eijk = 6, where we have summed over i, j, and k.
There is a remarkable relationship between the product of Levi-Civita symbols and the Kronecker
delta, given by the determinant
δ δim δin
il
= δjl δjn = δil (δjm δkn − δjn δkm ) − δim (δjl δkn − δjn δkl ) + δin (δjl δkm − δjm δkl ).
eijk elmn δjm
δ δkm δkn
kl
The Kronecker delta, Levi-Civita symbol, and the Einstein summation convention are used to
derive some common vector identities. The dot-product is written as 𝐴 · 𝐵 = Ai Bi , and the Levi-
Civita symbol is used to write the ith component of the cross-product as [𝐴 × 𝐵 ]i = eijk A j Bk , which
can be made self-evident by explicitly writing out the three components. The Kronecker delta finds
use as δij A j = Ai .
21
22 LECTURE 7. KRONECKER DELTA AND LEVI-CIVITA SYMBOL
a) δij A j = Ai ;
eijk elmn = δil (δjm δkn − δjn δkm ) − δim (δjl δkn − δjn δkl ) + δin (δjl δkm − δjm δkl ),
Vector identities
View this lecture on YouTube
𝐴 · (𝐵 × 𝐶 ) = 𝐵 · (𝐶 × 𝐴) = 𝐶 · (𝐴 × 𝐵 ), (8.1)
𝐴 × (𝐵 × 𝐶 ) = (𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶 (8.2)
(𝐴 × 𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ) (8.3)
Parentheses are optional when expressions have only one possible interpretation, but for clarity they
are often written. Proofs of these vector identities make us of the following Kronecker delta and
Levi-Civita identities: eijk = e jki = ekij ; eijk eimn = δjm δkn − δjn δkm ; and δij A j = Ai .
The first identity, called the scalar triple product, can be proved using the cyclic property of the
Levi-Civita tensor:
Ai eijk Bj Ck = Bj e jki Ck Ai = Ck ekij Ai Bj .
Another proof writes the scalar triple product as the three-by-three determinant
A1 A2 A3
𝐴 · (𝐵 × 𝐶 ) = B1 B2 B3 ,
C1 C2 C3
and uses the property that the determinant changes sign under row interchange. The scalar triple
product is also the volume of the parallelepiped defined by the three vectors.
The second identity, called the vector triple product, can be proved by writing the ith component
as
The third identity, called the scalar quadruple product, has proof
23
24 LECTURE 8. VECTOR IDENTITIES
𝐴 × (𝐵 × 𝐶 ) + 𝐵 × (𝐶 × 𝐴) + 𝐶 × (𝐴 × 𝐵 ) = 0.
|𝐴 × 𝐵 |2 = |𝐴|2 |𝐵 |2 − (𝐴 · 𝐵 )2 .
a) 𝐵 × (𝐶 × 𝐴)
b) 𝐴 × (𝐶 × 𝐵 )
c) (𝐴 × 𝐵 ) × 𝐶
d) (𝐶 × 𝐵 ) × 𝐴
a) 𝐴 · (𝐵 × 𝐵 )
b) 𝐴 · (𝐴 × 𝐵 )
c) 𝐴 × (𝐴 × 𝐵 )
d) 𝐵 · (𝐴 × 𝐵 )
25
26 LECTURE 8. VECTOR IDENTITIES
Lecture 9
In some physical problems scalars and vectors can be functions of both space and time. We call
these types of variables fields. For example, the temperature in some spatial domain is a scalar field,
and we can write
T (𝑟, t) = T ( x, y, z; t),
where we use the common notation of a semicolon on the right-hand-side to separate the space and
time dependence. Notice that the position vector 𝑟 is used to locate the temperature in space. As
another example, the velocity vector 𝑢 of a flowing fluid is a vector field, and we can write
The equations governing a field are sometimes called the field equations, and these equations com-
monly take the form of partial differential equations. For example, the equations for the electric and
magnetic vector fields are the famous Maxwell’s equations, and the equation for the velocity vector
field is called the Navier-Stokes equation. The equation for the scalar field (called the wave function)
in non-relativistic quantum mechanics is called the Schrödinger equation.
−y 𝑖 + x 𝑗
𝐵 ( x, y) = ,
x 2 + y2
27
28 LECTURE 9. SCALAR AND VECTOR FIELDS
Differentiation
29
31
In this week’s lectures, we learn about the derivatives of scalar and vector fields. We define the partial
derivative and derive the method of least squares as a minimization problem. We learn how to use
the chain rule for a function of several variables, and derive the triple product rule used in chem-
istry. From the del differential operator, we define the gradient, divergence, curl and Laplacian. We
learn some useful vector derivative identities and how to derive them using the Kronecker delta and
Levi-Civita symbol. Vector identities are then used to derive the electromagnetic wave equation from
Maxwell’s equations in free space. Electromagnetic waves are fundamental to all modern communica-
tion technologies.
32
Lecture 10
Partial derivatives
View this lecture on YouTube
For a function f = f ( x, y) of two variables, we define the partial derivative of f with respect to x
as
∂f f ( x + h, y) − f ( x, y)
= lim ,
∂x h →0 h
and similarly for the partial derivative of f with respect to y. To take a partial derivative, take the
derivative treating all other variables as constants. As an example, consider
f ( x, y) = 2x3 y2 + y3 .
We have
∂f ∂f
= 6x2 y2 , = 4x3 y + 3y2 .
∂x ∂y
Second derivatives are defined as the derivatives of the first derivatives, so we have
∂2 f ∂2 f
= 12xy2 , = 4x3 + 6y;
∂x2 ∂y2
and for continuous differentiable functions, the mixed second partial derivatives are independent of
the order in which the derivatives are taken,
∂2 f ∂2 f
= 12x2 y = .
∂x∂y ∂y∂x
To develop a multivariable Taylor series, we introduce the standard subscript notation for partial
derivatives,
∂f ∂f ∂2 f ∂2 f ∂2 f
fx = , fy = , f xx = , f xy = , f yy = , etc.
∂x ∂y ∂x2 ∂x∂y ∂y2
The Taylor series of f ( x, y) is then written as
1
f ( x, y) = f + f x x + f y y + f xx x2 + 2 f xy xy + f yy y2 + . . . ,
2!
where the function and all its partial derivatives on the right-hand side are evaluated at the origin.
33
34 LECTURE 10. PARTIAL DERIVATIVES
1
f ( x, y, z) = .
( x2 + y2 + z2 ) n
2. Given the function f = f (t, x ), find the Taylor series expansion of the expression
n
f ( β0 , β1 ) = ∑ ( β 0 + β 1 x i − y i )2 .
i =1
Here, the data is assumed given and the unknowns are the fitting parameters β 0 and β 1 . It should be
clear from the problem specification, that there must be values of β 0 and β 1 that minimize the function
f = f ( β 0 , β 1 ). To determine, these values, we set ∂ f /∂β 0 = ∂ f /∂β 1 = 0. This results in the equations
n n
∑ ( β0 + β1 xi − yi ) = 0, ∑ xi ( β0 + β1 xi − yi ) = 0.
i =1 i =1
n n n n n
β0 n + β1 ∑ xi = ∑ yi , β0 ∑ xi + β 1 ∑ xi2 = ∑ xi yi .
i =1 i =1 i =1 i =1 i =1
∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )2
35
36 LECTURE 11. THE METHOD OF LEAST SQUARES
Chain rule
View this lecture on YouTube
Partial derivatives are used in applying the chain rule to a function of several variables. Consider
a two-dimensional scalar field f = f ( x, y), and define the total differential of f to be
We can write d f as
df ∂ f dx ∂ f dy
= + .
dt ∂x dt ∂y dt
And if one has f = f ( x (r, θ ), y(r, θ )), say, then the corresponding chain rule is given by
∂f ∂ f ∂x ∂ f ∂y ∂f ∂ f ∂x ∂ f ∂y
= + , = + .
∂r ∂x ∂r ∂y ∂r ∂θ ∂x ∂θ ∂y ∂θ
dx d2 x
Example: Consider the differential equation = u(t, x (t)). Determine a formula for 2 in terms of u and its
dt dt
partial derivatives.
d2 x ∂u ∂u dx
= +
dt2 ∂t ∂x dt
∂u ∂u
= +u .
∂t ∂x
The above formula is called the material derivative and in three dimensions forms a part of the Navier-
Stokes equation for fluid flow.
37
38 LECTURE 12. CHAIN RULE
b) Eliminate x and y in favor of r and θ and compute the partial derivatives directly.
Suppose that three variables x, y and z are related by the equation f ( x, y, z) = 0, and it that is possible
to write x = x (y, z) and z = z( x, y). Taking differentials of x and y, we have
∂x ∂x ∂z ∂z
dx = dy + dz, dz = dx + dy.
∂y ∂z ∂x ∂y
We can make use of the second equation to eliminate dz in the first equation to obtain
∂x ∂x ∂z ∂z
dx = dy + dx + dy ;
∂y ∂z ∂x ∂y
or collecting terms,
∂x ∂z ∂x ∂x ∂z
1− dx = + dy.
∂z ∂x ∂y ∂z ∂y
Since dx and dy are independent variations, the terms in parenthesis must be zero. The left-hand-side
results in the reciprocity relation
∂x ∂z
= 1,
∂z ∂x
which states the intuitive result that ∂z/∂x and ∂x/∂z are multiplicative inverses of each other. The
right-hand-side results in
∂x ∂x ∂z
=− ,
∂y ∂z ∂y
which, when making use of the reciprocity relation, yields the counterintuitive triple product rule,
∂x ∂y ∂z
= −1.
∂y ∂z ∂x
39
40 LECTURE 13. TRIPLE PRODUCT RULE
Lecture 14
Example: Demonstrate the triple product rule using the ideal gas law.
where P is the pressure, V is the volume, T is the absolute temperature, n is the number of moles of
the gas, and R is the ideal gas constant. We say P, V and T are the state variables, and the ideal gas
law is a relation of the form
f ( P, V, T ) = PV − nRT = 0.
nRT nRT PV
P= , V= , T= ;
V P nR
∂P nRT ∂V nR ∂T V
=− 2 , = , = .
∂V V ∂T P ∂P nR
where we make use of the ideal gas law in the last equality.
41
42 LECTURE 14. TRIPLE PRODUCT RULE: EXAMPLE
2. Suppose the four variables x, y, z and t are related by the linear expression ax + by + cz + dt = 0.
Determine a corresponding quadruple product rule for these variables.
2( x + y )
a)
( x2 + y2 + z2 )5/2
( x + y )2
b)
( x2 + y2 + z2 )5/2
x 2 + y2
c)
( x2 + y2 + z2 )5/2
3xy
d)
( x2 + y2 + z2 )5/2
2. The least-squares line through the data points (0, 1), (1, 3), (2, 3) and (3, 4) is given by
7 9x
a) y = +
5 10
5 9x
b) y = +
7 10
7 10x
c) y = +
5 9
5 10x
d) y = +
7 9
3. Let f = f ( x, y) with x = r cos θ and y = r sin θ. Which of the following is true?
∂f ∂f ∂f
a) = x +y
∂θ ∂x ∂y
∂f ∂f ∂f
b) = −x + y
∂θ ∂x ∂y
∂f ∂f ∂f
c) =y +x
∂θ ∂x ∂y
∂f ∂f ∂f
d) = −y + x
∂θ ∂x ∂y
43
44 LECTURE 14. TRIPLE PRODUCT RULE: EXAMPLE
Lecture 15
Gradient
View this lecture on YouTube
Consider the three-dimensional scalar field f = f ( x, y, z), and the differential d f , given by
∂f ∂f ∂f
df = dx + dy + dz.
∂x ∂y ∂z
∇ f = yz 𝑖 + xz 𝑗 + xy 𝑘.
45
46 LECTURE 15. GRADIENT
a) φ( x, y, z) = x2 + y2 + z2 ;
1
b) φ( x, y, z) = p
x2 + y2 + z2
Solutions to the Problems
Lecture 16
Divergence
View this lecture on YouTube
Here, the dot product is used between a vector differential operator ∇ and a vector field 𝑢. The diver-
gence measures how much a vector field spreads out, or diverges, from a point. A more math-based
description will be given later.
x y z
𝐹 = F1 𝑖 + F2 𝑗 + F3 𝑘 = 𝑖+ 2 𝑗+ 2 𝑘.
( x2 + y2 + z2 )3/2 ( x + y2 + z2 )3/2 ( x + y2 + z2 )3/2
and analogous results for ∂F2 /∂y and ∂F3 /∂z. Adding the three derivatives results in
3 3( x 2 + y2 + z2 ) 3 3
∇·𝐹 = 3
− 5
= 3
− 3 = 0,
|𝑟 | |𝑟 | |𝑟 | |𝑟 |
47
48 LECTURE 16. DIVERGENCE
Curl
View this lecture on YouTube
Here, the cross product is used between a vector differential operator and a vector field. The curl
measures how much a vector field rotates, or curls, around a point. A more math-based description
will be given later.
Example: Show that the curl of a gradient is zero, that is, ∇ × (∇ f ) = 0.
We have
𝑖 𝑗 𝑘
∇ × (∇ f ) = ∂/∂x
∂/∂y ∂/∂z
∂ f /∂x ∂ f /∂y ∂ f /∂z
2
∂2 f
2
∂2 f
2
∂2 f
∂ f ∂ f ∂ f
= − 𝑖+ − 𝑗+ − 𝑘 = 0,
∂y∂z ∂z∂y ∂z∂x ∂x∂z ∂x∂y ∂y∂x
49
50 LECTURE 17. CURL
Laplacian
View this lecture on YouTube
∂2 ∂2 ∂2
∇2 = 2
+ 2 + 2.
∂x ∂y ∂z
The Laplacian can be applied to either a scalar field or a vector field. The Laplacian applied to a scalar
field, f = f ( x, y, z), can be written as the divergence of the gradient, that is,
∂2 f ∂2 f ∂2 f
∇2 f = ∇ · (∇ f ) = + + .
∂x2 ∂y2 ∂z2
The Laplacian applied to a vector field, acts on each component of the vector field separately. With
𝑢 = u1 ( x, y, z)𝑖 + u2 ( x, y, z)𝑗 + u3 ( x, y, z)𝑘, we have
∇2 𝑢 = ∇2 u1 𝑖 + ∇2 u2 𝑗 + ∇2 u3 𝑘.
The Laplacian appears in some classic partial differential equations. The Laplace equation, wave
equation, and diffusion equation all contain the Laplacian and are given, respectively, by
∂2 Φ ∂Φ
∇2 Φ = 0, = c2 ∇2 Φ, = D ∇2 Φ.
∂t2 ∂t
We have ∇2 f = 2 + 2 + 2 = 6.
51
52 LECTURE 18. LAPLACIAN
a) −1
b) 0
c) 1
d) 3
53
54 LECTURE 18. LAPLACIAN
Lecture 19
∇ × ∇ f = 0, ∇ · (∇ × 𝑢) = 0.
∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢,
∇ · ( f 𝑢) = 𝑢 · ∇ f + f ∇ · 𝑢,
∇ × ( f 𝑢) = ∇ f × 𝑢 + f ∇ × 𝑢,
∇(𝑢 · 𝑣 ) = (𝑢 · ∇)𝑣 + (𝑣 · ∇)𝑢 + 𝑢 × (∇ × 𝑣 ) + 𝑣 × (∇ × 𝑢),
∇ · (𝑢 × 𝑣 ) = 𝑣 · (∇ × 𝑢) − 𝑢 · (∇ × 𝑣 ),
∇ × (𝑢 × 𝑣 ) = 𝑢(∇ · 𝑣 ) − 𝑣 (∇ · 𝑢) + (𝑣 · ∇)𝑢 − (𝑢 · ∇)𝑣.
∂ ∂ ∂
𝑢 · ∇ = u1 + u2 + u3 ,
∂x1 ∂x2 ∂x3
∂f ∂f ∂f
𝑢 · ∇ f = u1 + u2 + u3 ;
∂x1 ∂x2 ∂x3
In some of these identities, the parentheses are optional when the expression has only one possible
interpretation. For example, it is common to see (𝑢 · ∇)𝑣 written as 𝑢 · ∇𝑣. The parentheses are
mandatory when the expression can be interpreted in more than one way, for example ∇ × 𝑢 × 𝑣
could mean either ∇ × (𝑢 × 𝑣 ) or (∇ × 𝑢) × 𝑣, and these two expressions are usually not equal.
Proof of all of these identities is most readily done by manipulating the Kronecker delta and Levi-
Civita symbols, and I give an example in the next lecture.
55
56 LECTURE 19. VECTOR DERIVATIVE IDENTITIES
Lecture 20
To prove the vector derivative identities, we use component notation, the Einstein summation con-
vention, the Levi-Civita symbol and the Kronecker delta. The ith component of the curl of a vector
field is written using the Levi-Civita symbol as
∂uk
(∇ × 𝑢)i = eijk ;
∂x j
∂ui
∇·𝑢 = .
∂xi
The contraction of the Kronecker delta with a vector field is given by δij u j = ui , and the Levi-Civita
symbol is invariant under cyclical permutation of its indices, that is, eijk = e jki = ekij . If only two
indices are interchanged, then the symbol changes sign, for example, eijk = −e jik . Furthermore, a
useful identity when a vector derivative identity contains two cross products is
∇ · (𝑢 × 𝑣 ) = 𝑣 · (∇ × 𝑢) − 𝑢 · (∇ × 𝑣 ).
We have
∂
∇ · (𝑢 × 𝑣 ) = eijk u j vk
∂xi
∂u j ∂v
= eijk v + eijk u j k
∂xi k ∂xi
∂u j ∂v
= vk ekij − u j e jik k
∂xi ∂xi
= 𝑣 · (∇ × 𝑢) − 𝑢 · (∇ × 𝑣 ).
The crucial step in the proof is the use of the product rule for the derivative. The rest of the proof just
requires facility with the notation and the manipulation of the indices of the Levi-Civita symbol.
57
58 LECTURE 20. VECTOR DERIVATIVE IDENTITIES (PROOF)
a) ∇ · ( f 𝑢) = 𝑢 · ∇ f + f ∇ · 𝑢;
b) ∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢.
d𝑟
= 𝑢(t, 𝑟 (t)),
dt
where
𝑟 = x1 𝑖 + x2 𝑗 + x3 𝑘, 𝑢 = u1 𝑖 + u2 𝑗 + u3 𝑘.
a) Write down the differential equations for dx1 /dt, dx2 /dt, and dx3 /dt;
b) Use the chain rule to determine formulas for d2 x1 /dt2 , d2 x2 /dt2 , and d3 x3 /dt2 ;
Electromagnetic waves
View this lecture on YouTube
Maxwell’s equations in free space are most simply written using the del operator, and are given by
∂𝐵 ∂𝐸
∇ · 𝐸 = 0, ∇ · 𝐵 = 0, ∇×𝐸 = − , ∇ × 𝐵 = µ 0 e0 .
∂t ∂t
Here I use the so-called SI units familiar to engineering students, where the constants e0 and µ0 are
called the permittivity and permeability of free space, respectively.
From the four Maxwell’s equations, we would like to obtain a single equation for the electric field
𝐸. To do so, we can make use of the curl of the curl identity
∇ × (∇ × 𝐸 ) = ∇(∇ · 𝐸 ) − ∇2 𝐸.
To obtain an equation for 𝐸, we take the curl of the third Maxwell’s equation and commute the time
and space derivatives
∂
∇ × (∇ × 𝐸 ) = − (∇ × 𝐵 ).
∂t
We apply the curl of the curl identity to obtain
∂
∇(∇ · 𝐸 ) − ∇2 𝐸 = − (∇ × 𝐵 ),
∂t
and then apply the first Maxwell’s equation to the left-hand-side, and the fourth Maxwell’s equation
to the right-hand-side. Rearranging terms, we obtain the three-dimensional wave equation given by
∂2 𝐸
= c2 ∇2 𝐸,
∂t2
√
with c the wave speed given by c = 1/ µ0 e0 ≈ 3 × 108 m/s. This is, of course, the speed of light in
vacuum.
59
60 LECTURE 21. ELECTROMAGNETIC WAVES
a) ∇ × (∇ f )
b) ∇ · (∇ × 𝑢)
c) ∇ · (∇ f )
d) ∇ × (∇(∇ · 𝑢))
3. Suppose the electric field is given by 𝐸 (𝑟, t) = sin(z − ct)𝑖. Then which of the following is a valid
free-space solution for the magnetic field 𝐵 = 𝐵 (𝑟, t)?
1
a) 𝐵 (𝑟, t) = sin (z − ct)𝑖
c
1
b) 𝐵 (𝑟, t) = sin (z − ct)𝑗
c
1
c) 𝐵 (𝑟, t) = sin ( x − ct)𝑖
c
1
d) 𝐵 (𝑟, t) = sin ( x − ct)𝑗
c
Solutions to the Practice quiz
61
62 LECTURE 21. ELECTROMAGNETIC WAVES
Week III
63
65
In this week’s lectures, we learn about integrating scalar and vector fields. Double and triple integrals
of scalar fields are taught, as are line integrals and surface integrals of vector fields. The important
technique of using curvilinear coordinates, namely polar coordinates in two dimensions, and cylin-
drical and spherical coordinates in three dimensions, is used to simplify problems with cylindrical
or spherical symmetry. The change of variables formula for multidimensional integrals using the
Jacobian of the transformation is explained.
66
Lecture 22
are the limits of the sums of ∆x∆y (or ∆x∆y∆z) multiplied by the integrand. A single integral is the
area under a curve y = f ( x ); a double integral is the volume under a surface z = f ( x, y). A triple
integral is used, for example, to find the mass of an object by integrating over its density.
To perform a double or triple integral, the correct limits of the integral needs to be determined,
and the integral is performed as two (or three) single integrals. For example, an integration over a
rectangle in the x-y plane can be written as either
ˆ y1 ˆ x1 ˆ x1 ˆ y1
f ( x, y) dx dy or f ( x, y) dy dx.
y0 x0 x0 y0
In the first double integral, the x integration is done first (holding y fixed), and the y integral is done
second. In the second, the order of integration is reversed. Either order of integration will give the
same result.
Example: Compute the volume of the surface z = x2 y above the x-y plane with base given by a unit square with
vertices (0, 0), (1, 0), (1, 1), and (0, 1).
To find the volume, we integrate z = x2 y over its base. The integral over the unit square is given by
either of the double integrals
ˆ 1ˆ 1 ˆ 1ˆ 1
x2 y dx dy or x2 y dy dx.
0 0 0 0
ˆ 1ˆ 1 ˆ 1
x =1 ! ˆ y =1
2 x3 y 1 1 1 y2 1
x y dx dy = dy = y dy = = ;
0 0 0 3 x =0
3 0 3 2 y =0
6
ˆ 1ˆ 1 ˆ 1
y =1 ! ˆ x =1
2 x2 y2 1 1 2 1 x3 1
x y dy dx = dx = x dy = = .
0 0 0 2 y =0 2 0 2 3 x =0 6
In this case, an even simpler integration method separates the x and y dependence and writes
ˆ 1ˆ 1 ˆ 1 ˆ 1
2 2 1 1 1
x y dx dy = x dx y dy = = .
0 0 0 0 3 2 6
67
68 LECTURE 22. DOUBLE AND TRIPLE INTEGRALS
1 1
0.8 0.8
0.6 0.6
x=1−y y =1−x
y
0.4 0.4
0.2 0.2
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x x
The integral over the triangle (see the figures) is given by either one of the double integrals
ˆ 1 ˆ 1− y ˆ 1 ˆ 1− x
x2 y dx dy, or x2 y dy dx.
0 0 0 0
ˆ 1 ˆ 1− y ˆ 1
x =1− y ! ˆ ˆ
2 x3 y 1 1 3 1 1
x y dx dy = dy = ( 1 − y ) y dy = (y − 3y2 + 3y3 − y4 ) dy
0 0 0 3 x =0 3 0 3 0
1
1 y2 3y4 y5
1 1 3 1 1
= − y3 + − = − 1 + − = ;
3 2 4 5 0 3 2 4 5 60
ˆ 1 ˆ 1− y ˆ 1
y =1− x ! ˆ 1 ˆ 1
2 x2 y2 1 1
x y dy dx = dx = x2 (1 − x )2 dx = ( x2 − 2x3 + x4 ) dx
0 0 0 2 y =0 2 0 2 0
1
1 x3 x4 x5
1 1 1 1 1
= − + = − + = ;
2 3 2 5 0 2 3 2 5 60
69
70 LECTURE 23. EXAMPLE: DOUBLE INTEGRAL WITH TRIANGLE BASE
a) 3.0 g
b) 1.5 g
c) 1.33 g
d) 1.0 g
3. The volume of the surface z = xy above the x-y plane with base given by the triangle with vertices
(0, 0), (1, 1), and (2, 0) is equal to
1
a)
6
1
b)
5
1
c)
4
1
d)
3
Solutions to the Practice quiz
71
72 LECTURE 23. EXAMPLE: DOUBLE INTEGRAL WITH TRIANGLE BASE
Lecture 24
Polar coordinates
View this lecture on YouTube
θ̂
In two dimensions, polar coordinates is the most com- y r̂
monly used curvilinear coordinate system. The relation-
y
ship between the Cartesian coordinates and polar coordi- r
nates is given by
θ
x = r cos θ, y = r sin θ.
x
x
One defines unit vectors 𝑟ˆ and 𝜃ˆ to be orthogonal and in the direction of increasing r and θ, respec-
ˆ 𝜃ˆ unit vectors are rotated an angle θ from the 𝑖-𝑗 unit vectors. Simple
tively (see above figure). The 𝑟-
trigonometry shows that
𝑟ˆ = cos θ𝑖 + sin θ𝑗, 𝜃ˆ = − sin θ𝑖 + cos θ𝑗.
It is important to remember that the direction of the unit vectors in curvilinear coordinates are not
fixed, but depend on their location. Here, 𝑟ˆ = 𝑟ˆ (θ ) and 𝜃ˆ = 𝜃ˆ (θ ), and by differentiating the polar unit
vectors, one can show that
d𝑟ˆ ˆ d𝜃ˆ
= 𝜃, = −𝑟.
ˆ
dθ dθ
The Cartesian partial derivatives can be transformed into polar form using the chain rule. Using
the relationship between the Cartesian coordinates and polar coordinates, we have for a scalar field
f = f ( x (r, θ ), y(r, θ )),
∂f ∂ f ∂x ∂ f ∂y ∂f ∂f
= + = cos θ + sin θ ,
∂r ∂x ∂r ∂y ∂r ∂x ∂y
∂f ∂ f ∂x ∂ f ∂y ∂f ∂f
= + = −r sin θ + r cos θ ;
∂θ ∂x ∂θ ∂y ∂θ ∂x ∂y
∂f ∂f sin θ ∂ f ∂f ∂f cos θ ∂ f
= cos θ − , = sin θ + .
∂x ∂r r ∂θ ∂y ∂r r ∂θ
73
74 LECTURE 24. POLAR COORDINATES
a) Given
𝑟ˆ = cos θ𝑖 + sin θ𝑗, 𝜃ˆ = − sin θ𝑖 + cos θ𝑗,
b) Given
∂f ∂f ∂f ∂f ∂f ∂f
= cos θ + sin θ , = −r sin θ + r cos θ ,
∂r ∂x ∂y ∂θ ∂x ∂y
invert a two-by-two matrix to solve for ∂ f /∂x and ∂ f /∂y.
A central force is a force acting on a point mass and pointing directly towards a fixed point in space.
The origin of the coordinate system is chosen at this fixed point, and the axis orientated such that the
initial position and velocity of the mass lies in the x-y plane. The subsequent motion of the mass is
then two dimensional, and polar coordinates can be employed.
The position vector of the point mass in polar coordinates is given by
𝑟 = r𝑟.
ˆ
The velocity of the point mass is obtained by differentiating r with respect to time. The added dif-
ficulty here is that the unit vectors 𝑟ˆ = 𝑟ˆ (θ (t)) and 𝜃ˆ = 𝜃ˆ (θ (t)) are also functions of time. When
differentiating, we will need to use the chain rule in the form
As is customary, here we will use the dot notation for the time derivative. For example, ẋ = dx/dt
and ẍ = d2 x/dt2 .
The velocity of the point mass is then given by
d𝑟ˆ ˆ
𝑟˙ = ṙ𝑟ˆ + r = ṙ𝑟ˆ + r θ̇ 𝜃;
dt
d𝑟ˆ d𝜃ˆ
𝑟¨ = r̈𝑟ˆ + ṙ + ṙ θ̇ 𝜃ˆ + r θ̈ 𝜃ˆ + r θ̇
dt dt
2 ˆ
= (r̈ − r θ̇ )𝑟ˆ + (2ṙ θ̇ + r θ̈ )𝜃.
The second equation is usually expressed as conservation of angular momentum, and after multipli-
cation by r, is written in the form
d
(mr2 θ̇ ) = 0, or mr2 θ̇ = constant.
dt
75
76 LECTURE 25. CENTRAL FORCE
𝑙 = 𝑟 × 𝑝,
where 𝑟 is the position vector of the mass and 𝑝 = m𝑟˙ is the momentum of the mass. Show that
Let u(s) be a differentiable and invertible function. We can change variables in this integral by letting
x = u(s) so that dx = u0 (s) ds. The integral in the new variable s then becomes
ˆ u −1 ( x f )
I= f (u(s))u0 (s) ds.
u −1 ( x 0)
The key piece for us here is the transformation of the infinitesimal length dx = u0 (s) ds.
We can be more concrete by examining a specific transformation. Consider the calculation of the
area of a circle of radius R, given by the integral
ˆ R p
A=4 R2 − x2 dx.
0
To more easily perform this integral, we can let x = R cos θ so that dx = − R sin θ dθ. The integral then
becomes ˆ ˆ
π/2 p π/2
A = 4R2 1 − cos2 θ sin θ dθ = sin2 θ dθ,
0 0
77
78 LECTURE 26. CHANGE OF VARIABLES (SINGLE INTEGRAL)
Lecture 27
We would like to change variables from ( x, y) to (s, t). For simplicity, we will write this change of
variables as x = x (s, t) and y = y(s, t). The region A in the x-y domain transforms into a region A0 in
the s-t domain, and the integrand becomes a function of the new variables s and t by the substitution
f ( x, y) = f ( x (s, t), y(s, t)). We now consider how to transform the infinitesimal area dx dy.
The transformation of dx dy is obtained by considering how an infinitesimal rectangle is trans-
formed into an infinitesimal parallelogram, and how the area of the two are related by the absolute
value of a determinant. The main result, which we do not derive here, is given by
dx dy = |det ( J )| ds dt,
To be more concrete, we again calculate the area of a circle. Here, using a two-dimensional integral,
the area of a circle can be written as ¨
A= dx dy,
A
where the integral subscript A denotes the region in the x-y plane that defines the circle. To perform
this integral, we can change from Cartesian to polar coordinates. Let
x = r cos θ, y = r sin θ.
We have
! !
∂x/∂r ∂x/∂θ cos θ −r sin θ
dx dy = det dr dθ = det dr dθ = r dr dθ.
∂y/∂r ∂y/∂θ sin θ r cos θ
The region in the r-θ plane that defines the circle is 0 ≤ r ≤ R and 0 ≤ θ ≤ 2π. The integral then
becomes ˆ ˆ ˆ ˆ
2π R 2π R
A= r dr dθ = dθ r dr = πR2 .
0 0 0 0
79
80 LECTURE 27. CHANGE OF VARIABLES (DOUBLE INTEGRAL)
Suppose a circular disk of radius R has mass density ρ0 at its center and ρ1 at its edge, and its density
is a linear function of the distance from the center. Find the total mass of the disk.
ˆ ∞
2
2. Compute the Gaussian integral given by I = e− x dx. Use the well-known trick
−∞
ˆ ∞ 2 ˆ ∞ ˆ ∞ ˆ ∞ ˆ ∞
− x2 − x2 − y2 2 + y2 )
2
I = e dx = e dx e dy = e−( x dx dy.
−∞ −∞ −∞ −∞ −∞
a) x𝑖 + y𝑗
b) x𝑖 − y𝑗
c) y𝑖 + x𝑗
d) −y𝑖 + x𝑗
d𝜃ˆ
2. is equal to
dθ
a) 𝑟ˆ
b) −𝑟ˆ
c) 𝜃ˆ
d) −𝜃ˆ
3. Suppose a circular disk of radius 1 cm has mass density 10 g/cm2 at its center, and 1 g/cm2 at its
edge, and its density is a linear function of the distance from the center. The total mass of the disk is
equal to
a) 8.80 g
b) 10.21 g
c) 12.57 g
d) 17.23 g
81
82 LECTURE 27. CHANGE OF VARIABLES (DOUBLE INTEGRAL)
Lecture 28
Cylindrical coordinates
View this lecture on YouTube
The orthogonal unit vectors 𝜌, ˆ and 𝑧ˆ point in the direction of increasing ρ, φ and z, respectively.
ˆ 𝜑,
The position vector is given by 𝑟 = ρ𝜌ˆ + z𝑧.
ˆ The volume element transforms as dx dy dz = ρ dρ dφ dz.
The del operator can be found using the polar form of the Cartesian derivatives (see the problems).
The result is
∂ 1 ∂ ∂
∇ = 𝜌ˆ + 𝜑ˆ + 𝑧ˆ .
∂ρ ρ ∂φ ∂z
The Laplacian, ∇ · ∇, is computed taking care to differentiate the unit vectors with respect to φ:
∂2 1 ∂ 1 ∂2 ∂2
∇2 = + + +
∂ρ2 ρ ∂ρ ρ2 ∂φ2 ∂z2
1 ∂
∂
1 ∂ 2 ∂2
= ρ + 2 2 + 2.
ρ ∂ρ ∂ρ ρ ∂φ ∂z
The divergence and curl of a vector field, 𝐴 = Aρ (ρ, φ, z)𝜌ˆ + Aφ (ρ, φ, z)𝜑ˆ + Az (ρ, φ, z)𝑧,
ˆ are given by
1 ∂ 1 ∂Aφ ∂Az
∇·𝐴 = (ρAρ ) + + ,
ρ ∂ρ ρ ∂φ ∂z
1 ∂Az ∂Aφ
ˆ
∂Aρ ∂Az 1 ∂ 1 ∂Aρ
∇ × 𝐴 = 𝜌ˆ − +𝜑 − + 𝑧ˆ (ρAφ ) − .
ρ ∂φ ∂z ∂z ∂ρ ρ ∂ρ ρ ∂φ
83
84 LECTURE 28. CYLINDRICAL COORDINATES
∂ ∂ ∂
∇ = 𝑥ˆ + 𝑦ˆ + 𝑧ˆ ,
∂x ∂y ∂z
ˆ
𝑥ˆ = cos φ𝜌ˆ − sin φ𝜑, ˆ
𝑦ˆ = sin φ𝜌ˆ + cos φ𝜑,
and
∂ ∂ sin φ ∂ ∂ ∂ cos φ ∂
= cos φ − , = sin φ + .
∂x ∂ρ ρ ∂φ ∂y ∂ρ ρ ∂φ
2. Compute ∇ · 𝜌ˆ in two ways:
ˆ ∇ · 𝜑ˆ and ∇ × 𝜑.
3. Using cylindrical coordinates, compute ∇ × 𝜌, ˆ
The spherical coordinate unit vectors can be written in terms of the Cartesian unit vectors by
𝑟ˆ = sin θ cos φ 𝑖 + sin θ sin φ 𝑗 + cos θ 𝑘,
𝜃ˆ = cos θ cos φ 𝑖 + cos θ sin φ 𝑗 − sin θ 𝑘,
𝜑ˆ = − sin φ 𝑖 + cos φ 𝑗;
By differentiating the unit vectors, we can derive the sometimes useful identities
85
86 LECTURE 29. SPHERICAL COORDINATES (PART A)
3. Consider a scalar field f = f (r ) that depends only on the distance from the origin. Using dx dy dz =
r2 sin θ dr dθ dφ, and an integration region V inside a sphere of radius R centered at the origin, show
that ˆ ˆ R
f dV = 4π r2 f (r ) dr.
V 0
4. Suppose a sphere of radius R has mass density ρ0 at its center, and ρ1 at its surface, and its density
is a linear function of the distance from the center. Find the total mass of the sphere. What is the
average density of the sphere?
First, we determine the gradient in spherical coordinates. Consider the scalar field f = f (r, θ, φ).
Our definition of a total differential is
∂f ∂f ∂f
df = dr + dθ + dφ = ∇ f · d𝑟.
∂r ∂θ ∂φ
In spherical coordinates,
𝑟 = r 𝑟ˆ (θ, φ),
and using
∂𝑟ˆ ˆ ∂𝑟ˆ ˆ
= 𝜃, = sin θ 𝜑,
∂θ ∂φ
we have
∂𝑟ˆ ∂𝑟ˆ
d𝑟 = dr 𝑟ˆ + r dθ + r dφ = dr 𝑟ˆ + r dθ 𝜃ˆ + r sin θ dφ 𝜑.
ˆ
∂θ ∂φ
Using the orthonormality of the unit vectors, we can therefore write d f as
∂f 1 ∂f ˆ 1 ∂f ˆ
df = 𝑟ˆ + 𝜃+ 𝜑 · (dr 𝑟ˆ + r dθ 𝜃ˆ + r sin θ dφ 𝜑ˆ ),
∂r r ∂θ r sin θ ∂φ
showing that
∂f 1 ∂f ˆ 1 ∂f ˆ
∇f = 𝑟ˆ + 𝜃+ 𝜑.
∂r r ∂θ r sin θ ∂φ
Some messy algebra will yield for the Laplacian
∂2 f
2 1 ∂ 2∂f 1 ∂ ∂f 1
∇ f = 2 r + 2 sin θ + ;
r ∂r ∂r r sin θ ∂θ ∂θ r2 sin2 θ ∂φ2
and for the divergence and curl of a vector field, 𝐴 = Ar (r, θ, φ)𝑟ˆ + Aθ (r, θ, φ)𝜃ˆ + Aφ (r, θ, φ)𝜑,
ˆ
1 ∂ 2 1 ∂ 1 ∂Aφ
∇·𝐴 = (r Ar ) + (sin θ Aθ ) + ,
r2 ∂r r sin θ ∂θ r sin θ ∂φ
𝜃ˆ 𝜑ˆ ∂
𝑟ˆ ∂ ∂Aθ 1 ∂Ar ∂ ∂Ar
∇×𝐴 = (sin θ Aφ ) − + − (rAφ ) + (rAθ ) − .
r sin θ ∂θ ∂φ r sin θ ∂φ ∂r r ∂r ∂θ
87
88 LECTURE 30. SPHERICAL COORDINATES (PART B)
a) (𝑖, 𝑗, 𝑘 )
b) (𝑖, 𝑘, 𝑗 )
c) (𝑖, −𝑘, 𝑗 )
d) (𝑖, 𝑘, −𝑗 )
3. Suppose a sphere of radius 5 cm has mass density 10 g/cm3 at its center, and 5g/cm3 at its surface,
and its density is a linear function of the distance from the center. The total mass of the sphere is given
by
a) 3927 g
b) 3491 g
c) 3272 g
d) 3142 g
89
90 LECTURE 30. SPHERICAL COORDINATES (PART B)
Lecture 31
The line integral of a vector field 𝑢 along a directed curve C is written as one of
ˆ ˛
𝑢 · d𝑟 or 𝑢 · d𝑟,
C C
where the latter form is used when the curve C is closed, with ending point equal to starting point.
To define the line integral, we break the curve into small displacement vectors, take the dot product of
the average value of 𝑢 on each piece of the curve with its displacement vector, and sum over all these
scalar values.
A general method to calculate the line integral is to parameterize the curve. Let the curve be
d𝑟
parameterized by the function 𝑟 = 𝑟 (t) as t goes from t0 to t f . Using d𝑟 = dt, the line integral
dt
becomes ˆ ˆ tf
d𝑟
𝑢 · d𝑟 = 𝑢(𝑟 (t)) · dt.
C t0 dt
Sometimes the curve is simple enough that d𝑟 can be computed directly. No matter, line integrals are
always done by converting them into single-variable integrals.
Example: Compute the line integral of 𝑟 = x𝑖 + y𝑗 in the x-y plane along two curves from the origin to the
point ( x, y) = (1, 1). The first curve C1 consists of two line segments, the first from (0, 0) to (1, 0), and the
second from (1, 0) to (1, 1). The second curve C2 is a straight line from the origin to (1, 1).
The computation along the first curve requires two separate integrations. For the curve along the
x-axis, we use d𝑟 = dx𝑖 and for the curve at x = 1 in the direction of 𝑗, we use d𝑟 = dy𝑗. The line
integral is therefore given by
ˆ ˆ 1 ˆ 1
𝑟 · d𝑟 = x dx + y dy = 1.
C1 0 0
For the second curve, we parameterize the line by 𝑟 (t) = t(𝑖 + 𝑗 ) as t goes from 0 to 1, so that
d𝑟 = dt(𝑖 + 𝑗 ), and the integral becomes
ˆ ˆ 1
𝑟 · d𝑟 = 2t dt = 1.
C2 0
The two line integrals are equal, and for this case only depend on the starting and ending points of
the curve.
91
92 LECTURE 31. LINE INTEGRAL OF A VECTOR FIELD
2. In the x-y plane, calculate the line integral of the vector field 𝑢 = −y𝑖 + x𝑗 counterclockwise around
the circle of radius R centered at the origin.
The surface integral of the normal component of a vector field 𝑢 computed over a surface S is written
as one of ˆ ˛
𝑢 · d𝑆 or 𝑢 · d𝑆,
S S
where the latter is used when the surface S is closed. One can write d𝑆 = 𝑛dS,
ˆ where 𝑛
ˆ is a normal
unit vector to the surface. To define the surface integral, we break the surface into little areas, take
the dot product of the average value of 𝑢 on each area with the normal unit vector times the area
itself, and then sum. For an open surface, the direction of the normal vectors needs to be specified as
there are two choices, but for a closed surface, by convention the direction is always chosen to point
outward.
This surface integral is often called a flux integral. If 𝑢 is the fluid velocity (length divided by
time), and ρ is the fluid density (mass divided by volume), then the surface integral
ˆ
ρ𝑢 · dS
S
computes the mass flux, that is, the mass passing through the surface S per unit time.
Example: Compute the flux integral of 𝑟 = x𝑖 + y𝑗 + z𝑘 over a square box centered at the origin with sides
parallel to the axes and side lengths equal to L .
From symmetry, we need only compute the surface integral through one face and them multiply by
six. Consider the face located at x = L/2. The normal vector to this face is 𝑖, and the infinitesimal
surface area is dy dz. The integral over this surface, say S1 , is therefore given by
ˆ ˆ L/2 ˆ L/2
L3
L
𝑟 · d𝑆 = dy dz = .
S1 − L/2 − L/2 2 2
93
94 LECTURE 32. SURFACE INTEGRAL OF A VECTOR FIELD
a) 0
1 2
b) L
2
c) L2
d) 2L2
2. Consider a right circular cylinder of radius R and length L centered on the z-axis. The surface
integral of 𝑢 = x𝑖 + y𝑗 over the cylinder is given by
a) 0
b) πR2 L
c) 2πR2 L
d) 4πR2 L
3. The flux integral of 𝑢 = z𝑘 over the upper hemisphere of a sphere of radius R centered at the origin
with normal vector 𝑟ˆ is given by
2π 3
a) R
3
4π 3
b) R
3
c) 2πR3
d) 4πR3
95
96 LECTURE 32. SURFACE INTEGRAL OF A VECTOR FIELD
Week IV
Fundamental Theorems
97
99
In this week’s lectures, we learn about the fundamental theorems of vector calculus. These include
the gradient theorem, the divergence theorem, and Stokes’ theorem. We show how these theorems
are used to derive continuity equations, define the divergence and curl in coordinate-free form, and
convert the integral version of Maxwell’s equations to differential form.
100
Lecture 33
Gradient theorem
View this lecture on YouTube
The gradient theorem is a generalization of the fundamental theorem of calculus for line integrals.
Let ∇φ be the gradient of a scalar field φ, and let C be a directed curve that begins at the point 𝑟1 and
ends at 𝑟2 . Suppose we can parameterize the curve C by 𝑟 = 𝑟 (t), where t1 ≤ t ≤ t2 , 𝑟 (t1 ) = 𝑟1 , and
𝑟 (t2 ) = 𝑟2 . Then using the chain rule in the form
d d𝑟
φ(𝑟 ) = ∇φ(𝑟 ) · ,
dt dt
dφ = ∇φ · d𝑟,
so that ˆ ˆ
∇φ · d𝑟 = dφ = φ(𝑟2 ) − φ(𝑟1 ).
C C
We have thus shown that the line integral of the gradient of a function is path independent, depending
only on the endpoints of the curve. In particular, we have the general result that
˛
∇φ · d𝑟 = 0
C
ˆ ˆ (1,1)
1 2 1 2 2
2
𝑟 · d𝑟 = ∇( x + y ) · d𝑟 = ( x + y ) = 1.
C 2 C 2 (0,0)
101
102 LECTURE 33. GRADIENT THEOREM
a) Compute ∇φ.
´
b) Compute C ∇φ · d𝑟 from (0, 0, 0) to (1, 1, 1) using the gradient theorem.
´
c) Compute C ∇φ · d𝑟 along the lines segments (0, 0, 0) to (1, 0, 0) to (1, 1, 0) to (1, 1, 1).
For a vector field 𝑢 defined on R3 , except perhaps at isolated singularities, the following conditions
are equivalent:
1. ∇ × 𝑢 = 0;
∂φ ∂φ
= x 2 (1 + y3 ), = y2 (1 + x 3 ).
∂x ∂y
where f = f (y) is a function that depends only on y. Differentiating φ with respect to y and using the
second equation, we obtain
x 3 y2 + f 0 ( y ) = y2 (1 + x 3 ) or f 0 ( y ) = y2 .
One more integration results in f (y) = y3 /3 + c, with c constant, and the scalar field is given by
1 3
φ( x, y) = ( x + x3 y3 + y3 ) + c.
3
103
104 LECTURE 34. CONSERVATIVE VECTOR FIELDS
a) 0
b) 1
c) 2
d) 3
˛
2. Let 𝑢 = y𝑖 + x𝑗. The value of 𝑢 · d𝑟, where C is the unit circle centered at the origin, is given by
C
a) 0
b) 1
c) 2
d) 3
a) ( x + y)2 + z
b) ( x − y)2 + z
c) x2 + xy + y2 + z
d) x2 − xy + y2 + z
105
106 LECTURE 34. CONSERVATIVE VECTOR FIELDS
Lecture 35
Divergence theorem
View this lecture on YouTube
Let 𝑢 be a differentiable vector field defined inside and on a smooth closed surface S enclosing a
volume V. The divergence theorem states that the integral of the divergence of 𝑢 over the enclosed
volume is equal to the flux of 𝑢 through the bounding surface; that is,
ˆ ˛
(∇ · 𝑢) dV = 𝑢 · d𝑆.
V S
We first prove the divergence theorem for a rectangular solid with sides parallel to the axes. Let
the rectangular solid be defined by a ≤ x ≤ b, c ≤ y ≤ d, and e ≤ z ≤ f . With 𝑢 = u1 𝑖 + u2 𝑗 + u3 𝑘,
the volume integral over V becomes
ˆ ˆ f ˆ dˆ b
∂u1 ∂u ∂u
(∇ · 𝑢) dV = + 2+ 3 dx dy dz.
V e c a ∂x ∂y ∂z
The three terms in the integral can be integrated separately using the fundamental theorem of calculus.
Each term in succession is integrated as
ˆ f ˆ d ˆ b
! ˆ f ˆ d
∂u1
dx dy dz = (u1 (b, y, z) − u1 ( a, y, z)) dy dz;
e c a ∂x e c
ˆ f ˆ b ˆ d
! ˆ fˆ b
∂u2
dy dx dz = (u2 ( x, d, z) − u2 ( x, c, z)) dx dz;
e a c ∂y e a
ˆ dˆ b ˆ f
! ˆ dˆ b
∂u3
dz dx dy = (u3 ( x, y, f ) − u3 ( x, y, e)) dx dy.
c a e ∂z c a
The integrals on the right-hand-sides correspond exactly to flux integrals over opposite sides of the
rectangular solid. For example, the side located at x = b corresponds with d𝑆 = 𝑖 dy dz and the side
located at x = a corresponds with d𝑆 = −𝑖 dy dz. Summing all three integrals yields the divergence
theorem for the rectangular solid.
Now, given any volume enclosed by a smooth surface, we can subdivide the volume by a very fine
three-dimensional rectangular grid and apply the above result to each rectangular solid in the grid. All
the volume integrals over the rectangular solids add. The internal rectangular solids, however, share
connecting side faces through which the flux integrals cancel, and the only flux integrals that remain
are those from the rectangular solids on the boundary of the volume with outward facing surfaces.
The result is the divergence theorem for any volume V enclosed by a smooth surface S.
107
108 LECTURE 35. DIVERGENCE THEOREM
Test the divergence theorem using 𝑢 = xy 𝑖 + yz 𝑗 + zx 𝑘 for a cube of side L lying in the first octant with a
vertex at the origin.
Here, Cartesian coordinates are appropriate and we use ∇ · 𝑢 = y + z + x. We have for the left-hand
side of the divergence theorem,
ˆ ˆ Lˆ Lˆ L
(∇ · 𝑢) dV = ( x + y + z) dx dy dz
V 0 0 0
= L /2 + L /2 + L4 /2
4 4
= 3L4 /2.
For the right-hand side of the divergence theorem, the flux integral only has nonzero contributions
from the three sides located at x = L, y = L and z = L. The corresponding unit normal vectors are 𝑖,
𝑗 and 𝑘, and the corresponding integrals are
˛ ˆ Lˆ L ˆ Lˆ L ˆ Lˆ L
𝑢 · d𝑆 = Ly dy dz + Lz dx dz + Lx dx dy
S 0 0 0 0 0 0
= L /2 + L4 /2 + L4 /2
4
= 3L4 /2.
109
110 LECTURE 36. DIVERGENCE THEOREM: EXAMPLE I
2. Compute the flux integral of 𝑟 = x𝑖 + y𝑗 + z𝑘 over a square box with side lengths equal to L by
applying the divergence theorem to convert the flux integral into a volume integral.
Test the divergence theorem using 𝑢 = r2 𝑟ˆ for a sphere of radius R centered at the origin.
To compute the left-hand-side of the divergence theorem, we recall the formula for the divergence of
a vector field 𝑢 in spherical coordinates:
1 ∂ 2 1 ∂ 1 ∂uφ
∇·𝑢 = 2
(r ur ) + (sin θuθ ) + .
r ∂r r sin θ ∂θ r sin θ ∂φ
1 d 4
∇·𝑢 = r = 4r.
r2 dr
111
112 LECTURE 37. DIVERGENCE THEOREM: EXAMPLE II
2. Compute the flux integral of 𝑟 = x𝑖 + y𝑗 + z𝑘 over a sphere of radius R by applying the divergence
theorem to convert the flux integral into a volume integral.
Continuity equation
View this lecture on YouTube
The divergence theorem is often used to derive a continuity equation, which expresses the local con-
servation of some physical quantity such as mass or electric charge. Here, we derive the continuity
equation for a compressible fluid such as a gas. Let ρ(𝑟, t) be the fluid density at position 𝑟 and time
t, and 𝑢(𝑟, t) be the fluid velocity. We will assume no sources or sinks of fluid. We place a small test
volume V in the fluid flow and consider the change in the fluid mass M inside V.
The fluid mass M in V varys because of the mass flux through the surface S surrounding V, and
one has ˛
dM
=− ρ𝑢 · d𝑆.
dt S
Taking the time derivative inside the integral on the left-hand side, and combining the two integrals
yields ˆ
∂ρ
+ ∇ · (ρ𝑢) dV = 0.
V ∂t
Since this integral vanishes for any test volume placed in the fluid, the integrand itself must be zero,
and we have derived the continuity equation
∂ρ
+ ∇ · (ρ𝑢) = 0.
∂t
For an incompressible fluid for which the density ρ is uniform and constant, the continuity equation
reduces to
∇ · 𝑢 = 0.
113
114 LECTURE 38. CONTINUITY EQUATION
∂ρ
+ 𝑢 · ∇ρ + ρ∇ · 𝑢 = 0.
∂t
2. The electric charge density (charge per unit volume) is give by ρ(𝑟, t) and the volume current
density (current per unit area) is given by 𝐽 (𝑟, t). Local conservation of charge states that the time
rate of change of the total charge within a volume is equal to the negative of the charge flowing out of
that volume, resulting in the equation
ˆ ˛
d
ρ(𝑟, t) dV = − 𝐽 · d𝑆.
dt V S
From this law of charge conservation, derive the electrodynamics continuity equation.
a) 0
√
b) πRL R2 + L2
√
c) 2πRL R2 + L2
√
d) 3πRL R2 + L2
˛
2. The surface integral 𝑟 · d𝑆 over a right circular cylinder of radius R and length L is equal to
S
a) 0
b) πR2 L
c) 2πR2 L
d) 3πR2 L
d) 𝑢 = ( x + y)2 𝑖 + ( x − y)2 𝑗
115
116 LECTURE 38. CONTINUITY EQUATION
Lecture 39
Green’s theorem
View this lecture on YouTube
Green’s theorem is a two-dimensional version of Stokes’ theorem, and serves as a simpler introduction.
Let 𝑢 = u1 ( x, y)𝑖 + u2 ( x, y)𝑗 be a differentiable two-dimensional vector field defined on the x-y plane.
Green’s theorem relates an area integral over S in the plane to a line integral around C surrounding
this area, and is given by ˆ ˛
∂u2 ∂u
− 1 dS = (u1 dx + u2 dy).
S ∂x ∂y C
is given by
ˆ ˆ dˆ b ˆ bˆ d
∂u2 ∂u ∂u2 ∂u1 c
− 1 dS = dx dy − dy dx.
S ∂x ∂y c a ∂x a c ∂y
a b
x
The inner integrals can be done using the fundamental theorem of calculus, and we obtain
ˆ ˆ d ˆ b ˛
∂u2 ∂u
− 1 dS = [u2 (b, y) − u2 ( a, y)] dy + [u1 ( x, c) − u1 ( x, d)] dx = (u1 dx + u2 dy).
S ∂x ∂y c a C
Note that the line integral is done so that the bounded area is always to the left, which means coun-
terclockwise.
Now, given any closed smooth curve in the x-y plane enclosing an area, we can subdivide the
area by a very fine two-dimensional rectangular grid and apply the above result to each rectangle
in the grid. All the area integrals over the internal rectangles add. The internal rectangles share
connecting sides over which the line integrals cancel, and the only line integrals that remain are those
that approximate the given bounding curve. The result is Green’s theorem for any area S in the plane
bounded by a curve C.
117
118 LECTURE 39. GREEN’S THEOREM
2. Test Green’s theorem using 𝑢 = −y𝑖 + x𝑗 for a circle of radius R centered at the origin.
Stokes’ theorem
View this lecture on YouTube
∂u2 ∂u
− 1 = (∇ × 𝑢) · 𝑘;
∂x ∂y
and with d𝑆 = 𝑘 dS and u1 dx + u2 dy = 𝑢 · d𝑟, Green’s theorem can be rewritten in the form
ˆ ˛
(∇ × 𝑢) · d𝑆 = 𝑢 · d𝑟.
S C
This three-dimensional extension of Green’s theorem is called Stokes’ theorem. Here, S is a general
three-dimensional surface bounded by a closed spatial curve C. A simple example would be a hemi-
sphere located anywhere in space bounded by a circle. The orientation of the closed curve and the
normal vector to the surface should follow the right-hand rule. If your fingers of your right hand point
in the direction of the line integral, your thumb should point in the direction of the normal vector to
the surface.
119
120 LECTURE 40. STOKES’ THEOREM
a) y-z plane;
b) z-x plane.
2. Test Stokes’ theorem using 𝑢 = −y𝑖 + x𝑗 for a hemisphere of radius R with z > 0 bounded by a
circle of radius R lying in the x-y plane with center at the origin.
˛
1. Let 𝑢 = −y𝑖 + x𝑗. Compute 𝑢 · d𝑟 for the quarter circle
y
C
of radius R as illustrated. Here, it is simpler to apply Stokes’
theorem to compute an area integral. The answer is 0
0 R
a) 0 x
1 2
b) 2 πR
c) πR2
d) 2πR2
ˆ
−y x
2. Let 𝑢 = 𝑖 + 𝑗. Compute the value of (∇ × 𝑢) · d𝑆 over a circle of radius R centered
x 2 + y2 x 2 + y2 S
at the origin in the x-y plane with normal vector 𝑘. Here, because 𝑢 is singular at 𝑟 = 0, it is necessary
to apply Stokes’ theorem and compute a line integral. The answer is
a) 0
b) π
c) 2π
d) 4π
˛
3. Let 𝑢 = − x2 y𝑖 + xy2 𝑗. Compute 𝑢 · d𝑟 for a unit square in the first quadrant with vertex at the
C
origin. Here, it is simpler to compute an area integral. The answer is
a) 0
1
b)
3
2
c)
3
d) 1
121
122 LECTURE 40. STOKES’ THEOREM
Lecture 41
With 𝑢 a differentiable vector field defined inside and on a smooth closed surface S enclosing a
volume V, the divergence theorem states
ˆ ˛
∇ · 𝑢 dV = 𝑢 · d𝑆.
V S
We can limit this expression by shrinking the integration volume down to a point to obtain a coordinate-
free representation of the divergence as
˛
1
∇ · 𝑢 = lim 𝑢 · d𝑆.
V →0 V S
Picture V as the volume of a small sphere with surface S and 𝑢 as the velocity field of some fluid of
constant density. Then if the flow of fluid into the sphere is equal to the flow of fluid out of the sphere,
the surface integral will be zero and ∇ · 𝑢 = 0. However, if more fluid flows out of the sphere than in,
then ∇ · 𝑢 > 0 and if more fluid flows in than out, ∇ · 𝑢 < 0. Positive divergence indicates a source
of fluid and negative divergence indicates a sink of fluid.
Now consider a surface S bounded by a curve C. Stokes’ theorem states that
ˆ ˛
(∇ × 𝑢) · d𝑆 = 𝑢 · d𝑟.
S C
We can limit this expression by shrinking the integration surface down to a point. With 𝑛 a unit
normal vector to the surface, with direction given by the right-hand rule, we obtain
˛
1
(∇ × 𝑢) · 𝑛 = lim 𝑢 · d𝑟.
S →0 S C
Picture S as the area of a small disk bounded by a circle C and again picture 𝑢 as the velocity field
of a fluid. The line integral of 𝑢 · d𝑟 around the circle C is called the flow’s circulation and measures
the swirl of the fluid around the center of the circle. The vector field 𝜔 = ∇ × 𝑢 is called the vorticity
of the fluid. The vorticity is most decidedly nonzero in a wirling (say, turbulent) fluid, composed of
eddies of all different sizes.
123
124 LECTURE 41. MEANING OF THE DIVERGENCE AND THE CURL
∂𝑢 1
+ (𝑢 · ∇)𝑢 = − ∇p + ν∇2 𝑢,
∂t ρ
a) By taking the divergence of the Navier-Stokes equation, derive the following equation for the
pressure in terms of the velocity field:
∂ui ∂u j
∇2 p = − ρ .
∂x j ∂xi
b) By taking the curl of the Navier-Stokes equation, derive the vorticity equation
∂𝜔
+ (𝑢 · ∇)𝜔 = (𝜔 · ∇)𝑢 + ν∇2 𝜔.
∂t
You can use all the vector identities presented in these lecture notes, but you will need to prove
that
1
𝑢 × (∇ × 𝑢) = ∇(𝑢 · 𝑢) − (𝑢 · ∇)𝑢.
2
Maxwell’s equations
View this lecture on YouTube
where 𝐸 and 𝐵 are the electric and magnetic fields, qenc and Ienc are the charge or current enclosed
by the bounding surface or curve, and ε 0 and µ0 are dimensional constants called the permittivity and
permeability of free space.
The transformation from integral to differential form is a straightforward application of both the
divergence and Stokes’ theorem. The charge q and the current I are related to the charge density ρ
and the current density 𝐽 by ˆ ˆ
q= ρ dV, I= 𝐽 · d𝑆.
V S
We apply the divergence theorem to the surface integrals and Stokes’ theorem to the line integrals,
replace qenc and Ienc by integrals, and combine results into single integrals to obtain
ˆ ˆ
ρ ∂𝐵
∇·𝐸− dV = 0, ∇×𝐸+ · d𝑆 = 0,
V ε0 S ∂t
ˆ ˆ
∂𝐸
(∇ · 𝐵 ) dV = 0, ∇ × 𝐵 − µ0 𝐽 + ε 0 · d𝑆 = 0.
V S ∂t
Since the integration volumes and surfaces are of arbitrary size and shape, the integrands must vanish
and we obtain the aesthetically appealing differential forms for Maxwell’s equations given by
ρ ∂𝐵
∇·𝐸 = , ∇×𝐸 = − ,
ε0 ∂t
∂𝐸
∇ · 𝐵 = 0, ∇ × 𝐵 = µ0 𝐽 + ε 0 .
∂t
125
126 LECTURE 42. MAXWELL’S EQUATIONS
determine the magnetic field of a current carrying infinite wire placed on the z-axis. Assume the
magnetic field has cylindrical symmetry.
127
Appendix A
The first row of matrix A has elements a11 and a12 ; the second row has elements a21 and a22 . The
first column has elements a11 and a21 ; the second column has elements a12 and a22 . Matrices can be
multiplied by scalars and added. This is done element-by-element as follows:
! !
ka11 ka12 a11 + b11 a12 + b12
kA = , A+B = .
ka21 ka22 a21 + b21 a22 + b22
Matrices can also be multiplied. Matrix multiplication does not commute, and two matrices can be
multiplied only if the number of columns of the matrix on the left equals the number of rows of the
matrix on the right. One multiplies matrices by going across the rows of the first matrix and down the
columns of the second matrix. The two-by-two example is given by
! ! !
a11 a12 b11 b12 a11 b11 + a12 b21 a11 b12 + a12 b22
= .
a21 a22 b21 b22 a21 b11 + a22 b21 a21 b12 + a22 b22
Making use of the definition of matrix multiplication, a system of linear equations can be written
in matrix form. For instance, a general system with two equations and two unknowns is given by
Ax = b.
129
130 APPENDIX A. MATRIX ADDITION AND MULTIPLICATION
Appendix B
AA−1 = A−1 A = I,
that is, multiply the diagonal elements and subtract the product of the off-diagonal elements.
The three-by-three determinant is given in terms of two-by-two determinants as
a11 a12 a13
a a23 a a23 a a22
22 21 21
a21 a22 a23 = a11 − a12 + a13 .
a32 a33 a31 a33 a31 a32
a31 a32 a33
The rule here is to go across the first row of the matrix, multiplying each element in the row by the
determinant of the matrix obtained by crossing out that element’s row and column, and adding the
results with alternating signs.
We will need to invert two-by-two and three-by-three matrices, but this will mainly be simple
because our matrices will be orthogonal. The rows (or columns) of an orthogonal matrix, considered
as components of a vector, are orthonormal. For example, the following two matrices are orthogonal
matrices:
! sin θ cos φ sin θ sin φ cos θ
cos θ sin θ
, cos θ cos φ cos θ sin φ − sin θ .
− sin θ cos θ
− sin φ cos φ 0
For the first matrix, the row vectors 𝑟ˆ = cos θ𝑖 + sin θ𝑗 and 𝜃ˆ = − sin θ𝑖 + cos θ𝑗 have unit length and
are orthogonal, and the same can be said for the rows of the second matrix.
The inverse of an orthogonal matrix is simply given by its transpose, obtained by interchanging
the matrices rows and columns. For example,
! −1 !
cos θ sin θ cos θ − sin θ
= .
− sin θ cos θ sin θ cos θ
131
132 APPENDIX B. MATRIX DETERMINANTS AND INVERSES
For more general two-by-two matrices, the inverse can be found from
! −1 !
a b 1 d −b
= .
c d ad − bc −c a
In words, switch the diagonal elements, negate the off-diagonal elements, and divide by the determi-
nant.
Appendix C
Problem solutions
133
134 APPENDIX C. PROBLEM SOLUTIONS
C
A
B+
+B C
A
(A + B) + C = A + (B + C)
2. Draw a triangle with sides composed of the vectors 𝐴, 𝐵, and 𝐶, with 𝐶 = 𝐴 + 𝐵. Then draw the
vector 𝑋 pointing from the midpoint of 𝐶 to the midpoint of 𝐵.
B
A
1 1
(𝐴 + 𝐵 ) + 𝑋 = 𝐴 + 𝐵,
2 2
and solving for 𝑋 yields 𝑋 = 21 𝐴. Therefore 𝑋 is parallel to 𝐴 and one-half its length.
135
1.
𝑟2 − 𝑟1 ( x − x1 )𝑖 + ( y2 − y1 )𝑗 + ( z2 − z1 )𝑘
= p2
|𝑟2 − 𝑟1 | ( x2 − x1 )2 + ( y2 − y1 )2 + ( z2 − z1 )2
b) The force on acting on m1 with position vector 𝑟1 due to the mass m2 with position vector 𝑟2 is
written as
𝑟2 − 𝑟1
𝐹 = Gm1 m2
|𝑟2 − 𝑟1 |3
( x2 − x1 )𝑖 + ( y2 − y1 )𝑗 + ( z2 − z1 )𝑘
= Gm1 m2
[( x2 − x1 )2 + (y2 − y1 )2 + (z2 − z1 )2 ]3/2
136 APPENDIX C. PROBLEM SOLUTIONS
1.
a) 𝐴 · 𝐵 = A1 B1 + A2 B2 + A3 B3 = B1 A1 + B2 A2 + B3 A3 = 𝐵 · 𝐴;
b) 𝐴 · (𝐵 + 𝐶 ) = A1 ( B1 + C1 ) + A2 ( B2 + C2 ) + A3 ( B3 + C3 ) = A1 B1 + A1 C1 + A2 B2 + A2 C2 +
A3 B3 + A3 C3 = ( A1 B1 + A2 B2 + A3 B3 ) + ( A1 C1 + A2 C2 + A3 C3 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶;
2. The dot product of a unit vector with itself is one, and the dot product of a unit vector with one
perpendicular to itself is zero. That is,
𝑖 · 𝑖 = 𝑗 · 𝑗 = 𝑘 · 𝑘 = 1; 𝑖 · 𝑗 = 𝑖 · 𝑘 = 𝑗 · 𝑘 = 0; 𝑗 · 𝑖 = 𝑘 · 𝑖 = 𝑘 · 𝑗 = 0.
θ
B
With 𝐶 = 𝐴 − 𝐵, we have
where θ is the angle between vectors 𝐴 and 𝐵. In the usual notation, if A, B and C are the lengths of
the sides of a triangle, and θ is the angle opposite side C, then
C2 = A2 + B2 − 2AB cos θ.
137
1.
a)
𝑖 𝑗 𝑘 𝑖 𝑗 𝑘
𝐴 × 𝐵 = A1 A2 A3 = − B1 B2 B3 = −𝐵 × 𝐴.
B1 B2 B3 A1 A2 A3
b)
𝑖 𝑗 𝑘
𝐴 × (𝐵 + 𝐶 ) = A1 A2 A3
B1 + C1 B2 + C2 B3 + C3
𝑖 𝑗 𝑘 𝑖 𝑗 𝑘
= A1 A2 A3 + A1 A2 A3 = 𝐴 × 𝐵 + 𝐴 × 𝐶.
B1 B2 B3 C1 C2 C3
c)
𝑖 𝑗 𝑘 𝑖 𝑗 𝑘 𝑖 𝑗 𝑘
𝐴 × (k𝐵 ) = A1 A2 A3 = k A1 A2 A3 = kA1 kA2 kA3
kB1 kB2 kB3 B1 B2 B3 B1 B2 B3
= k(𝐴 × 𝐵 ) = (k𝐴) × 𝐵.
2. The cross product of a unit vector with itself is equal to the zero vector, the cross product of a unit
vector with another (keeping the order cyclical in 𝑖, 𝑗, 𝑘) is equal to the third unit vector, and reversing
the order of multiplication changes the sign. That is,
𝑖 × 𝑖 = 0, 𝑗 × 𝑗 = 0, 𝑘 × 𝑘 = 0;
𝑖 × 𝑗 = 𝑘, 𝑗 × 𝑘 = 𝑖, 𝑘 × 𝑖 = 𝑗;
𝑖 × (𝑖 × 𝑘 ) = −𝑖 × 𝑗 = −𝑘,
(𝑖 × 𝑖) × 𝑘 = 0 × 𝑘 = 0.
138 APPENDIX C. PROBLEM SOLUTIONS
1. c. As an example, 𝑖 × (𝑖 × 𝑗 ) 6= (𝑖 × 𝑖) × 𝑗.
2. b.
𝑖 𝑗 𝑘
(𝐴 × 𝐵 ) · 𝑗 = a1 a2 a3 · 𝑗 = a3 b1 − a1 b3 .
b1 b2 b3
3. d.
𝑖 × (𝑗 × 𝑘 ) = 𝑖 × 𝑖 = 0, (𝑖 × 𝑗 ) × 𝑘 = 𝑘 × 𝑘 = 0, (𝑖 × 𝑖) × 𝑗 = 0 × 𝑗 = 0, 𝑖 × (𝑖 × 𝑗 ) = 𝑖 × 𝑘 = −𝑗.
139
1. We first compute the displacement vector between (1, 1, 1) and (2, 3, 2):
Choosing a point on the line to be (1, 1, 1), the parametric equation for the line is given by
The line crosses the x = 0 and z = 0 planes when t = −1 at the intersection point (0, −1, 0), and
crosses the y = 0 plane when t = −1/2 at the intersection point (1/2, 0, 1/2).
140 APPENDIX C. PROBLEM SOLUTIONS
1. We find two vectors parallel to the plane defined by the three points, (−1, −1, −1), (1, 1, 1), and
(1, −1, 0):
The intersection of this plane with the z = 0 plane forms the line given by y = − x.
141
1. d. Write the parametric equation as 𝑟 = 𝑟0 + 𝑢t. Using the point (0, 1, 1), we take 𝑟0 = 𝑗 + 𝑘 and
from both points (0, 1, 1) and (1, 0, −1), we have 𝑢 = (1 − 0)𝑖 + (0 − 1)𝑗 + (−1 − 1)𝑘 = 𝑖 − 𝑗 − 2𝑘.
Therefore 𝑟 = 𝑗 + 𝑘 + (𝑖 − 𝑗 − 2𝑘 )t = t𝑖 + (1 − t)𝑗 + (1 − 2t)𝑘.
2. a. The line is parameterized as 𝑟 = t𝑖 + (1 − t)𝑗 + (1 − 2t)𝑘. The intersection with the z = 0 plane
1 1 1 1
occurs when t = 1/2 so that 𝑟 = 𝑖 + 𝑗. The intersection point is therefore ( , , 0).
2 2 2 2
3. d. We first find the parametric equation for the plane. From the points (1, 1, 1), (1, 1, 2) and (2, 1, 1),
we construct the two displacement vectors
𝑁 = 𝑠1 × 𝑠2 = 𝑘 × (𝑖 − 𝑘 ) = 𝑘 × 𝑖 − 𝑘 × 𝑘 = 𝑗.
or y = 1. This plane is parallel to the x-z plane and when z = 0 is simply the line y = 1 for all values
of x. Note now that we could have guessed this result because all three points defining the plane are
located at y = 1.
142 APPENDIX C. PROBLEM SOLUTIONS
1. We have
2.
a) Now δij A j is the sum of three terms, where only the j = i term is nonzero. Therefore, δij A j = Ai .
3. We make use of the identities δii = 3 and δik δjk = δij . For the Kronecker delta, the order of the
indices doesn’t matter. We also use
eijk elmn = δil (δjm δkn − δjn δkm ) − δim (δjl δkn − δjn δkl ) + δin (δjl δkm − δjm δkl ).
a)
eijk eimn = δii (δjm δkn − δjn δkm ) − δim (δji δkn − δjn δki ) + δin (δji δkm − δjm δki )
= 3(δjm δkn − δjn δkm ) − (δjm δkn − δjn δkm ) + (δjn δkm − δjm δkn )
= δjm δkn − δjn δkm .
1.
𝐴 × (𝐵 × 𝐶 ) + 𝐵 × (𝐶 × 𝐴) + 𝐶 × (𝐴 × 𝐵 )
= [(𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶 ] + [(𝐵 · 𝐴)𝐶 − (𝐵 · 𝐶 )𝐴] + [(𝐶 · 𝐵 )𝐴 − (𝐶 · 𝐴)𝐵 ]
= [(𝐴 · 𝐶 )𝐵 − (𝐶 · 𝐴)𝐵 ] + [(𝐵 · 𝐴)𝐶 − (𝐴 · 𝐵 )𝐶 ] + [(𝐶 · 𝐵 )𝐴 − (𝐵 · 𝐶 )𝐴]
= 0.
1. c. The relevant formula from the lecture is eijk eilm = δjl δkm − δjm δkl . To apply this formula, we need
to rearrange the indices keeping cyclical order:
3. c. Use the facts that 𝐴 × 𝐵 is orthogonal to both 𝐴 and 𝐵, 𝐴 · 𝐵 is zero if 𝐴 and 𝐵 are orthogonal,
and 𝐴 × 𝐵 is zero if 𝐴 and 𝐵 are parallel.
145
f (t + e, x + δ) = f (t, x ) + e f t ( x, t) + δ f x ( x, t).
∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )2
2
y
1 2 3
x
148 APPENDIX C. PROBLEM SOLUTIONS
1.
∂f ∂ f ∂x ∂ f ∂y
= +
∂r ∂x ∂r ∂y ∂r
= ye xy cos θ + xe xy sin θ
2 cos θ sin θ 2 cos θ sin θ
= r sin θ cos θer + r sin θ cos θer
2 cos θ sin θ
= 2r sin θ cos θer ,
and
∂f ∂ f ∂x ∂ f ∂y
= +
∂θ ∂x ∂θ ∂y ∂θ
= ye xy (−r sin θ ) + xe xy (r cos θ )
2 cos θ sin θ 2 cos θ sin θ
= −r2 sin2 θer + r2 cos2 θer
2 cos θ sin θ
= r2 (cos2 θ − sin2 θ )er .
2 cos θ sin θ
b) Substituting for x and y, we have f = er . Then
∂f 2
= 2r cos θ sin θer cos θ sin θ ,
∂r
∂f 2
= r2 (cos2 θ − sin2 θ )er cos θ sin θ .
∂θ
149
−by − cz − ax − cz − ax − by
x= , y= , z= .
a b c
−by − cz − dt − ax − cz − dt − ax − by − dt − ax − by − cz
x= , y= , z= , t= .
a b c d
∂x b ∂y c ∂z d ∂t a
=− , =− , =− , =− ;
∂y a ∂z b ∂t c ∂x d
Apparently an odd number of products yields −1 and an even number of products yields +1.
150 APPENDIX C. PROBLEM SOLUTIONS
∂f −x
= 2 ;
∂x ( x + y2 + z2 )3/2
∂2 f 3xy
= 2
∂x∂y ( x + y2 + z2 )5/2
2. a. From the data points (0, 1), (1, 3), (2, 3) and (3, 4), we compute
3. d. Let f = f ( x, y) with x = r cos θ and y = r sin θ. Then application of the chain rule results in
∂f ∂ f ∂x ∂ f ∂y
= +
∂θ ∂x ∂θ ∂y ∂θ
∂f ∂f
= −r sin θ + r cos θ
∂x ∂y
∂f ∂f
= −y + x .
∂x ∂y
151
1.
∇(r2 ) = 2𝑟.
1
b) Let φ( x, y, z) = p . The gradient is given by
x2 + y2 + z2
!
1
∇φ = ∇ p
x 2 + y2 + z2
x y z
=− 2 2 2 3/2
𝑖− 2 2 2 3/2
𝑗− 2 𝑘.
(x + y + z ) (x + y + z ) ( x + y + z2 )3/2
2
1.
∂ ∂ ∂
∇·𝐹 = ( xy) + (yz) + (zx )
∂x ∂y ∂z
= y + z + x = x + y + z.
∂ ∂ ∂
∇·𝐹 = (yz) + ( xz) + ( xy) = 0.
∂x ∂y ∂z
153
1.
1. We have
! ! !
∂2 ∂2 ∂2
21 1 1 1
∇ = 2 p + 2 p + 2 p .
r ∂x x 2 + y2 + z2 ∂y x 2 + y2 + z2 ∂z x 2 + y2 + z2
We can compute the derivatives with respect to x and use symmetry to find the other two terms. We
have !
∂ 1 −x
= ;
( x2 + y2 + z2 )3/2
p
∂x x 2 + y2 + z2
and
3( x 2 + y2 + z2 )
21 3
∇ =− 2 +
r ( x + y2 + z2 )3/2 ( x2 + y2 + z2 )5/2
3 3
=− 2 + = 0.
( x + y2 + z2 )3/2 ( x2 + y2 + z2 )3/2
155
1. d. We have
1 1
∇ =∇
r2 x 2 + y2 + z2
−2x −2y −2z
= 2 𝑖+ 2 𝑗+ 2 𝑘
( x + y2 + z2 )2 ( x + y2 + z2 )2 ( x + y2 + z2 )2
2𝑟
=− 4.
r
2. b. We use !
x𝑖 + y𝑗 + z𝑘
∇·𝐹 = ∇· p .
x 2 + y2 + z2
Now,
!
x2 + y2 + z2 − x2 ( x2 + y2 + z2 )−1/2
p
∂ x
=
x 2 + y2 + z2
p
∂x x 2 + y2 + z2
1 x2
= − 3,
r r
and similarly for the partial derivatives with respect to y and z. Adding all three partial derivatives
results in
3 x 2 + y2 + z2 3 1 2
∇·𝐹 = − = − = .
r r3 r r r
3.
b. We have
𝑖 𝑗 𝑘
∇ × 𝑟 = ∂/∂x ∂/∂z = 0.
∂/∂y
x y z
156 APPENDIX C. PROBLEM SOLUTIONS
1.
a) We compute:
∂
∇ · ( f 𝑢) = ( f ui )
∂xi
∂f ∂u
= u +f i
∂xi i ∂xi
= 𝑢 · ∇ f + f ∇ · 𝑢.
Therefore, ∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢.
2.
d2 x1 ∂u ∂u dx ∂u dx ∂u dx
2
= 1+ 1 1+ 1 2+ 1 3
dt ∂t ∂x1 dt ∂x2 dt ∂x3 dt
∂u1 ∂u1 ∂u1 ∂u1
= + u1 + u2 + u3 .
∂t ∂x1 ∂x2 ∂x3
d2 x2 ∂u ∂u ∂u ∂u d2 x3 ∂u ∂u ∂u ∂u
2
= 2 + u1 2 + u2 2 + u3 2 , 2
= 3 + u1 3 + u2 3 + u3 3 .
dt ∂t ∂x1 ∂x2 ∂x3 dt ∂t ∂x1 ∂x2 ∂x3
d2 𝑟 ∂𝑢
2
= + 𝑢 · ∇𝑢.
dt ∂t
This expression is called the material acceleration, and is found in the Navier-Stokes equation of
fluid mechanics.
158 APPENDIX C. PROBLEM SOLUTIONS
∂𝐵 ∂𝐸
∇ · 𝐸 = 0, ∇ · 𝐵 = 0, ∇×𝐸 = − , ∇ × 𝐵 = µ 0 e0 .
∂t ∂t
Take the curl of the fourth Maxwell’s equation, and commute the time and space derivatives to obtain
∂
∇ × ( ∇ × 𝐵 ) = µ 0 e0 (∇ × 𝐸 ),
∂t
∂
∇ ( ∇ · 𝐵 ) − ∇ 2 𝐵 = µ 0 e0 (∇ × 𝐸 ).
∂t
Apply the second Maxwell’s equation to the left-hand-side, and the third Maxwell’s equation to the
right-hand-side. Rearranging terms, we obtain the three-dimensional wave equation given by
∂2 𝐵
= c2 ∇2 𝐵,
∂t2
√
where c = 1/ µ0 e0 .
159
Setting 𝑣 = 𝑢, we have
∇(𝑢 · 𝑢) = 2(𝑢 · ∇)𝑢 + 2𝑢 × (∇ × 𝑢).
Therefore,
1
∇(𝑢 · 𝑢) = 𝑢 × (∇ × 𝑢) + (𝑢 · ∇)𝑢.
2
2. c. The curl of a gradient (a. and d.) and the divergence of a curl (b.) are zero. The divergence of a
gradient (c) is the Laplacian and is not always zero.
∂𝐵
Maxwell’s equation ∇ × 𝐸 = − then results in
∂t
∂𝐵
= − cos (z − ct)𝑗,
∂t
1
𝐵= sin (z − ct)𝑗.
c
160 APPENDIX C. PROBLEM SOLUTIONS
To determine the mass of the cube, we place our coordinate system so that one corner of the cube is at
the origin and the adjacent corners are on the positive x, y and z axes. We assume that the density of
the cube is only a function of z, with
z
ρ ( z ) = ρ1 + ( ρ2 − ρ1 ).
L
1.
1
x = y/3
0.8
0.6
y
0.4
0.2
x = 1 + y/3
0
0 0.2 0.4 0.6 0.8 1 1.2
x
ˆ 1 ˆ 1+y/3 ˆ 1
x=1+y/3
2 x3 y
x y dx dy = dy
0 y/3 0 3 x=y/3
ˆ 3 !
1 1 1 3
1
= y 1+ y − y dy
3 0 3 3
ˆ
1 1
1
= y 1 + y + y2 dy
3 0 3
1
1 1 2 1 3 1
y + y + y4
=
3 2 3 12 0
1 1 1 1 11
= + + = .
3 2 3 12 36
162 APPENDIX C. PROBLEM SOLUTIONS
ˆ 1ˆ 1 ˆ 1 ˆ 1 ˆ 1
!2 2
1 1
xy dx dy = x dx y dy = x dx = = .
0 0 0 0 0 2 4
2. b. To determine the mass of the cube, we place our coordinate system so that one corner of the
cube is at the origin and the adjacent corners are on the positive x, y and z axes. We assume that the
density of the cube is only a function of z, with
ρ(z) = (1 + z) g/cm3 .
3. d. We draw a picture of the triangle and illustrate the chosen direction of integration.
0.6
y
0.4
0.2
0 0.5 1 1.5 2
x
1.
ˆ 𝜃ˆ and 𝑖, 𝑗 is given by
a) The matrix form for the relationship between 𝑟,
! ! !
𝑟ˆ cos θ sin θ 𝑖
= .
𝜃ˆ − sin θ cos θ 𝑗
Therefore,
ˆ
𝑖 = cos θ 𝑟ˆ − sin θ 𝜃, ˆ
𝑗 = sin θ 𝑟ˆ + cos θ 𝜃.
b) The matrix form for the relationship between ∂ f /∂r, ∂ f /∂θ and ∂ f /∂x, ∂ f /∂y is given by
! ! !
∂ f /∂r cos θ sin θ ∂ f /∂x
= .
∂ f /∂θ −r sin θ r cos θ ∂ f /∂y
Therefore,
∂f ∂f sin θ ∂ f ∂f ∂f cos θ ∂ f
= cos θ − , = sin θ + .
∂x ∂r r ∂θ ∂y ∂r r ∂θ
2. We have
r𝑟ˆ = r cos θ 𝑖 + r sin θ 𝑗 = x𝑖 + y𝑗,
and
r𝜃ˆ = −r sin θ 𝑖 + r cos θ 𝑗 = −y𝑖 + x𝑗.
164 APPENDIX C. PROBLEM SOLUTIONS
1. We have
𝑙 = 𝑟 × 𝑝 = 𝑟 × (m𝑟˙ ) = mr𝑟ˆ × (ṙ𝑟ˆ + r θ̇ 𝜃ˆ ) = mr2 θ̇ (𝑟ˆ × 𝜃ˆ ).
σ (r ) = ρ0 + (ρ1 − ρ0 )(r/R).
Integrating the mass density in polar coordinates to find the total mass of the disk, we have
ˆ 2π ˆ R
M= [ρ0 + (ρ1 − ρ0 )(r/R)] r dr dθ
0 0
r = R
ρ0 r 2 ( ρ − ρ0 )r 3
= 2π + 1
2 3R r =0
1
= πR2 (ρ0 + 2ρ1 ).
3
Therefore, ˆ ∞ 2 √
I= e− x dx = π.
−∞
166 APPENDIX C. PROBLEM SOLUTIONS
d𝜃ˆ
= − cos θ𝑖 − sin θ𝑗 = −𝑟.
ˆ
dθ
σ = σ (r ) = (10 − 9r ) g/cm2 .
The mass is found by integrating in polar coordinates using dx dy = r dr dθ. Calculating in grams, we
have
ˆ 2π ˆ 1
M= (10 − 9r )r dr dθ
0 0
ˆ 2π ˆ 1
= dθ (10 − 9r )r dr
0 0
1
2 3
= 2π (5r − 3r ) = 4π ≈ 12.57 g.
0
167
1. We have
∂ ∂ ∂
∇ = 𝑥ˆ + 𝑦ˆ + 𝑧ˆ
∂x ∂y ∂z
ˆ
∂ sin φ ∂ ˆ
∂ cos φ ∂ ∂
= cos φ𝜌ˆ − sin φ𝜑 cos φ − + sin φ𝜌ˆ + cos φ𝜑 sin φ + + 𝑧ˆ
∂ρ ρ ∂φ ∂ρ ρ ∂φ ∂z
2 ∂ cos φ sin φ ∂ 2 ∂ sin φ cos φ ∂
= 𝜌ˆ cos φ − + sin φ +
∂ρ ρ ∂φ ∂ρ ρ ∂φ
!
2 2φ ∂
∂ sin φ ∂ ∂ cos ∂
+ 𝜑ˆ − sin φ cos φ + + cos φ sin φ + + 𝑧ˆ
∂ρ ρ ∂φ ∂ρ ρ ∂φ ∂z
∂ 1 ∂ ∂
= 𝜌ˆ + 𝜑ˆ + 𝑧ˆ .
∂ρ ρ ∂φ ∂z
a)
1 ∂ 1
∇ · 𝜌ˆ = (ρ) = ;
ρ ∂ρ ρ
b)
∇ · 𝜌ˆ = ∇ · (cos φ𝑖 + sin φ𝑗 )
!
x y
= ∇· p 𝑖+ p 𝑗
x 2 + y2 x 2 + y2
! !
∂ x ∂ y
= p + p
∂x x 2 + y2 ∂y x 2 + y2
x2 + y2 − x2 ( x2 + y2 )−1/2 x2 + y2 − y2 ( x2 + y2 )−1/2
p p
= +
x 2 + y2 x 2 + y2
p p
2 x 2 + y2 − x 2 + y2
=
x 2 + y2
1 1
= p = .
2
x +y 2 ρ
3. ∇ × 𝜌ˆ = 0, ∇ · 𝜑ˆ = 0 and
1 ∂ 1
∇ × 𝜑ˆ = 𝑧ˆ (ρ) = 𝑧.
ˆ
ρ ∂ρ ρ
168 APPENDIX C. PROBLEM SOLUTIONS
1. The spherical coordinate unit vectors can be written in terms of the Cartesian unit vectors by
𝜑ˆ − sin φ cos φ 0 𝑘
The columns (and rows) of the transforming matrix Q are observed to be orthonormal so that Q is an
orthogonal matrix. We have Q−1 = QT so that
𝑖 sin θ cos φ cos θ cos φ − sin φ 𝑟ˆ
𝑗 = sin θ sin φ cos θ sin φ cos φ 𝜃ˆ ;
𝑘 cos θ − sin θ 0 𝜑ˆ
or in expanded form
2. We need the relationship between the Cartesian and the spherical coordinates, given by
= r2 sin θ.
3. We have
ˆ ˆ 2π ˆ π ˆ R
f dV = f (r )r2 sin θ dr dθ dφ
V 0 0 0
ˆ 2π ˆ π ˆ R
= dφ sin θ dθ r2 f (r ) dr
0 0 0
ˆ R
= 4π r2 f (r ) dr,
0
´ 2π ´π π
where we have used 0 dφ = 2π and 0 sin θ dθ = − cos θ 0 = 2.
The average density of the sphere is its mass divided by its volume, given by
1 3
ρ= ρ0 + ρ1 .
4 4
170 APPENDIX C. PROBLEM SOLUTIONS
1. We begin with
Differentiating,
∂𝑟ˆ ˆ
= cos θ cos φ 𝑖 + cos θ sin φ 𝑗 − sin θ 𝑘 = 𝜃;
∂θ
and
∂𝑟ˆ ˆ
= − sin θ sin φ 𝑖 + sin θ cos φ 𝑗 = sin θ 𝜑.
∂φ
1 ∂ 2 2
∇ · 𝑟ˆ = 2
(r ) = , ∇ × 𝑟ˆ = 0;
r ∂r r
1 ∂ cos θ 𝜑ˆ ∂ 𝜑ˆ
∇ · 𝜃ˆ = (sin θ ) = , ∇ × 𝜃ˆ = (r ) = ;
r sin θ ∂θ r sin θ r ∂r r
𝑟ˆ ∂ ˆ
𝜃 ∂ 𝑟ˆ cos θ 𝜃ˆ
∇ · 𝜑ˆ = 0, ∇ × 𝜑ˆ = (sin θ ) − (r ) = − .
r sin θ ∂θ r ∂r r sin θ r
2. c. When 𝑟 = x𝑖, the position vector points along the x-axis. Then 𝑟ˆ also points along the x-axis, 𝜃ˆ
points along the negative z-axis and 𝜑ˆ points along the y-axis. We have (𝑟, ˆ 𝜑ˆ ) = (𝑖, −𝑘, 𝑗 ).
ˆ 𝜃,
where ρ is the object’s mass density. Here, with the density ρ in units of g/cm3 , we have
ρ = ρ(r ) = 10 − r.
The integral is easiest to do in spherical coordinates, and using dx dy dz = r2 sin θ dr dθ dφ, and com-
puting in grams, we have
ˆ 2π ˆ π ˆ 5
M= (10 − r ) r2 sin θ dr dθ dφ
0 0 0
ˆ 5
= 4π (10r2 − r3 ) dr
0
5
10 3 1 4 3125π
= 4π r − r = g
3 4 0 3
≈ 3272 g ≈ 3.3 kg.
172 APPENDIX C. PROBLEM SOLUTIONS
1. In spherical coordinates, on the surface of a sphere of radius R centered at the origin, we have
𝑟 = R𝑟ˆ and d𝑆 = 𝑟ˆ R2 sin θ dθ dφ. Therefore,
˛ ˆ 2π ˆ π
𝑟 · d𝑆 = R3 sin θ dθ dφ = 4πR3 .
S 0 0
174 APPENDIX C. PROBLEM SOLUTIONS
3. a. We perform the flux integral in spherical coordinates. On the surface of the sphere of radius R,
we have
𝑢 = z𝑘 = ( R cos θ )(cos θ 𝑟ˆ − sin θ 𝜃ˆ ),
and
d𝑆 = 𝑟ˆ R2 sin θ dθ dφ.
a) ∇φ = (2xy + y2 )𝑖 + ( x2 + 2xy)𝑗 + 𝑘
´
b) Using the gradient theorem, C ∇φ · d𝑟 = φ(1, 1, 1) − φ(0, 0, 0) = 3.
c) Integrating over the three directed line segments given by (1) (0, 0, 0) to (1, 0, 0); (2) (1, 0, 0) to
(1, 1, 0), and; (3) (1, 1, 0) to (1, 1, 1):
ˆ ˆ ˆ ˆ
∇φ · d𝑟 = ∇φ · d𝑟 + ∇φ · d𝑟 + ∇φ · d𝑟
C C1 C2 C3
ˆ 1 ˆ 1
= 0+ (1 + 2y) dy + dz
0 0
= 3.
176 APPENDIX C. PROBLEM SOLUTIONS
a)
𝑖 𝑗 𝑘
∇ × 𝑢 = ∂/∂x
∂/∂y ∂/∂z
2xy + z2 2yz + x2 2zx + y2
= (2y − 2y)𝑖 + (2z − 2z)𝑗 + (2x − 2x )𝑘
= 0.
b) We need to satisfy
∂φ ∂φ ∂φ
= 2xy + z2 , = 2yz + x2 , = 2zx + y2 .
∂x ∂y ∂z
Take the derivative with respect to y and satsify the second equation:
∂f ∂f
x2 + = 2yz + x2 or = 2yz.
∂y ∂y
Take the derivative of φ = x2 y + xz2 + y2 z + g(z) with respect to z and satisfy the last gradient
equation:
2xz + y2 + g0 (z) = 2zx + y2 or g0 (z) = 0.
2. a. Since ∇ × 𝑢 = ∇ × (y𝑖 + x𝑗 ) = 0, the line integral 𝑢 around any closed curve is zero. By
inspection, we can also observe that 𝑢 = ∇φ, where φ = xy.
3. c. To solve the multiple choice question, we can always take the gradients of the four choices.
Without the advantage of multiple choice, however, we need to compute φ and we do so here. We
solve
∂φ ∂φ ∂φ
= 2x + y, = 2y + x, = 1.
∂x ∂y ∂z
Integrating the first equation with respect to x holding y and z fixed, we find
ˆ
φ= (2x + y) dx = x2 + xy + f (y, z).
∂f ∂f
x+ = 2y + x or = 2y.
∂y ∂y
Another integration results in f (y, z) = y2 + g(z). Finally, differentiating φ with respect to z yields
g0 (z) = 1, or g(z) = z + c. The final solution is
φ( x, y, z) = x2 + xy + y2 + z + c.
1. Using spherical coordinates, let 𝑢 = ur (r, θ, φ)𝑟ˆ + uθ (r, θ, φ)𝜃ˆ + uφ (r, θ, φ)𝜑.
ˆ Then the volume
integral becomes
ˆ ˆ 2π ˆ π ˆ R
1 ∂ 2 1 ∂ 1 ∂uφ
(∇ · 𝑢) dV = (r ur ) + (sin θ uθ ) + r2 sin θ dr dθ dφ.
V 0 0 0 r2 ∂r r sin θ ∂θ r sin θ ∂φ
Each term in the integrand can be integrated once. The first term is integrated as
ˆ 2π ˆ π ˆ R ˆ 2π ˆ π ˆ R
!
1 ∂ 2 2 ∂ 2
(r ur ) r sin θ dr dθ dφ = (r ur ) dr sin θ dθ dφ
0 0 0 r2 ∂r 0 0 0 ∂r
ˆ 2π ˆ π
= ur ( R, θ, φ) R2 sin θ dθ dφ.
0 0
ˆ 2π ˆ π ˆ R ˆ π ˆ R ˆ 2π
!
1 ∂uφ 2 ∂uφ
r sin θ dr dθ dφ = dφ r dr dθ
0 0 0 r sin θ ∂φ 0 0 0 ∂φ
ˆ π ˆ R
= uφ (r, θ, 2π ) − uφ (r, θ, 0) r dr dθ
0 0
= 0,
since uφ (r, θ, 2π ) = uφ (r, θ, 0) because φ is a periodic variable with same physical location at 0 and 2π.
Therefore, we have
ˆ ˆ 2π ˆ π ˛
2
(∇ · 𝑢) dV = ur ( R, θ, φ) R sin θ dθ dφ = 𝑢 · d𝑆,
V 0 0 S
where S is a sphere of radius R located at the origin, with unit normal vector given by 𝑟,
ˆ and infinites-
imal surface area given by dS = R2 sin θ dθ dφ.
179
1. With 𝑢 = x2 y 𝑖 + y2 z 𝑗 + z2 x 𝑘, we use ∇ · 𝑢 = 2xy + 2yz + 2zx. We have for the left-hand side of
the divergence theorem,
ˆ ˆ Lˆ Lˆ L
(∇ · 𝑢) dV = 2 ( xy + yz + zx ) dx dy dz
V 0 0 0
"ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ #
L L L L L L L L L
=2 x dx y dy dz + dx y dy z dz + x dx dy z dz
0 0 0 0 0 0 0 0 0
= 2( L5 /4 + L5 /4 + L5 /4)
= 3L5 /2.
For the right-hand side of the divergence theorem, the flux integral only has nonzero contributions
from the three sides located at x = L, y = L and z = L. The corresponding unit normal vectors are 𝑖,
𝑗 and 𝑘, and the corresponding integrals are
˛ ˆ Lˆ L ˆ Lˆ L ˆ Lˆ L
2 2
𝑢 · d𝑆 = L y dy dz + L z dx dz + L2 x dx dy
S 0 0 0 0 0 0
= L /2 + L5 /2 + L5 /2
5
= 3L5 /2.
Note that the integral is equal to three times the volume of the box and is independent of the placement
and orientation of the coordinate system.
180 APPENDIX C. PROBLEM SOLUTIONS
1 d 1
∇·𝑢 = (r ) = 2 .
r2 dr r
For the right-hand side of the divergence theorem, we have for a sphere of radius R centered at the
origin, d𝑆 = 𝑟ˆ dS and
˛ ˛
1 4πR2
𝑢 · d𝑆 = dS = = 4πR.
S S R R
Note that the integral is equal to three times the volume of the sphere and is independent of the
placement and orientation of the coordinate system.
provided r 6= 0 where φ is singular. Therefore, if the volume V does not contain the origin, then
ˆ
1 2
∇ dV = 0, (0, 0, 0) ∈
/ V.
V r
However, if V contains the origin, we need only integrate over a small sphere of volume V 0 ∈ V
centered at the origin, since ∇2 (1/r ) = 0 outside of V 0 . We therefore have from the divergence
theorem ˆ ˆ ˛
2 1 2 1 1
∇ dV = ∇ dV = ∇ · d𝑆,
V r V0 r S0 r
where the surface S0 is now the surface of a sphere of radius R, say, centered at the origin. Using
spherical coordinates,
1 d 1 𝑟ˆ
∇ = 𝑟ˆ = − 2,
r dr r r
and since d𝑆 = 𝑟dS,
ˆ we have
˛ ˛
1 1
∇ · d𝑆 = − 2 dS = −4π,
S0 r R S0
ˆ
0, (0, 0, 0) ∈
/ V;
1
∇2 dV =
V r −4π, (0, 0, 0) ∈ V.
181
For those of you familar with the Dirac delta function, say from my course Differential Equations for
Engineers, what we have here is
1
∇2 = −4πδ(𝑟 ),
r
where δ(𝑟 ) is the three-dimensional Dirac delta function satisfying
δ(𝑟 ) = 0, when 𝑟 6= 0,
and ˆ
δ(𝑟 ) dV = 1, provided the origin is in V.
V
182 APPENDIX C. PROBLEM SOLUTIONS
∂ρ
+ ∇ · (ρ𝑢) = 0.
∂t
∂ρ
+ 𝑢 · ∇ρ + ρ∇ · 𝑢 = 0.
∂t
2. We begin with ˆ ˛
d
ρ(𝑟, t) dV = − 𝐽 · d𝑆.
dt V S
and combining both sides of the equation and bringing the time derivative inside the integral results
in ˆ
∂ρ
+∇·𝐽 dV = 0.
V ∂t
Since the integral is zero for any volume V, we obtain the electrodynamics continuity equation given
by
∂ρ
+ ∇ · 𝐽 = 0.
∂t
183
2. d. ˛ ˆ ˆ
𝑟 · d𝑆 = (∇ · 𝑟 ) dV = 3 dV = 3πR2 L.
S V V
1. With 𝑢 = −y𝑖 + x𝑗, we use ∂u2 /∂x − ∂u1 /∂y = 2. For a square of side L, we have for the left-hand
side of Green’s theorem ˆ ˆ
∂u2 ∂u
− 1 dA = 2 dA = 2L2 .
A ∂x ∂y A
When the square lies in the first quadrant with vertex at the origin, we have for the right-hand side of
Green’s theorem,
˛ ˆ L ˆ 0 ˆ 0 ˆ L
(u1 dx + u2 dy) = 0 dx + (− L) dx + 0 dy + L dy = 2L2 .
C 0 L L 0
2. With 𝑢 = −y𝑖 + x𝑗, we use ∂u2 /∂x − ∂u1 /∂y = 2. For a circle of radius R, we have for the left-hand
side of Green’s theorem, ˆ ˆ
∂u2 ∂u
− 1 dA = 2 dA = 2πR2 .
A ∂x ∂y A
For a circle of radius R centered at the origin, we change variables to x = R cos θ and y = R sin θ. Then
dx = − R sin θ and dy = R cos θ, and we have for the right-hand side of Green’s theorem,
˛ ˛ ˆ 2π
(u1 dx + u2 dy) = (−y dx + x dy) = ( R2 sin2 θ + R2 cos2 θ )dθ = 2πR2 .
C C 0
185
1. Let 𝑢 = u1 ( x, y, z) 𝑖 + u2 ( x, y, z) 𝑗 + u3 ( x, y, z) 𝑘. Then
∂u3 ∂u ∂u1 ∂u ∂u2 ∂u
∇×𝑢 = − 2 𝑖+ − 3 𝑗+ − 1 𝑘.
∂y ∂z ∂z ∂x ∂x ∂y
a) For an area lying in the y-z plane bounded by a curve C, the normal vector to the area is 𝑖.
Therefore, Green’s theorem is given by
ˆ ˛
∂u3 ∂u
− 2 dA = (u2 dy + u3 dz);
A ∂y ∂z C
b) For an area lying in the z-x plane bounded by a curve C, the normal vector to the area is 𝑗.
Therefore, Green’s theorem is given by
ˆ ˛
∂u1 ∂u
− 3 dA = (u3 dz + u1 dx );
A ∂z ∂x C
The correct orientation of the curves are determined by the right-hand rule, using a right-handed
coordinate system.
2. We have 𝑢 = −y𝑖 + x𝑗. The right-hand side of Stokes’ theorem was computed in an earlier problem
on Green’s theorem and we repeat the solution here. For a circle of radius R lying in the x-y plane
with center at the origin, we change variables to x = R cos φ and y = R sin φ. Then dx = − R sin φ and
dy = R cos φ, and we have for the right-hand side of Stokes’ theorem,
˛ ˛ ˛ ˆ 2π
𝑢 · d𝑟 = (u1 dx + u2 dy) = (−y dx + x dy) = ( R2 sin2 φ + R2 cos2 φ)dθ = 2πR2 .
C C C 0
With
ˆ
𝑘 = cos θ 𝑟ˆ − sin θ 𝜃,
we have
𝑘 · 𝑟ˆ = cos θ;
and
ˆ ˆ 2π ˆ π/2
2
(∇ × 𝑢) · d𝑆 = 2R dφ cos θ sin θ dθ
S 0
0
2 2 π/2
= 2πR2 .
= 2πR sin θ 0
186 APPENDIX C. PROBLEM SOLUTIONS
1
where we have used d𝑆 = 𝑘 dA and the area of the quarter circle is πR2 .
4
−y x
2. c. With 𝑢 = 𝑖+ 2 𝑗, one can show by differentiating that ∇ × 𝑢 = 0 provided
x 2 + y2 x + y2
( x, y) 6= (0, 0). However, the integration region contains the origin so the integral is best done by
applying Stokes’ theorem. We use cylindrical coordinates to write
−y x 𝜑ˆ
𝑢= 𝑖 + 𝑗 = .
x 2 + y2 x 2 + y2 ρ
Then, ˆ ˛ ˆ ˆ
2π
𝜑ˆ 2π
ˆ dφ =
(∇ × 𝑢) · d𝑆 = 𝑢 · d𝑟 = · 𝜑ρ dφ = 2π.
S C 0 ρ 0
1.
∂𝑢 1
+ (𝑢 · ∇)𝑢 = − ∇p + ν∇2 𝑢, ∇ · 𝑢 = 0.
∂t ρ
Taking the divergence of the Navier-Stokes equation and using the continuity equation results in
1
∇ · ((𝑢 · ∇)𝑢) = − ∇2 p.
ρ
Now, !
∂ ∂u ∂ui ∂u j
∇ · ((𝑢 · ∇)𝑢) = uj i = .
∂xi ∂x j ∂x j ∂xi
Therefore,
∂ui ∂u j
∇2 p = − ρ .
∂x j ∂xi
b) Taking the curl of the Navier-Stokes equation, and using 𝜔 = ∇ × 𝑢 and ∇ × ∇p = 0, we obtain
∂𝜔
+ ∇ × (𝑢 · ∇)𝑢 = ν∇2 𝜔.
∂t
1
𝑢 × (∇ × 𝑢) = ∇(𝑢 · 𝑢) − (𝑢 · ∇)𝑢.
2
∂um ∂um
[𝑢 × (∇ × 𝑢)]i = eijk u j eklm = ekij eklm u j
∂xl ∂xl
∂um ∂u j ∂u
= (δil δjm − δim δjl )u j = uj − uj i
∂xl ∂xi ∂x j
1 ∂ ∂u
= (u j u j ) − u j i
2 ∂xi ∂x j
1
= ∇(𝑢 · 𝑢) − [(𝑢 · ∇)𝑢]i .
2 i
Therefore, using that the curl of a gradient and the divergence of a curl is equal to zero, and
𝜔 = ∇ × 𝑢 and ∇ · 𝑢 = 0, we have
1
∇ × (𝑢 · ∇)𝑢 = ∇ × ∇(𝑢 · 𝑢) − 𝑢 × (∇ × 𝑢)
2
= −∇ × (𝑢 × 𝜔 )
= − [𝑢(∇ · 𝜔 ) − 𝜔 (∇ · 𝑢) + (𝜔 · ∇)𝑢 − (𝑢 · ∇)𝜔 ]
= −(𝜔 · ∇)𝑢 + (𝑢 · ∇)𝜔.
∂𝜔
+ (𝑢 · ∇)𝜔 = (𝜔 · ∇)𝑢 + ν∇2 𝜔.
∂t
188 APPENDIX C. PROBLEM SOLUTIONS
1. The electric field from a point charge at the origin should be spherically symmetric. We therefore
write using spherical coordinates, 𝐸 (𝑟 ) = E(r )𝑟.
ˆ Integrating Gauss’s law over a spherical shell of
radius r, we have ˛ ˛
q
𝐸 · d𝑆 = E(r ) dS = 4πr2 E(r ) = .
S S ε0
Therefore, the electric field is given by
q
𝐸 (𝑟 ) = ˆ
𝑟.
4πε 0 r2
2. The magnetic field from a current carrying infinite wire should have cylindrical symmetry. We
ˆ Integrating Ampère’s law over a circle
therefore write using cylindrical coordinates, 𝐵 (𝑟 ) = B(ρ)𝜑.
of radius ρ in the x-y plane in the counterclockwise direction, we obtain
˛ ˛
𝐵 · d𝑟 = B(ρ) dr = 2πρB(ρ) = µ0 I,
C C
µ0 I ˆ
B (𝑟 ) = 𝜑.
2πρ