Vector Calculus For Engineers
Vector Calculus For Engineers
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
8 Vector identities 18
II Differentiation 27
12 Partial derivatives 28
14 Chain rule 32
17 Gradient 38
iv
CONTENTS v
18 Divergence 40
19 Curl 42
20 Laplacian 44
23 Electromagnetic waves 50
29 Central force 65
32 Cylindrical coordinates 71
36 Arc length 81
38 Work-energy theorem 85
42 Flux integrals 94
V Fundamental Theorems 97
43 Gradient theorem 98
Appendices 123
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
𝐴 + 𝐵 = 𝐵 + 𝐴, (𝐴 + 𝐵 ) + 𝐶 = 𝐴 + (𝐵 + 𝐶 );
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 𝐵.
2
WEEK I. VECTORS 3
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.
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 𝑘.
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
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 .
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,
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
a) 𝐴 · 𝐵 = 𝐵 · 𝐴;
b) 𝐴 · (𝐵 + 𝐶 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶;
2. Determine all the combinations of dot products between the standard unit vectors 𝑖, 𝑗,
and 𝑘.
3. Let 𝐶 = 𝐴 − 𝐵. Calculate the dot product of 𝐶 with itself and thus derive the law of
cosines.
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
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
a) 𝐴 × 𝐵 = −𝐵 × 𝐴;
b) 𝐴 × (𝐵 + 𝐶 ) = 𝐴 × 𝐵 + 𝐴 × 𝐶;
2. Determine all the combinations of cross products between the standard unit vectors 𝑖,
𝑗, and 𝑘.
3. Show that the cross product is not in general associative. That is, find an example using
unit vectors such that
𝐴 × (𝐵 × 𝐶 ) 6= (𝐴 × 𝐵 ) × 𝐶.
a) 𝐴 · 𝐵 = 𝐵 · 𝐴
b) 𝐴 + (𝐵 + 𝐶 ) = (𝐴 + 𝐵 ) + 𝐶
c) 𝐴 × (𝐵 × 𝐶 ) = (𝐴 × 𝐵 ) × 𝐶
d) 𝐴 · (𝐵 + 𝐶 ) = 𝐴 · 𝐵 + 𝐴 · 𝐶
a) a2 b3 − a3 b2
b) a3 b1 − a1 b3
c) a1 b2 − a2 b1
d) a1 b3 − a3 b1
a) 𝑖 × (𝑗 × 𝑘 )
b) (𝑖 × 𝑗 ) × 𝑘
c) (𝑖 × 𝑖) × 𝑗
d) 𝑖 × (𝑖 × 𝑗 )
10
Lecture 5 | Analytic geometry
of lines
View this lecture on YouTube
𝑟 = 𝑟0 + 𝑢t,
x = x0 + u1 t, y = y0 + u2 t, z = z0 + u3 t;
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:
Choosing a point on the line with position vector 𝑟0 = 𝑖 + 2𝑗 + 3𝑘, the parametric equation
for the line is given by
The line crosses the z = 0 plane when 3 − 2t = 0, or t = 3/2, and ( x, y) = (4, 2).
11
WEEK I. VECTORS 12
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 × 𝑠2 = −1 1 0 = 𝑖 + 𝑗 + 𝑘.
0 −1 1
The intersection of this plane with the z = 0 plane forms the line given by y = − x + 4.
13
WEEK I. VECTORS 14
a) t𝑖 + (1 + t)𝑗 + (1 + 2t)𝑘
b) t𝑖 + (1 − t)𝑗 + (1 + 2t)𝑘
c) t𝑖 + (1 + t)𝑗 + (1 − 2t)𝑘
d) t𝑖 + (1 − t)𝑗 + (1 − 2t)𝑘
a) y = x
b) y = x + 1
c) y = x − 1
d) y = 1
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
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
16
WEEK I. VECTORS 17
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.
a) δij A j = Ai ;
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 ),
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 ;
δij A j = Ai ;
𝐴 · 𝐵 = 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
𝐴 · (𝐵 × 𝐶 ) = 𝐵 · (𝐶 × 𝐴) = 𝐶 · (𝐴 × 𝐵 ),
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:
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
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 ,
𝐴 × (𝐵 × 𝐶 ) = (𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶.
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
𝐴 × (𝐵 × 𝐶 ) + 𝐵 × (𝐶 × 𝐴) + 𝐶 × (𝐴 × 𝐵 ) = 0.
(𝐴 × 𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ).
|𝐴 × 𝐵 |2 = |𝐴|2 |𝐵 |2 − (𝐴 · 𝐵 )2 .
4. Prove using vector triple products that the vector quadruple product satisfies
a) 𝐵 × (𝐶 × 𝐴)
b) 𝐴 × (𝐶 × 𝐵 )
c) (𝐴 × 𝐵 ) × 𝐶
d) (𝐶 × 𝐵 ) × 𝐴
a) 𝐴 · (𝐵 × 𝐵 )
b) 𝐴 · (𝐴 × 𝐵 )
c) 𝐴 × (𝐴 × 𝐵 )
d) 𝐵 · (𝐴 × 𝐵 )
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
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
25
WEEK I. VECTORS 26
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
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
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
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
n n n n n
β0 n + β1 ∑ xi = ∑ yi , β0 ∑ xi + β 1 ∑ xi2 = ∑ xi yi .
i =1 i =1 i =1 i =1 i =1
∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )2
30
WEEK II. DIFFERENTIATION 31
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 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.
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
b) Eliminate x and y in favor of r and θ and compute the partial derivatives directly.
Suppose that three variables x, y and z are related by the equation f ( x, y, z) = 0, and
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.
where P is the pressure, V is the volume, T is the absolute temperature, n is the number
of moles of the gas, and R is the ideal gas constant. We say P, V and T are the state
variables, and the ideal gas law is a relation of the form
f ( P, V, T ) = PV − nRT = 0.
nRT nRT PV
P= , V= , T= ;
V P nR
∂P nRT ∂V nR ∂T V
=− 2 , = , = .
∂V V ∂T P ∂P nR
where we make use of the ideal gas law in the last equality.
35
WEEK II. DIFFERENTIATION 36
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
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
∂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.
∇ f = yz 𝑖 + xz 𝑗 + xy 𝑘.
38
WEEK II. DIFFERENTIATION 39
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 ).
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.
∂ ∂ ∂
∇·𝑟 = x + y + z = 3.
∂x ∂y ∂z
𝑟
Example: Let 𝐹 = for all 𝑟 6= 0. Find ∇ · 𝐹 .
|𝑟 |3
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
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,
|𝑟 | |𝑟 | |𝑟 | |𝑟 |
40
WEEK II. DIFFERENTIATION 41
𝑖 𝑗 𝑘
∂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.
42
WEEK II. DIFFERENTIATION 43
𝑢 = u1 ( x, y)𝑖 + u2 ( x, y)𝑗.
𝜔 = ω3 ( x, y)𝑘.
∂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
We have ∇2 f = 2 + 2 + 2 = 6.
44
WEEK II. DIFFERENTIATION 45
46
Lecture 21 | Vector derivative
identities
View this lecture on YouTube
∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇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
∂f ∂f ∂f
𝑢 · ∇ f = u1 + u2 + u3 ,
∂x1 ∂x2 ∂x3
In some of these identities, the parentheses are optional when the expression has only
one possible interpretation. For example, it is common to see (𝑢 · ∇)𝑣 written as 𝑢 · ∇𝑣.
The parentheses are mandatory when the expression can be interpreted in more than one
way, for example ∇ × 𝑢 × 𝑣 could mean either ∇ × (𝑢 × 𝑣 ) or (∇ × 𝑢) × 𝑣, and these
two expressions are usually not equal.
Proof of all of these identities is most readily done by manipulating the Kronecker
delta and Levi-Civita symbols, and I give an example in the next lecture.
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
∂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
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.
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
∂
∇(∇ · 𝐸 ) − ∇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
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
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
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
ˆ 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
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
ˆ 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
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 θ.
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θ
∂f ∂f
d f = ∇ f · d𝑟 or df = dr + dθ.
∂r ∂θ
We have
d𝑟ˆ ˆ
d𝑟 = d(r𝑟ˆ ) = 𝑟dr
ˆ +r dθ = 𝑟dr
ˆ + r𝜃dθ,
dθ
and equating the two forms for d f results in
∇ f · (𝑟dr ˆ ) = ∂ f dr + ∂ f dθ.
ˆ + r𝜃dθ
∂r ∂θ
∂ 1 ∂
∇ = 𝑟ˆ + 𝜃ˆ .
∂r r ∂θ
59
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 60
Given
𝑟ˆ = cos θ𝑖 + sin θ𝑗, 𝜃ˆ = − sin θ𝑖 + cos θ𝑗,
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
∂ ∂ sin θ ∂ ∂ ∂ cos θ ∂
= cos θ − , = sin θ + .
∂x ∂r r ∂θ ∂y ∂r r ∂θ
ˆ
𝑢 = 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 ∂θ
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
1
k1 𝑟ˆ + k2 𝜃ˆ ,
𝑢=
r
∂ 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
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
d𝑟ˆ d𝜃ˆ
𝑟¨ = r̈𝑟ˆ + ṙ + ṙ θ̇ 𝜃ˆ + r θ̈ 𝜃ˆ + r θ̇
dt dt
= (r̈ − r θ̇ 2 )𝑟ˆ + (2ṙ θ̇ + r θ̈ )𝜃.ˆ
m(r̈ − r θ̇ 2 ) = − f , m(2ṙ θ̇ + r θ̈ ) = 0.
d
(mr2 θ̇ ) = 0, or mr2 θ̇ = constant.
dt
65
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 66
𝑙 = 𝑟 × 𝑝,
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.
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
67
Lecture 31 | Change of variables
(double integral)
View this lecture on YouTube
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
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.
−∞ −∞ −∞ −∞ −∞
a) x𝑖 + y𝑗
b) x𝑖 − y𝑗
c) y𝑖 + x𝑗
d) −y𝑖 + x𝑗
d𝜃ˆ
2. is equal to
dθ
a) 𝑟ˆ
b) −𝑟ˆ
c) 𝜃ˆ
d) −𝜃ˆ
3. Suppose a circular disk of radius 1 cm has mass density 10 g/cm2 at its center, and
1 g/cm2 at its edge, and its density is a linear function of the distance from the center.
The total mass of the disk is equal to
a) 8.80 g
b) 10.21 g
c) 12.57 g
d) 17.23 g
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;
∂ 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
ˆ
𝑥ˆ = cos φ𝜌ˆ − sin φ𝜑, ˆ
𝑦ˆ = sin φ𝜌ˆ + cos φ𝜑,
and
∂ ∂ sin φ ∂ ∂ ∂ cos φ ∂
= cos φ − , = sin φ + .
∂x ∂ρ ρ ∂φ ∂y ∂ρ ρ ∂φ
2. Compute ∇ · 𝜌ˆ in two ways:
ˆ ∇ · 𝜑ˆ 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
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
By differentiating the unit vectors, we can derive the sometimes useful identities
73
WEEK III. INTEGRATION AND CURVILINEAR COORDINATES 74
3. Consider a scalar field f = f (r ) that depends only on the distance from the origin.
Using dx dy dz = r2 sin θ dr dθ dφ, and an integration region V inside a sphere of radius R
centered at the origin, show that
ˆ ˆ R
f dV = 4π r2 f (r ) dr.
V 0
4. Suppose a sphere of radius R has mass density ρ0 at its center, and ρ1 at its surface,
and its density is a linear function of the distance from the center. Find the total mass of
the sphere. What is the average density of the sphere?
First, we determine the gradient in spherical coordinates. Consider the scalar field f =
f (r, θ, φ). Our definition of a total differential is
∂f ∂f ∂f
df = dr + dθ + dφ = ∇ f · d𝑟.
∂r ∂θ ∂φ
In spherical coordinates,
𝑟 = r 𝑟ˆ (θ, φ),
and using
∂𝑟ˆ ˆ ∂𝑟ˆ ˆ
= 𝜃, = sin θ 𝜑,
∂θ ∂φ
we have
∂𝑟ˆ ∂𝑟ˆ
d𝑟 = dr 𝑟ˆ + r dθ + r dφ = dr 𝑟ˆ + r dθ 𝜃ˆ + r sin θ dφ 𝜑.
ˆ
∂θ ∂φ
Using the orthonormality of the unit vectors, we can therefore write d f as
∂f 1 ∂f ˆ 1 ∂f ˆ
df = 𝑟ˆ + 𝜃+ 𝜑 · (dr 𝑟ˆ + r dθ 𝜃ˆ + r sin θ dφ 𝜑ˆ ),
∂r r ∂θ r sin θ ∂φ
∂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
∇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) (𝑖, 𝑗, 𝑘 )
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
77
Week IV
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 ,
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.
79
WEEK IV. LINE AND SURFACE INTEGRALS 80
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.
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
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θ.
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
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
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
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.
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
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
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
87
Lecture 39 | Surface integral of a
scalar field
View this lecture on YouTube
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
ˆ ˆ ˆ
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
a) Unroll the cylinder and compute the area of the resulting rectangle.
a) Unroll the cone and compute the area of the resulting circular sector.
az az
𝑟= cos θ 𝑖 + sin θ 𝑗 + z 𝑘, for 0 ≤ z ≤ b and 0 ≤ θ ≤ 2π,
b b
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π.
∂𝑟 ∂𝑟
= R cos θ cos φ 𝑖 + R cos θ sin φ 𝑗 − R sin θ 𝑘, = − R sin θ sin φ 𝑖 + R sin θ cos φ 𝑗.
∂θ ∂φ
𝑖 𝑗 𝑘
∂𝑟 ∂𝑟
× = 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
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
92
WEEK IV. LINE AND SURFACE INTEGRALS 93
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
94
WEEK IV. LINE AND SURFACE INTEGRALS 95
GR2
um =
4νρ
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
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 ).
dφ = ∇φ · d𝑟,
so that ˆ ˆ
∇φ · d𝑟 = dφ = φ(𝑟2 ) − φ(𝑟1 ).
C C
We have thus shown that the line integral of the gradient of a function is path independent,
depending only on the endpoints of the curve. In particular, we have the general result
that ˛
∇φ · d𝑟 = 0
C
ˆ ˆ (1,1)
1 1 2
𝑟 · d𝑟 = ∇( x2 + y2 ) · d𝑟 = ( x + y2 ) = 1.
C 2 C 2 (0,0)
98
WEEK V. FUNDAMENTAL THEOREMS 99
a) Compute ∇φ.
´
b) Compute C ∇φ · d𝑟 from (0, 0, 0) to (1, 1, 1) using the gradient theorem.
´
c) Compute C ∇φ · d𝑟 along the lines segments (0, 0, 0) to (1, 0, 0) to (1, 1, 0) to (1, 1, 1).
For a vector field 𝑢 defined on R3 , except perhaps at isolated singularities, the follow-
ing conditions are equivalent:
1. ∇ × 𝑢 = 0;
𝑖 𝑗 𝑘
∇×𝑢 = ∂/∂x ∂/∂y ∂/∂z = (3x2 y2 − 3x2 y2 )𝑘 = 0.
x 2 (1 + y3 ) y2 (1 + x 3 ) 0
∂φ ∂φ
= x 2 (1 + y3 ), = y2 (1 + x 3 ).
∂x ∂y
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
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
1
T= m |𝑣 |2 .
2
𝐹 = −∇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
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
a) ( x + y)2 + z
b) ( x − y)2 + z
c) x2 + xy + y2 + z
d) x2 − xy + y2 + z
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
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.
= 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
2. Compute the flux integral of 𝑟 = x𝑖 + y𝑗 + z𝑘 over a square box with side lengths
equal to L by applying the divergence theorem to convert the flux integral into a volume
integral.
Test the divergence theorem using 𝑢 = r2 𝑟ˆ for a sphere of radius R centered at the origin.
To compute the left-hand-side of the divergence theorem, we recall the formula for the
divergence of a vector field 𝑢 in spherical coordinates:
1 ∂ 2 1 ∂ 1 ∂uφ
∇·𝑢 = 2
(r ur ) + (sin θuθ ) + .
r ∂r r sin θ ∂θ r sin θ ∂φ
1 d 4
∇·𝑢 = r = 4r.
r2 dr
109
WEEK V. FUNDAMENTAL THEOREMS 110
Λ( x𝑖 + y𝑗 + z𝑘 )
𝑢( x, y, z) = .
4π ( x2 + y2 + z2 )3/2
Λ𝑟ˆ
𝑢(r ) = .
4πr2
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.
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
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.
111
WEEK V. FUNDAMENTAL THEOREMS 112
∂ρ
+ 𝑢 · ∇ρ + ρ∇ · 𝑢 = 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.
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
d) 𝑢 = ( x + y)2 𝑖 + ( x − y)2 𝑗
113
Lecture 50 | Green’s theorem
View this lecture on YouTube
ˆ
∂u2 ∂u1
− dS
S ∂x ∂y
ˆ dˆ b ˆ bˆ d
∂u2 ∂u1
= dx dy − dy dx.
c a ∂x a c ∂y
= (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
2. Test Green’s theorem using 𝑢 = −y𝑖 + x𝑗 for a circle of radius R centered at the origin.
𝑢 = u1 ( x, y) 𝑖 + u2 ( x, y) 𝑗,
𝑢 = 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𝑟,
116
WEEK V. FUNDAMENTAL THEOREMS 117
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.
Γ −y𝑖 + x𝑗
𝑢( x, y) = .
2π x 2 + y2
Γ𝜑ˆ
𝑢(ρ, φ, z) = .
2πρ
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 Γ.
˛
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
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
∂𝑢 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
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
determine the electric field of a point charge q at the origin. Assume the electric field is
spherically symmetric.
(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.
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
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,
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
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
127
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 128
1 1
(𝐴 + 𝐵 ) + 𝑋 = 𝐴 + 𝐵,
2 2
and solving for 𝑋 yields 𝑋 = 21 𝐴. Therefore 𝑋 is parallel to 𝐴 and one-half its length.
𝑟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
1.
a) 𝐴 · 𝐵 = A1 B1 + A2 B2 + A3 B3 = B1 A1 + B2 A2 + B3 A3 = 𝐵 · 𝐴;
b) 𝐴 · (𝐵 + 𝐶 ) = A1 ( B1 + C1 ) + A2 ( B2 + C2 ) + A3 ( B3 + C3 ) = A1 B1 + A1 C1 + A2 B2 +
A2 C2 + A3 B3 + A3 C3 = ( A1 B1 + A2 B2 + A3 B3 ) + ( A1 C1 + A2 C2 + A3 C3 ) = 𝐴 · 𝐵 +
𝐴 · 𝐶;
2. The dot product of a unit vector with itself is one, and the dot product of a unit vector
with one perpendicular to itself is zero. That is,
𝑖 · 𝑖 = 𝑗 · 𝑗 = 𝑘 · 𝑘 = 1; 𝑖 · 𝑗 = 𝑖 · 𝑘 = 𝑗 · 𝑘 = 0; 𝑗 · 𝑖 = 𝑘 · 𝑖 = 𝑘 · 𝑗 = 0.
With 𝐶 = 𝐴 − 𝐵, we have
where θ is the angle between vectors 𝐴 and 𝐵. In the usual notation, if A, B and C are
the lengths of the sides of a triangle, and θ is the angle opposite side C, then
C2 = A2 + B2 − 2AB cos θ.
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;
𝑖 × 𝑗 = 𝑘, 𝑗 × 𝑘 = 𝑖, 𝑘 × 𝑖 = 𝑗;
𝑖 × (𝑖 × 𝑘 ) = −𝑖 × 𝑗 = −𝑘,
(𝑖 × 𝑖) × 𝑘 = 0 × 𝑘 = 0.
1. c. As an example, 𝑖 × (𝑖 × 𝑗 ) 6= (𝑖 × 𝑖) × 𝑗.
2. b.
𝑖 𝑗 𝑘
(𝐴 × 𝐵 ) · 𝑗 = a1 a2 a3 · 𝑗 = a3 b1 − a1 b3 .
b1 b2 b3
3. d.
𝑖 × (𝑗 × 𝑘 ) = 𝑖 × 𝑖 = 0, (𝑖 × 𝑗 ) × 𝑘 = 𝑘 × 𝑘 = 0,
(𝑖 × 𝑖) × 𝑗 = 0 × 𝑗 = 0, 𝑖 × (𝑖 × 𝑗 ) = 𝑖 × 𝑘 = −𝑗.
1. We first compute the displacement vector between (1, 1, 1) and (2, 3, 2):
Choosing a point on the line to be (1, 1, 1), the parametric equation for the line is given by
The line crosses the x = 0 and z = 0 planes when t = −1 at the intersection point
(0, −1, 0), and crosses the y = 0 plane when t = −1/2 at the intersection point (1/2, 0, 1/2).
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 131
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 × 𝑠2 = 1 1 1 = 𝑖 + 𝑗 − 2𝑘.
2
0 −2 −1
The intersection of this plane with the z = 0 plane forms the line given by y = − x.
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)𝑘.
3. d. We first find the parametric equation for the plane. From the points (1, 1, 1), (1, 1, 2)
and (2, 1, 1), we construct the two displacement vectors
𝑁 = 𝑠1 × 𝑠2 = 𝑘 × (𝑖 − 𝑘 ) = 𝑘 × 𝑖 − 𝑘 × 𝑘 = 𝑗.
or y = 1. This plane is parallel to the x-z plane and when z = 0 is simply the line y = 1 for
all values of x. Note now that we could have guessed this result because all three points
defining the plane are located at y = 1.
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
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 .
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,
(𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = (𝐴 × 𝐵 ) · 𝐷𝐶 − (𝐴 × 𝐵 ) · 𝐶𝐷,
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.
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
𝐴 · 𝐵 × 𝐶 = 𝐶 · 𝐴 × 𝐵 = 𝐴 × 𝐵 · 𝐶.
𝑒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
and
𝑒1 · (𝑒2 × 𝑒3 ) = 𝑖 · (𝑗 × 𝑘 ) = 𝑖 · 𝑖 = 1.
Finally,
𝑒3 · (𝑒2 × 𝑒1 ) = 𝑒2 · (𝑒1 × 𝑒3 ) = 𝑒1 · (𝑒3 × 𝑒2 ),
and
𝑒3 · (𝑒2 × 𝑒1 ) = 𝑘 · (𝑗 × 𝑖) = −𝑘 · 𝑘 = −1.
𝑒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
1. We prove the Jacobi identity using the vector triple product and rearranging terms:
𝐴 × (𝐵 × 𝐶 ) + 𝐵 × (𝐶 × 𝐴) + 𝐶 × (𝐴 × 𝐵 )
= [(𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶 ] + [(𝐵 · 𝐴)𝐶 − (𝐵 · 𝐶 )𝐴] + [(𝐶 · 𝐵 )𝐴 − (𝐶 · 𝐴)𝐵 ]
= [(𝐴 · 𝐶 )𝐵 − (𝐶 · 𝐴)𝐵 ] + [(𝐵 · 𝐴)𝐶 − (𝐴 · 𝐵 )𝐶 ] + [(𝐶 · 𝐵 )𝐴 − (𝐵 · 𝐶 )𝐴]
= 0.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 135
(𝐴 × 𝐵 ) · (𝐶 × 𝐷 ) = (𝐴 · 𝐶 )(𝐵 · 𝐷 ) − (𝐴 · 𝐷 )(𝐵 · 𝐶 ).
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
𝐴 × (𝐵 × 𝐶 ) = (𝐴 · 𝐶 )𝐵 − (𝐴 · 𝐵 )𝐶.
(𝐴 × 𝐵 ) × (𝐶 × 𝐷 ) = 𝑋 × (𝐶 × 𝐷 )
= (𝑋 · 𝐷 )𝐶 − (𝑋 · 𝐶 )𝐷
= ((𝐴 × 𝐵 ) · 𝐷 )𝐶 − ((𝐴 × 𝐵 ) · 𝐶 )𝐷.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 136
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. Define
f (t + e, x + δ) = g(e, δ).
Applying this expansion to f (t + α∆t, x + β∆t f (t, x )), we have to first-order in ∆t,
∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )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
1.
∂f ∂ f ∂x ∂ f ∂y
= +
∂r ∂x ∂r ∂y ∂r
= ye xy cos θ + xe xy sin θ
2 cos θ sin θ 2 cos θ sin θ
= r sin θ cos θer + r sin θ cos θer
2 cos θ sin θ
= 2r sin θ cos θer ,
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 θ .
∂θ
−by − cz − ax − cz − ax − by
x= , y= , z= .
a b c
∂x b ∂y c ∂z a
=− , =− , =− ;
∂y a ∂z b ∂x c
−by − cz − dt − ax − cz − dt − ax − by − dt − ax − by − cz
x= , y= , z= , t= .
a b c d
∂x b ∂y c ∂z d ∂t a
=− , =− , =− , =− ;
∂y a ∂z b ∂t c ∂x d
Apparently an odd number of products yields −1 and an even number of products yields
+1.
∂f −x
= 2 ;
∂x ( x + y2 + z2 )3/2
∂2 f 3xy
= 2
∂x∂y ( x + y2 + z2 )5/2
2. a. From the data points (0, 1), (1, 3), (2, 3) and (3, 4), we compute
∑ xi2 ∑ yi − ∑ xi yi ∑ xi n ∑ xi yi − (∑ xi )(∑ yi )
β0 = , β1 = ,
n ∑ xi2 − (∑ xi )2 n ∑ xi2 − (∑ xi )2
we have
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
1.
∇(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
𝑟
∇(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
1.
∂ ∂ ∂
∇·𝐹 = ( xy) + (yz) + (zx )
∂x ∂y ∂z
= y + z + x = x + y + z.
∂ ∂ ∂
∇·𝐹 = (yz) + ( xz) + ( xy) = 0.
∂x ∂y ∂z
1.
𝑖 𝑗 𝑘
∇ × 𝐹 = ∂/∂x ∂/∂y ∂/∂z = −y𝑖 − z𝑗 − x𝑘.
xy yz zx
𝑖 𝑗 𝑘
∇ × 𝐹 = ∂/∂x ∂/∂y ∂/∂z = ( x − x )𝑖 + (y − y)𝑗 + (z − z)𝑘 = 0.
yz xz xy
𝑖 𝑗 𝑘
∂u2 ∂u
𝜔 = ∇×𝑢 = ∂/∂x ∂/∂y ∂/∂z = 0𝑖 + 0𝑗 + − 1 𝑘 = ω3 𝑘.
∂x ∂y
u1 ( x, y) u2 ( x, y) 0
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
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
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
∂
∇ · ( 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)
Therefore, ∇ × (∇ × 𝑢) = ∇(∇ · 𝑢) − ∇2 𝑢.
2.
a) With d𝑟/dt = 𝑢(t, 𝑟 (t)), the component equations are given by
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
d2 x2 ∂u ∂u ∂u ∂u d2 x3 ∂u ∂u ∂u ∂u
2
= 2 + u1 2 + u2 2 + u3 2 , 2
= 3 + u1 3 + u2 3 + u3 3 .
dt ∂t ∂x1 ∂x2 ∂x3 dt ∂t ∂x1 ∂x2 ∂x3
d2 𝑟 ∂𝑢
= + 𝑢 · ∇𝑢.
dt2 ∂t
This expression is called the material acceleration, and is found in the Navier-Stokes
equation of fluid mechanics.
∂𝐵 ∂𝐸
∇ · 𝐸 = 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 .
Setting 𝑣 = 𝑢, we have
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.
𝑖 𝑗 𝑘
∇×𝐸 = ∂/∂x ∂/∂y ∂/∂z = cos (z − ct)𝑗.
sin (z − ct) 0 0
∂𝐵
Maxwell’s equation ∇ × 𝐸 = − then results in
∂t
∂𝐵
= − cos (z − ct)𝑗,
∂t
1
𝐵= sin (z − ct)𝑗.
c
To determine the mass of the cube, we place our coordinate system so that one corner of
the cube is at the origin and the adjacent corners are on the positive x, y and z axes. We
assume that the density of the cube is only a function of z, with
z
ρ ( z ) = ρ1 + ( ρ2 − ρ1 ).
L
1.
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
ˆ 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 .
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
ˆ 𝜃ˆ and 𝑖, 𝑗 is given by
1. The matrix form for the relationship between 𝑟,
! ! !
𝑟ˆ cos θ sin θ 𝑖
= .
𝜃ˆ − sin θ cos θ 𝑗
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
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𝑗.
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
1 ∂ 1 ∂uθ
∇·𝑢 = (rur ) +
r ∂r r ∂θ
1 ∂ k1 1 ∂ k2
= 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.
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νρ
1. We have
𝑙 = 𝑟 × 𝑝 = 𝑟 × (m𝑟˙ ) = mr𝑟ˆ × (ṙ𝑟ˆ + r θ̇ 𝜃ˆ ) = mr2 θ̇ (𝑟ˆ × 𝜃ˆ ).
σ (r ) = ρ0 + (ρ1 − ρ0 )(r/R).
Integrating the mass density in polar coordinates to find the total mass of the disk, we
have
ˆ 2π ˆ R
M= [ρ0 + (ρ1 − ρ0 )(r/R)] r dr dθ
0 0
r = R
ρ 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
Therefore, ˆ ∞ 2 √
I= e− x dx = π.
−∞
d𝜃ˆ
= − cos θ𝑖 − sin θ𝑗 = −𝑟.
ˆ
dθ
σ = σ (r ) = (10 − 9r ) g/cm2 .
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
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
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
1. The spherical coordinate unit vectors can be written in terms of the Cartesian unit
vectors by
𝜑ˆ − sin φ cos φ 0 𝑘
The columns (and rows) of the transforming matrix Q are observed to be orthonormal so
that Q is an orthogonal matrix. We have Q−1 = QT so that
𝑖 sin θ cos φ cos θ cos φ − sin φ 𝑟ˆ
ˆ
=
𝑗 sin θ sin φ cos θ sin φ cos φ 𝜃 ;
𝑘 cos θ − sin θ 0 𝜑ˆ
or in expanded form
2. We need the relationship between the Cartesian and the spherical coordinates, given by
= r2 sin θ.
3. We have
ˆ ˆ 2π ˆ π ˆ R
f dV = f (r )r2 sin θ dr dθ dφ
V 0 0 0
ˆ 2π ˆ π ˆ R
= dφ sin θ dθ r2 f (r ) dr
0 0 0
ˆ R
= 4π r2 f (r ) dr,
0
´ 2π ´π π
where we have used 0 dφ = 2π and 0 sin θ dθ = − cos θ 0
= 2.
The average density of the sphere is its mass divided by its volume, given by
1 3
ρ= ρ0 + ρ1 .
4 4
1. We begin with
Differentiating,
∂𝑟ˆ ˆ
= cos θ cos φ 𝑖 + cos θ sin φ 𝑗 − sin θ 𝑘 = 𝜃;
∂θ
and
∂𝑟ˆ ˆ
= − sin θ sin φ 𝑖 + sin θ cos φ 𝑗 = sin θ 𝜑.
∂φ
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
1 d r2
2 𝑟ˆ d
∇ = ( ) 𝑟ˆ = 0.
r2 dr r2 dr r2
2. c. When 𝑟 = x𝑖, the position vector points along the x-axis. Then 𝑟ˆ also points along
the x-axis, 𝜃ˆ points along the negative z-axis and 𝜑ˆ points along the y-axis. We have
(𝑟, ˆ 𝜑ˆ ) = (𝑖, −𝑘, 𝑗 ).
ˆ 𝜃,
where ρ is the object’s mass density. Here, with the density ρ in units of g/cm3 , we have
ρ = ρ(r ) = 10 − r.
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θ.
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
where now the angle θ goes from 0 to π. The infinitesimal arc length ds is given by
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 158
which is the length of the wire πR times the average linear mass density.
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
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
x = R cos θ, y = R sin θ.
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𝑖,
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.
1. d. We have
q q q
ds = (dx )2 + (dy)2 = 1 + (dy/dx )2 dx = 1 + (2x )2 dx.
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
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.
1.
a) The unrolled cylinder is a rectangle with dimensions as shown on the figure below:
∂𝑟 ∂𝑟
= − a sin θ 𝑖 + a cos θ 𝑗, = 𝑘.
∂θ ∂z
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 161
𝑖 𝑗 𝑘
∂𝑟 ∂𝑟
× = − a sin θ a cos θ 0 = a cos θ 𝑖 + a sin θ 𝑗,
∂θ ∂z
0 0 1
so that
∂𝑟 ∂𝑟 p
× = a2 cos2 θ + a2 sin2 θ = a.
∂θ ∂z
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
az az
𝑟= cos θ 𝑖 + sin θ 𝑗 + z 𝑘, for 0 ≤ z ≤ b and 0 ≤ θ ≤ 2π,
b b
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 162
∂𝑟 az az ∂𝑟 a a
= − sin θ 𝑖 + cos θ 𝑗, = cos θ 𝑖 + sin θ + 𝑘.
∂θ b b ∂z b b
𝑖 𝑗 𝑘
∂𝑟 ∂𝑟 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
b 2 2
z( x, y) = x + y
a2
ˆ ˆ
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
x = r cos θ, y = r sin θ,
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
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
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
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.
∂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φ.
3. a. We perform the flux integral in spherical coordinates. On the surface of the sphere
of radius R, we have
𝑢 = z𝑘 = ( R cos θ )(cos θ 𝑟ˆ − sin θ 𝜃ˆ ),
and
d𝑆 = 𝑟ˆ R2 sin θ dθ dφ.
a) ∇φ = (2xy + y2 )𝑖 + ( x2 + 2xy)𝑗 + 𝑘
´
b) Using the gradient theorem, C ∇φ · d𝑟 = φ(1, 1, 1) − φ(0, 0, 0) = 3.
c) Integrating over the three directed line segments given by (1) (0, 0, 0) to (1, 0, 0); (2)
(1, 0, 0) to (1, 1, 0), and; (3) (1, 1, 0) to (1, 1, 1):
ˆ ˆ ˆ ˆ
∇φ · d𝑟 = ∇φ · d𝑟 + ∇φ · d𝑟 + ∇φ · d𝑟
C C1 C2 C3
ˆ 1 ˆ 1
= 0+ (1 + 2y) dy + dz
0 0
= 3.
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 166
a)
𝑖 𝑗 𝑘
∇×𝑢 = ∂/∂x ∂/∂y ∂/∂z
2xy + z2 2yz + x2 2zx + y2
= (2y − 2y)𝑖 + (2z − 2z)𝑗 + (2x − 2x )𝑘
= 0.
b) We need to satisfy
∂φ ∂φ ∂φ
= 2xy + z2 , = 2yz + x2 , = 2zx + y2 .
∂x ∂y ∂z
Take the derivative with respect to y and satsify the second equation:
∂f ∂f
x2 + = 2yz + x2 or = 2yz.
∂y ∂y
Take the derivative of φ = x2 y + xz2 + y2 z + g(z) with respect to z and satisfy the
last gradient equation:
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.
3. c. To solve the multiple choice question, we can always take the gradients of the four
choices. Without the advantage of multiple choice, however, we need to compute φ and
we do so here. We solve
∂φ ∂φ ∂φ
= 2x + y, = 2y + x, = 1.
∂x ∂y ∂z
Integrating the first equation with respect to x holding y and z fixed, we find
ˆ
φ= (2x + y) dx = x2 + xy + f (y, z).
∂f ∂f
x+ = 2y + x or = 2y.
∂y ∂y
φ( x, y, z) = x2 + xy + y2 + z + c.
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
ˆ 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
ˆ 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φ.
= 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
= 3L5 /2.
Note that the integral is equal to three times the volume of the box and is independent of
the placement and orientation of the coordinate system.
1. With 𝑢 = 𝑟/r,
ˆ we use spherical coordinates to compute
1 d 1
∇·𝑢 = (r ) = 2 .
r2 dr r
For the right-hand side of the divergence theorem, we have for a sphere of radius R
centered at the origin, d𝑆 = 𝑟ˆ dS and
˛ ˛
1 4πR2
𝑢 · d𝑆 = dS = = 4πR.
S S R R
Λ( 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
Λ
1 ∂
∇·𝑢 = r2 = 0.
r2 ∂r 4πr2
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
ˆ
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
∇ · 𝑢 = Λδ(𝑟 ),
δ(𝑟 ) = 0, when 𝑟 6= 0,
and ˆ
δ(𝑟 ) dV = 1, provided the origin is in V.
V
1
δ (𝑟 ) = δ ( x ) δ ( y ) δ ( z ) = δ (r ),
4πr2
where δ( x ), δ(y), δ(z) and δ(r ) are one-dimensional Dirac delta functions.
∂ρ
+ ∇ · (ρ𝑢) = 0.
∂t
∂ρ
+ 𝑢 · ∇ρ + ρ∇ · 𝑢 = 0.
∂t
2. We begin with ˆ ˛
d
ρ(𝑟, t) dV = − 𝐽 · d𝑆.
dt V S
and combining both sides of the equation and bringing the time derivative inside the
integral results in ˆ
∂ρ
+∇·𝐽 dV = 0.
V ∂t
Since the integral is zero for any volume V, we obtain the electrodynamics continuity
equation given by
∂ρ
+ ∇ · 𝐽 = 0.
∂t
2. d. ˛ ˆ ˆ
𝑟 · d𝑆 = (∇ · 𝑟 ) dV = 3 dV = 3πR2 L.
S V V
APPENDIX C. PROBLEM AND PRACTICE QUIZ SOLUTIONS 172
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
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
𝑖 𝑗 𝑘
∇ × 𝑢 = ∂/∂x ∂/∂y ∂/∂z = 2𝑘;
−y x 0
With
ˆ
𝑘 = cos θ 𝑟ˆ − sin θ 𝜃,
we have
𝑘 · 𝑟ˆ = cos θ;
and
ˆ ˆ 2π ˆ π/2
(∇ × 𝑢) · d𝑆 = 2R2 dφ cos θ sin θ dθ
S 0 0
Γ −y𝑖 + x𝑗
𝑢= .
2π x 2 + y2
x = ρ cos φ, y = ρ sin φ, ˆ
𝑖 = cos φ𝜌ˆ − sin φ𝜑, ˆ
𝑗 = sin φ𝜌ˆ + cos φ𝜑.
Γ
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
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
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π
2π
𝜑ˆ
ˆ
(∇ × 𝑢) · d𝑆 = 𝑢 · d𝑟 = · 𝜑ρdφ = dφ = 2π.
S C 0 ρ 0
1.
∂𝑢 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
1
𝑢 × (∇ × 𝑢) = ∇(𝑢 · 𝑢) − (𝑢 · ∇)𝑢.
2
∂um ∂um
[𝑢 × (∇ × 𝑢)]i = eijk u j eklm = ekij eklm u j
∂xl ∂xl
∂um ∂u j ∂u
= (δil δjm − δim δjl )u j = uj − uj i
∂xl ∂xi ∂x j
1 ∂ ∂u
= (u 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
= −∇ × (𝑢 × 𝜔 )
= − [𝑢(∇ · 𝜔 ) − 𝜔 (∇ · 𝑢) + (𝜔 · ∇)𝑢 − (𝑢 · ∇)𝜔 ]
= −(𝜔 · ∇)𝑢 + (𝑢 · ∇)𝜔.
∂𝜔
+ (𝑢 · ∇)𝜔 = (𝜔 · ∇)𝑢 + ν∇2 𝜔.
∂t
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
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
µ0 I ˆ
𝐵 (𝑟 ) = 𝜑.
2πρ