0% found this document useful (0 votes)
27 views

Vector Calculus For Engineers

Vector Calculus Numerical Problems with Solutions

Uploaded by

amitava2010
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Vector Calculus For Engineers

Vector Calculus Numerical Problems with Solutions

Uploaded by

amitava2010
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 184

Vector Calculus for Engineers

Lecture Notes for

Jeffrey R. Chasnov
The Hong Kong University of Science and Technology
Department of Mathematics
Clear Water Bay, Kowloon
Hong Kong

Copyright ○
c 2019-2022 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 determi-
nant.
I have divided these notes into chapters called Lectures, with each Lecture correspond-
ing 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
Contents

I Vectors 1

1 Vectors 2

2 Cartesian coordinates 4

3 Dot product 6

4 Cross product 8

Practice quiz: Vectors 10

5 Analytic geometry of lines 11

6 Analytic geometry of planes 13

Practice quiz: Analytic geometry 15

7 Kronecker delta and Levi-Civita symbol 16

8 Vector identities 18

9 Scalar triple product 20

10 Vector triple product 22

Practice quiz: Vector algebra 24

11 Scalar and vector fields 25

II Differentiation 27

12 Partial derivatives 28

13 The method of least squares 30

14 Chain rule 32

15 Triple product rule 34

16 Triple product rule (example) 35

Practice quiz: Partial derivatives 37

17 Gradient 38

iv
CONTENTS v

18 Divergence 40

19 Curl 42

20 Laplacian 44

Practice quiz: The del operator 46

21 Vector derivative identities 47

22 Vector derivative identities (proof) 48

23 Electromagnetic waves 50

Practice quiz: Vector calculus algebra 52

III Integration and Curvilinear Coordinates 53

24 Double and triple integrals 54

25 Example: Double integral with triangle base 56

Practice quiz: Multidimensional integration 58

26 Polar coordinates (gradient) 59

27 Polar coordinates (divergence & curl) 61

28 Polar coordinates (Laplacian) 63

29 Central force 65

30 Change of variables (single integral) 67

31 Change of variables (double integral) 68

Practice quiz: Polar coordinates 70

32 Cylindrical coordinates 71

33 Spherical coordinates (Part A) 73

34 Spherical coordinates (Part B) 75

Practice quiz: Cylindrical and spherical coordinates 77

IV Line and surface integrals 78

35 Line integral of a scalar field 79


CONTENTS vi

36 Arc length 81

37 Line integral of a vector field 83

38 Work-energy theorem 85

Practice quiz: Line integrals 87

39 Surface integral of a scalar field 88

40 Surface area of a sphere 90

41 Surface integral of a vector field 92

42 Flux integrals 94

Practice quiz: Surface integrals 96

V Fundamental Theorems 97

43 Gradient theorem 98

44 Conservative vector fields 100

45 Conservation of energy 102

Practice quiz: Gradient theorem 104

46 Divergence theorem 105

47 Divergence theorem (example 1) 107

48 Divergence theorem (example 2) 109

49 Continuity equation 111

Practice quiz: Divergence theorem 113

50 Green’s theorem 114

51 Stokes’ theorem 116

Practice quiz: Stokes’ theorem 118

52 Meaning of the divergence and the curl 119

53 Maxwell’s equations 121


CONTENTS vii

Appendices 123

A Matrix addition and multiplication 124

B Matrix determinants and inverses 125

C Problem and practice quiz solutions 127


Week I

Vectors

In this week’s lectures, we learn about vectors. Vectors are line segments with both length and
direction, 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.

1
Lecture 1 | Vectors
View this lecture on YouTube

We define a vector in three-dimensional Euclidean space as having a length (or mag-


nitude) 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 direc-
tion. 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:

𝐴 + 𝐵 = 𝐵 + 𝐴, (𝐴 + 𝐵 ) + 𝐶 = 𝐴 + (𝐵 + 𝐶 );

and scalar multiplication is distributive:

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 𝐵.

Vector addition Vector subtraction

2
WEEK I. VECTORS 3

Problems for Lecture 1


1. Show graphically that vector addition is associative, i.e., (𝐴 + 𝐵 ) + 𝐶 = 𝐴 + (𝐵 + 𝐶 ).

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.

Solutions to the Problems


Lecture 2 | 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 its tail at the origin and 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 will write a vector as

𝐴 = A1 𝑖 + A2 𝑗 + A3 𝑘.

With also 𝐵 = B1 𝑖 + B2 𝑗 + B3 𝑘, vector addition and scalar multiplication can be expressed


component-wise and is given by

𝐴 + 𝐵 = ( A1 + B1 )𝑖 + ( A2 + B2 )𝑗 + ( A3 + B3 )𝑘, c𝐴 = cA1 𝑖 + cA2 𝑗 + cA3 𝑘.

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 the head of 𝑟1 to the head of 𝑟2 is
given by
𝑟2 − 𝑟1 = ( x2 − x1 )𝑖 + (y2 − y1 )𝑗 + (z2 − z1 )𝑘.

4
WEEK I. VECTORS 5

Problems for Lecture 2


1. Given a Cartesian coordinate system with standard unit vectors 𝑖, 𝑗, and 𝑘, let a mass
m1 be at position 𝑟1 = x1 𝑖 + y1 𝑗 + z1 𝑘 and a mass m2 be at position 𝑟2 = x2 𝑖 + y2 𝑗 + z2 𝑘.
In terms of the standard unit vectors, determine the unit vector that points from m1 to m2 .

2. 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 gravi-
tational 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 .

Solutions to the Problems


Lecture 3 | 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 asso-
ciative with respect to scalar multiplication; that is,

𝐴 · 𝐵 = 𝐵 · 𝐴, 𝐴 · (𝐵 + 𝐶 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶, 𝐴 · (c𝐵 ) = (c𝐴) · 𝐵 = c(𝐴 · 𝐵 ).

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 θ.
Then in this coor-
dinate system, 𝐴 =
|𝐴|𝑖, 𝐵 = |𝐵 | cos θ𝑖 +
|𝐵 | sin θ𝑗, and

𝐴 · 𝐵 = |𝐴||𝐵 | cos θ,

a result independent of
the choice of coordinate
system. If 𝐴 and 𝐵 are
parallel, then θ = 0 and
𝐴 · 𝐵 = |𝐴||𝐵 | and in
particular, 𝐴 · 𝐴 = |𝐴|2 .
If 𝐴 and 𝐵 are perpen-
dicular, then θ = π/2
and 𝐴 · 𝐵 = 0.

6
WEEK I. VECTORS 7

Problems for Lecture 3


1. Using the definition of the dot product 𝐴 · 𝐵 = A1 B1 + A2 B2 + A3 B3 , prove that

a) 𝐴 · 𝐵 = 𝐵 · 𝐴;

b) 𝐴 · (𝐵 + 𝐶 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶;

c) 𝐴 · (k𝐵 ) = (k𝐴) · 𝐵 = k(𝐴 · 𝐵 ).

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.

Solutions to the Problems


Lecture 4 | 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

Defining the cross product by a determinant serves to remember the formula. One can
prove that the cross product is anticommutative, distributive over addition, and associa-
tive with respect to scalar multiplication; that is

𝐴 × 𝐵 = −𝐵 × 𝐴, 𝐴 × (𝐵 + 𝐶 ) = 𝐴 × 𝐵 + 𝐴 × 𝐶, 𝐴 × (c𝐵 ) = (c𝐴) × 𝐵 = c(𝐴 × 𝐵 ).

Right-hand rule (from Wikipedia)

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 θ.

Furthermore, the vector 𝐴 × 𝐵 points in the direction perpendicular to the plane formed
by 𝐴 and 𝐵, and its sign is determined by the right-hand rule. Also, observe that |𝐴 × 𝐵 |
is the area of the parallelogram whose adjacent sides are the vectors 𝐴 and 𝐵.

8
WEEK I. VECTORS 9

Problems for Lecture 4


1. Using properties of the determinant, prove that

a) 𝐴 × 𝐵 = −𝐵 × 𝐴;

b) 𝐴 × (𝐵 + 𝐶 ) = 𝐴 × 𝐵 + 𝐴 × 𝐶;

c) 𝐴 × (k𝐵 ) = (k𝐴) × 𝐵 = k(𝐴 × 𝐵 ).

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= (𝐴 × 𝐵 ) × 𝐶.

Solutions to the Problems


Practice Quiz | Vectors
1. Let 𝐴, 𝐵 and 𝐶 be any vectors. Which of the following statements is false?

a) 𝐴 · 𝐵 = 𝐵 · 𝐴

b) 𝐴 + (𝐵 + 𝐶 ) = (𝐴 + 𝐵 ) + 𝐶

c) 𝐴 × (𝐵 × 𝐶 ) = (𝐴 × 𝐵 ) × 𝐶

d) 𝐴 · (𝐵 + 𝐶 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶

2. Let 𝐴 = a1 𝑖 + a2 𝑗 + a3 𝑘 and 𝐵 = b1 𝑖 + b2 𝑗 + b3 𝑘. Then (𝐴 × 𝐵 ) · 𝑗 is equal to

a) a2 b3 − a3 b2

b) a3 b1 − a1 b3

c) a1 b2 − a2 b1

d) a1 b3 − a3 b1

3. Which vector is not equal to zero?

a) 𝑖 × (𝑗 × 𝑘 )

b) (𝑖 × 𝑗 ) × 𝑘

c) (𝑖 × 𝑖) × 𝑗

d) 𝑖 × (𝑖 × 𝑗 )

Solutions to the Practice quiz

10
Lecture 5 | Analytic geometry
of lines
View this lecture on YouTube

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,

where t is a parameter that can take on any real value.


This parametric equation for a line has clear physical meaning. If 𝑟 is the position vec-
tor of a particle, then 𝑢 is the velocity vector, and t is the time. In particular, differentiating
𝑟 = 𝑟 (t) with respect to time results in d𝑟/dt = 𝑢.
A nonparametric equation for the line can be obtained by eliminating t from the equa-
tions for the components. The component equations are

x = x0 + u1 t, y = y0 + u2 t, z = z0 + u3 t;

and eliminating t results in

x − x0 y − y0 z − z0
= = .
u1 u2 u3

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

𝑟 = 𝑟0 + 𝑢t = 𝑖 + 2𝑗 + 3𝑘 + t(2𝑖 − 2𝑘 ) = (1 + 2t)𝑖 + 2𝑗 + (3 − 2t)𝑘.

The line crosses the z = 0 plane when 3 − 2t = 0, or t = 3/2, and ( x, y) = (4, 2).

11
WEEK I. VECTORS 12

Problems for Lecture 5


1. Find the parametric equation for a line that passes through the points (1, 1, 1) and
(2, 3, 2). Determine the intersection point of the line with the x = 0 plane, y = 0 plane
and z = 0 plane.

Solutions to the Problems


Lecture 6 | Analytic geometry
of planes
View this lecture on YouTube

A plane in three-dimensional space is determined by three non-collinear points. Two


linearly independent 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 any two displacement vectors, such as 𝑠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 any 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:

𝑠1 = (1 − 2)𝑖 + (2 − 1)𝑗 + (1 − 1)𝑘 = −𝑖 + 𝑗,


𝑠2 = (1 − 1)𝑖 + (1 − 2)𝑗 + (2 − 1)𝑘 = −𝑗 + 𝑘.

A normal vector to the plane is then found from

𝑖 𝑗 𝑘
𝑁 = 𝑠1 × 𝑠2 = −1 1 0 = 𝑖 + 𝑗 + 𝑘.
0 −1 1

And the equation for the plane can be found from 𝑁 · 𝑟 = 𝑁 · 𝑟1 , or

(𝑖 + 𝑗 + 𝑘) · ( x𝑖 + y𝑗 + z𝑘) = (𝑖 + 𝑗 + 𝑘) · (2𝑖 + 𝑗 + 𝑘), or x + y + z = 4.

The intersection of this plane with the z = 0 plane forms the line given by y = − x + 4.

13
WEEK I. VECTORS 14

Problems for Lecture 6


1. Find an equation for the plane defined by the three points (−1, −1, −1), (1, 1, 1) and
(1, −1, 0). Determine the equation for the line in the x-y plane formed by the intersection
of this plane with the z = 0 plane.

Solutions to the Problems


Practice Quiz | Analytic geometry
1. The line that passes through the points (0, 1, 1) and (1, 0, −1) has parametric equation
given by

a) t𝑖 + (1 + t)𝑗 + (1 + 2t)𝑘

b) t𝑖 + (1 − t)𝑗 + (1 + 2t)𝑘

c) t𝑖 + (1 + t)𝑗 + (1 − 2t)𝑘

d) t𝑖 + (1 − t)𝑗 + (1 − 2t)𝑘

2. The line of Question 1 intersects the z = 0 plane at the point


1 1
a) ( , , 0)
2 2
1 1
b) (− , , 0)
2 2
1 1
c) ( , − , 0)
2 2
1 1
d) (− , − , 0)
2 2
3. The equation for the line in the x-y plane formed by the intersection of the plane defined
by the points (1, 1, 1), (1, 1, 2) and (2, 1, 1) and the z = 0 plane is given by

a) y = x

b) y = x + 1

c) y = x − 1

d) y = 1

Solutions to the Practice quiz

15
Lecture 7 | Kronecker delta and
Levi-Civita symbol
View this lecture on YouTube

We will soon make use of the Kronecker delta and Levi-Civita symbol to derive some
important vector identities. 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 cyclic permutation
of (1, 2, 3) (that is, one of (1, 2, 3), (2, 3, 1) or (3, 1, 2)); −1 if an anticyclic permutation of
(1, 2, 3) (that is, one of (3, 2, 1), (2, 1, 3) or (1, 3, 2)); and 0 if any two indices are equal. The
choice of letters for the indices is arbitrary.
More formally, for indices restricted to the values of one, two or three,

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), (2, 1, 3) or (1, 3, 2);

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 within a single term or in a product of terms
implies summation over that index. For example, we will write an expression such as
∑3i=1 Ai Bi more simply as Ai Bi . Within a single term or a product of terms, any index
letter can be repeated at most one time, though multiple index letters may be repeated.
Using the Einstein summation convention, two interesting examples are

δii = 3 and eijk eijk = 6,

where δii = δ11 + δ22 + δ33 and eijk eijk implies a sum over i, j, and k, containing a total of
33 = 27 terms in the sum, where six of the terms are equal to one and the remaining terms
are equal to zero. As these two examples show, repeated indices in a term or product may
dramatically simplify the expression.
Finally, we state here a remarkable relationship between the product of Levi-Civita
symbols and the Kronecker delta, given by the determinant

δil δim δin


eijk elmn = δjl δjm δjn = δil (δjm δkn − δjn δkm ) − δim (δjl δkn − δjn δkl ) + δin (δjl δkm − δjm δkl ).
δkl δkm δkn

16
WEEK I. VECTORS 17

Problems for Lecture 7


1. Prove the following cyclic and anticyclic permutation identities:

a) eijk = e jki = ekij ;

b) eijk = −e jik , eijk = −ekji , eijk = −eikj .

2. The notation [. . . ]i means the ith component of the bracketed vector. Verify the cross-
product relation [𝐴 × 𝐵 ]i = eijk A j Bk by considering i = 1, 2, 3.

3. Prove the following Kronecker-delta identities:

a) δij A j = Ai ;

b) δik δkj = δij .

4. Given the most general identity relating the Levi-Civita symbol to the Kronecker delta,

eijk elmn = δil (δjm δkn − δjn δkm ) − δim (δjl δkn − δjn δkl ) + δin (δjl δkm − δjm δkl ),

prove the following simpler and more useful relations:

a) eijk eimn = δjm δkn − δjn δkm ;

b) eijk eijn = 2δkn .

Solutions to the Problems


Lecture 8 | Vector identities
View this lecture on YouTube

Four sometimes useful vector identities are

(scalar triple product) 𝐴 · (𝐵 × 𝐶 ) = 𝐵 · (𝐶 × 𝐴) = 𝐶 · (𝐴 × 𝐵 ),


(vector triple product) 𝐴 × (𝐵 × 𝐶 ) = (𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶,
(scalar quadruple product) (𝐴 × 𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ),
(vector quadruple product) (𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = ((𝐴 × 𝐵 ) · 𝐷 )𝐶 − ((𝐴 × 𝐵 ) · 𝐶 )𝐷.

Parentheses are optional when expressions have only one possible interpretation, but for
clarity they are often written. The first and third identities equate scalars whereas the
second and fourth identities equate vectors. To prove two vectors 𝐴 and 𝐵 are equal, one
must prove that their components are equal, that is Ai = Bi for an arbitrary index i.
Proofs of these vector identities can make use of the Kronecker delta, the Levi-Civita
symbol and the Einstein summation convention, where repeated indices are summed over.
The algebraic toolbox that we will need contains the cyclic permutation identities for the
Levi-Civita symbol:
eijk = e jki = ekij ;

the contraction of two Levi-Civita symbols:

eijk eimn = δjm δkn − δjn δkm ;

the contraction of the Kronecker delta with a vector:

δij A j = Ai ;

and the scalar and vector products written as

𝐴 · 𝐵 = Ai Bi , [𝐴 × 𝐵 ]i = eijk A j Bk .

We will use the notation [. . . ]i to mean the ith component of the bracketed vector.

18
WEEK I. VECTORS 19

Problems for Lecture 8


1. Remove all optional parentheses from the four vector identities

(scalar triple product) 𝐴 · (𝐵 × 𝐶 ) = 𝐵 · (𝐶 × 𝐴) = 𝐶 · (𝐴 × 𝐵 ),


(vector triple product) 𝐴 × (𝐵 × 𝐶 ) = (𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶,
(scalar quadruple product) (𝐴 × 𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ),
(vector quadruple product) (𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = ((𝐴 × 𝐵 ) · 𝐷 )𝐶 − ((𝐴 × 𝐵 ) · 𝐶 )𝐷.

Solutions to the Problems


Lecture 9 | Scalar triple product
View this lecture on YouTube

The scalar triple product, which can be written as either 𝐴 · (𝐵 × 𝐶 ) or 𝐴 · 𝐵 × 𝐶, satisfies

𝐴 · (𝐵 × 𝐶 ) = 𝐵 · (𝐶 × 𝐴) = 𝐶 · (𝐴 × 𝐵 ),

that is, its value is unchanged under a cyclic permutation of the three vectors. This identity
can be proved using the cyclic property of the Levi-Civita symbol:

𝐴 · (𝐵 × 𝐶 ) = Ai eijk Bj Ck = Bj e jki Ck Ai = 𝐵 · (𝐶 × 𝐴),

and similarly,

𝐵 · (𝐶 × 𝐴) = Bj e jki Ck Ai = Ck ekij Ai Bj = 𝐶 · (𝐴 × 𝐵 ).

We can also write the scalar triple product as a three-by-three determinant. Using the
determinant expression for the cross-product, we have

𝑖 𝑗 𝑘 A1 A2 A3
𝐴 · (𝐵 × 𝐶 ) = 𝐴 · B1 B2 B3 = B1 B2 B3 .
C1 C2 C3 C1 C2 C3

The absolute value of a three-by-three determinant, and therefore that of the scalar triple
product, is the volume of the parallelepiped defined by the three row vectors 𝐴, 𝐵 and
𝐶, as shown in the figure below.

20
WEEK I. VECTORS 21

Problems for Lecture 9


1. Consider the scalar triple product 𝐴 · (𝐵 × 𝐶 ). Prove that if any two vectors are equal,
then the scalar triple product is zero.

2. Show that swapping the positions of the operators without re-ordering the vectors
leaves the scalar triple product unchanged, that is,

𝐴 · 𝐵 × 𝐶 = 𝐴 × 𝐵 · 𝐶.

3. It is sometimes useful to define a notation where the unit vectors are distinguished by
their index. That is, we define 𝑒1 = 𝑖, 𝑒2 = 𝑗 and 𝑒3 = 𝑘. Prove that

𝑒i · (𝑒 j × 𝑒k ) = eijk ,

where eijk is the usual Levi-Civita symbol.

Solutions to the Problems


Lecture 10 | Vector triple product
View this lecture on YouTube

The vector triple product satisfies

𝐴 × (𝐵 × 𝐶 ) = (𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶.

This identity can be proved using Kronecker delta and Levi-Civita symbol identities as
follows:

Justification
[𝐴 × (𝐵 × 𝐶 )]i = eijk A j [𝐵 × 𝐶 ]k [𝐴 × 𝑋 ]i = eijk A j Xk
= eijk A j eklm Bl Cm [𝐵 × 𝐶 ]k = eklm Bl Cm
= ekij eklm A j Bl Cm eijk = ekij
= (δil δjm − δim δjl ) A j Bl Cm ekij eklm = δil δjm − δim δjl
= A j Bi Cj − A j Bj Ci δil Bl = Bi , δjm Cm = Cj , etc.
= (𝐴 · 𝐶 ) Bi − (𝐴 · 𝐵 )Ci A j Cj = 𝐴 · 𝐶, A j Bj = 𝐴 · 𝐵
= [(𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶 ]i . vector subtraction law

22
WEEK I. VECTORS 23

Problems for Lecture 10


1. Prove the Jacobi identity:

𝐴 × (𝐵 × 𝐶 ) + 𝐵 × (𝐶 × 𝐴) + 𝐶 × (𝐴 × 𝐵 ) = 0.

2. Prove that the scalar quadruple product satisfies

(𝐴 × 𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ).

3. Prove Lagrange’s identity in three dimensions:

|𝐴 × 𝐵 |2 = |𝐴|2 |𝐵 |2 − (𝐴 · 𝐵 )2 .

4. Prove using vector triple products that the vector quadruple product satisfies

(𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = ((𝐴 × 𝐵 ) · 𝐷 )𝐶 − ((𝐴 × 𝐵 ) · 𝐶 )𝐷.

Solutions to the Problems


Practice Quiz | Vector algebra
1. The expression eijk eljm is equal to

a) δjm δkn − δjn δkm

b) δjn δkm − δjm δkn

c) δkm δil − δkl δim

d) δkl δim − δkm δil

2. The expression 𝐴 × (𝐵 × 𝐶 ) is always equal to

a) 𝐵 × (𝐶 × 𝐴)

b) 𝐴 × (𝐶 × 𝐵 )

c) (𝐴 × 𝐵 ) × 𝐶

d) (𝐶 × 𝐵 ) × 𝐴

3. Which of the following expressions may not be zero?

a) 𝐴 · (𝐵 × 𝐵 )

b) 𝐴 · (𝐴 × 𝐵 )

c) 𝐴 × (𝐴 × 𝐵 )

d) 𝐵 · (𝐴 × 𝐵 )

Solutions to the Practice quiz

24
Lecture 11 | Scalar and vector fields
View this lecture on YouTube

In physics, scalars and vectors can be functions of both space and time. We call these
types of functions fields. For example, the temperature in some region of space 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 if the components of this velocity field are u1 , u2 and u3 , we can write

𝑢(𝑟, t) = u1 ( x, y, z; t)𝑖 + u2 ( x, y, z; t)𝑗 + u3 ( x, y, z; t)𝑘.

The equations governing a field are called the field equations, and these equations
commonly 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 equa-
tion for the fluid 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.
There are many ways to
visualize scalar and vector
fields, and one tries to make
plots as informative as pos-
sible. On the right is a
simple visualization of the
two-dimensional vector field
given by

−y 𝑖 + x 𝑗
𝐵 ( x, y) = ,
x 2 + y2

where the vectors at each


point are represented by ar-
rows.

25
WEEK I. VECTORS 26

Problems for Lecture 11


1. List some physical examples of scalar and vector fields.

Solutions to the Problems


Week II

Differentiation

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
chemistry. 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
communication technologies.

27
Lecture 12 | 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
with respect to a variable, take the derivative with respect to that variable 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 in-
dependent of the order in which the derivatives are taken,

∂2 f ∂2 f
= 12x2 y = .
∂x∂y ∂y∂x

To simplify notation, 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) about the origin is developed by expanding the function in a
multivariable power series that agrees with the function value and all its partial deriva-
tives at ( x, y) = (0, 0). We have

1  
f ( x, y) = f + f x x + f y y + f xx x2 + 2 f xy xy + f yy y2 + . . . .
2!

The function and all its partial derivatives on the right-hand side are evaluated at (0, 0)
and are constants. By taking partial derivatives it is evident that f (0, 0) = f , f x (0, 0) = f x ,
f y (0, 0) = f y , and so on as the infinite series continues.

28
WEEK II. DIFFERENTIATION 29

Problems for Lecture 12


1. Compute the three partial derivatives of

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

f (t + α∆t, x + β∆t f (t, x ))

to first order in ∆t.

Solutions to the Problems


Lecture 13 | The method of
least squares
View this lecture on YouTube

Local maxima and minima of a multivariable function can be found by computing the
zeros of the partial derivatives. These zeros are called critical points. A critical point need
not be a maximum or minimum, for example it might be a minimum in one direction and
a maximum in another (called a saddle point), but in many problems these points are max-
ima or minima. Here, we will solve the least-squares problem by minimizing a function.
Suppose there is some experimental data that you
want to fit by a straight line (illustrated on the right).
In general, let the data consist of a set of n points given
by ( x1 , y1 ), . . . , ( xn , yn ). Here, we assume that the x
values are exact, and the y values are noisy. We further
assume that the best fit line to the data takes the form
y = β 0 + β 1 x. Although we know that the line can not go
through all the data points, we can try to find the line
that minimizes the sum of the squares of the vertical
distances between the line and the points.
Define this function of the sum of the squares to be

n
f ( β0 , β1 ) = ∑ ( β 0 + β 1 x i − y i )2 .
i =1

Here, the data are 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

We can write these equations as a linear system for β 0 and β 1 as

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

The solution for β 0 and β 1 in terms of the data is given by

∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )2

where the summations are from i = 1 to n.

30
WEEK II. DIFFERENTIATION 31

Problems for Lecture 13


1. By minimizing the sum of the squares of the vertical distance between the line and the
points, determine the least-squares line through the data points (1, 1), (2, 3) and (3, 2).

Solutions to the Problems


Lecture 14 | 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
df = f ( x + dx, y + dy) − f ( x, y).

We can write df as

df = [ f ( x + dx, y + dy) − f ( x, y + dy)] + [ f ( x, y + dy) − f ( x, y)]


∂f ∂f
= dx + dy.
∂x ∂y

If one has f = f ( x (t), y(t)), say, then division of df by dt results in

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
dt dt
terms of u and its partial derivatives.

Applying the chain rule, we have at time t,

d2 x ∂u ∂u dx
2
= +
dt ∂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.

32
WEEK II. DIFFERENTIATION 33

Problems for Lecture 14


1. Let f ( x, y) = e xy , with x = r cos θ and y = r sin θ. Compute the partial derivatives
∂ f /∂r and ∂ f /∂θ in two ways:

a) Use the chain rule on f = f ( x (r, θ ), y(r, θ ));

b) Eliminate x and y in favor of r and θ and compute the partial derivatives directly.

Solutions to the Problems


Lecture 15 | Triple product rule
View this lecture on YouTube

Suppose that three variables x, y and z are related by the equation f ( x, y, z) = 0, and
that it is possible to write x = x (y, z), y = y( x, z) and z = z( x, y). Taking differentials of x
and z, 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 can be independent variations, the terms in parentheses 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 prod-
uct rule,
∂x ∂y ∂z
= −1.
∂y ∂z ∂x

34
Lecture 16 | Triple product rule
(example)
View this lecture on YouTube

Example: Demonstrate the triple product rule using the ideal gas law.

The ideal gas law states that


PV = nRT,

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.

We can write P = P(V, T ), V = V ( P, T ) and T = T ( P, V ), that is,

nRT nRT PV
P= , V= , T= ;
V P nR

and the partial derivatives are given by

∂P nRT ∂V nR ∂T V
=− 2 , = , = .
∂V V ∂T P ∂P nR

The triple product results in


   
∂P ∂V ∂T nRT nR V nRT
=− =− = −1,
∂V ∂T ∂P V2 P nR PV

where we make use of the ideal gas law in the last equality.

35
WEEK II. DIFFERENTIATION 36

Problems for Lecture 16


1. Suppose the three variables x, y and z are linearly related by ax + by + cz = 0. Show
that x, y and z satisfy the triple product rule.

2. Suppose the four variables x, y, z and t are linearly related by ax + by + cz + dt = 0.


Determine a corresponding quadruple product rule for these variables.

Solutions to the Problems


Practice Quiz | Partial derivatives
1 ∂2 f
1. Let f ( x, y, z) = . The mixed second partial derivative is equal to
( x2 + y2 + z2 )1/2 ∂x∂y

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

Solutions to the Practice quiz

37
Lecture 17 | Gradient
View this lecture on YouTube

Consider the three-dimensional scalar field f = f ( x, y, z), and the differential df , given
by
∂f ∂f ∂f
df = dx + dy + dz.
∂x ∂y ∂z
Using the dot product, we can write this in vector form as
 
∂f ∂f ∂f
df = 𝑖+ 𝑗+ 𝑘 · (dx𝑖 + dy𝑗 + dz𝑘 ) = ∇ f · d𝑟,
∂x ∂y ∂z

where d𝑟 = dx𝑖 + dy𝑗 + dz𝑘, and

∂f ∂f ∂f
∇f = 𝑖+ 𝑗+ 𝑘
∂x ∂y ∂z

is called the gradient of f . The nabla symbol ∇ is pronounced “del” and ∇ f is pro-
nounced “del- f ”. Another useful way to view the gradient is to consider ∇ as a vector
differential operator which has the form

∂ ∂ ∂
∇=𝑖 +𝑗 +𝑘 .
∂x ∂y ∂z

Because of the properties of the dot product, the differential df is maximum when the
infinitesimal displacement vector d𝑟 points in the same direction as the gradient vector
∇f . Therefore, ∇f points in the direction of maximally increasing f , and the magnitude
of ∇f gives the slope (or gradient) of f in that direction.

Example: Compute the gradient of f ( x, y, z) = xyz.


The partial derivatives are easily calculated, and we have

∇ f = yz 𝑖 + xz 𝑗 + xy 𝑘.

38
WEEK II. DIFFERENTIATION 39

Problems for Lecture 17


1. Let the position vector be given by 𝑟 = x𝑖 + y𝑗 + z𝑘 and its length be given by r =
p
x2 + y2 + z2 . Compute the gradient of the following scalar fields and write your results
in terms of 𝑟 and r.

a) φ( x, y, z) = x2 + y2 + z2 ;
p
b) φ( x, y, z) = x2 + y2 + z2 ;
1
c) φ( x, y, z) = p .
x2 + y2 + z2
2. Using the results from Problem 1, guess the general form of ∇(r n ).

Solutions to the Problems


Lecture 18 | Divergence
View this lecture on YouTube

Consider in Cartesian coordinates the three-dimensional vector field, 𝑢 = u1 ( x, y, z)𝑖 +


u2 ( x, y, z)𝑗 + u3 ( x, y, z)𝑘. The divergence of 𝑢, denoted as ∇ · 𝑢 and pronounced “del-
dot-u”, is defined as the scalar field given by
 
∂ ∂ ∂
∇·𝑢 = +𝑗 +𝑘
𝑖 · ( u1 𝑖 + u2 𝑗 + u3 𝑘 )
∂x ∂y ∂z
∂u ∂u ∂u
= 1 + 2 + 3.
∂x ∂y ∂z

Here, the dot product is used between a vector differential operator ∇ and a vector field
𝑢. The divergence measures how much a vector field spreads out, or diverges, from a
point. A more math-based description will be given later.

Example: Let the position vector be given by 𝑟 = x𝑖 + y𝑗 + z𝑘. Find ∇ · 𝑟.

A direct calculation gives

∂ ∂ ∂
∇·𝑟 = x + y + z = 3.
∂x ∂y ∂z

𝑟
Example: Let 𝐹 = for all 𝑟 6= 0. Find ∇ · 𝐹 .
|𝑟 |3

Writing out the components of 𝐹 , we have

x y z
𝐹 = F1 𝑖 + F2 𝑗 + F3 𝑘 = 𝑖+ 2 𝑗+ 2 𝑘.
( x2 + y2 2
+z ) 3/2 2 2
(x + y + z ) 3/2 ( x + y + z2 )3/2
2

Using the quotient rule for the derivative, we have

∂F1 ( x2 + y2 + z2 )3/2 − 3x2 ( x2 + y2 + z2 )1/2 1 3x2


= 2 2 2 3
= 3
− 5,
∂x (x + y + z ) |𝑟 | |𝑟 |

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,
|𝑟 | |𝑟 | |𝑟 | |𝑟 |

valid as long as |𝑟 | 6= 0, where 𝐹 diverges. In electrostatics, 𝐹 is proportional to the


electric field of a point charge located at the origin.

40
WEEK II. DIFFERENTIATION 41

Problems for Lecture 18


1. Find the divergence of the following vector fields:

a) 𝐹 = xy𝑖 + yz𝑗 + zx𝑘;

b) 𝐹 = yz𝑖 + xz𝑗 + xy𝑘.

Solutions to the Problems


Lecture 19 | Curl
View this lecture on YouTube

Consider in Cartesian coordinates the three-dimensional vector field 𝑢 = u1 ( x, y, z)𝑖 +


u2 ( x, y, z)𝑗 + u3 ( x, y, z)𝑘. The curl of 𝑢, denoted as ∇ × 𝑢 and pronounced “del-cross-u”,
is defined as the vector field given by

𝑖 𝑗 𝑘      
∂u3 ∂u ∂u1 ∂u ∂u2 ∂u
∇ × 𝑢 = ∂/∂x ∂/∂y ∂/∂z = − 2 𝑖+ − 3 𝑗+ − 1 𝑘.
∂y ∂z ∂z ∂x ∂x ∂y
u1 u2 u3

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
= − 𝑖+ − 𝑗+ − 𝑘
∂y∂z ∂z∂y ∂z∂x ∂x∂z ∂x∂y ∂y∂x
= 0,

using the equality of mixed partials.

Example: Show that the divergence of a curl is zero, that is, ∇ · (∇ × 𝑢) = 0.


We have
     
∂ ∂u3 ∂u2 ∂ ∂u1 ∂u3 ∂ ∂u2 ∂u1
∇ · (∇ × 𝑢) = − + − + −
∂x ∂y ∂z ∂y ∂z ∂x ∂z ∂x ∂y
 2
∂2 u1
  2
∂2 u2
  2
∂2 u3

∂ u1 ∂ u2 ∂ u3
= − + − + −
∂y∂z ∂z∂y ∂z∂x ∂x∂z ∂x∂y ∂y∂x
= 0,

again using the equality of mixed partials.

42
WEEK II. DIFFERENTIATION 43

Problems for Lecture 19


1. Find the curl of the following vector fields:

a) 𝐹 = xy𝑖 + yz𝑗 + zx𝑘;

b) 𝐹 = yz𝑖 + xz𝑗 + xy𝑘.

2. Consider a two-dimensional velocity field given by

𝑢 = u1 ( x, y)𝑖 + u2 ( x, y)𝑗.

Show that the vorticity 𝜔 = ∇ × 𝑢 takes the form

𝜔 = ω3 ( x, y)𝑘.

Determine ω3 in terms of u1 and u2 .

Solutions to the Problems


Lecture 20 | Laplacian
View this lecture on YouTube

The Laplacian differential operator, denoted as ∇ · ∇ = ∇2 and pronounced as “del-


squared”, is given in Cartesian coordinates as

∂2 ∂2 ∂2
∇2 = + + .
∂x2 ∂y2 ∂z2

The Laplacian can be applied to either a scalar field or a vector field and results in a scalar
field or a vector field, respectively. 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 in Cartesian coordinates, 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 equa-
tion, wave equation (with c the wave velocity), and diffusion equation (with D the diffu-
sivity) all contain the Laplacian and are given, respectively, by

∂2 Φ ∂Φ
∇2 Φ = 0, = c2 ∇2 Φ, = D ∇2 Φ.
∂t2 ∂t

Example: Find the Laplacian of f ( x, y, z) = x2 + y2 + z2 .

We have ∇2 f = 2 + 2 + 2 = 6.

44
WEEK II. DIFFERENTIATION 45

Problems for Lecture 20


 
1
1. Compute ∇2
p
for r 6= 0. Here, r = x2 + y2 + z2 .
r

Solutions to the Problems


Practice Quiz | The del operator
p
Let 𝑟 = x𝑖 + y𝑗 + z𝑘 and r = x 2 + y2 + z2 .
 
1
1. What is the value of ∇ 2 ?
r
𝑟
a) −
r3
2𝑟
b) −
r3
𝑟
c) − 4
r
2𝑟
d) −
r4
𝑟
2. Let 𝐹 = . The divergence ∇ · 𝐹 is equal to
r
1
a)
r
2
b)
r
1
c)
r2
2
d)
r2
3. The curl of the position vector, ∇ × 𝑟, is equal to
𝑟
a)
r
b) 0
(∇ · 𝑟 )𝑟
c)
r
d) 𝑖 − 𝑗 + 𝑘

Solutions to the Practice quiz

46
Lecture 21 | Vector derivative
identities
View this lecture on YouTube

Let f = f (𝑟 ) be a scalar field and 𝑢 = 𝑢(𝑟 ) and 𝑣 = 𝑣 (𝑟 ) be vector fields, where


𝑢 = u1 𝑖 + u2 𝑗 + u3 𝑘, and 𝑣 = v1 𝑖 + v2 𝑗 + v3 𝑘. Here, we will change notation and define
the position vector to be 𝑟 = x1 𝑖 + x2 𝑗 + x3 𝑘 (instead of using the coordinates x, y and z).
We have already shown that the curl of a gradient is zero, and the divergence of a curl is
zero, that is,
∇ × ∇ f = 0, ∇ · (∇ × 𝑢) = 0.

Other sometimes useful vector derivative identities include

∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢,
∇ · ( f 𝑢) = 𝑢 · ∇ f + f ∇ · 𝑢,
∇ × ( f 𝑢) = ∇ f × 𝑢 + f ∇ × 𝑢,
∇(𝑢 · 𝑣 ) = (𝑢 · ∇)𝑣 + (𝑣 · ∇)𝑢 + 𝑢 × (∇ × 𝑣 ) + 𝑣 × (∇ × 𝑢),
∇ · (𝑢 × 𝑣 ) = 𝑣 · (∇ × 𝑢) − 𝑢 · (∇ × 𝑣 ),
∇ × (𝑢 × 𝑣 ) = 𝑢(∇ · 𝑣 ) − 𝑣 (∇ · 𝑢) + (𝑣 · ∇)𝑢 − (𝑢 · ∇)𝑣.

Two of the identities make use of the del operator in the expression

∂ ∂ ∂
𝑢 · ∇ = u1 + u2 + u3 ,
∂x1 ∂x2 ∂x3

which acts on a scalar field as

∂f ∂f ∂f
𝑢 · ∇ f = u1 + u2 + u3 ,
∂x1 ∂x2 ∂x3

and acts on a vector field as

(𝑢 · ∇)𝑣 = (𝑢 · ∇v1 ) 𝑖 + (𝑢 · ∇v2 ) 𝑗 + (𝑢 · ∇v3 ) 𝑘.

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.

47
Lecture 22 | Vector derivative
identities (proof)
View this lecture on YouTube

To prove the vector derivative identities, we use component notation, the Einstein sum-
mation convention, 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

and the divergence of a vector field is written as

∂ui
∇·𝑢 = .
∂xi

We will continue to make use of the usual Kronecker delta and Levi-Civita symbol iden-
tities.
As one example, I prove here the vector derivative identity

∇ · (𝑢 × 𝑣 ) = 𝑣 · (∇ × 𝑢) − 𝑢 · (∇ × 𝑣 ).

We have

∂  
∇ · (𝑢 × 𝑣 ) = eijk u j vk (write using component notation)
∂xi
∂u j ∂v
= eijk v + eijk u j k (product rule for the derivative)
∂xi k ∂xi
∂u j ∂v
= vk ekij − u j e jik k (eijk = ekij , eijk = −e jik )
∂xi ∂xi
= 𝑣 · (∇ × 𝑢) − 𝑢 · (∇ × 𝑣 ). (back to vector notation)

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.

48
WEEK II. DIFFERENTIATION 49

Problems for Lecture 22


1. Use the Kronecker delta, the Levi-Civita symbol and the Einstein summation conven-
tion, and the identities

𝑎 · 𝑏 = δij ai b j , (𝑎 × 𝑏)i = eijk a j bk , eijk eilm = δjl δkm − δjm δkl ,

to prove the following identities:

a) ∇ · ( f 𝑢) = 𝑢 · ∇ f + f ∇ · 𝑢;

b) ∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢.

2. Consider the vector differential equation for the position 𝑟 of a fluid element subject to
a velocity field 𝑢 that depends on time t and position 𝑟,

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 d2 x3 /dt2 ;

c) Write your solution for d2 𝑟/dt2 as a vector equation using the ∇ operator.

Solutions to the Problems


Lecture 23 | Electromagnetic
waves
View this lecture on YouTube

Maxwell’s equations for the electric field 𝐸 and the magnetic field 𝐵 in the vacuum
of free space are most simply written using the del operator, and are given by

∂𝐵 ∂𝐸
∇ · 𝐸 = 0, ∇ · 𝐵 = 0, ∇×𝐸 = − , ∇ × 𝐵 = µ 0 e0 .
∂t ∂t

Here I use the 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 𝐸.
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.

50
WEEK II. DIFFERENTIATION 51

Problems for Lecture 23


1. Derive the wave equation for the magnetic field 𝐵.

Solutions to the Problems


Practice Quiz | Vector calculus
algebra
1. Let 𝑢 and 𝑣 be vector fields. Using the vector derivative identity ∇(𝑢 · 𝑣 ) = (𝑢 · ∇)𝑣 +
(𝑣 · ∇)𝑢 + 𝑢 × (∇ × 𝑣 ) + 𝑣 × (∇ × 𝑢), which of the following identities is valid?
1
a) ∇(𝑢 · 𝑢) = 𝑢 × (∇ × 𝑢) + (𝑢 · ∇)𝑢
2
1
b) ∇(𝑢 · 𝑢) = 𝑢 × (∇ × 𝑢) − (𝑢 · ∇)𝑢
2
1
c) ∇(𝑢 · 𝑢) = (∇ × 𝑢) × 𝑢 + (𝑢 · ∇)𝑢
2
1
d) ∇(𝑢 · 𝑢) = (∇ × 𝑢) × 𝑢 − (𝑢 · ∇)𝑢
2
2. Let 𝑢 be a vector field and f be a scalar field. Which of the following expressions is not
always zero?

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

52
Week III

Integration and Curvilinear


Coordinates

In this week’s lectures, we learn about multidimensional integration. The important technique of
using curvilinear coordinates, namely polar coordinates in two dimensions, and cylindrical and
spherical coordinates in three dimensions, is used to simplify problems with circular, cylindrical
or spherical symmetry. Differential operators in curvilinear coordinates are derived. The change
of variables formula for multidimensional integrals using the Jacobian of the transformation is
explained.

53
Lecture 24 | Double and triple
integrals
View this lecture on YouTube

Double and triple integrals, written as


ˆ ¨ ˆ ˚
f dA = f ( x, y) dx dy, f dV = f ( x, y, z) dx dy dz,
A A V V

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 need 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 double integral, 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

The respective calculations are

ˆ 1ˆ 1 ˆ 1 x =1
! ˆ 1 y =1
2 x3 y 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
! ˆ 1 x =1
2 x 2 y2 1 1 x3 1
x y dy dx = dx = x2 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

54
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 55

Problems for Lecture 24


1. A cube has edge length L, with mass density increasing linearly from ρ1 to ρ2 from one
face of the cube to the opposite face. By solving a triple integral, compute the mass of the
cube in terms of L, ρ1 and ρ2 .

Solutions to the Problems


Lecture 25 | Example: Double
integral with triangle
base
View this lecture on YouTube

Example: Compute the volume of the surface z = x2 y above the x-y plane with base given by
a right triangle with vertices (0, 0), (1, 0), (0, 1).

1 1

0.8 0.8

0.6 0.6

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

The left figure illustrates the integral over x first and y second; and the right figure illus-
trates the integral over y first and x second. These are the two double integrals,
ˆ 1 ˆ 1− y ˆ 1 ˆ 1− x
2
x y dx dy, or x2 y dy dx.
0 0 0 0

The respective calculations are

ˆ 1 ˆ 1− y ˆ 1 x =1− y
! ˆ 1 ˆ 1
2 x3 y 1 1
x y dx dy = dy = (1 − y)3 y dy = (y − 3y2 + 3y3 − y4 ) dy
0 0 0 3 x =0 3 0 3 0
1
y2 3y4 5
  
1 3y 1 1 3 1 1
= −y + − = −1+ − = ;
3 2 4 5 0 3 2 4 5 60

ˆ 1 ˆ 1− y ˆ 1 y =1− x
! ˆ 1 ˆ 1
2 x 2 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
x3 x4
x5
   
1 1 1 1 1 1
= − + = − + = .
2 3 2 5 0 2 3 2 5 60

56
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 57

Problems for Lecture 25


1. Compute the volume of the surface z = x2 y above the x-y plane with base given by a
parallelogram with vertices (0, 0), (1, 0), (4/3, 1) and (1/3, 1).

Solutions to the Problems


Practice Quiz | Multidimensional
integration
1. The volume of the surface z = xy above the x-y plane with base given by a unit square
with vertices (0, 0), (1, 0), (1, 1), and (0, 1) is equal to
1
a)
5
1
b)
4
1
c)
3
1
d)
2
2. A cube has edge length of 1 cm, with mass density increasing linearly from 1 g/cm3 to
2 g/cm3 from one face of the cube to the opposite face. The mass of the cube is given by

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

58
Lecture 26 | Polar coordinates
View this lecture on YouTube
(gradient)
In two dimensions, polar coordinates are the most com-
monly used curvilinear coordinate system. The relation-
ship between Cartesian and polar coordinates is given
by
x = r cos θ, y = r sin θ.

The unit vectors 𝑟ˆ and 𝜃ˆ are defined to be orthogonal


and in the direction of increasing r and θ, respectively,
and the position vector is given by 𝑟 = r𝑟. ˆ 𝜃ˆ unit
ˆ The 𝑟-
vectors are rotated an angle θ from the 𝑖-𝑗 unit vectors. Trigonometry shows that

𝑟ˆ = cos θ𝑖 + sin θ𝑗, 𝜃ˆ = − sin θ𝑖 + cos θ𝑗.

Notice that the direction of the unit vectors in polar coordinates is not fixed, but depends
on their position. Here, 𝑟ˆ = 𝑟ˆ (θ ) and 𝜃ˆ = 𝜃ˆ (θ ), and their derivatives are given by

d𝑟ˆ ˆ d𝜃ˆ
= 𝜃, = −𝑟.
ˆ
dθ dθ

Now, consider a two-dimensional scalar field given by f = f (r, θ ). By using the


definition of the two-dimensional gradient or, alternatively, by applying the chain rule,
the differential d f can be written as

∂f ∂f
d f = ∇ f · d𝑟 or df = dr + dθ.
∂r ∂θ

We have
d𝑟ˆ ˆ
d𝑟 = d(r𝑟ˆ ) = 𝑟dr
ˆ +r dθ = 𝑟dr
ˆ + r𝜃dθ,

and equating the two forms for d f results in

∇ f · (𝑟dr ˆ ) = ∂ f dr + ∂ f dθ.
ˆ + r𝜃dθ
∂r ∂θ

By inspection, we see that


∂f 1 ∂f ˆ
∇f = 𝑟ˆ + 𝜃,
∂r r ∂θ
so that the gradient operator, in polar coordinates, is given by

∂ 1 ∂
∇ = 𝑟ˆ + 𝜃ˆ .
∂r r ∂θ

59
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 60

Problems for Lecture 26


1. The inverse of a two-by-two matrix is given by
! −1 !
a b 1 d −b
= .
c d ad − bc −c a

Given
𝑟ˆ = cos θ𝑖 + sin θ𝑗, 𝜃ˆ = − sin θ𝑖 + cos θ𝑗,

invert a two-by-two matrix to solve for 𝑖 and 𝑗.

2. Cartesian coordinates are related to polar coordinates by the equations x = r cos θ and
y = r sin θ.

a) Let f = f ( x (r, θ ), y(r, θ )). Using the chain rule, show that

∂f ∂f ∂f ∂f ∂f ∂f
= cos θ + sin θ , = −r sin θ + r cos θ .
∂r ∂x ∂y ∂θ ∂x ∂y

b) Invert the result of Part (a) to show that

∂ ∂ sin θ ∂ ∂ ∂ cos θ ∂
= cos θ − , = sin θ + .
∂x ∂r r ∂θ ∂y ∂r r ∂θ

3. Determine expressions for r𝑟ˆ and r𝜃ˆ in Cartesian coordinates.

Solutions to the Problems


Lecture 27 | Polar coordinates
(divergence & curl)
View this lecture on YouTube

Define a vector field in polar coordinates to be

ˆ
𝑢 = ur (r, θ )𝑟ˆ + uθ (r, θ )𝜃.

To compute the divergence and curl in polar coordinates, we will use 𝑟ˆ = 𝑟ˆ (θ ) and
𝜃ˆ = 𝜃ˆ (θ ), and
d𝑟ˆ ˆ d𝜃ˆ ∂ 1 ∂
= 𝜃, = −𝑟,
ˆ ∇ = 𝑟ˆ + 𝜃ˆ .
dθ dθ ∂r r ∂θ
The polar unit vectors also satisfy

𝑟ˆ · 𝑟ˆ = 𝜃ˆ · 𝜃ˆ = 1, 𝑟ˆ · 𝜃ˆ = 𝜃ˆ · 𝑟ˆ = 0, 𝑟ˆ × 𝑟ˆ = 𝜃ˆ × 𝜃ˆ = 0, 𝑟ˆ × 𝜃ˆ = −(𝜃ˆ × 𝑟ˆ ) = 𝑘,
ˆ

where 𝑘ˆ is the standard Cartesian unit vector pointing along the z-axis.
The divergence is computed from
 
∂ ˆ 1 ∂
· ur 𝑟ˆ + uθ 𝜃ˆ

∇ · 𝑢 = 𝑟ˆ + 𝜃
∂r r ∂θ
∂ ∂ 1 ∂ 1 ∂
uθ 𝜃ˆ + 𝜃ˆ · (ur 𝑟ˆ ) + 𝜃ˆ · uθ 𝜃ˆ
 
= 𝑟ˆ · (ur 𝑟ˆ ) + 𝑟ˆ ·
∂r ∂r r ∂θ r ∂θ
∂ur 1 1 ∂uθ
= + 0 + ur +
∂r r r ∂θ
1 ∂ 1 ∂uθ
= (rur ) + .
r ∂r r ∂θ

And the curl is computed from


 
∂ 1 ∂
+ 𝜃ˆ × ur 𝑟ˆ + uθ 𝜃ˆ

∇×𝑢 = 𝑟ˆ
∂r r ∂θ
∂ ∂ 1 ∂ 1 ∂
uθ 𝜃ˆ + 𝜃ˆ × (ur 𝑟ˆ ) + 𝜃ˆ × uθ 𝜃ˆ
 
= 𝑟ˆ × (ur 𝑟ˆ ) + 𝑟ˆ ×
∂r ∂r r ∂θ r ∂θ
∂uθ  1 ∂ur  1
𝑟ˆ × 𝜃ˆ + 𝜃ˆ × 𝑟ˆ − uθ 𝜃ˆ × 𝑟ˆ

= 0+
 ∂r r ∂θ r
1 ∂ 1 ∂u r
= 𝑘ˆ (ruθ ) − .
r ∂r r ∂θ

Note that the curl of a two-dimensional vector field defined in a plane points in the
direction perpendicular to the plane following the right-hand rule.

61
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 62

Problems for Lecture 27


1. Let 𝑢 be a two-dimensional vector field given in polar coordinates by

1
k1 𝑟ˆ + k2 𝜃ˆ ,

𝑢=
r

where k1 and k2 are constants. For r 6= 0, determine ∇ · 𝑢 and ∇ × 𝑢.

Solutions to the Problems


Lecture 28 | Polar coordinates
(Laplacian)
View this lecture on YouTube

The two-dimensional Laplacian operator in polar coordinates can be computed using

∂ 1 ∂
∇2 = (∇ · ∇), where ∇ = 𝑟ˆ + 𝜃ˆ .
∂r r ∂θ

We have
   
2 ∂ ˆ 1 ∂ ∂ ˆ 1 ∂
∇ = 𝑟ˆ + 𝜃 · 𝑟ˆ + 𝜃
∂r r ∂θ ∂r r ∂θ
       
∂ ∂ ∂ ˆ1 ∂ ˆ 1 ∂ ∂ ˆ 1 ∂ ˆ 1 ∂
= 𝑟ˆ · 𝑟ˆ + 𝑟ˆ · 𝜃 +𝜃· 𝑟ˆ +𝜃· 𝜃
∂r ∂r ∂r r ∂θ r ∂θ ∂r r ∂θ r ∂θ
∂2 1 ∂ 1 ∂2
= 2
+0+ + 2 2
∂r r ∂r r ∂θ
1 ∂2
 
1 ∂ ∂
= r + 2 2.
r ∂r ∂r r ∂θ

The Laplacian operator in polar coordinates can be applied to either a scalar or vector
field. When applied to a vector field, one needs to differentiate the unit vectors with
respect to θ.

63
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 64

Problems for Lecture 28


1. Consider the fluid flow through a pipe of circular cross-section radius R with a constant
pressure gradient along the pipe length. Define the z-axis to be the symmetry axis down
the center of the pipe in the direction of the flowing fluid. The velocity field in a steady
p
flow then takes the form 𝑢 = u(r )𝑘, where r = x2 + y2 and u satisfies the Navier-Stokes
equation given by
G
∇2 u = − .
νρ
Here, G is the pressure gradient, ν is the kinematic viscosity, and ρ is the fluid density,
all assumed to be constant. You may further assume that the interior surface of the pipe
has no slip so that the fluid velocity is zero when r = R. Solve for the velocity field u(r )
in the pipe’s cross section using the polar coordinate form for the Laplacian. What is the
maximum value of the velocity?

Solutions to the Problems


Lecture 29 | Example: Central
force
View this lecture on YouTube

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.
If the central force is the only relevant force, 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 and acceleration of the point mass is obtained by differentiating 𝑟 with re-
spect to time. The algebra is made complicated because the unit vectors 𝑟ˆ = 𝑟ˆ (θ (t)) and
𝜃ˆ = 𝜃ˆ (θ (t)) are also functions of time. When differentiating, we will need to use the chain
rule in the form
d𝑟ˆ d𝑟ˆ dθ dθ ˆ d𝜃ˆ d𝜃ˆ dθ dθ
= = 𝜃, = = − 𝑟.ˆ
dt dθ dt dt dt dθ dt dt
As is customary, we make use of 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

and the acceleration is given by

d𝑟ˆ d𝜃ˆ
𝑟¨ = r̈𝑟ˆ + ṙ + ṙ θ̇ 𝜃ˆ + r θ̈ 𝜃ˆ + r θ̇
dt dt
= (r̈ − r θ̇ 2 )𝑟ˆ + (2ṙ θ̇ + r θ̈ )𝜃.ˆ

A central force can be written as 𝐹 = − f 𝑟,


ˆ where usually f = f (r ). Newton’s equation,
m𝑟¨ = 𝐹 , then separates into the two component equations,

m(r̈ − r θ̇ 2 ) = − f , m(2ṙ θ̇ + r θ̈ ) = 0.

The second equation is usually expressed as conservation of angular momentum, and


after multiplication by r, is written in the form

d
(mr2 θ̇ ) = 0, or mr2 θ̇ = constant.
dt

65
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 66

Problems for Lecture 29


1. The angular momentum 𝑙 of a point mass m relative to an origin is defined as

𝑙 = 𝑟 × 𝑝,

where 𝑟 is the position vector of the mass and 𝑝 = m𝑟˙ is the momentum of the mass.
Show that
|𝑙| = mr2 |θ̇ |.

2. Prove that  
d𝑣 d 1
m𝑣 · = m |𝑣 |2 .
dt dt 2
This result will be used to derive the conservation of energy.

Solutions to the Problems


Lecture 30 | Change of variables
(single integral)
View this lecture on YouTube

A double (or triple) integral written in Cartesian coordinates, can sometimes be more
easily computed by changing coordinate systems. To do so, we need to derive a change
of variables formula.
It is illuminating to first revisit the change-of-variables formula for single integrals.
Consider the integral ˆ xf
I= f ( x ) dx.
x0

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 calcu-
lation 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
2 2
A = 4R 1 − cos2 θ sin θ dθ = 4R sin2 θ dθ,
0 0

which can be done using the double-angle formula to yield A = πR2 .

67
Lecture 31 | Change of variables
(double integral)
View this lecture on YouTube

We consider the double integral


¨
I= f ( x, y) dx dy.
A

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 transformed 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,

where J is called the Jacobian of the transformation, and is the matrix defined as
!
∂( x, y) ∂x/∂s ∂x/∂t
J= = .
∂(s, t) ∂y/∂s ∂y/∂t

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

68
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 69

Problems for Lecture 31


1. The mass density of a flat object can be specified by σ = σ ( x, y), with units of mass per
unit area. The total mass of the object is found from the double integral
ˆ ˆ
M= σ( x, y) dx dy.
A

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 ˆ ∞ ˆ ∞ ˆ ∞ ˆ ∞
2 2 2 2 + y2 )
I2 = e− x dx = e− x dx e−y dy = e−( x dx dy.
−∞ −∞ −∞ −∞ −∞

Solutions to the Problems


Practice Quiz | Polar coordinates
1. r𝜃ˆ is equal to

a) x𝑖 + y𝑗

b) x𝑖 − y𝑗

c) y𝑖 + x𝑗

d) −y𝑖 + x𝑗

d𝜃ˆ
2. is equal to

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

Solutions to the Practice quiz

70
Lecture 32 | Cylindrical
coordinates
View this lecture on YouTube
Cylindrical coordinates extends polar co-
ordinates to three dimensions by adding a
Cartesian coordinate along the z-axis (see
figure). To conform to standard usage, we
change notation and define the relation-
ship between the Cartesian and the cylin-
drical coordinates to be

x = ρ cos φ, y = ρ sin φ, z = z;

with inverse relation


q
ρ= x 2 + y2 , tan φ = y/x.

A spatial point ( x, y, z) in Cartesian coordinates is now specified by (ρ, φ, z) in cylindrical


coordinates.
The orthogonal unit vectors 𝜌, ˆ and 𝑧ˆ point in the direction of increasing ρ, φ and
ˆ 𝜑,
ˆ
z, respectively, and 𝜌ˆ and 𝜑 are functions of the angle φ. The position vector is given by
𝑟 = ρ𝜌ˆ + z𝑧.
ˆ The differential 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+ 2
∂ρ ρ ∂ρ ρ ∂φ ∂z
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 ∂ρ ρ ∂ρ ρ ∂φ

71
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 72

Problems for Lecture 32


1. Determine the del operator ∇ in cylindrical coordinates. There are several ways to
do this, but a straightforward, though algebraically lengthy one, is to transform from
Cartesian coordinates using
∂ ∂ ∂
∇ = 𝑥ˆ + 𝑦ˆ + 𝑧ˆ ,
∂x ∂y ∂z
and the identities

ˆ
𝑥ˆ = cos φ𝜌ˆ − sin φ𝜑, ˆ
𝑦ˆ = sin φ𝜌ˆ + cos φ𝜑,

and
∂ ∂ sin φ ∂ ∂ ∂ cos φ ∂
= cos φ − , = sin φ + .
∂x ∂ρ ρ ∂φ ∂y ∂ρ ρ ∂φ
2. Compute ∇ · 𝜌ˆ in two ways:

a) With the divergence in cylindrical coordinates;

b) By transforming to Cartesian coordinates.

ˆ ∇ · 𝜑ˆ and ∇ × 𝜑.
3. Using cylindrical coordinates, compute ∇ × 𝜌, ˆ

4. The center-of-mass of a solid with density ρ and total mass M is defined (with respect
to a given coordinate system with position vector 𝑟) as
ˆ
1
𝑅= ρ𝑟dV.
M V

Find the center-of-mass of the uniform solid cone pictured below, with coordinate system
1
specified. You may assume that the volume of the cone is given by V = πa2 b.
3

Solutions to the Problems


Lecture 33 | Spherical coordinates
(Part A)
View this lecture on YouTube

Spherical coordinates are useful for problems


with spherical symmetry. The relationship be-
tween the Cartesian and the spherical coordi-
nates (see figure) is given by

x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ,

where 0 ≤ θ ≤ π and 0 ≤ φ ≤ 2π. A spa-


tial point ( x, y, z) in Cartesian coordinates is now
specified by (r, θ, φ) in spherical coordinates. The
orthogonal unit vectors 𝑟, ˆ and 𝜑ˆ point in the
ˆ 𝜃,
direction of increasing r, θ and φ, respectively.
The position vector is given by
𝑟 = r𝑟,
ˆ

where 𝑟ˆ = 𝑟ˆ (θ, φ); and the differential volume element transforms as

dx dy dz = r2 sin θ dr dθ dφ.

Using trigonometry, 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 φ 𝑗;

with inverse relation

𝑖 = sin θ cos φ 𝑟ˆ + cos θ cos φ 𝜃ˆ − sin φ 𝜑,


ˆ

𝑗 = sin θ sin φ 𝑟ˆ + cos θ sin φ 𝜃ˆ + cos φ 𝜑,


ˆ
ˆ
𝑘 = cos θ 𝑟ˆ − sin θ 𝜃.

By differentiating the unit vectors, we can derive the sometimes useful identities

∂𝑟ˆ ˆ ∂𝜃ˆ ∂𝜑ˆ


= 𝜃, = −𝑟,
ˆ = 0;
∂θ ∂θ ∂θ
∂𝑟ˆ ˆ ∂𝜃ˆ ˆ ∂𝜑ˆ ˆ
= sin θ 𝜑, = cos θ 𝜑, = − sin θ 𝑟ˆ − cos θ 𝜃.
∂φ ∂φ ∂φ

73
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 74

Problems for Lecture 33


1. Write the relationship between the spherical coordinate unit vectors and the Cartesian
unit vectors in matrix form. Notice that Q, the transformation matrix for this relationship,
is orthogonal. Invert the relationship using the formula Q−1 = QT .

2. Use the Jacobian change-of-variables formula for triple integrals, given by


 
∂x/∂r ∂x/∂θ ∂x/∂φ
dx dy dz = det  ∂y/∂r ∂y/∂φ  dr dθ dφ,
 
∂y/∂θ
∂z/∂r ∂z/∂θ ∂z/∂φ

to derive dx dy dz = r2 sin θ dr dθ dφ.

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?

Solutions to the Problems


Lecture 34 | Spherical coordinates
(Part B)
View this lecture on YouTube

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 the gradient of f is given by

∂f 1 ∂f ˆ 1 ∂f ˆ
∇f = 𝑟ˆ + 𝜃+ 𝜑.
∂r r ∂θ r sin θ ∂φ

Some messy algebra will yield for the Laplacian of the scalar field f ,

∂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φ
∇·𝐴 = 2
(r Ar ) + (sin θ Aθ ) + ,
r ∂r r sin θ ∂θ r sin θ ∂φ
𝜃ˆ 𝜑ˆ ∂
     
𝑟ˆ ∂ ∂Aθ 1 ∂Ar ∂ ∂Ar
∇×𝐴 = (sin θ Aφ ) − + − (rAφ ) + (rAθ ) − .
r sin θ ∂θ ∂φ r sin θ ∂φ ∂r r ∂r ∂θ

75
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 76

Problems for Lecture 34


1. Using the formulas for the spherical coordinate unit vectors in terms of the Cartesian
unit vectors, prove that
∂𝑟ˆ ˆ ∂𝑟ˆ ˆ
= 𝜃, = sin θ 𝜑.
∂θ ∂φ
2. Compute the divergence and curl of the spherical coordinate unit vectors.

3. It may be useful to know that the Laplacian in spherical coordinates depends on


whether it acts on a a scalar or a vector field. The Laplacian of a vector field in spherical
coordinates may be derived using the curl of a curl identity,

∇2 𝐴 = ∇(∇ · 𝐴) − ∇ × (∇ × 𝐴).

We consider here two simple cases. (The general form for the Laplacian in spherical
coordinates for a vector field can be found online.)

a) If in spherical coordinates, f = f (r ), show that


 
1 d df
∇2 f = r2 .
r2 dr dr

b) If in spherical coordinates, 𝐴 = Ar (r )𝑟,


ˆ show that
 
2 d 1 d 2
∇ 𝐴= (r Ar ) 𝑟.
ˆ
dr r2 dr

4. Using spherical coordinates, show that for r 6= 0,


 
1
2
∇ = 0.
r

5. Using spherical coordinates, show that for r 6= 0,


 
𝑟ˆ
∇2 = 0.
r2

Solutions to the Problems


Practice Quiz | Cylindrical and
spherical
coordinates
 
1
x2 + y2 , the function ∇2
p
1. With ρ = is equal to
ρ
a) 0
1
b)
ρ3
2
c)
ρ3
3
d)
ρ3

2. Let 𝑟 = x𝑖. Then (𝑟, ˆ 𝜑ˆ ) is equal to


ˆ 𝜃,

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

Solutions to the Practice quiz

77
Week IV

Line and surface integrals

This week we learn about line integrals and surface integrals. We learn how to take the line
integral of a scalar field and use line integrals to compute arc lengths. We then learn how to take
line integrals of vector fields by taking the dot product of the vector field with tangent unit vectors
to the curve. Consideration of the line integral of a force field results in the work-energy theorem.
Next, we learn how to take the surface integral of a scalar field, and compute the surface areas of
a cylinder, cone, sphere and paraboloid. We then learn how to take the surface integral of a vector
field by taking the dot product of the vector field with normal unit vectors to the surface. The
surface integral of a velocity field is used to define the mass flux of a fluid through the surface.

78
Lecture 35 | Line integral of a
scalar field
View this lecture on YouTube

Define the line integral of a scalar field f = f (𝑟 ) over a curve C by subdividing the
curve into small scalar elements of length ds, multiplying each ds by the average value of
f on the element, and summing over all elements. We write the line integral as
ˆ
f (𝑟 ) ds.
C

For simplicity, we restrict our discussion here to curves in the x-y plane and write f (𝑟 ) =
f ( x, y). By the Pythagorean theorem, we can also write
q
ds = (dx )2 + (dy)2 ,

and it is possible to convert a line integral into an ordinary one-dimensional integral in


one of two ways. First, if the curve can be specified by a one-dimensional function, such
as y = y( x ) from x = x0 to x f , then dy = y0 ( x )dx and
q
ds = 1 + y0 ( x )2 dx.

We then have ˆ ˆ xf q
f ( x, y) ds = f ( x, y( x )) 1 + y0 ( x )2 dx.
C x0

Second, if the curve can be parameterized by t, such as x = x (t) and y = y(t), with t
ranging from t = t0 to t f , then dx = ẋ (t)dt and dy = ẏ(t)dt, and
q
ds = ẋ (t)2 + ẏ(t)2 dt.

The line integral then becomes


ˆ ˆ tf q
f ( x, y) ds = f ( x (t), y(t)) ẋ (t)2 + ẏ(t)2 dt.
C t0

79
WEEK IV. LINE AND SURFACE INTEGRALS 80

Problems for Lecture 35


1. The perimeter (or circumference) of a closed curve C can be computed from
ˆ
P= ds.
C

Compute the circumference of a circle of radius R by parameterizing the circle and per-
forming a line integral.

2. The linear mass density of a wire lying flat in the x-y plane can be specified by λ =
λ( x, y), with units of mass per unit length. The total mass of the wire is found from the
line integral ˆ
M= λ( x, y) ds,
C

where the integration is over the curve C formed by the wire. Suppose a semi-circular
wire of radius R has linear mass density λ0 on one end and λ1 on the other end, and its
linear mass density increases linearly along the length of the wire. Find the total mass of
the wire.

Solutions to the Problems


Lecture 36 | Arc length
View this lecture on YouTube

The arc length P of a curve C, which is a special case of a line integral of a scalar field, is
given by ˆ
P= ds.
C

For even simple curves, this integral may not have an analytical solution. For example,
consider the circumference of an ellipse. The equation for an ellipse centered at the origin
with width 2a and height 2b is given by

x2 y2
+ = 1.
a2 b2

Assuming a ≥ b, the eccentricity of this ellipse is defined as


q
e= 1 − (b/a)2 .

To compute the circumference of an ellipse, we parameterize the ellipse using

x (θ ) = a cos θ, y(θ ) = b sin θ,

where θ goes from 0 to 2π. The infinitesimal arc length ds is then given by
q q
ds = (dx )2 + (dy)2 = x 0 (θ )2 + y0 (θ )2 dθ
p
= a2 sin2 θ + b2 cos2 θ dθ
q
= a 1 − [1 − (b/a)2 ] cos2 θ dθ
p
= a 1 − e2 cos2 θ dθ.

Therefore, the circumference of an ellipse — or perimeter P — is given by the line integral


ˆ ˆ 2π p
P= ds = a 1 − e2 cos2 θ dθ
C 0
ˆ π/2 p
= 4a 1 − e2 cos2 θ dθ,
0

where the final integral is over one-quarter of the arc length of the ellipse , and is called
the complete elliptic integral of the second kind.

81
WEEK IV. LINE AND SURFACE INTEGRALS 82

Problems for Lecture 36


1. Determine a formula for the perimeter of an ellipse that deviates slightly from a circle.
Assume that the ellipse is specified by a and b (and the eccentricity e) as defined in the
lecture, and that the radius of the circle is given by a. Start with the exact integral formula
for the perimeter of an ellipse. Taylor series expand in e keeping only terms up to e2 , and
integrate.

Solutions to the Problems


Lecture 37 | Line integral of a
vector field
View this lecture on YouTube

Let 𝑢 = 𝑢(𝑟 ) be a vector field, C a directed curve, and d𝑟 the infinitesimal displace-
ment vector along C. Define a unit vector 𝑡ˆ that points in the direction of d𝑟 such that
ˆ Then the line integral of 𝑢 along C is defined to be
d𝑟 = 𝑡ds.
ˆ ˆ
𝑢 · d𝑟 = 𝑢 · 𝑡ˆ ds,
C C

ˆ If the curve is closed, sometimes a circle is


which is a line integral of the scalar field 𝑢 · 𝑡.
written in the middle of the integral sign.
A general method to calculate the line integral of a vector field is to parameterize the
curve. Let the curve be parameterized by the function 𝑟 = 𝑟 (t) as t goes from t0 to t f .
Using d𝑟 = (d𝑟/dt)dt, the line integral becomes
ˆ ˆ tf
d𝑟
𝑢 · d𝑟 = 𝑢(𝑟 (t)) · dt.
C t0 dt

Sometimes the curve is simple enough that d𝑟 can be computed directly.


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 C1 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 C2 , we parameterize the straight 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 depend only on the starting and ending
points of the curves.

83
WEEK IV. LINE AND SURFACE INTEGRALS 84

Problems for Lecture 37


1. In the x-y plane, calculate the line integral of the vector field 𝑢 = −y𝑖 + x𝑗 counter-
clockwise around a square with vertices (0, 0), ( L, 0), ( L, L), and (0, L).

2. In the x-y plane, calculate the line integral of the vector field 𝑢 = −y𝑖 + x𝑗 counter-
clockwise around the circle of radius R centered at the origin.

Solutions to the Problems


Lecture 38 | Work-energy theorem
View this lecture on YouTube

Newton’s second law of motion for a mass m with velocity 𝑣 acted on by a force 𝐹 is
given by
d𝑣
m = 𝐹.
dt
The conservation of energy is an important concept in physics and requires a definition of
work. We first take the dot product of both sides of Newton’s law with the velocity vector
and use the identity  
d𝑣 d 1
m𝑣 · = m |𝑣 |2
dt dt 2
to obtain  
d 1
m |𝑣 |2 = 𝐹 · 𝑣.
dt 2
Integrating from an initial time ti to a final time t f , with 𝑣 (ti ) = 𝑣i and 𝑣 (t f ) = 𝑣 f , we
have ˆ ˆ
tf
1 1
m | 𝑣 f | 2 − m | 𝑣i | 2 = 𝐹 · 𝑣 dt = 𝐹 · d𝑟,
2 2 ti C

where we have used d𝑟 = 𝑣dt. The line integral is taken along the curve C traversed by
the mass between the times ti and t f . We define the kinetic energy T of a mass m by

1
T= m |𝑣 |2 ,
2

and the work W done by a force on a mass as it moves along a curve C as


ˆ
W= 𝐹 · d𝑟.
C

We these definitions, the work-energy theorem states that the work done on a mass by a
force is equal to the change in the kinetic energy of the mass, or in equation form,

W = T f − Ti .

85
WEEK IV. LINE AND SURFACE INTEGRALS 86

Problems for Lecture 38


1. A mass m is dropped from a building of height h. Assuming the mass falls with
constant acceleration − g, calculate the work done by gravity and compute the velocity of
the mass as it hits the ground.

Solutions to the Problems


Practice Quiz | Line integrals
1. The arc length of the parabola y = x2 for 0 ≤ x ≤ 1 is given by the integral
ˆ 1√
a) 1 + 2x dx
0
ˆ 1 √
b) 1 + 4x dx
0
ˆ 1 p
c) 1 + 2x2 dx
0
ˆ 1 p
d) 1 + 4x2 dx
0

2. The line integral of the vector field 𝑢 = −y𝑖 + x𝑗 counterclockwise around a triangle
with vertices (0, 0), ( L, 0), and (0, L) is equal to

a) 0
1 2
b) L
2
c) L2

d) 2L2

3. A mass m is shot upward from the ground with a speed v0 , attains a maximum height,
and then falls back to ground. Calculate the work done by gravity on the mass.

a) 0

b) v20 /4g

c) v20 /2g

d) v20 /g

Solutions to the Practice quiz

87
Lecture 39 | Surface integral of a
scalar field
View this lecture on YouTube

Let S be a surface in a three-dimensional space. Define the surface integral of a scalar


field f = f (𝑟 ) over S by subdividing the surface into small elements dS, multiplying each
element by the average value of f on the element, and summing over all elements. We
write the surface integral as ˆ
f (𝑟 ) dS.
S

A parameterization of the surface S is given by

𝑟 (u, v) = x (u, v)𝑖 + y(u, v)𝑗 + z(u, v)𝑘,

where the position vector 𝑟 points to the surface, and the surface is spanned by 𝑟 as
the parameters u and v vary. The surface integral is performed over u and v, and the
infinitesimal surface element dS is found from the area defined by the tangent vectors
∂𝑟/∂u and ∂𝑟/∂v to the surface by way of the cross product, that is,

∂𝑟 ∂𝑟
dS = × du dv.
∂u ∂v

If the surface lies over an area A in the x-y plane and can be describe by z = z( x, y), then
we can parameterize the surface by 𝑟 ( x, y) and write

𝑟 ( x, y) = x𝑖 + y𝑗 + z( x, y)𝑘.

Therefore,
∂𝑟 ∂z ∂𝑟 ∂z
= 𝑖 + 𝑘, = 𝑗 + 𝑘,
∂x ∂x ∂y ∂y
and the cross product is given by

𝑖 𝑗 𝑘
∂𝑟 ∂𝑟 ∂z ∂z
× = 1 0 ∂z/∂x = − 𝑖 − 𝑗 + 𝑘.
∂x ∂y ∂x ∂y
0 1 ∂z/∂y

The surface integral in this case becomes

ˆ ˆ ˆ
s  2  2
∂z ∂z
f (r) dS = f (𝑟 ( x, y)) 1+ + dx dy.
S A ∂x ∂y

88
WEEK IV. LINE AND SURFACE INTEGRALS 89

Problems for Lecture 39


´
1. Compute the lateral surface area A = S dS of a cylinder (see figure) in two ways.

a) Unroll the cylinder and compute the area of the resulting rectangle.

b) Define the cylinder parametrically as

𝑟 = a cos θ 𝑖 + a sin θ 𝑗 + z 𝑘, for 0 ≤ z ≤ b and 0 ≤ θ ≤ 2π,

and compute the surface integral.


´
2. Compute the lateral surface area A = S dS of a cone (see figure) in two ways.

a) Unroll the cone and compute the area of the resulting circular sector.

b) Define the cone parametrically as

az az
𝑟= cos θ 𝑖 + sin θ 𝑗 + z 𝑘, for 0 ≤ z ≤ b and 0 ≤ θ ≤ 2π,
b b

and compute the surface integral.

Solutions to the Problems


Lecture 40 | Surface area of a
sphere
View this lecture on YouTube

Surface area is given by the integral


ˆ
S= dS,
S

where the integral is evaluated by parameterizing the surface. Here, we compute the
surface area of a sphere of radius R. The sphere can be parameterized using spherical
coordinates as

𝑟 (θ, φ) = R sin θ cos φ𝑖 + R sin θ sin φ𝑗 + R cos θ𝑘, for 0 ≤ θ ≤ π and 0 ≤ φ ≤ 2π.

To find the infinitesimal surface element, we compute the partial derivatives of 𝑟:

∂𝑟 ∂𝑟
= R cos θ cos φ 𝑖 + R cos θ sin φ 𝑗 − R sin θ 𝑘, = − R sin θ sin φ 𝑖 + R sin θ cos φ 𝑗.
∂θ ∂φ

The cross product is

𝑖 𝑗 𝑘
∂𝑟 ∂𝑟
× = R cos θ cos φ R cos θ sin φ − R sin θ
∂θ ∂φ
− R sin θ sin φ R sin θ cos φ 0
= R2 sin2 θ cos φ 𝑖 + R2 sin2 θ sin φ 𝑗 + R2 sin θ cos θ 𝑘,

so that
q
∂𝑟 ∂𝑟
× = R2 sin4 θ cos2 φ + sin4 θ sin2 φ + sin2 θ cos2 θ
∂θ ∂φ
q
= R2 sin θ sin2 θ (sin2 φ + cos2 φ) + cos2 θ
= R2 sin θ.

Therefore,
∂𝑟 ∂𝑟
dS = × dθ dφ = R2 sin θ dθ dφ.
∂θ ∂φ

Recall that for a sphere, dV = r2 sin θ dr dθ dφ, so that as one would expect, dSdr is equal
to dV at r = R.
The surface area of a sphere can be found from the integral
ˆ ˆ 2π ˆ π ˆ 2π ˆ π
S= dS = R2 sin θ dθ dφ = R2 dφ sin θ dθ = 4πR2 .
S 0 0 0 0

90
WEEK IV. LINE AND SURFACE INTEGRALS 91

Problems for Lecture 40


´
1. Compute the lateral surface area S = S dS of a paraboloid (see figure), defined by
 
a2 z = b x 2 + y2 , for 0 ≤ z ≤ b.

Compute the resulting two-dimensional integral using polar coordinates.

Solutions to the Problems


Lecture 41 | Surface integral of a
vector field
View this lecture on YouTube

Let 𝑢 = 𝑢(𝑟 ) be a vector field, S a surface in three-dimensional space, and d𝑆 an in-


finitesimal surface element with normal unit vector given by 𝑛.
ˆ The surface integral of 𝑢
over S is defined to be ˆ ˆ
𝑢 · d𝑆 = 𝑢·𝑛
ˆ dS,
S S

which is a surface integral of the scalar field 𝑢 · 𝑛.


ˆ The integration surface can be either
open or closed. For an open surface, the directions of the normal vectors need to be
specified (such as up or down), but for a closed surface, the 𝑛’s
ˆ are always assumed to be
in the outward direction.
Example: Compute the surface integral of 𝑟 = x𝑖 + y𝑗 + z𝑘 over a cube centered at the origin
with sides parallel to the axes and side lengths equal to L .
The faces of the cube are located at x = ± L/2, y = ± L/2 and z = ± L/2, and the surface
area of each face is L2 . For the face at x = L/2, say, we have 𝑟 = ( L/2)𝑖 + y𝑗 + z𝑘 and
d𝑆 = 𝑖dS. The integral over this face is given by
ˆ ˆ
L L3
𝑟 · d𝑆 = dS = .
S 2 S 2

One can see that the surface integrals over all six faces of the cube are equal, and we
obtain for the surface integral over the entire cube,
˛
L3
𝑟 · d𝑆 = 6 × = 3L3 ,
S 2

equal to three times the volume of the cube. The circle notation on the integral sign
signifies integration over a closed surface.

Example: Compute the surface integral of 𝑟 = x𝑖 + y𝑗 + z𝑘 over a sphere centered at the origin
with radius R .
Using spherical coordinates, on the surface of a sphere of radius R centered at the origin,
we have 𝑟 = R𝑟, ˆ and the surface area of the sphere is 4πR2 . Therefore,
ˆ d𝑆 = 𝑟dS
˛ ˛
𝑟 · d𝑆 = R dS = 4πR3 ,
S S

equal to three times the volume of the sphere.

92
WEEK IV. LINE AND SURFACE INTEGRALS 93

Problems for Lecture 41


1. Compute the surface integral of 𝑟 = x𝑖 + y𝑗 + z𝑘 over a closed cylinder centered at the
origin with with radius a and length l.

Solutions to the Problems


Lecture 42 | Flux integrals
View this lecture on YouTube

The surface integral of a vector field 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 ˆ
ρ𝑢 · d𝑆
S

computes the mass flux, that is, the mass passing through the surface S per unit time.
Flux integrals for the electric and magnetic vector fields are also defined.
If S is a closed surface, then the normal vector 𝑛
ˆ is assumed to be in the outward
direction, and a positive value for the flux integral implies a net flux from inside the
surface to outside; a negative value implies a net flux from outside to inside. If a fluid is
incompressible, a positive mass flux indicates a source of fluid inside the closed surface,
and a negative mass flux indicates a sink.
Example: Find the flux of the electric field through a sphere of radius R centered at the origin,
where a point charge q is located. The electric field due to the point charge is given in spherical
coordinates by Coulomb’s law,
q
𝐸= ˆ
𝑟.
4πe0 r2

To compute the flux integral, we use d𝑆 = 𝑟ˆ dS, where the surface area of the sphere is
given by S = 4πR2 . We have
˛ ˛
q q
𝐸 · d𝑆 = 2
dS = ,
S 4πe 0R e0

which is observed to be independent of R because of the Coulomb inverse square law.

94
WEEK IV. LINE AND SURFACE INTEGRALS 95

Problems for Lecture 42


1. Calculate the mass flux of a laminar fluid of density ρ, viscosity ν and constant pressure
gradient G passing through a cross section of a pipe of radius R. Choosing z as the
symmetry axis for the pipe, the velocity of the fluid is given by
  r 2 
𝑢(𝑟 ) = um 1 − 𝑘,
R

where r is the radial coordinate in the cross section and

GR2
um =
4νρ

is the maximum velocity of the fluid in the center of the pipe.

Solutions to the Problems


Practice Quiz | Surface integrals
1. The shape of a donut or bagel is called a torus. Let R be the radius from the center of
the hole to the center of the torus tube and r be the radius of the torus tube. Then the
equation for a torus symmetric about the z-axis is given by
 q 2
R− x2 + y2 + z2 = r 2 .

The torus may be parameterized by

x = ( R + r cos θ ) cos φ, y = ( R + r cos θ ) sin φ, z = r sin θ,

where 0 ≤ θ ≤ 2π and 0 ≤ φ ≤ 2π. The infinitesimal surface element dS for the torus is
given by

a) R(r + R cos φ) dθ dφ

b) r ( R + r cos φ) dθ dφ

c) R(r + R cos θ ) dθ dφ

d) r ( R + r cos θ ) dθ dφ

2. Consider a closed 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

Solutions to the Practice quiz

96
Week V

Fundamental Theorems

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 the law of conservation of energy, continuity equations, define the divergence and
curl in coordinate-free form, and convert the integral version of Maxwell’s equations to differential
form.

97
Lecture 43 | 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
and the standard fundamental theorem of calculus, we have
ˆ ˆ t2 ˆ t2
d𝑟 d
∇φ · d𝑟 = ∇φ(𝑟 ) · dt = φ(𝑟 ) dt
C t1 dt t1 dt
= φ(𝑟 (t2 )) − φ(𝑟 (t1 )) = φ(𝑟2 ) − φ(𝑟1 ).

A more direct way to derive this result is to write the differential

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

for any closed curve C.


Example: Compute the line integral of 𝑟 = x𝑖 + y𝑗 in the x-y plane from the origin to the point
(1, 1).
We have 𝑟 = 21 ∇( x2 + y2 ), so that the line integral is path independent. Therefore,

ˆ ˆ (1,1)
1 1 2
𝑟 · d𝑟 = ∇( x2 + y2 ) · d𝑟 = ( x + y2 ) = 1.
C 2 C 2 (0,0)

98
WEEK V. FUNDAMENTAL THEOREMS 99

Problems for Lecture 43


1. Let φ(𝑟 ) = x2 y + xy2 + z.

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).

Solutions to the Problems


Lecture 44 | Conservative vector
fields
View this lecture on YouTube

For a vector field 𝑢 defined on R3 , except perhaps at isolated singularities, the follow-
ing conditions are equivalent:

1. ∇ × 𝑢 = 0;

2. 𝑢 = ∇φ for some scalar field φ = φ(𝑟 );


ˆ
3. 𝑢 · d𝑟 is path independent for any curve C;
C
˛
4. 𝑢 · d𝑟 = 0 for any closed curve C.
C

When these conditions hold, we say that 𝑢 is a conservative vector field.


Example: Let 𝑢( x, y) = x2 (1 + y3 )𝑖 + y2 (1 + x3 )𝑗. Show that 𝑢 is a conservative vector field,
and determine φ = φ( x, y) such that 𝑢 = ∇φ.
To show that 𝑢 is a conservative vector field, we can prove ∇ × 𝑢 = 0:

𝑖 𝑗 𝑘
∇×𝑢 = ∂/∂x ∂/∂y ∂/∂z = (3x2 y2 − 3x2 y2 )𝑘 = 0.
x 2 (1 + y3 ) y2 (1 + x 3 ) 0

To find the scalar field φ, we solve

∂φ ∂φ
= x 2 (1 + y3 ), = y2 (1 + x 3 ).
∂x ∂y

Integrating the first equation with respect to x holding y fixed, we find


ˆ
1 3
φ= x2 (1 + y3 ) dx = x (1 + y3 ) + f ( y ),
3

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

100
WEEK V. FUNDAMENTAL THEOREMS 101

Problems for Lecture 44


1. Let 𝑢 = (2xy + z2 )𝑖 + (2yz + x2 )𝑗 + (2zx + y2 )𝑘.

a) Show that 𝑢 is a conservative vector field.

b) Calculate the scalar field φ such that 𝑢 = ∇φ.

Solutions to the Problems


Lecture 45 | Conservation of
energy
View this lecture on YouTube

The work-energy theorem states that the work done on a mass by a force is equal to
the change in the kinetic energy of the mass, or
ˆ
𝐹 · d𝑟 = T f − Ti ,
C

where the kinetic energy of a mass m moving with velocity 𝑣 is given by

1
T= m |𝑣 |2 .
2

If 𝐹 is a conservative vector field, then we can write

𝐹 = −∇V,

where V = V (𝑟 ) is called the potential energy. Using the gradient theorem, we have
ˆ
T f − Ti = − ∇V · d𝑟 = Vi − Vf ,
C

where Vi and Vf are the initial and final potential energies of the mass. Rearranging terms,
we have
Ti + Vi = T f + Vf .

In other words, the sum of the kinetic and potential energy is conserved.
Example: Find the potential energy of a mass m in the gravitational field of a mass M.
We place the origin of our coordinate system on the mass M. The gravitational force on
m at position 𝑟 is then given by the inverse square law, written as

mM𝑟
𝐹 = −G .
r3

In the problems of Lecture 17, we have shown that ∇(1/r ) = −𝑟/r3 . Therefore, the
potential energy of m is given by
mM
V = −G .
r

102
WEEK V. FUNDAMENTAL THEOREMS 103

Problems for Lecture 45


1. The escape velocity is the smallest initial velocity for a mass on the Earth’s surface to
escape from the Earth’s gravitational field. Using the conservation of energy, determine
the escape velocity of a mass m. Define M to be the mass of the Earth, and R its radius.
The gravitational constant G and the acceleration due to gravity on the surface of the
Earth g are related by
GM
g= .
R2
Write the escape velocity in terms of g and R.

Solutions to the Problems


Practice Quiz | Gradient theorem
ˆ
1. Let φ(𝑟 ) = xyz. The value of ∇φ · d𝑟 from (0, 0, 0) to (1, 1, 1) is equal to
C

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,
C
is given by

a) 0

b) 1

c) 2

d) 3

3. Let 𝑢 = (2x + y)𝑖 + (2y + x )𝑗 + 𝑘. If 𝑢 = ∇φ, then φ can be equal to

a) ( x + y)2 + z

b) ( x − y)2 + z

c) x2 + xy + y2 + z

d) x2 − xy + y2 + z

Solutions to the Practice quiz

104
Lecture 46 | 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 theo-
rem 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 flux of u through the six-sided bounding surface, thus proving
the divergence theorem for a 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.

105
WEEK V. FUNDAMENTAL THEOREMS 106

Problems for Lecture 46


1. Prove the divergence theorem for a sphere of radius R centered at the origin. Use
spherical coordinates.

Solutions to the Problems


Lecture 47 | Divergence theorem
(example 1)
View this lecture on YouTube

The divergence theorem is given by


ˆ ˛
(∇ · 𝑢) dV = 𝑢 · d𝑆.
V S

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.

107
WEEK V. FUNDAMENTAL THEOREMS 108

Problems for Lecture 47


1. Test the divergence theorem using 𝑢 = x2 y 𝑖 + y2 z 𝑗 + z2 x 𝑘 for a cube of side L lying
in the first octant with a vertex at the origin.

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.

Solutions to the Problems


Lecture 48 | Divergence theorem
(example 2)
View this lecture on YouTube

The divergence theorem is given by


ˆ ˛
(∇ · 𝑢) dV = 𝑢 · d𝑆.
V S

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 θ ∂φ

Here, ur = r2 is the only nonzero component of 𝑢, and we have

1 d  4
∇·𝑢 = r = 4r.
r2 dr

Therefore, using dV = r2 sin θ dr dθ dφ, we have


ˆ ˆ 2π ˆ π ˆ R
(∇ · 𝑢) dV = 4r3 sin θ dr dθ dφ
V 0 0 0
ˆ 2π ˆ π ˆ R
= dφ sin θ dθ 4r3 dr = 4πR4 .
0 0 0

For the right-hand-side of the divergence theorem, we have 𝑢 = R2 𝑟ˆ and d𝑆 = 𝑟R


ˆ 2 sin θ dθ dφ,
so that ˛ ˆ ˆ
2π π
𝑢 · d𝑆 = R4 sin θ dθ dφ = 4πR4 .
S 0 0

109
WEEK V. FUNDAMENTAL THEOREMS 110

Problems for Lecture 48


1. Test the divergence theorem using 𝑢 = 𝑟/r
ˆ for a sphere of radius R centered at the
origin.

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.

3. With Λ a constant, consider the velocity field of a fluid given by

Λ( x𝑖 + y𝑗 + z𝑘 )
𝑢( x, y, z) = .
4π ( x2 + y2 + z2 )3/2

a) Using spherical coordinates, show that

Λ𝑟ˆ
𝑢(r ) = .
4πr2

b) Using spherical coordinates, show that ∇ · 𝑢 = 0 provided r 6= 0.

c) Using the divergence theorem, show that


ˆ
∇ · 𝑢 dV = Λ,
V

provided that the volume V contains the origin, and is zero otherwise. You have
therefore shown that the divergence of the velocity field is given by

∇ · 𝑢 = Λδ(𝑟 ),

where δ(𝑟 ) is the three-dimensional Dirac delta function. This velocity field is called
a source flow.

Solutions to the Problems


Lecture 49 | Continuity equation
View this lecture on YouTube

The divergence theorem is often used to derive a continuity equation, which expresses
the local conservation 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 the scalar
function ρ(𝑟, t) be the mass density of a fluid at position 𝑟 and time t, and 𝑢(𝑟, t) be
the fluid velocity. We will assume no sources or sinks of fluid. We consider 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 surround-
ing V, and one has ˛
dM
=− ρ𝑢 · d𝑆.
dt S

Now the mass of the fluid is given in terms of the mass density by
ˆ
M= ρ dV,
V

and application of the divergence theorem to the surface integral results in


ˆ ˆ
d
ρ dV = − ∇ · (ρ𝑢) dV.
dt V V

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 everywhere, and we have derived the continuity equation

∂ρ
+ ∇ · (ρ𝑢) = 0.
∂t

For an incompressible fluid, for which the mass density ρ is uniform and constant, the
continuity equation reduces to
∇ · 𝑢 = 0.

A vector field with zero divergence is called incompressible or solenoidal.

111
WEEK V. FUNDAMENTAL THEOREMS 112

Problems for Lecture 49


1. Show that the continuity equation can be written as

∂ρ
+ 𝑢 · ∇ρ + ρ∇ · 𝑢 = 0.
∂t

2. The electric charge density (charge per unit volume) is usually written using the same
symbol as the mass density, ρ(𝑟, 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.

Solutions to the Problems


Practice Quiz | Divergence
theorem
1. The integral of 𝑢 = yz𝑖 + xz𝑗 + xy𝑘 over the closed surface of a right circular cone with
radius R and length L and base in the x-y plane is given by

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
S
equal to

a) 0

b) πR2 L

c) 2πR2 L

d) 3πR2 L

3. Which velocity field is not incompressible (∇ · 𝑢 6= 0)?


1
a) 𝑢 = xy𝑖 − y2 𝑗
2
b) 𝑢 = (1 + x )𝑖 + (1 − y)𝑗
 
2 1 2
c) 𝑢 = ( x − xy)𝑖 + y − 2xy 𝑗
2

d) 𝑢 = ( x + y)2 𝑖 + ( x − y)2 𝑗

Solutions to the Practice quiz

113
Lecture 50 | Green’s theorem
View this lecture on YouTube

Green’s theorem is a two-dimensional version of Stokes’ theorem (which applies to


three dimensions), 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

We will first prove Green’s theorem for a


rectangle with sides parallel to the axes. Let
the rectangle of area S be defined by a ≤ x ≤
b and c ≤ y ≤ d, as pictured here. The area
integral is given by

ˆ  
∂u2 ∂u1
− dS
S ∂x ∂y
ˆ dˆ b ˆ bˆ d
∂u2 ∂u1
= dx dy − dy dx.
c a ∂x a c ∂y

The inner integrals can be done using the


fundamental theorem of calculus, and we ob-
tain
ˆ   ˆ d ˆ b
∂u2 ∂u
− 1 dS = [u2 (b, y) − u2 ( a, y)] dy + [u1 ( x, c) − u1 ( x, d)] dx
S ∂x ∂y
˛c a

= (u1 dx + u2 dy).
C

Note that the line integral is done so that the bounded area is always to the left, which
means counterclockwise.
Now, given any closed smooth curve in the x-y plane enclosing an area, we can subdi-
vide 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 rectangles add, whereas all
the line integrals over the internal sides of the rectangles cancel. The only remaining line
integrals are on the perimeter and approximate the given bounding curve. The result is
Green’s theorem for any area S in the plane bounded by a curve C.

114
WEEK V. FUNDAMENTAL THEOREMS 115

Problems for Lecture 50


1. Test Green’s theorem using 𝑢 = −y𝑖 + x𝑗 for a square of side L lying in the first
quadrant with vertex at the origin.

2. Test Green’s theorem using 𝑢 = −y𝑖 + x𝑗 for a circle of radius R centered at the origin.

Solutions to the Problems


Lecture 51 | Stokes’ theorem
View this lecture on YouTube

Green’s theorem for a differentiable two-dimensional vector field,

𝑢 = u1 ( x, y) 𝑖 + u2 ( x, y) 𝑗,

and a smooth curve C in the x-y plane surrounding an area S is given by


ˆ   ˛
∂u2 ∂u
− 1 dS = (u1 dx + u2 dy).
S ∂x ∂y C

Green’s theorem can be extended to three dimensions. With

𝑢 = u1 ( x, y, z) 𝑖 + u2 ( x, y, z) 𝑗 + u3 ( x, y, z)𝑘,

we see that
∂u2 ∂u
− 1 = (∇ × 𝑢) · 𝑘.
∂x ∂y
And with
d𝑆 = 𝑘 dS, u1 dx + u2 dy = 𝑢 · d𝑟,

Green’s theorem can be rewritten in the form


ˆ ˛
(∇ × 𝑢) · d𝑆 = 𝑢 · d𝑟.
S C

This restatement of Green’s theorem, if interpreted as an equation in three dimensions,


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 hemisphere 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.

116
WEEK V. FUNDAMENTAL THEOREMS 117

Problems for Lecture 51


1. From Stokes’ theorem, determine the form of Green’s theorem for a curve lying in the

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.

3. Consider the two-dimensional velocity field of a fluid given by

Γ −y𝑖 + x𝑗
 
𝑢( x, y) = .
2π x 2 + y2

a) Using cylindrical coordinates, show that

Γ𝜑ˆ
𝑢(ρ, φ, z) = .
2πρ

b) The vorticity field of the fluid is defined as 𝜔 = ∇ × 𝑢. Using cylindrical coordi-


nates, show that 𝜔 = 0 provided ρ 6= 0.

c) Using Stokes’ theorem, show that the surface integral of the vorticity field over an
area in the x-y plane containing the origin is equal to Γ, and therefore that the
vorticity is given by 𝜔 = Γδ( x )δ(y)𝑘, ˆ where δ( x ) and δ(y) are one-dimensional
Dirac delta functions. This is the definition of a point vortex of strength Γ.

Solutions to the Problems


Practice Quiz | Stokes’ theorem

˛
1. Let 𝑢 = −y𝑖 + x𝑗. Compute 𝑢 · d𝑟 for
C
the quarter circle of radius R as illustrated.
Here, it is simpler to apply Stokes’ theorem
to compute an area integral. The answer is

a) 0
1 2
b) 2 πR

c) πR2

d) 2πR2
ˆ
−y x
2. Let 𝑢 = 2 𝑖+ 2 𝑗. Compute the value of (∇ × 𝑢) · d𝑆 over a circle of
x + y2 x + y2 S
radius R centered 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
C
vertex at the origin. Here, it is simpler to compute an area integral. The answer is

a) 0
1
b)
3
2
c)
3
d) 1

Solutions to the Practice quiz

118
Lecture 52 | Meaning of the diver-
gence and the curl
View this lecture on YouTube

With 𝑢 a differentiable vector field defined inside and on a smooth closed surface S en-
closing 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 on which a differentiable vector field
u is defined. 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 whirling (say, turbulent) fluid, composed of eddies of all different sizes.

119
WEEK V. FUNDAMENTAL THEOREMS 120

Problems for Lecture 52


1. The incompressible Navier-Stokes equation governing fluid flow is given by

∂𝑢 1
+ (𝑢 · ∇)𝑢 = − ∇p + ν∇2 𝑢,
∂t ρ

with ∇ · 𝑢 = 0. Here, 𝑢, p, ρ and ν are the fluid’s velocity, pressure, density and kinematic
viscosity, respectively.

a) By taking the divergence of both sides 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 both sides of the Navier-Stokes equation, and defining the
vorticity as 𝜔 = ∇ × 𝑢, 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

Solutions to the Problems


Lecture 53 | Maxwell’s equations
View this lecture on YouTube

Maxwell’s equations in SI units and in integral form are given by


˛
qenc
𝐸 · d𝑆 = , (Gauss’s law for electric fields)
ε0
˛S
𝐵 · d𝑆 = 0, (Gauss’s law for magnetic fields)
S
˛ ˆ
d
𝐸 · d𝑟 = − 𝐵 · d𝑆, (Faraday’s law)
C dt S
˛  ˆ 
d
𝐵 · d𝑟 = µ0 Ienc + ε 0 𝐸 · d𝑆 , (Ampère-Maxwell law)
C dt S

where 𝐸 and 𝐵 are the electric and magnetic fields, qenc is the charge enclosed by the
bounding surface S and Ienc is the current through the bounding surface. The dimensional
constants ε 0 and µ0 are 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 qenc in the volume V and the
current Ienc through the surface S are related to the charge density ρ and the current
density 𝐽 by ˆ ˆ
qenc = ρ dV, Ienc = 𝐽 · 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 over ρ and J, and combine the results 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

121
WEEK V. FUNDAMENTAL THEOREMS 122

Problems for Lecture 53


1. Using Gauss’s law for the electric field given by
˛
qenc
𝐸 · d𝑆 = ,
S ε0

determine the electric field of a point charge q at the origin. Assume the electric field is
spherically symmetric.

2. Using Ampère’s law, ˛


𝐵 · d𝑟 = µ0 Ienc ,
C

(a special case of the Ampére-Maxwell law for static fields), determine the magnetic field
of a current carrying infinite wire placed on the z-axis. Assume the magnetic field has
cylindrical symmetry.

Solutions to the Problems


Appendices

123
Appendix A | Matrix addition and
multiplication
View this lecture on YouTube

Two-by-two matrices A and B, with two rows and two columns, can be written as
! !
a11 a12 b11 b12
A= , B= .
a21 a22 b21 b22

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 ma-
trices 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

a11 x1 + a12 x2 = b1 , a21 x1 + a22 x2 = b2 ;

and the matrix form of this equation is given by


! ! !
a11 a12 x1 b1
= .
a21 a22 x2 b2

In short, this matrix equation is commonly written as

Ax = b.

124
Appendix B | Matrix determinants
and inverses
View this lecture on YouTube
We denote the inverse of an n-by-n matrix A as A−1 , where

AA−1 = A−1 A = I,

and where I is the n-by-n identity matrix satisfying IA = AI = A. In particular, if A is


an invertible matrix, then the unique solution to the matrix equation Ax = b is given by
x = A−1 b.
It can be shown that a matrix A is invertible if and only if its determinant is not
zero. Here, we only need two-by-two and three-by-three determinants. The two-by-two
determinant, using the vertical bar notation, is given by

a11 a12
= a11 a22 − a12 a21 ;
a21 a22

that is, multiply the diagonal elements and subtract the product of the off-diagonal ele-
ments.
The three-by-three determinant is given in terms of two-by-two determinants as

a11 a12 a13


a22 a23 a21 a23 a21 a22
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 orthog-
onal 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 θ

125
APPENDIX B. MATRIX DETERMINANTS AND INVERSES 126

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

i.e., switch the diagonal elements, negate the off-diagonal elements, and divide by the
determinant.
Appendix C | Problem and practice
quiz solutions
Solutions to the Problems for Lecture 1

1. We show the associative law graphically:

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 𝐵.

From the figure, we see that


1 1
𝐶 + 𝑋 = 𝐴 + 𝐵.
2 2

127
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 128

Using 𝐶 = 𝐴 + 𝐵, this equation becomes

1 1
(𝐴 + 𝐵 ) + 𝑋 = 𝐴 + 𝐵,
2 2

and solving for 𝑋 yields 𝑋 = 21 𝐴. Therefore 𝑋 is parallel to 𝐴 and one-half its length.

Solutions to the Problems for Lecture 2

1. The unit vector that points from m1 to m2 is given by

𝑟2 − 𝑟1 ( x − x1 )𝑖 + ( y2 − y1 )𝑗 + ( z2 − z1 )𝑘
= p2 .
|𝑟2 − 𝑟1 | ( x2 − x1 )2 + ( y2 − y1 )2 + ( z2 − z1 )2

2. The force acting on m1 with position vector 𝑟1 due to the mass m2 with position vector
𝑟2 is written as

𝑟2 − 𝑟1 ( x2 − x1 )𝑖 + ( y2 − y1 )𝑗 + ( z2 − z1 )𝑘
𝐹 = Gm1 m2 3
= Gm1 m2 .
|𝑟2 − 𝑟1 | [( x2 − x1 )2 + (y2 − y1 )2 + (z2 − z1 )2 ]3/2

Solutions to the Problems for Lecture 3

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 ) = 𝐴 · 𝐵 +
𝐴 · 𝐶;

c) 𝐴 · (k𝐵 ) = A1 (kB1 ) + A2 (kB2 ) + A3 (kB3 ) = (kA1 ) B1 + (kA2 ) B2 + (kA3 ) B3 = k( A1 B1 ) +


k ( A2 B2 ) + k( A3 B3 ) = (k𝐴) · 𝐵 = k (𝐴 · 𝐵 )

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.

3. Consider the triangle composed of three vectors pictured below.

With 𝐶 = 𝐴 − 𝐵, we have

|𝐶 |2 = 𝐶 · 𝐶 = (𝐴 − 𝐵 ) · (𝐴 − 𝐵 ) = 𝐴 · 𝐴 + 𝐵 · 𝐵 − 2𝐴 · 𝐵 = |𝐴|2 + |𝐵 |2 − 2|𝐴||𝐵 | cos θ,


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 129

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 θ.

Solutions to the Problems for Lecture 4

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𝐴) × 𝐵.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 130

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;

𝑖 × 𝑗 = 𝑘, 𝑗 × 𝑘 = 𝑖, 𝑘 × 𝑖 = 𝑗;

𝑘 × 𝑗 = −𝑖, 𝑗 × 𝑖 = −𝑘, 𝑖 × 𝑘 = −𝑗.

3. One such example is

𝑖 × (𝑖 × 𝑘 ) = −𝑖 × 𝑗 = −𝑘,
(𝑖 × 𝑖) × 𝑘 = 0 × 𝑘 = 0.

Solutions to the Practice quiz: Vectors

1. c. As an example, 𝑖 × (𝑖 × 𝑗 ) 6= (𝑖 × 𝑖) × 𝑗.

2. b.
𝑖 𝑗 𝑘
(𝐴 × 𝐵 ) · 𝑗 = a1 a2 a3 · 𝑗 = a3 b1 − a1 b3 .
b1 b2 b3

3. d.

𝑖 × (𝑗 × 𝑘 ) = 𝑖 × 𝑖 = 0, (𝑖 × 𝑗 ) × 𝑘 = 𝑘 × 𝑘 = 0,
(𝑖 × 𝑖) × 𝑗 = 0 × 𝑗 = 0, 𝑖 × (𝑖 × 𝑗 ) = 𝑖 × 𝑘 = −𝑗.

Solutions to the Problems for Lecture 5

1. We first compute the displacement vector between (1, 1, 1) and (2, 3, 2):

𝑢 = (2 − 1)𝑖 + (3 − 1)𝑗 + (2 − 1)𝑘 = 𝑖 + 2𝑗 + 𝑘.

Choosing a point on the line to be (1, 1, 1), the parametric equation for the line is given by

𝑟 = 𝑟0 + 𝑢t = (𝑖 + 𝑗 + 𝑘 ) + (𝑖 + 2𝑗 + 𝑘 )t = (1 + t)𝑖 + (1 + 2t)𝑗 + (1 + t)𝑘.

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).
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 131

Solutions to the Problems for Lecture 6

1. We find two vectors parallel to the plane defined by the three points, (−1, −1, −1),
(1, 1, 1), and (1, −1, 0):

𝑠1 = (1 + 1)𝑖 + (1 + 1)𝑗 + (1 + 1)𝑘 = 2𝑖 + 2𝑗 + 2𝑘,


𝑠2 = (1 − 1)𝑖 + (−1 − 1)𝑗 + (0 − 1)𝑘 = −2𝑗 − 𝑘.

We can divide 𝑠1 by 2 to construct a normal vector from

𝑖 𝑗 𝑘
1
𝑁 = 𝑠1 × 𝑠2 = 1 1 1 = 𝑖 + 𝑗 − 2𝑘.
2
0 −2 −1

The equation for the plane can be found from 𝑁 · (𝑟 − 𝑟2 ) = 0, or 𝑁 · 𝑟 = 𝑁 · 𝑟2 , or

(𝑖 + 𝑗 − 2𝑘) · ( x𝑖 + y𝑗 + z𝑘) = (𝑖 + 𝑗 − 2𝑘) · (𝑖 + 𝑗 + 𝑘), or x + y − 2z = 0.

The intersection of this plane with the z = 0 plane forms the line given by y = − x.

Solutions to the Practice quiz: Analytic geometry

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


1 1
z = 0 plane occurs when t = 1/2 so that 𝑟 = 𝑖 + 𝑗. The intersection point is therefore
2 2
1 1
( , , 0).
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 = (1 − 1)𝑖 + (1 − 1)𝑗 + (2 − 1)𝑘 = 𝑘


𝑠2 = (2 − 1)𝑖 + (1 − 1)𝑗 + (1 − 2)𝑘 = 𝑖 − 𝑘.

The normal vector to the plane can be found from

𝑁 = 𝑠1 × 𝑠2 = 𝑘 × (𝑖 − 𝑘 ) = 𝑘 × 𝑖 − 𝑘 × 𝑘 = 𝑗.

Therefore, the parametric equation for the plane, given by 𝑁 · (𝑟 − 𝑟1 ) = 0, is determined


to be
𝑗 · (( x − 1)𝑖 + (y − 1)𝑗 + (z − 1)𝑘 ) = 0,
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 132

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.

Solutions to the Problems for Lecture 7

1.

a) If ijk is a cyclic permutation of (1, 2, 3), then eijk = e jki = ekij = 1. If ijk is an
anticyclic permutation of (1, 2, 3), then eijk = e jki = ekij = −1. And if any two
indices are equal, then eijk = e jki = ekij = 0. The use is that we can cyclically
permute the indices of the Levi-Civita symbol without changing its value.

b) If ijk is a cyclic permutation of (1, 2, 3), then eijk = 1 and e jik = ekji = eikj = −1. If
ijk is an anticyclic permutation of (1, 2, 3), then eijk = −1 and e jik = ekji = eikj = 1.
And if any two indices are equal, then eijk = e jik = eikj = 0. The use is that we can
swap any two indices of the Levi-Civita symbol if we change its sign.

2. Notice that in the expression eijk A j Bk , the indices j and k are repeated (and therefore
summed over) but the index i is not. Taking i = 1, 2, or 3, we have

e1jk A j Bk = e123 A2 B3 + e132 A3 B2 = A2 B3 − A3 B2 = [𝐴 × 𝐵 ]1 ,


e2jk A j Bk = e231 A3 B1 + e213 A1 B3 = A3 B1 − A1 B3 = [𝐴 × 𝐵 ]2 ,
e3jk A j Bk = e312 A1 B2 + e321 A2 B1 = A1 B2 − A2 B1 = [𝐴 × 𝐵 ]3 .

3.

a) Now, δij A j = δi1 A1 + δi2 A2 + δi3 A3 . The only nonzero term has the index of A equal
to i, therefore δij A j = Ai .

b) Now, δik δkj = δi1 δ1j + δi2 δ2j + δi3 δ3j . If i 6= j, then every term in the sum is zero. If
i = j, then only one term is nonzero and equal to one. Therefore, δik δkj = δij . This
result could also be viewed as an application of Part (a).

4. 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 ).
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 133

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 .

b) We use the result of a) and find

eijk eijn = δjj δkn − δjn δkj = 3δkn − δkn = 2δkn .

Solutions to the Problems for Lecture 8

1. We sometimes need parentheses because the vector product is not associative and
expressions can be evaluated in more than one way with different results. We can write
without any ambiguity,

(scalar triple product) 𝐴 · 𝐵 × 𝐶 = 𝐵 · 𝐶 × 𝐴 = 𝐶 · 𝐴 × 𝐵,


(vector triple product) 𝐴 × (𝐵 × 𝐶 ) = 𝐴 · 𝐶𝐵 − 𝐴 · 𝐵𝐶,
(scalar quadruple product) 𝐴 × 𝐵 · 𝐶 × 𝐷 = 𝐴 · 𝐶𝐵 · 𝐷 − 𝐴 · 𝐷𝐵 · 𝐶.

For the vector quadruple product, we can write without ambiguity

(𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = (𝐴 × 𝐵 ) · 𝐷𝐶 − (𝐴 × 𝐵 ) · 𝐶𝐷,

or
(𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = (𝐴 × 𝐵 · 𝐷 )𝐶 − (𝐴 × 𝐵 · 𝐶 )𝐷.

The absence of any parentheses on the right-hand side would result in an ambiguity,
however, since in general,

((𝐴 × 𝐵 ) · 𝐷 )𝐶 6= 𝐴 × ((𝐵 · 𝐷 )𝐶 ).

The vector on the left-hand side of this expression is parallel to 𝐶 while the vector on the
right-hand side is perpendicular to 𝐶. The two expressions can therefore be only equal if
𝐶 is the zero vector.

Solutions to the Problems for Lecture 9

1. Consider 𝐴 · (𝐵 × 𝐶 ). If 𝐴 = 𝐵, then 𝐴 · (𝐵 × 𝐶 ) = 𝐴 · (𝐴 × 𝐶 ) = 0 since 𝐴 × 𝐶


is orthogonal to 𝐴. A similar results holds for 𝐴 = 𝐶. If 𝐵 = 𝐶, then 𝐴 · (𝐵 × 𝐶 ) =
𝐴 · (𝐵 × 𝐵 ) = 0 since 𝐵 × 𝐵 = 0.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 134

2. We use the fact that the value of the scalar triple product is unchanged under a cyclic
permutation of the three vectors, and that the dot product is commutative. We have

𝐴 · 𝐵 × 𝐶 = 𝐶 · 𝐴 × 𝐵 = 𝐴 × 𝐵 · 𝐶.

3. Consider the scalar triple product

𝑒i · ( 𝑒 j × 𝑒 k ) .

We have already proved that if any two indices are equal, then the scalar triple product is
zero. Furthermore, the scalar triple product is unchanged under a cyclic permutation of
the three vectors so that

𝑒1 · (𝑒2 × 𝑒3 ) = 𝑒2 · (𝑒3 × 𝑒1 ) = 𝑒3 · (𝑒1 × 𝑒2 ),

and
𝑒1 · (𝑒2 × 𝑒3 ) = 𝑖 · (𝑗 × 𝑘 ) = 𝑖 · 𝑖 = 1.

Finally,
𝑒3 · (𝑒2 × 𝑒1 ) = 𝑒2 · (𝑒1 × 𝑒3 ) = 𝑒1 · (𝑒3 × 𝑒2 ),

and
𝑒3 · (𝑒2 × 𝑒1 ) = 𝑘 · (𝑗 × 𝑖) = −𝑘 · 𝑘 = −1.

We have computed all possible cases, and have thus proved

𝑒i · (𝑒 j × 𝑒k ) = eijk .

A slicker proof would denote the mth component of 𝑒 j by e jm and use e jm = δjm , and
so on for the other unit vectors and components. Then

𝑒i · (𝑒 j × 𝑒k ) = eil elmn e jm ekn = elmn δil δjm δkn = eijk .

Solutions to the Problems for Lecture 10

1. We prove the Jacobi identity using the vector triple product and rearranging terms:

𝐴 × (𝐵 × 𝐶 ) + 𝐵 × (𝐶 × 𝐴) + 𝐶 × (𝐴 × 𝐵 )
= [(𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶 ] + [(𝐵 · 𝐴)𝐶 − (𝐵 · 𝐶 )𝐴] + [(𝐶 · 𝐵 )𝐴 − (𝐶 · 𝐴)𝐵 ]
= [(𝐴 · 𝐶 )𝐵 − (𝐶 · 𝐴)𝐵 ] + [(𝐵 · 𝐴)𝐶 − (𝐴 · 𝐵 )𝐶 ] + [(𝐶 · 𝐵 )𝐴 − (𝐵 · 𝐶 )𝐴]
= 0.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 135

2. We want to prove that the scalar quadruple product satisfies

(𝐴 × 𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ).

We have

Justification
(𝐴 × 𝐵 ) · (𝐶 × 𝐷 )
= [𝐴 × 𝐵 ] i [𝐶 × 𝐷 ] i 𝑋 · 𝑌 = Xi Yi
= eijk A j Bk eilm Cl Dm [𝑋 × 𝑌 ]i = eijk X j Yk
= eijk eilm A j Bk Cl Dm commutative law
= (δjl δkm − δjm δkl ) A j Bk Cl Dm eijk eilm = δjl δkm − δjm δkl
= A j Cj Bk Dk − A j D j Bk Ck δjl Cl = Cj , δkm Dm = Dk , etc.
= (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ). A j Cj = 𝐴 · 𝐶, Bk Dk = 𝐵 · 𝐷, etc.

3. We can prove Lagrange’s identity using the scalar quadruple product identity (𝐴 ×
𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ). We have

|𝐴 × 𝐵 |2 = (𝐴 × 𝐵 ) · (𝐴 × 𝐵 ) = (𝐴 · 𝐴)(𝐵 · 𝐵 ) − (𝐴 · 𝐵 )(𝐵 · 𝐴) = |𝐴|2 |𝐵 |2 − (𝐴 · 𝐵 )2 .

An alternative proof uses

|𝐴 × 𝐵 |2 = |𝐴|2 |𝐵 |2 sin2 θ = |𝐴|2 |𝐵 |2 (1 − cos2 θ )


= |𝐴|2 |𝐵 |2 − |𝐴|2 |𝐵 |2 cos2 θ = |𝐴|2 |𝐵 |2 − (𝐴 · 𝐵 )2 .

4. We want to prove that the vector quadruple product satisfies

(𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = ((𝐴 × 𝐵 ) · 𝐷 )𝐶 − ((𝐴 × 𝐵 ) · 𝐶 )𝐷.

We will make use of the vector triple product identity given by

𝐴 × (𝐵 × 𝐶 ) = (𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶.

Let X = 𝐴 × 𝐵. Then using the vector triple product identity, we have

(𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = 𝑋 × (𝐶 × 𝐷 )
= (𝑋 · 𝐷 )𝐶 − (𝑋 · 𝐶 )𝐷
= ((𝐴 × 𝐵 ) · 𝐷 )𝐶 − ((𝐴 × 𝐵 ) · 𝐶 )𝐷.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 136

Solutions to the Practice quiz: Vector algebra

1. c. The relevant formula from the lecture is eijk eilm = δjl δkm − δjm δkl . To directly apply
this formula, we permute the indices of the Levi-Civita symbols without changing their
cyclic order:
eijk eljm = e jki e jml = δkm δil − δkl δim .

2. d. The other expressions can be shown to be false using 𝐴 × 𝐵 = −𝐵 × 𝐴 and, in


general, 𝐴 × (𝐵 × 𝐶 ) 6= (𝐴 × 𝐵 ) × 𝐶.

3. c. Use the facts that 𝐴 × 𝐵 is orthogonal to both 𝐴 and 𝐵, 𝐴 · 𝐵 is zero if 𝐴 and 𝐵


are orthogonal, and 𝐴 × 𝐵 is zero if 𝐴 and 𝐵 are parallel.

Solutions to the Problems for Lecture 11

1. Scalar fields: electrostatic potential, gravitational potential, temperature, humidity, con-


centration, density, pressure, wavefunction of quantum mechanics.
Vector fields: electric and magnetic fields, magnetic vector potential, velocity, force fields
such as gravity.

Solutions to the Problems for Lecture 12

1. Using the chain rule,

∂f −2nx ∂f −2ny ∂f −2nz


= 2 , = 2 , = 2 .
∂x ( x + y 2 + z 2 ) n +1 ∂y ( x + y 2 + z 2 ) n +1 ∂z ( x + y 2 + z 2 ) n +1

2. Define
f (t + e, x + δ) = g(e, δ).

Then the first-order Taylor series expansion of g is given by

g(e, δ) = g(0, 0) + egt (0, 0) + δgx (0, 0),

which in terms of f becomes

f (t + e, x + δ) = f (t, x ) + e f t (t, x ) + δ f x (t, x ).

Applying this expansion to f (t + α∆t, x + β∆t f (t, x )), we have to first-order in ∆t,

f (t + α∆t, x + β∆t f (t, x )) = f (t, x ) + α∆t f t (t, x ) + β∆t f (t, x ) f x (t, x ).


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 137

Solutions to the Problems for Lecture 13

1. The formulas derived in the text are

∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )2

where the sum is from i = 1 to 3. Here, x1 = 1, x2 = 2, x3 = 3, and y1 = 1, y2 = 3 and


y3 = 2. We have

(14)(6) − (13)(6) (3)(13) − (6)(6)


β0 = = 1, β1 = = 1/2.
(3)(14) − (6)2 (3)(14) − (6)2

The best fit line is therefore y = 1 + x/2. The graph of the data and the line are shown
below.

1 2 3

Solutions to the Problems for Lecture 14

1.

a) With f ( x, y) = e xy , x = r cos θ, and y = r sin θ, application of the chain rule results


in

∂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 ,
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 138

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 θ .
∂θ

Solutions to the Problems for Lecture 16

1. Suppose ax + by + cz = 0. We have the relations

−by − cz − ax − cz − ax − by
x= , y= , z= .
a b c

The partial derivatives are

∂x b ∂y c ∂z a
=− , =− , =− ;
∂y a ∂z b ∂x c

and the triple product is


 
∂x ∂y ∂z b c  a
= − − − = −1.
∂y ∂z ∂x a b c

2. Suppose ax + by + cz + dt = 0. We have the relations

−by − cz − dt − ax − cz − dt − ax − by − dt − ax − by − cz
x= , y= , z= , t= .
a b c d

The partial derivatives are

∂x b ∂y c ∂z d ∂t a
=− , =− , =− , =− ;
∂y a ∂z b ∂t c ∂x d

and the quadruple product is


   
∂x ∂y ∂z ∂t b c d  a
= − − − − = 1.
∂y ∂z ∂t ∂x a b c d
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 139

Apparently an odd number of products yields −1 and an even number of products yields
+1.

Solutions to the Practice quiz: Partial derivatives

1. d. The partial derivative with respect to x is given by

∂f −x
= 2 ;
∂x ( x + y2 + z2 )3/2

and the mixed second partial derivative is then given by

∂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

∑ xi = 6, ∑ xi2 = 14, ∑ yi = 11, ∑ xi yi = 21.


Then using

∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )2

we have

(14)(11) − (21)(6) 154 − 126 28 7


β0 = 2
= = = ,
(4)(14) − (6) 56 − 36 20 5
(4)(21) − (6)(11) 84 − 66 18 9
β1 = 2
= = = .
(4)(14) − (6) 56 − 36 20 10

The least-squares line is therefore given by y = 7/5 + 9x/10.

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
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 140

Solutions to the Problems for Lecture 17

1.

a) Let φ( x, y, z) = x2 + y2 + z2 . The gradient is given by

∇φ = ∇( x2 + y2 + z2 ) = 2x𝑖 + 2y𝑗 + 2z𝑘.

In terms of the position vector, we have

∇(r2 ) = 2𝑟.

p
b) Let φ( x, y, z) = x2 + y2 + z2 . The gradient is given by
q
∇φ = ∇ x 2 + y2 + z2
x y z
= p 𝑖+ p 𝑗+p 𝑘.
x 2 + y2 + z2 x 2 + y2 + z2 x 2 + y2 + z2

In terms of the position vector, we have

𝑟
∇(r ) = = 𝑟.
ˆ
r

1
c) 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 𝑘.
( x + y2 + z2 )3/2 ( x + y2 + z2 )3/2 ( x + y2 + z2 )3/2

In terms of the position vector, we have


 
1 𝑟
∇ = − 3.
r r

2. Following the pattern given by


 
2 𝑟 1 𝑟
∇(r ) = 2𝑟 , ∇(r ) = , ∇ =− 3,
r r r

we guess that the general result is

∇(r n ) = n𝑟r n−2 .


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 141

Solutions to the Problems for Lecture 18

1.

a) With 𝐹 = xy𝑖 + yz𝑗 + zx𝑘, we have

∂ ∂ ∂
∇·𝐹 = ( xy) + (yz) + (zx )
∂x ∂y ∂z
= y + z + x = x + y + z.

b) With 𝐹 = yz𝑖 + xz𝑗 + xy𝑘, we have

∂ ∂ ∂
∇·𝐹 = (yz) + ( xz) + ( xy) = 0.
∂x ∂y ∂z

Solutions to the Problems for Lecture 19

1.

a) With 𝐹 = xy𝑖 + yz𝑗 + zx𝑘, we have

𝑖 𝑗 𝑘
∇ × 𝐹 = ∂/∂x ∂/∂y ∂/∂z = −y𝑖 − z𝑗 − x𝑘.
xy yz zx

b) With 𝐹 = yz𝑖 + xz𝑗 + xy𝑘, we have

𝑖 𝑗 𝑘
∇ × 𝐹 = ∂/∂x ∂/∂y ∂/∂z = ( x − x )𝑖 + (y − y)𝑗 + (z − z)𝑘 = 0.
yz xz xy

2. With 𝑢 = u1 ( x, y)𝑖 + u2 ( x, y)𝑗, we have

𝑖 𝑗 𝑘  
∂u2 ∂u
𝜔 = ∇×𝑢 = ∂/∂x ∂/∂y ∂/∂z = 0𝑖 + 0𝑗 + − 1 𝑘 = ω3 𝑘.
∂x ∂y
u1 ( x, y) u2 ( x, y) 0

Therefore, ω3 = ∂u2 /∂x − ∂u1 /∂y.

Solutions to the Problems for Lecture 20

1. We have
! ! !
∂2 ∂2 ∂2
 
2 1 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
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 142

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

−x −( x2 + y2 + z2 )3/2 + 3x2 ( x2 + y2 + z2 )1/2


 

=
∂x ( x + y2 + z2 )3/2
2 ( x 2 + y2 + z2 )3
1 3x2
=− + 2 .
( x2 + y2 2
+z ) 3/2 ( x + y2 + z2 )5/2

It is easy to guess the derivative with respect to y and z, and we have

3( x 2 + y2 + z2 )
 
12 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

a result only valid for r 6= 0.

Solutions to the Practice quiz: The del operator

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 x2 + 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
∇·𝐹 = − 3
= − = .
r r r r r
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 143

3.
b. We have
𝑖 𝑗 𝑘
∇ × 𝑟 = ∂/∂x ∂/∂y ∂/∂z = 0.
x y z

Solutions to the Problems for Lecture 22


1.
a) To prove ∇ · ( f 𝑢) = 𝑢 · ∇ f + f ∇ · 𝑢, we compute


∇ · ( f 𝑢) = ( f ui ) (divergence in component notation)
∂xi
∂f ∂u
= u +f i (product rule for the derivative)
∂xi i ∂xi
= 𝑢 · ∇ f + f ∇ · 𝑢. (back to vector notation)

b) To prove ∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢, we compute for the ith component:


 
∂ ∂um
[∇ × (∇ × 𝑢)]i = eijk eklm (curl in component notation)
∂x j ∂xl
∂2 u m
= eijk eklm (eklm doesn’t depend on x j )
∂x j ∂xl
∂2 u m
= ekij eklm (eijk = ekij )
∂x j ∂xl
∂2 u m
= (δil δjm − δim δjl ) (ekij eklm = δil δjm − δim δjl )
∂x j ∂xl
∂2 u j ∂2 u i ∂2 u m ∂2 u m
= − (δil = , etc.)
∂x j ∂xi ∂x j ∂x j ∂x j ∂xl ∂x j ∂xi
= [∇(∇ · 𝑢)]i − [∇2 𝑢]i . (back to vector notation)

Therefore, ∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢.

2.
a) With d𝑟/dt = 𝑢(t, 𝑟 (t)), the component equations are given by

dx1 dx2 dx3


= u1 (t; x1 , x2 , x3 ), = u2 (t; x1 , x2 , x3 ), = u3 (t; x1 , x2 , x3 ).
dt dt dt

b) Using the chain rule, we can compute the second derivative of x1 as

d2 x1 ∂u ∂u dx ∂u dx ∂u dx
= 1+ 1 1+ 1 2+ 1 3
dt2 ∂t ∂x1 dt ∂x2 dt ∂x3 dt
∂u ∂u ∂u ∂u
= 1 + u1 1 + u2 1 + u3 1 .
∂t ∂x1 ∂x2 ∂x3
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 144

Similarly for x2 and x3 , we have

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

c) Using the operator


∂ ∂ ∂
𝑢 · ∇ = u1 + u2 + u3 ,
∂x1 ∂x2 ∂x3
the three components can be combined into the vector expression

d2 𝑟 ∂𝑢
= + 𝑢 · ∇𝑢.
dt2 ∂t

This expression is called the material acceleration, and is found in the Navier-Stokes
equation of fluid mechanics.

Solutions to the Problems for Lecture 23

1. Start with Maxwell’s equations:

∂𝐵 ∂𝐸
∇ · 𝐸 = 0, ∇ · 𝐵 = 0, ∇×𝐸 = − , ∇ × 𝐵 = µ 0 e0 .
∂t ∂t

Take the curl of the fourth Maxwell’s equation, and commute the time and space deriva-
tives to obtain

∇ × ( ∇ × 𝐵 ) = µ 0 e0 (∇ × 𝐸 ).
∂t
Apply the curl of the curl identity to obtain


∇ ( ∇ · 𝐵 ) − ∇ 2 𝐵 = µ 0 e0 (∇ × 𝐸 ).
∂t

Apply the second Maxwell’s equation to the left-hand-side, and the third Maxwell’s equa-
tion 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 .

Solutions to the Practice quiz: Vector calculus algebra

1. a. We make use of the vector identity

∇(𝑢 · 𝑣 ) = (𝑢 · ∇)𝑣 + (𝑣 · ∇)𝑢 + 𝑢 × (∇ × 𝑣 ) + 𝑣 × (∇ × 𝑢).

Setting 𝑣 = 𝑢, we have

∇(𝑢 · 𝑢) = 2(𝑢 · ∇)𝑢 + 2𝑢 × (∇ × 𝑢).


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 145

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.

3. b. With 𝐸 (𝑟, t) = sin(z − ct)𝑖, we have ∇ · 𝐸 = 0, and

𝑖 𝑗 𝑘
∇×𝐸 = ∂/∂x ∂/∂y ∂/∂z = cos (z − ct)𝑗.
sin (z − ct) 0 0

∂𝐵
Maxwell’s equation ∇ × 𝐸 = − then results in
∂t

∂𝐵
= − cos (z − ct)𝑗,
∂t

which can be integrated (setting the constant to zero) to obtain

1
𝐵= sin (z − ct)𝑗.
c

Solutions to the Problems for Lecture 24

1. In general, the mass of a solid with mass density ρ = ρ( x, y, z) is given by


˚
M= ρ( x, y, z) dx dy dz.
V

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

The mass of the cube is then given by


ˆ Lˆ Lˆ L ˆ L ˆ L ˆ Lh
h z i z i
M= (ρ2 − ρ1 ) dx dy dz =
ρ1 + dx dy ρ1 + (ρ2 − ρ1 ) dz
0 0 0 L 0 0 0 L
 2 L  
z 1 1
= L2 ρ1 z + ( ρ2 − ρ1 ) = L3 ρ1 + ( ρ2 − ρ1 ) = L3 ( ρ1 + ρ2 ).
2L 0 2 2
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 146

Solutions to the Problems for Lecture 25

1.

0.8

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1 1.2

The figure illustrates the integral over x first and y second. With this order, the integral
over the parallelogram is given by

ˆ 1 ˆ 1+y/3 ˆ 1 x =1+y/3
x3 y
x2 y dx dy = dy
0 y/3 0 3 x =y/3
ˆ 1  3  3 !
1 1 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 4
= y + y + y
3 2 3 12 0
 
1 1 1 1 11
= + + = .
3 2 3 12 36

Solutions to the Practice quiz: Multidimensional integration

1. b. To find the volume, we integrate z = xy over its base. We have

ˆ 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
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 147

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 .

The mass of the cube in grams is then given by


ˆ 1ˆ 1ˆ 1 ˆ 1 ˆ 1 ˆ 1
1 1
M= (1 + z) dx dy dz = dx dy (1 + z) dz = (z + z2 ) 0
= 1.5 g.
0 0 0 0 0 0 2

3. d. We draw a picture of the triangle and illustrate the chosen direction of integration.

0.5

0 0.5 1 1.5 2

Integrating first along x and then along y, the volume is given by


ˆ 1 ˆ 2− y ˆ 1 2− y ˆ 1
1 2 1 h i
xy dx dy = x y dy = y (2 − y)2 − y2 dy
0 y 0 2 y 2 0
ˆ 1  
2 1 1 1
=2 (y − y ) dy = 2 − = .
0 2 3 3

Solutions to the Problems for Lecture 26

ˆ 𝜃ˆ and 𝑖, 𝑗 is given by
1. The matrix form for the relationship between 𝑟,
! ! !
𝑟ˆ cos θ sin θ 𝑖
= .
𝜃ˆ − sin θ cos θ 𝑗

Inverting the two-by-two matrix, we have


! ! !
𝑖 cos θ − sin θ 𝑟ˆ
= .
𝑗 sin θ cos θ 𝜃ˆ
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 148

Therefore,
ˆ
𝑖 = cos θ 𝑟ˆ − sin θ 𝜃, ˆ
𝑗 = sin θ 𝑟ˆ + cos θ 𝜃.

2.

a) With x = r cos θ and y = r sin θ, and with f = f ( x (r, θ ), y(r, θ )), we have using the
chain rule,

∂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

b) We can write the result of Part (a) in matrix form as


! ! !
∂ f /∂r cos θ sin θ ∂ f /∂x
= .
∂ f /∂θ −r sin θ r cos θ ∂ f /∂y

Inverting the two-by-two matrix results in


! ! !
∂ f /∂x 1 r cos θ − sin θ ∂ f /∂r
= ,
∂ f /∂y r r sin θ cos θ ∂ f /∂θ

or
∂f ∂f sin θ ∂ f ∂f ∂f cos θ ∂ f
= cos θ − , = sin θ + .
∂x ∂r r ∂θ ∂y ∂r r ∂θ
The Cartesian partial derivatives in polar form are therefore

∂ ∂ sin θ ∂ ∂ ∂ cos θ ∂
= cos θ − , = sin θ + .
∂x ∂r r ∂θ ∂y ∂r r ∂θ

3. We have
r𝑟ˆ = r cos θ 𝑖 + r sin θ 𝑗 = x𝑖 + y𝑗,

and
r𝜃ˆ = −r sin θ 𝑖 + r cos θ 𝑗 = −y𝑖 + x𝑗.

Solutions to the Problems for Lecture 27

1. We have
1
k 𝑟ˆ + k2 𝜃ˆ = ur 𝑟ˆ + uθ 𝜃,
ˆ

𝑢=
r 1
so that
k1 k2
ur = , uθ = .
r r
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 149

The divergence is given by

1 ∂ 1 ∂uθ
∇·𝑢 = (rur ) +
r ∂r    r ∂θ  
1 ∂ k1 1 ∂ k2
= r +
r ∂r r r ∂θ r
= 0;

and the curl is given by


 
1 ∂ 1 ∂ur
∇×𝑢 = 𝑘 (ruθ ) +
r ∂r r ∂θ
     
1 ∂ k2 1 ∂ k1
=𝑘 r +
r ∂r r r ∂θ r
= 0.

It is important to emphasis that these results are only valid for r 6= 0. The vector field is
singular when r = 0 and is not differentiable in the usual sense.

Solutions to the Problems for Lecture 28

1. With u = u(r ), we solve


G
∇2 u = − ,
νρ
with boundary condition u( R) = 0. Writing the Laplacian in polar coordinates, we have
 
1 d du G
r =− .
r dr dr νρ

We multiply by r and integrate from 0 to r:


ˆ r   ˆ r
d du G
r dr = − r dr,
0 dr dr νρ 0

or
du Gr2
r =− .
dr 2νρ
We now divide by r and integrate from r to R:
ˆ R ˆ R
du G
dr = − r dr,
r dr 2νρ r

or
G
u ( R ) − u (r ) = − ( R2 − r 2 ).
4νρ
Applying the no-slip boundary condition at r = R, we obtain

GR2
  r 2 
u (r ) = 1− .
4νρ R
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 150

The maximum velocity occurs in the center of the pipe and is given by

GR2
um = ,
4νρ

so we can write the velocity field as


  r 2 
u (r ) = um 1 − .
R

Solutions to the Problems for Lecture 29

1. We have
𝑙 = 𝑟 × 𝑝 = 𝑟 × (m𝑟˙ ) = mr𝑟ˆ × (ṙ𝑟ˆ + r θ̇ 𝜃ˆ ) = mr2 θ̇ (𝑟ˆ × 𝜃ˆ ).

Now, 𝑟ˆ and 𝜃ˆ are perpendicular unit vectors so that |𝑟ˆ × 𝜃ˆ | = 1, and

|𝑙| = mr2 |θ̇ ||𝑟ˆ × 𝜃ˆ | = mr2 |θ̇ |.

2. Using the Einstein summation convention, we have


 
d 1 1 d
m |𝑣 |2 = m (v v )
dt 2 2 dt i i
 
1 dvi dv
= m vi + vi i
2 dt dt
dvi
= mvi
dt
d𝑣
= m𝑣 · .
dt

Solutions to the Problems for Lecture 31

1. The mass density of the disk is given by

σ (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
ρ r2 ( ρ − ρ0 )r 3

= 2π 0 + 1
2 3R r =0
1
= πR2 (ρ0 + 2ρ1 ).
3
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 151

2. It is simplest to do this integral by transforming to polar coordinates. With x2 + y2 = r2


and dx dy = r dr dθ, we have
ˆ 2π ˆ ∞ ˆ 2π ˆ ∞ ˆ ∞
−r 2 −r 2 2
2
I = e r dr dθ = dθ re dr = 2π re−r dr.
0 0 0 0 0

Let u = r2 and du = 2r dr. Then the integral transforms to


ˆ ∞ ∞
I =π2
e−u du = −πe−u = π.
0 0

Therefore, ˆ ∞ 2 √
I= e− x dx = π.
−∞

Solutions to the Practice quiz: Polar coordinates

1. d. Using 𝜃ˆ = − sin θ𝑖 + cos θ𝑗, we have

r𝜃ˆ = −r sin θ𝑖 + r cos θ𝑗 = −y𝑖 + x𝑗.

2. b. With 𝑟ˆ = cos θ𝑖 + sin θ𝑗 and 𝜃ˆ = − sin θ𝑖 + cos θ𝑗, we have

d𝜃ˆ
= − cos θ𝑖 − sin θ𝑗 = −𝑟.
ˆ

3. The mass density of the disk is given in polar coordinates by

σ = σ (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
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 152

Solutions to the Problems for Lecture 32

1. We have

∂ ∂ ∂
∇ = 𝑥ˆ + 𝑦ˆ + 𝑧ˆ
∂x ∂y ∂z
 
∂ sin φ ∂
= cos φ𝜌ˆ − sin φ𝜑ˆ cos φ −

∂ρ ρ ∂φ
 
∂ cos φ ∂ ∂
+ sin φ𝜌ˆ + cos φ𝜑ˆ sin φ +

+ 𝑧ˆ
∂ρ ρ ∂φ ∂z
 
∂ cos φ sin φ ∂ ∂ sin φ cos φ ∂
= 𝜌ˆ cos2 φ − + sin2 φ +
∂ρ ρ ∂φ ∂ρ ρ ∂φ
!
∂ sin2 φ ∂ ∂ cos2 φ ∂ ∂
+ 𝜑ˆ − sin φ cos φ + + cos φ sin φ + + 𝑧ˆ
∂ρ ρ ∂φ ∂ρ ρ ∂φ ∂z
∂ 1 ∂ ∂
= 𝜌ˆ + 𝜑ˆ + 𝑧ˆ .
∂ρ ρ ∂φ ∂z

2. The calculations are

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
∇ × 𝜑ˆ = 𝑧ˆ (ρ) = 𝑧.
ˆ
ρ ∂ρ ρ

1
4. With ρ constant, the mass of the cone is given by M = ρV = πρa2 b. By symmetry, we
3
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 153

argue that 𝑅 = Z𝑘. Then ˆ


ρ
Z= zdV.
M V

We can perform the dxdy integration at a fixed z by finding the area of a circular cross-
section of the cone located at height z above the apex. The radius of this circular cross-
az
section is given by r = . Therefore, the volume integral reduces to a one-dimensional
b
integral over z, and we have
ˆ b  az 2
ρ
Z= zπ dz
M 0 b
ˆ b
πρa2 /b2
= 1
z3 dz
2
3 πρa b 0
 4
3 b
=
b3 4
3
= b.
4

Solutions to the Problems for Lecture 33

1. 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 φ 𝑗.

In matrix form, this relationship is written as


    
𝑟ˆ sin θ cos φ sin θ sin φ cos θ 𝑖
 ˆ 
 𝜃  = cos θ cos φ cos θ sin φ − sin θ   𝑗  .
 

𝜑ˆ − 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

𝑖 = sin θ cos φ 𝑟ˆ + cos θ cos φ 𝜃ˆ − sin φ 𝜑,


ˆ

𝑗 = sin θ sin φ 𝑟ˆ + cos θ sin φ 𝜃ˆ + cos φ 𝜑,


ˆ
ˆ
𝑘 = cos θ 𝑟ˆ − sin θ 𝜃.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 154

2. We need the relationship between the Cartesian and the spherical coordinates, given by

x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ.

The Jacobian to compute is

∂x/∂r ∂x/∂θ ∂x/∂φ sin θ cos φ r cos θ cos φ −r sin θ sin φ


∂y/∂r ∂y/∂θ ∂y/∂φ = sin θ sin φ r cos θ sin φ r sin θ cos φ
∂z/∂r ∂z/∂θ ∂z/∂φ cos θ −r sin θ 0
sin θ cos φ cos θ cos φ − sin φ
= r2 sin θ sin θ sin φ cos θ sin φ cos φ
cos θ − sin θ 0
 
= r2 sin θ sin2 θ cos2 φ + cos2 θ cos2 φ + sin2 θ sin2 φ + cos2 θ sin2 φ
  
= r2 sin θ sin2 θ + cos2 θ sin2 φ + cos2 φ

= r2 sin θ.

Therefore, dx dy dz = r2 sin θ dr dθ dφ.

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.

4. To find the mass, we use the result


˚
M= ρ( x, y, z) dx dy dz,
V

where ρ is the object’s mass density. Here, the density ρ is given by

ρ(r ) = ρ0 + (ρ1 − ρ0 )(r/R),


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 155

and the total mass of the sphere is given by


ˆ 2π ˆ π ˆ R
M= [ρ0 + (ρ1 − ρ0 )(r/R)] r2 sin θ dr dθ dφ
0 0 0
ˆ R
r3 ρ0 R3 ( ρ − ρ0 ) R3
  
= 4π ρ0 r 2 + ( ρ1 − ρ0 ) dr = 4π + 1
0 R 3 4
 
4 1 3
= πR3 ρ0 + ρ1 .
3 4 4

The average density of the sphere is its mass divided by its volume, given by

1 3
ρ= ρ0 + ρ1 .
4 4

Solutions to the Problems for Lecture 34

1. We begin with

𝑟ˆ = sin θ cos φ 𝑖 + sin θ sin φ 𝑗 + cos θ 𝑘,


𝜃ˆ = cos θ cos φ 𝑖 + cos θ sin φ 𝑗 − sin θ 𝑘,
𝜑ˆ = − sin φ 𝑖 + cos φ 𝑗.

Differentiating,
∂𝑟ˆ ˆ
= cos θ cos φ 𝑖 + cos θ sin φ 𝑗 − sin θ 𝑘 = 𝜃;
∂θ
and
∂𝑟ˆ ˆ
= − sin θ sin φ 𝑖 + sin θ cos φ 𝑗 = sin θ 𝜑.
∂φ

2. The computations are

1 ∂ 2 2
∇ · 𝑟ˆ = (r ) = , ∇ × 𝑟ˆ = 0;
r2 ∂r r
1 ∂ cos θ 𝜑ˆ ∂ 𝜑ˆ
∇ · 𝜃ˆ = (sin θ ) = , ∇ × 𝜃ˆ = (r ) = ;
r sin θ ∂θ r sin θ r ∂r r
𝑟ˆ ∂ ˆ ∂
𝜃 ˆ
𝑟 cos θ 𝜃ˆ
∇ · 𝜑ˆ = 0, ∇ × 𝜑ˆ = (sin θ ) − (r ) = − .
r sin θ ∂θ r ∂r r sin θ r

3. We use
∂ 1 ∂ 1 ∂
+ 𝜃ˆ ∇ = 𝑟ˆ+ 𝜑ˆ ,
∂r r ∂θ r sin θ ∂φ

𝜃ˆ 𝜑ˆ ∂
     
𝑟ˆ ∂ ∂Aθ 1 ∂Ar ∂ ∂Ar
∇×𝐴 = (sin θ Aφ ) − + − (rAφ ) + (rAθ ) − ,
r sin θ ∂θ ∂φ r sin θ ∂φ ∂r r ∂r ∂θ
and the results of Problem 2.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 156

a) If f = f (r ), then

d2 f
 
2 df df
∇ f = ∇ · ∇f = ∇ · 𝑟ˆ = 2 + ∇ · 𝑟ˆ
dr dr dr
 
df 2 df 1 d df
= 2+ = 2 r2 .
dr r dr r dr dr

b) If 𝐴 = Ar (r )𝑟,
ˆ then
∇2 𝐴 = ∇(∇ · 𝐴) − ∇ × (∇ × 𝐴).

From the formula for the curl of a vector field in spherical coordinates, one finds
∇ × 𝐴 = 0. Therefore,

∇2 𝐴 = ∇(∇ · 𝐴) = ∇(∇ · ( Ar 𝑟ˆ )
   
1 d d 1 d 2
= ∇ 2 (r 2 Ar ) = ( r A r ) ˆ
𝑟.
r dr dr r2 dr

4. Using spherical coordinates, for r 6= 0 for which 1/r diverges, we have


    
1 1 ∂ ∂ 1 1 ∂
∇2 = 2 r2 = 2 (−1) = 0.
r r ∂r ∂r r r ∂r

5. Using spherical coordinates, for r 6= 0 for which 1/r2 diverges, we have

1 d r2
   
2 𝑟ˆ d
∇ = ( ) 𝑟ˆ = 0.
r2 dr r2 dr r2

Solutions to the Practice quiz: Cylindrical and spherical coordinates

1. b. We compute using the Laplacian in cylindrical coordinates:


       
1
2 1 ∂ ∂ 1 1 ∂ 1 1 ∂ 1 1
∇ = ρ = ρ − 2 =− = 3.
ρ ρ ∂ρ ∂ρ ρ ρ ∂ρ ρ ρ ∂ρ ρ ρ

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
(𝑟, ˆ 𝜑ˆ ) = (𝑖, −𝑘, 𝑗 ).
ˆ 𝜃,

3. c. To find the mass, we use the result


˚
M= ρ( x, y, z) dx dy dz,
V
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 157

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 computing 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.

Solutions to the Problems for Lecture 35

1. We parameterize a circle of radius R by

x (θ ) = R cos θ, y(θ ) = R sin θ,

where the angle θ goes from 0 to 2π. The infinitesimal arc length ds is given by
q q
ds = (dx )2 + (dy)2 = x 0 (θ )2 + y0 (θ )2 dθ
p
= R2 sin2 θ + R2 cos2 θ dθ = R dθ.

The circumference of a circle — or perimeter P — is then given by the line integral


ˆ ˆ 2π
P= ds = Rdθ = 2πR.
C 0

2. Place the semi-circular wire in the upper half of the x-y plane. Since arc length is given
by R∆θ, the mass density of the wire increases linearly with the polar angle θ. Then in
polar coordinates,
1
λ ( θ ) = λ0 + (λ − λ0 )θ.
π 1
To calculate the mass of the wire, we again parameterize the semi-circle of radius R by

x (θ ) = R cos θ, y(θ ) = R sin θ,

where now the angle θ goes from 0 to π. The infinitesimal arc length ds is given by
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 158

ds = R dθ, and the total mass of the wire is given by


ˆ ˆ π  
1
M= λ ds = λ0 + (λ1 − λ0 )θ R dθ
C 0 π
 π ( λ + λ1 )
= R λ0 π + ( λ1 − λ0 ) = πR 0 ,
2 2

which is the length of the wire πR times the average linear mass density.

Solutions to the Problems for Lecture 36

1. We start with the exact integral formula for the perimeter of an ellipse, and Taylor
series expand the integrand in the eccentricity e, keeping only the first two terms. Using

the Taylor series approximation, 1 + δ ≈ 1 + δ/2, we have
ˆ π/2  ˆ π/2 
p 1 2 2
P = 4a 1 − e2 cos2
θ dθ ≈ 4a 1 − e cos θ dθ
0 0 2
ˆ π/2 !  
π 1 2 2
 π π 2 1 2
= 4a − e cos θ dθ = 4a − e = 2πa 1 − e ,
2 2 0 2 8 4

which is slightly less than the perimeter of a circle of radius a.

Solutions to the Problems for Lecture 37

1. We integrate 𝑢 = −y𝑖 + x𝑗 counterclockwise around the square. We write


˛ ˆ ˆ ˆ ˆ
𝑢 · d𝑟 = 𝑢 · d𝑟 + 𝑢 · d𝑟 + 𝑢 · d𝑟 + 𝑢 · d𝑟,
C C1 C2 C3 C4

where the curves Ci represent theˆ four sides of the square. On C1 from (0, 0) to ( L, 0), we
have y = 0 and d𝑟 = dx𝑖 so that 𝑢 · d𝑟 = 0. On C2 from ( L, 0) to ( L, L), we have x = L
C1
ˆ ˆ L
and d𝑟 = dy𝑗 so that 𝑢 · d𝑟 = Ldy = L2 . On C3 from ( L, L) to (0, L), we have
C2 0
ˆ ˆ 0
y = L and d𝑟 = dx𝑖 so that 𝑢 · d𝑟 = − Ldx = L2 . The sign of this term is tricky, but
C3 L
notice that the curve is going in the -𝑖 direction and so is the x-component of the vector
field so the dot product
ˆ should be positive. On C4 from (0, L) to (0, 0), we have x = 0 and
d𝑟 = dy𝑗 so that 𝑢 · d𝑟 = 0. Summing the four contributions, we found
C4
˛
𝑢 · d𝑟 = 2L2 ,
C

which is twice the area of the square.

2. We integrate 𝑢 = −y𝑖 + x𝑗 counterclockwise around a unit circle. To parameterize a


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 159

circle with radius R, we write

x = R cos θ, y = R sin θ.

Therefore, 𝑢 = − R sin θ𝑖 + R cos θ𝑗 and d𝑟 = (− R sin θ𝑖 + R cos θ𝑗 )dθ. We have 𝑢 · d𝑟 =


R2 dθ and ˛ ˆ 2π
𝑢 · d𝑟 = R2 dθ = 2πR2 ,
C 0

which is twice the area of the circle.

Solutions to the Problems for Lecture 38

1. We define our coordinate system with the x-axis pointing downward and the origin at
the initial position of the mass. With

𝐹 = mg𝑖, d𝑟 = dx𝑖,

the work done by gravity as the mass falls a distance h is given by


ˆ ˆ h
W= 𝐹 · d𝑟 = mg dx = mgh.
C 0

With 𝑣 f the final velocity of the mass, and with the initial velocity equal to zero, we have
from the work-energy theorem,
1
mgh = m |𝑣 f |2 ,
2
or
p
|𝑣 f | = 2gh.

Solutions to the Practice quiz: Line integrals

1. d. We have
q q q
ds = (dx )2 + (dy)2 = 1 + (dy/dx )2 dx = 1 + (2x )2 dx.

Therefore, the arc length is given by


ˆ 1 p
1 + 4x2 dx.
0

2. c. We integrate 𝑢 = −y𝑖 + x𝑗 counterclockwise around the right triangle. We write


˛ ˆ ˆ ˆ
𝑢 · d𝑟 = 𝑢 · d𝑟 + 𝑢 · d𝑟 + 𝑢 · d𝑟,
C C1 C2 C3
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 160

where the curves Ci represent the three ˆsides of the triangle. On C1 from (0, 0) to ( L, 0),
we have y = 0 and d𝑟 = dx𝑖 so that 𝑢 · d𝑟 = 0. On C2 from ( L, 0) to (0, L), we
C1
parameterize the line segment by 𝑟 = ( L − s)𝑖 + s𝑗 as s goes from zero to L so that
d𝑟 = −ds𝑖 + ds𝑗. Therefore, on this line segment, 𝑢 · d𝑟 = ( x + y)ds = L ds. We have
ˆ ˆ L
𝑢 · d𝑟 = L ds = L2 . On C3 from (0, L) to (0, 0), we have x = 0 and d𝑟 = dy𝑗 so that
ˆ C2 0

𝑢 · d𝑟 = 0. Summing the three contributions, we found


C4
˛
𝑢 · d𝑟 = L2 ,
C

which is twice the area of the triangle.

3. a. Define the x-axis to point vertically upward. The gravitational force is given by
F = −mgi and the work done by gravity on the way up is −mgxmax and the work done
by gravity on the way down is mgxmax , where xmax is the maximum height attained by
the mass. The total work done is zero.

Solutions to the Problems for Lecture 39

1.

a) The unrolled cylinder is a rectangle with dimensions as shown on the figure below:

The lateral surface area is A = 2πab.

b) Define the cylinder parametrically as

𝑟 = a cos θ 𝑖 + a sin θ 𝑗 + z 𝑘, for 0 ≤ z ≤ b and 0 ≤ θ ≤ 2π.

To find the infinitesimal surface element, we compute the partial derivatives of 𝑟:

∂𝑟 ∂𝑟
= − a sin θ 𝑖 + a cos θ 𝑗, = 𝑘.
∂θ ∂z
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 161

The cross product is

𝑖 𝑗 𝑘
∂𝑟 ∂𝑟
× = − a sin θ a cos θ 0 = a cos θ 𝑖 + a sin θ 𝑗,
∂θ ∂z
0 0 1

so that

∂𝑟 ∂𝑟 p
× = a2 cos2 θ + a2 sin2 θ = a.
∂θ ∂z

The surface area is given by


ˆ ˆ b ˆ 2π
A= dS = a dθ dz = 2πab.
S 0 0

2.

a) The unrolled cone is a circular sector with dimensions as shown on the figure below:


The lateral surface area is the sector of a circle of radius a2 + b2 . Its area is found
from

arc length of sector


A= × area of circle
circumference of circle
2πa
= √ × π ( a2 + b2 )
2π a2 + b2
r  a 2
p
= πa a2 + b2 = πab 1 + .
b

b) Define the cone parametrically as

az az
𝑟= cos θ 𝑖 + sin θ 𝑗 + z 𝑘, for 0 ≤ z ≤ b and 0 ≤ θ ≤ 2π,
b b
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 162

To find the infinitesimal surface element, we compute the partial derivatives of 𝑟:

∂𝑟 az az ∂𝑟 a a
= − sin θ 𝑖 + cos θ 𝑗, = cos θ 𝑖 + sin θ + 𝑘.
∂θ b b ∂z b b

The cross product is

𝑖 𝑗 𝑘
∂𝑟 ∂𝑟 az az az az a2 z
× = − b sin θ b cos θ 0 = cos θ 𝑖 + sin θ 𝑗 − 2 𝑘,
∂θ ∂z a a
b b b
b cos θ b sin θ 1

so that
s
∂𝑟 ∂𝑟 a2 z2 a2 z2 a4 z2
× = 2
cos2 θ + 2 sin2 θ + 4
∂θ ∂z b b b
r
az a2
= 1+ 2.
b b

The surface area is given by


ˆ r ˆ b ˆ 2π
az a2
A= dS = 1 + 2 dθ dz
S 0 0 b b
r
2
ˆ b ˆ 2π
a a
= 1+ 2 z dz dθ
b b 0 0
r  a 2
= πab 1 + .
b

Solutions to the Problems for Lecture 40

1. For the paraboloid, we have

b  2 2

z( x, y) = x + y
a2

The surface area is given by

ˆ ˆ
s  2  2
∂z ∂z
S= dS = 1+ + dx dy.
S S ∂x ∂y

Here,
∂z 2bx ∂z 2by
= 2 , = 2 ,
∂x a ∂y a
so that
ˆ q
S= 1 + 4b2 x2 /a4 + 4b2 y2 /a4 dx dy
S
ˆ r 4
2b a
= 2 + ( x2 + y2 ) dx dy.
a S 4b2
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 163

We integrate in polar coordinates. Let

x = r cos θ, y = r sin θ,

and dx dy = r dr dθ. The integral becomes


ˆ 2π ˆ a
r
2b a4
S= 2 + r2 r dr dθ
a 0 0 4b2
ˆ a2 + a4 /4b2
2πb
= u1/2 du
a2 a4 /4b2

4πb

a 4 3/2  4 3/2 !
a
= 2 a2 + 2 −
3a 4b 4b2
3/2   !
a2

4 a 3
= πab 1+ 2 − .
3 4b 2b

Solutions to the Problems for Lecture 41

1. Use cylindrical coordinates with the origin at the exact center of the cylinder, with the
z-axis down the long symmetry axis. The flat top disk of the cylinder will be at z = l/2
and the bottom disk of the cylinder will be at z = −l/2. The lateral curved surface of the
cylinder is at ρ = a.
We have for the surface integral on the lateral surface,

𝑟 = a𝜌ˆ + z𝑧,
ˆ d𝑆 = 𝜌dS,
ˆ

and for the total surface area of the lateral surface, S = 2πal. Therefore,
ˆ ˆ
𝑟 · d𝑆 = a dS = 2πa2 l.
S S

On the top disk of the cylinder, we have

l
𝑟 = ρ𝜌ˆ + 𝑧,
ˆ d𝑆 = 𝑧ˆ dS,
2

and for the total surface area of the top disk, S = πa2 . Therefore,
ˆ ˆ
l πa2 l
𝑟 · d𝑆 = dS = .
S 2 S 2

The bottom disk of the cylinder will yield the same result, so that
˛
πa2 l
𝑟 · d𝑆 = 2πa2 l + 2 × = 3πa2 l,
S 2

which is three times the volume of the cylinder.


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 164

Solutions to the Problems for Lecture 42

1. To find the mass flux, we use


  r 2 
𝑢(𝑟 ) = um 1 − 𝑘.
R

With d𝑆 = 𝑘 r dr dθ, the mass flux through a cross section of the pipe is given by
ˆ ˆ 2π ˆ R   r 2 
ρ𝑢 · d𝑆 = ρum 1 − r dr dθ
S 0 0 R
ˆ 1  
= 2πR2 ρum 1 − s2 s ds
0
1
= πR2 ρum .
2

This is one-half of what it would be if the entire fluid was moving with velocity um . Using
the formula for um , we have ˆ
πGR4
ρ𝑢 · d𝑆 = .
S 8ν
This result is called the Hagen-Poiseuille equation, which relates the pressure gradient to
the radius of the pipe for a fixed mass flux.

Solutions to the Practice quiz: Surface integrals

1. d. The parameterization of the torus is given by

x = ( R + r cos θ ) cos φ, y = ( R + r cos θ ) sin φ, z = r sin θ,

so that the position vector is given by

r = ( R + r cos θ ) cos φ i + ( R + r cos θ ) sin φ j + r sin θ k.

The partial derivatives are

∂r
= −r sin θ cos φ i − r sin θ sin φ j + r cos θ k,
∂θ
∂r
= −( R + r cos θ ) sin φ i + ( R + r cos θ ) cos φ j,
∂φ

and

i j k
∂r ∂r
× = −r sin θ cos φ −r sin θ sin φ r cos θ
∂θ ∂φ
−( R + r sin θ ) sin φ ( R + r cos θ ) cos φ 0
= −r ( R + r cos θ ) cos θ cos φ i − r ( R + r cos θ ) cos θ sin φ j − r ( R + r cos θ ) sin θ k.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 165

Therefore,

∂r ∂r h i1/2
× = r2 ( R + r cos θ )2 cos2 θ (cos2 φ + sin2 φ) + r2 ( R + r cos θ )2 sin2 θ
∂θ ∂φ
h i1/2
= r2 ( R + r cos θ )2 (cos2 θ + sin2 θ ) = r ( R + r cos θ ),

and
dS = r ( R + r cos θ ) dθ dφ.

2. c. In cylindrical coordinates, 𝑢 = x𝑖 + y𝑗 = ρ𝜌.


ˆ The cylinder ends have normal vectors
𝑧ˆ and −𝑧,
ˆ which are perpendicular to 𝑢. On the side of the cylinder, we have 𝑢 = R𝜌ˆ
and d𝑆 = 𝜌dS,
ˆ so that
˛ ˆ
𝑢 · d𝑆 = R dS = R(2πRL) = 2πR2 L.
S

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φ.

Therefore, the surface integral over the upper hemisphere becomes


ˆ ˆ 2π ˆ π/2
𝑢 · d𝑆 = R3 cos2 θ sin θ dθ dφ
S 0 0
ˆ π/2 ˆ 1
3 2 3 2π 3
= 2πR cos θ sin θ dθ = 2πR w2 dw = R .
0 0 3

Solutions to the Problems for Lecture 43

1. With φ(𝑟 ) = x2 y + xy2 + z:

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.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 166

Solutions to the Problems for Lecture 44

1. With 𝑢 = (2xy + z2 )𝑖 + (2yz + x2 )𝑗 + (2zx + y2 )𝑘:

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

Integrate the first equation to get


ˆ
φ= (2xy + z2 ) dx = x2 y + xz2 + f (y, z).

Take the derivative with respect to y and satsify the second equation:

∂f ∂f
x2 + = 2yz + x2 or = 2yz.
∂y ∂y

Integrate this equation for f to get


ˆ
f = 2yz dy = y2 z + g(z).

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.

Therefore, g(z) = c where c is a constant, and φ = x2 y + y2 z + z2 x + c.

Solutions to the Problems for Lecture 45

1. Let vescape be the magnitude of the escape velocity for a mass launched perpendicular
to the Earth’s surface. When the mass reaches infinity, its velocity should be exactly zero.
Conservation of energy results in

1 2 mM
mvescape − G = 0,
2 R
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 167

or
GM
v2escape = 2 R = 2gR.
R2
Therefore, we have
p
vescape = 2gR.

Solutions to the Practice quiz: Gradient theorem


ˆ
1. b. ∇φ · d𝑟 = φ(1, 1, 1) − φ(0, 0, 0) = 1.
C

2. a. Since ∇ × 𝑢 = ∇ × (y𝑖 + x𝑗 ) = 0, the line integral 𝑢 around any closed curve is


zero. By inspection, we can also observe that 𝑢 = ∇φ, where φ = xy + c.

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).

Differentiating φ with respect to y and using the second equation, we obtain

∂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.

Answer c. is correct with the constant c = 0.

Solutions to the Problems for Lecture 46

1. Using spherical coordinates, let 𝑢 = ur (r, θ, φ)𝑟ˆ + uθ (r, θ, φ)𝜃ˆ + uφ (r, θ, φ)𝜑.
ˆ Then the
volume integral becomes
ˆ
(∇ · 𝑢) dV
V
ˆ 2π ˆ π ˆ R  
1 ∂ 2 1 ∂ 1 ∂uφ
= 2
(r ur ) + (sin θ uθ ) + r2 sin θ dr dθ dφ.
0 0 0 r ∂r r sin θ ∂θ r sin θ ∂φ
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 168

Each term in the integrand can be integrated once. The first term is integrated as

ˆ 2π ˆ π ˆ R  
1 ∂ 2
(r ur ) r2 sin θ dr dθ dφ
0 0 0 r2 ∂r
ˆ 2π ˆ π ˆ R ! ˆ 2π ˆ π
∂ 2
= (r ur ) dr sin θ dθ dφ = ur ( R, θ, φ) R2 sin θ dθ dφ.
0 0 0 ∂r 0 0

The second term is integrated as

ˆ 2π ˆ π ˆ R  
1 ∂
(sin θ uθ ) r2 sin θ dr dθ dφ
0 0 0 r sin θ ∂θ
ˆ 2π ˆ R ˆ π 

= (sin θ uθ ) dθ r dr dφ
0 0 0 ∂θ
ˆ 2π ˆ R
= (sin (π ) uθ (r, π, φ) − sin (0) uθ (r, 0, φ)) r dr dφ = 0,
0 0

since sin (π ) = sin (0) = 0. Similarly, the third term is integrated as

ˆ 2π ˆ π ˆ R 

1 ∂uφ
r2 sin θ dr dθ dφ
0 0 0 r sin θ ∂φ
ˆ π ˆ R ˆ 2π ! ˆ πˆ R
∂uφ 
= dφ r dr dθ = uφ (r, θ, 2π ) − uφ (r, θ, 0) r dr dθ = 0,
0 0 0 ∂φ 0 0

since uφ (r, θ, 2π ) = uφ (r, θ, 0) because φ is a periodic variable with the same physical
location at 0 and 2π.
Therefore, we have
ˆ ˆ 2π ˆ π ˛
(∇ · 𝑢) dV = ur ( R, θ, φ) R2 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 infinitesimal surface area given by dS = R2 sin θ dθ dφ.

Solutions to the Problems for Lecture 47

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
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 169

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.

2. With 𝑟 = x𝑖 + y𝑗 + z𝑘, we have ∇ · 𝑟 = 3. Therefore, from the divergence theorem we


have ˆ ˆ ˆ
𝑟 · d𝑆 = ∇ · 𝑟 dV = 3 dV = 3L3 .
S V V

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.

Solutions to the Problems for Lecture 48

1. With 𝑢 = 𝑟/r,
ˆ we use spherical coordinates to compute

1 d 1
∇·𝑢 = (r ) = 2 .
r2 dr r

Therefore, for the left-hand side of the divergence theorem we have


ˆ ˆ R  
1
(∇ · 𝑢) dV = 4π r2 dr = 4πR.
V 0 r2

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

2. With 𝑟 = x𝑖 + y𝑗 + z𝑘, we have ∇ · 𝑟 = 3. Therefore, from the divergence theorem we


have ˆ ˆ ˆ  
4
𝑟 · d𝑆 = ∇ · 𝑟 dV = 3 dV = 3 πR3 = 4πR3 .
S V V 3
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.

3. We consider the velocity field given by

Λ( x𝑖 + y𝑗 + z𝑘 )
𝑢( x, y, z) = .
4π ( x2 + y2 + z2 )3/2
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 170
p
a) Using spherical coordinates, we have 𝑟 = r𝑟ˆ with r = x2 + y2 + z2 . Therefore,

Λ𝑟ˆ
𝑢= .
4πr2

b) We compute ∇ · 𝑢 for r 6= 0 using spherical coordinates:

Λ
  
1 ∂
∇·𝑢 = r2 = 0.
r2 ∂r 4πr2

c) We now consider the volume integral of ∇ · 𝑢, i.e.,


ˆ
∇ · 𝑢 dV.
V

If V does not contain the origin, then this volume integral is zero. If V contains the
origin, and since ∇ · 𝑢 = 0 everywhere except at the origin, we need only integrate
over a small sphere of volume V 0 ∈ V centered at the origin. We therefore have from
the divergence theorem
ˆ ˆ ˛
∇ · 𝑢 dV = ∇ · 𝑢 dV = 𝑢 · d𝑆,
V V0 S0

where the surface S0 is now the surface of a sphere of radius R, say, centered at the
origin. Since d𝑆 = 𝑟dS,
ˆ we have
˛ ˛
Λ
𝑢 · d𝑆 = dS = Λ,
S0 4πR2 S0

since the surface area of the sphere is 4πR2 . Therefore,

ˆ

0, (0, 0, 0) ∈
/ V;
∇ · 𝑢 dV =
V Λ, (0, 0, 0) ∈ V.

For those of you familiar with the one-dimensional Dirac delta function, say from
my course Differential Equations for Engineers, what we have here is

∇ · 𝑢 = Λδ(𝑟 ),

where δ(𝑟 ) is the three-dimensional Dirac delta function satisfying

δ(𝑟 ) = 0, when 𝑟 6= 0,

and ˆ
δ(𝑟 ) dV = 1, provided the origin is in V.
V

In Cartesian or in spherical coordinates, the three-dimensional Dirac delta function


APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 171

centered at the origin may be written as

1
δ (𝑟 ) = δ ( x ) δ ( y ) δ ( z ) = δ (r ),
4πr2

where δ( x ), δ(y), δ(z) and δ(r ) are one-dimensional Dirac delta functions.

Solutions to the Problems for Lecture 49

1. The continuity equation as derived in the lecture is given by

∂ρ
+ ∇ · (ρ𝑢) = 0.
∂t

Using the vector identity ∇ · (ρ𝑢) = 𝑢 · ∇ρ + ρ∇ · 𝑢, the continuity equation becomes

∂ρ
+ 𝑢 · ∇ρ + ρ∇ · 𝑢 = 0.
∂t

2. We begin with ˆ ˛
d
ρ(𝑟, t) dV = − 𝐽 · d𝑆.
dt V S

The divergence theorem applied to the right-hand side results in


˛ ˆ
𝐽 · d𝑆 = ∇ · 𝐽 dV;
S V

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

Solutions to the Practice quiz: Divergence theorem

1. a. With 𝑢 = yz𝑖 + xz𝑗 + xy𝑘, we have ∇ · 𝑢 = 0. Therefore,


˛ ˆ
𝑢 · d𝑆 = (∇ · 𝑢) dV = 0.
S V

2. d. ˛ ˆ ˆ
𝑟 · d𝑆 = (∇ · 𝑟 ) dV = 3 dV = 3πR2 L.
S V V
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 172

3. d. Computing the divergences, we have


 
1 2
∇ · xy𝑖 − y 𝑗 = y − y = 0,
2
∇ · [(1 + x )𝑖 + (1 − y)𝑗 ] = 1 − 1 = 0,
   
1 2
∇ · ( x2 − xy)𝑖 + y − 2xy 𝑗 = (2x − y) + (y − 2x ) = 0,
2
h i
∇ · ( x + y)2 𝑖 + ( x − y)2 𝑗 = 2( x + y) − 2( x − y) = 4y.

Solutions to the Problems for Lecture 50

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 ∂u1
− 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 θ dθ and dy = R cos θ dθ, 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

Solutions to the Problems for Lecture 51

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
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 173

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 φ dφ and dy = R cos φ dφ, 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

The left-hand side of Stokes’ theorem uses

𝑖 𝑗 𝑘
∇ × 𝑢 = ∂/∂x ∂/∂y ∂/∂z = 2𝑘;
−y x 0

ˆ 2 sin θ dθ dφ, we have


so that with d𝑆 = 𝑟R
ˆ ˆ 2π ˆ π/2
2
(∇ × 𝑢) · d𝑆 = 2R 𝑘 · 𝑟ˆ sin θ dθ dφ.
S 0 0

With
ˆ
𝑘 = cos θ 𝑟ˆ − sin θ 𝜃,

we have
𝑘 · 𝑟ˆ = cos θ;

and
ˆ ˆ 2π ˆ π/2
(∇ × 𝑢) · d𝑆 = 2R2 dφ cos θ sin θ dθ
S 0 0

= 2πR2 sin2 θ = 2πR2 .


π/2
0
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 174

3. We consider the two-dimensional velocity field given by

Γ −y𝑖 + x𝑗
 
𝑢= .
2π x 2 + y2

a) Cylindrical coordinates are defined by

x = ρ cos φ, y = ρ sin φ, ˆ
𝑖 = cos φ𝜌ˆ − sin φ𝜑, ˆ
𝑗 = sin φ𝜌ˆ + cos φ𝜑.

Substituting into 𝑢, we obtain


Γ𝜑ˆ
𝑢= .
2πρ

b) Let 𝜔 = ∇ × 𝑢. For ρ 6= 0, our velocity field satisfies uρ = 0, uφ = Γ/(2πρ), uz = 0,


and we find using cylindrical coordinates,

Γ
    
1 ∂ 1 ∂uρ 1 ∂
𝜔 = ∇ × 𝑢 = 𝑘ˆ (ρuφ ) − = 𝑘ˆ = 0.
ρ ∂ρ ρ ∂φ ρ ∂ρ 2π

c) We now consider a surface integral of the vorticity field over an area in the x-y plane
containing the origin, i.e., ˆ
ˆ
𝜔 · 𝑘dS.
S

Because 𝜔 = 0 everywhere except at ρ = 0, we can reduce this integral to be that


over a circle of radius R centered at the origin. Then applying Stokes’ theorem,
ˆ ˆ ˛ ˆ 2π
Γ𝜑ˆ
 
ˆ
𝜔 · 𝑘dS = ˆ
(∇ × 𝑢) · 𝑘dS = 𝑢 · d𝑟 = ˆ
· 𝜑Rdφ = Γ.
S S C 0 2πR

Now 𝜔 equals zero everywhere except at the origin, and the two-dimensional in-
tegral of its z-component over any area in the x-y plane containing the origin is
equal to Γ. We can therefore identify the z-component of 𝜔 with Γ times the two-
dimensional Dirac delta function, i.e.,

𝜔 = Γδ( x )δ(y)𝑘,
ˆ

where δ( x ) and δ(y) are one-dimensional Dirac delta functions. This vorticity field
is called a two-dimensional point vortex. The two-dimensional Dirac delta function,
here written in Cartesian coordinates, can also be written in cylindrical (or polar)
coordinates as
1
δ( x )δ(y) = δ ( ρ ).
2πρ
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 175

Solutions to the Practice quiz: Stokes’ theorem

1. b. With 𝑢 = −y𝑖 + x𝑗, we have ∇ × 𝑢 = 2𝑘 and we use Stokes’ theorem to write


˛ ˆ ˆ
1
𝑢 · d𝑟 = (∇ × 𝑢) · d𝑆 = 2 dA = πR2 ,
C S 2

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
x 2 + y2 x + y2
provided ( 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 𝜑ˆ
𝑢= 𝑖+ 2 𝑗= .
x2 +y 2 x +y 2 ρ

Then, ˆ ˛ ˆ ˆ 2π

𝜑ˆ
 
ˆ

(∇ × 𝑢) · d𝑆 = 𝑢 · d𝑟 = · 𝜑ρdφ = dφ = 2π.
S C 0 ρ 0

3. c. With 𝑢 = − x2 y𝑖 + xy2 𝑗, we have ∇ × 𝑢 = ( x2 + y2 )𝑘. Therefore, with d𝑆 = 𝑘dxdy,


we have
˛ ˆ ˆ 1ˆ 1
𝑢 · d𝑟 = (∇ × 𝑢) · d𝑆 = ( x2 + y2 ) dx dy
C S 0 0
ˆ 1 ˆ 1 ˆ 1 ˆ 1
2 2
= x dx dy + dx y2 dy = .
0 0 0 0 3

Solutions to the Problems for Lecture 52

1.

a) The Navier-Stokes equation and the continuity equation are given by

∂𝑢 1
+ (𝑢 · ∇)𝑢 = − ∇p + ν∇2 𝑢, ∇ · 𝑢 = 0.
∂t ρ

Taking the divergence of both sides 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
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 176

Therefore,
∂ui ∂u j
∇2 p = − ρ .
∂x j ∂xi

b) Taking the curl of both sides of the Navier-Stokes equation, and using 𝜔 = ∇ × 𝑢
and ∇ × ∇p = 0, we obtain

∂𝜔
+ ∇ × (𝑢 · ∇)𝑢 = ν∇2 𝜔.
∂t

To simplify the second term, we first prove the identity

1
𝑢 × (∇ × 𝑢) = ∇(𝑢 · 𝑢) − (𝑢 · ∇)𝑢.
2

We prove by considering the ith component of the left-hand side:

∂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 u ) − u j i
2 ∂xi j j ∂x j
 
1
= ∇(𝑢 · 𝑢) − [(𝑢 · ∇)𝑢]i .
2 i

Therefore, using the facts that the curl of a gradient and the divergence of a curl are
equal to zero, and 𝜔 = ∇ × 𝑢 and ∇ · 𝑢 = 0, we have
 
1
∇ × (𝑢 · ∇)𝑢 = ∇ × ∇(𝑢 · 𝑢) − 𝑢 × (∇ × 𝑢)
2
= −∇ × (𝑢 × 𝜔 )
= − [𝑢(∇ · 𝜔 ) − 𝜔 (∇ · 𝑢) + (𝜔 · ∇)𝑢 − (𝑢 · ∇)𝜔 ]
= −(𝜔 · ∇)𝑢 + (𝑢 · ∇)𝜔.

Putting it all together gives us the vorticity equation, given by

∂𝜔
+ (𝑢 · ∇)𝜔 = (𝜔 · ∇)𝑢 + ν∇2 𝜔.
∂t

Solutions to the Problems for Lecture 53

1. The electric field from a point charge at the origin should be spherically symmetric.
We therefore write using spherical coordinates, 𝐸 (𝑟 ) = E(r )𝑟.
ˆ Applying Gauss’s law to a
spherical shell of radius r, we have
˛ ˛
q
𝐸 · d𝑆 = E(r ) dS = 4πr2 E(r ) = .
S S ε0
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 177

Therefore, the electric field is given by

q
𝐸 (𝑟 ) = ˆ
𝑟.
4πε 0 r2

2. The magnetic field from a current carrying infinite wire should have cylindrical symme-
ˆ Applying Ampère’s
try. We therefore write using cylindrical coordinates, 𝐵 (𝑟 ) = B(ρ)𝜑.
law to a circle of radius ρ in the x-y plane in the counterclockwise direction, we obtain
˛ ˛
𝐵 · d𝑟 = B(ρ) dr = 2πρB(ρ) = µ0 I,
C C

where I is the current in the wire. Therefore,

µ0 I ˆ
𝐵 (𝑟 ) = 𝜑.
2πρ

You might also like