64
Lecture Notes Multivariable Calculus II Semester 2015 Department of Mathematics University of the West Indies Kingston, Jamaica Dr. Davide Batic

Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Embed Size (px)

Citation preview

Page 1: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Lecture Notes

Multivariable Calculus

II Semester 2015

Department of MathematicsUniversity of the West Indies

Kingston, Jamaica

Dr. Davide Batic

Page 2: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Contents

1 Scalar and vector fields. 3

1.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Scalar and vector fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Problems to Section 1 7

3 Line, surface, and volume integrals 9

3.1 Line integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Surface integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.2.1 Parametric surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2.2 Surface integrals of scalar fields . . . . . . . . . . . . . . . . . . . . 233.2.3 Surface integrals of vector fields . . . . . . . . . . . . . . . . . . . . 29

3.3 Volume integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4 Problems to Section 3 34

5 The operators: gradient, divergence, and curl 34

5.1 The gradient of a scalar field . . . . . . . . . . . . . . . . . . . . . . . . . 355.2 The curl of a vector field . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515.3 The divergence of a vector field . . . . . . . . . . . . . . . . . . . . . . . . 53

6 Problems to Section 5 56

7 Some integral theorems 57

7.1 The Stokes theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577.2 The Divergence theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

8 Applications 60

8.1 Electromagnetism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608.2 Gradient and Laplace operators in an arbitrary coordinate system . . . . 63

1

Page 3: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Preface

These class notes are the script for the class Multivariable Calculus I held for the firsttime to the students in Mathematics, Physics and Actuarial Science at the Universityof the West Indies during the second semester 2013. I underline that this manuscriptis by no means a book on multivariable calculus. To be honest, at the very beginningI decided to write these notes for myself with the aim of presenting the selected topicsin a structured form and with the hope of reducing the time needed to prepare futurelectures. Later on, I realized that it would be good for the students to have such notesat disposal since they could offer them the possibility to read what we discussed in classand to check some of the most difficult computations or proofs. The experience showsthat one really understands mathematics only if he is able to reproduce it by its own.Last but not least, I hope the role played by the students in the improvement process ofthe class notes will be important. Together with this manuscript there is a collection ofexercises that can be downloaded at the following link

http : //www.mona.uwi.edu/mathematics/math2403 −multivariable− calculus

2

Page 4: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

1 Scalar and vector fields.

Topics: definition of a scalar field, examples of scalar fields and their graphical rep-resentation, definition of a vector field, examples of vector fields and their graphicalrepresentation (wind charts), conservation of angular momentum in a central field.

1.1 Introduction.

Multivariable Calculus extends Calculus from the real line to the Euclidean vector spaceRn and instead of working with functions of a real variable we will deal with new math-

ematical objects such as scalar and vector fields. The Euclidean vector space is simplythe collection of n-tuples

Rn = (x1, · · · , xn) | xi ∈ R ∀i = 1, · · · , n

equipped with addition and scalar multiplication, where n is a natural number. Ifu = (u1, · · · , un) is any vector in the Euclidean space we denote its length also calledmagnitude or norm as follows

|u| =

√√√√n∑

i=1

u2i =√

u21+ · · ·+ u2n.

If not otherwise stated u1, · · · , un denote the components of the vector u with respectto the standard basis B = e1, · · · , en of Rn where

e1 = (1, 0, · · · , 0), e2 = (0, 1, 0 · · · , 0), · · · , en = (0, 0, · · · , 1).

Clearly, u can also be written as a linear combination over the basis vectors, that is

u = u1e1 + · · ·+ unen =

n∑

i=1

uiei.

We will derive most of the results for the case n = 2 (Euclidean plane) and n = 3(Euclidean space).

1.2 Scalar and vector fields

A scalar field is a map assigning a real number to each point in space. Remember that apoint in space can be identified by a vector. This is captured by the following definition

Definition 1.1 A scalar field is a map F : Ω ⊆ Rn −→ I ⊆ R such that

(x1, · · · , xn) 7−→ F (x1, · · · , xn) ∈ R.

3

Page 5: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

For instance, the temperature distribution in a room is an example of a scalar field. Otherexamples of scalar fields are the pressure and the density of a material object. Sometimesit is useful to construct a graphical representation of a scalar field. Let us suppose thatwe have a temperature distribution T : R2 −→ [0,+∞) with T (x, y) = x2 + y2. If welook at T (x, y) as to a third variable z, the problem boils down to construct a graphicalrepresentation for the surface z = x2 + y2 in the Euclidean space R

3. For instance, wecould imagine to cut such a surface with different planes parallel to the xy-plane. Hence,if z = 0 we get x2 + y2 = 0 and this equation is satisfied if and only if x = y = 0. Thismeans that our surface touches the plane z = 0 only at the point (0, 0). If z = 1, weobtain x2 + y2 = 1 which is the equation of a circle of radius one and center at (0, 0)and if z = 4, the intersection of this plane with the given surface will be represented bythe circle x2 + y2 = 4 with radius 2 and again centered at the origin of the Cartesianaxes. By choosing more planes parallel to the xy-plane we end up with what we call acontour plot of the scalar field. Another representation of the same scalar field can be

Figure 1: Contour plot of the scalar field T (x, y) = x2 + y2.

constructed by keeping in mind the result obtained from the contour plot and adding toit the information we get by intersecting our surface with the main planes orthogonal tothe xy-plane. For instance, if we consider the intersection with the plane x = 0 whichis orthogonal to the plane xy-plane we obtain the relation z = y2 which is the equationof a parabola. Similarly, if we choose the plane y = 0 we obtain the parabola z = x2.The surface represented in Fig. 2 is called a paraboloid of revolution because it canbe obtained by rotating a parabola with vertex at the the origin around the z-axis. Thecircles appearing in Fig. 2 are the same circles you see also in Fig. 1 where the thirddimension along z has been suppressed. Finally, notice that such circles represents pointsin space characterized by the same value of the temperature. A vector field is a mapsending vectors into vectors. More precisely we have the following definition

4

Page 6: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 2: Plot of the scalar field T (x, y) = x2 + y2.

5

Page 7: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Definition 1.2 A vector field is a map V : Ω ⊆ Rn −→ Γ ⊆ R

m such that

(x1, · · · , xn) 7−→ V(x1, · · · , xn) = (V1(x1, · · · , xn), · · · , Vm(x1, · · · , xn)),

where the natural numbers n and m do not necessarily need to coincide.

Note that the above vector field associates to each vector in Rn a vector (V1, · · · , Vm)

belonging to Rm. Furthermore, each component of the vector field can be interpreted

as a scalar field since for any i = 1, · · · , n the function Vi maps the vector (x1, · · · , xn)into a real number! An example of a vector field is the velocity

v =dr

dt

of an object at the time t whose vector position r = r(t) is some vector-valued functionof t. Clearly, v and r are vector fields with n = 1 and m = 3 since they associate to acertain time t a vector in the Euclidean space. Other examples of vector fields are theacceleration of a material object a = dv/dt, the force field F, the electric and magneticfields E and B appearing in Maxwell’s theory of electromagnetism and so on. In thecase of simple vector fields, we can construct graphical representations of vector fieldswhich are called wind charts. For instance, let us suppose that a certain wind velocityis described by the vector field V : R2 −→ R

2 such that V(x, y) = (y, x). We can choosea sequence of points in the domain of definition of V and compute the correspondingvectors. Then, we draw these vectors as arrows emanating from the corresponding points.For instance, at the point (1, 0) we have the vector (0, 1), at the point (1, 1) the vector(1, 1), and choosing more points we end up with the wind chart represented by Fig. 3.The next example concerning the conservation of the angular momentum of a particlesubject to a central force is an important application of vector fields.

Example Suppose we have a particle of mass m at the time t located at the point(x, y, z) ∈ R

3. We further suppose that the particle follows a certain trajectory as timeevolves. This means that the coordinates of the particle are some functions of time, sayx = x(t), y = y(t), and z = z(t). We will further suppose that these real functions aredifferentiable. At this point the position of the particle can be identified by the positionvector r(t) = (x(t), y(t), z(t)) and its velocity and acceleration are given by

v =dr

dt, a =

dv

dt.

Let us imagine that our particle experiences the influence of a central force, that is aforce represented by the vector field F = −f(r)r, where f is some positive continuousfunction of the distance r =

√x2 + y2 + z2 of the particle from the origin of a Cartesian

system of coordinates. Note that the minus sign in the expression of the force signalizesthat the force has opposite direction with respect to the position vector r. This meansthat the force attracts the particle to the origin. In physics the angular momentum of aparticle of mass m with velocity v and position vector r is defined as the cross product

L = mr× v.

6

Page 8: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 3: Wind chart of V(x, y) = (y, x).

We want to show that under the above hypotheses the angular momentum of the particleis conserved in time, that is it remains constant as the time varies. This will be the caseif we can show that dL/dt = 0. To do that we first observe that

dL

dt= m

dr

dt× v+mr× dv

dt= mv × v +mr× a = r× (ma) = r× F,

where we used Newton’s law F = ma and the fact that v × v = 0 since the vector v isparallel to itself. Taking into account that we have a central force, we finally obtain

dL

dt= −r× (f(r)r) = −f(r)r× r = 0.

2 Problems to Section 1

Exercise 2.1 (First incourse test AY 2012-13) Construct the contour plot of the scalarfield T : R2 −→ R such that T (x, y) = x2 − y. Sketch also the wind chart for the vectorfield V : R2 −→ R

2 such that V(x, y) = (x+ y,−x).

Exercise 2.2 (First incourse test AY 2013-14) Sketch the following surfaces in R3

7

Page 9: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

1. z = −y2,

2. z = x2 + y2 − 4x− 6y + 13.

8

Page 10: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

3 Line, surface, and volume integrals

Topics: smooth curve in R2, examples of smooth curves, arclength of a smooth curve,

example of a computation of the length of a smooth curve, line integral of a scalarfield along a smooth curve, examples, line integral of a scalar field with respect to acoordinate along a smooth curve, example, a vector-valued integral of a scalar field alonga smooth curve, example, line integral of a vector field, example, a vector-valued lineintegral of a vector field along a smooth curve, parametric surfaces, examples, parametricrepresentation of a sphere, normal vector to a surface, construction of a tangent plane toa surface at a given point, definition of surface area, examples, surface integrals of scalarfields, examples, surface integrals of vector fields, examples, volume integrals, physicalmotivation, examples.

3.1 Line integrals

Given a curve C in R2 or R

3 we want to know how to compute integrals of scalar andvector fields along the given curve. First we need to give a rigorous definition of curve.Examples of curves in R

2 are presented in Fig. 4 Each point P on the curve C1 can be

x

y

0

P = (x, y)

r

A

B

C1C2

Figure 4: Examples of smooth curves.

identified by a position vector r that in turn can be used to describe the whole curve ifthe coordinates of the points belonging to C1 are suitably parameterized. The curve C2is an example of a closed curve, i.e. a curve where the initial and final points coincide.

Definition 3.1 A smooth curve in the Euclidean plane is a vector-valued functionr : [a, b] ⊂ R −→ R

2 such that

9

Page 11: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

1. t ∈ [a, b] 7−→ r(t) = (x(t), y(t)),

2. the following derivative exists and is unique for all t ∈ [a, b]

dr

dt=

(dx

dt,dy

dt

).

We call parametric representation of the curve C the set of equation x = x(t) andy = y(t). We will say that the curve C is closed if r(a) = r(b).

As we will see in the next examples, the second condition in the above definition ensuresthat the curve is smooth, that is it does not exhibit corners or cusps.

Example Consider the curve C in the Euclidean plane described by the relation y =2−x2 with x ∈ [0,

√2]. The curve starts at A = (0, 2) and ends at the point B = (

√2, 0).

See Fig. 5. We want to find a parametric representation of C. The simplest choice is to

y

x0

CA

B

Figure 5: Graphical representation of the curve y = 2− x2.

identify x with a parameter t ∈ [0,√2]. Then, y = 2 − x2 = 2 − t2 and the parametric

representation is given by

x = t, y = 2− t2, t ∈ [0,√2].

This implies that the vector-valued function r identifying points on C will be

r(t) = (t, 2− t2), t ∈ [0,√2].

It is interesting to observe that the parametric representation of a curve does not needto be unique. If we decide instead to parameterize the coordinate y according to therelation y = t, since y varies on the interval [0, 2] (see Fig. 5), we must require thatt ∈ [0, 2]. Then, using the Cartesian equation of C we find that t = 2− x2. Solving for x

10

Page 12: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

yields x = ±√2− t. Since x ∈ [0,

√2], we have to choose the positive root and therefore

x =√2− t. Hence, in this case we obtained a different but equivalent parameterization

given byx =

√2− t, y = t, t ∈ [0, 2].

In the next example we look at a curve that fails to be smooth.

Example Let us consider a path C obtained by joining the line segments C1 and C2 asin Fig. 6. It is easy to see that C1 is parameterized as

y

x0

C1

C2

A D

B

Figure 6: Example of a non smooth curve with initial point A and final point B.

x = t, y = 1, t ∈ [0, 1]

and C2 can be represented as

x = 1, y = 1− t, t ∈ [0, 1].

Therefore, C1 and C2 are described for t ∈ [0, 1] by the vector-valued functions r1(t) =(t, 1) and r2(t) = (1, t − 1), respectively. If we compute the derivatives of r1 and r2 atthe point D = (1, 1), we find that such derivatives exist but they do not coincide since

dr1dt

= (1, 0),dr2dt

= (0,−1).

Our curve fails to be smooth due to the presence of a corner at D.

Example We want to construct the parametric representation of the upper half-circlex2 + y2 = 1 depicted in Fig. 8. Let x = cos θ with θ ∈ [0, π]. Then, from the equationx2 + y2 = 1 we get

y2 = 1− x2 = 1− cos2θ = sin2 θ.

11

Page 13: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

AB

C

0x

y

r

P (x, y)

θ

Figure 7: Representation of the upper half-circle x2 + y2 = 1 with start and end pointsat A and B, respectively.

Taking the square root we obtain y = ±| sin θ|. Since θ ∈ [0, π], it follows that sin θ ≥ 0there and hence | sin θ| = sin θ. Furthermore, we are considering the upper half-circlewhere y ≥ 0. This implies that we have to take the root with the plus sign. At thispoint we can conclude that y = sin θ. Thus, the parametric representation of the curveC is

x = cos θ, y = sin θ, θ ∈ [0, π].

The corresponding vector-valued function is r(θ) = (cos θ, sin θ) with θ ∈ [0, π].

Example Let us derive the parametric representation of the line segment in Fig. 8. Theinitial and final points are identified by the vectors rA = (xA, yA) and rB = (xB , yB).We look for a vector-valued function r = r(t) such that r(0) = rA and r(1) = rB . Thismeans that the general expression for r must depend on rA, rB, and the parameter t. Acomparison with the equation of a line in the Euclidean plane suggests that it would bereasonable to assume that r is linear in t and therefore we consider the following guess,namely

r(t) = (at+ b)rA + (ct+ d)rB ,

where a, b, c, d are real constants to be determined by means of the conditions r(0) = rAand r(1) = rB . Employing such conditions we end up with the following system ofequations

brA + drB = rA, (a+ b)rA + (c+ d)rB = rB .

We see that it must be b = 1, d = 0, a+ b = 0, and c+ d = 1. Solving this system yields

a = −1, b = 1, c = 1, d = 0.

12

Page 14: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

x

y

rA

0

A

rB

B

C

Figure 8: Representation of a line segment with start and end points at A and B,respectively.

Finally, the vector-valued equation describing the line segment is

r(t) = (1− t)rA + trB. (1)

The corresponding parametric equations are

x(t) = (1− t)xA + txB, y(t) = (1− t)yA + tyB.

Suppose that C is an arbitrary smooth curve with initial point A and end point B,respectively. Let r = r(t) with t ∈ [tA, tB ] be a vector-valued function describing C. Ifwe consider an infinitesimal line element of the curve, then its length ds can be computedby Pythagoras’s theorem and we find that

ds =√

(dx)2 + (dy)2.

Let x = x(t) and y = y(t) be some parametric representation of C. Then, the ChainRule applied to ds yields

ds =

√(dx

dtdt

)2

+

(dy

dtdt

)2

=

√(dx

dt

)2

+

(dy

dt

)2

dt.

Hence, the length of C is

L =

Cds =

tB

tA

dt

√(dx

dt

)2

+

(dy

dt

)2

. (2)

Example We want to compute the length of the curve described by the equation

y(x) = 1 +3

√9

4x2, y ∈ [1, 4].

13

Page 15: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

y

x0

C

A B

E

Figure 9: Representation of y(x) = 1 + 3

√9

4x2 with start and end points at (−2

√3, 4)

and (2√3, 4), respectively.

Fig. 9 represents the above function for y ∈ [1, 4]. Even though our curve is not smoothdue to the presence of a cusp at the point E = (0, 1), we observe that the function iseven, that is y(−x) = y(x) and hence the total lenght L will be simply twice the lengthof the smooth curve with start point E and end point B. To construct a parametricrepresentation of that portion of the curve, let y = t with t ∈ [1, 4]. Then, x as a functionof t can be found by solving the equation

t = 1 +3

√9

4x2,

whose solutions are

x = ±2

3(t− 1)2/3.

Since x ≥ 0 for the portion of curve between the points E and B, we conclude that

x =2

3(t− 1)2/3.

In order to apply (2) observe that

dx

dt=

√t− 1,

dy

dt= 1.

Hence, we have that

L = 2

C

Eds = 2

4

1

dt√t =

28

3.

14

Page 16: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

We give the definition of line integral of a scalar field.

Definition 3.2 Let F = F (x, y) be a scalar field and C a smooth curve described by thevector-valued function r(t) = (x(t), y(t)) with t ∈ [a, b]. The line integral of F along

C is defined as

Cds F (x, y) =

b

adt F (x(t), y(t))

√(dx

dt

)2

+

(dy

dt

)2

. (3)

Example Let us evaluate the line integral of the scalar field F (x, y) = xy4 along thesmooth curve C represented by the positive quarter of the circle x2 + y2 = 1 followed inthe counterclockwise direction and then along the line segment with start point (−2, 1)and end point (1, 2). For the quarter of circle we use the parameterization x = cos θand y = cos θ with θ ∈ (0, π/2). Then, the infinitesimal length ds along the curve C isobtained by applying (2) which gives ds = dt. Hence,

Cds F (x, y) =

π/2

0

dθ cos θ sin4 θ =1

5.

Concerning the integration along the line segment we apply (1) which leads to therepresentation r(t) = (3t− 2, t+ 1) with t ∈ [0, 1]. In this case ds =

√10dt and

Cds F (x, y) =

√10

1

0

dt (3t− 2)(t+ 1)4 =

√10

2.

Definition 3.3 A smooth curve in the Euclidean space is a vector-valued functionr : [a, b] ⊂ R −→ R

3 such that

1. t ∈ [a, b] 7−→ r(t) = (x(t), y(t), z(t)),

2. the following derivative exists and is unique for all t ∈ [a, b]

dr

dt=

(dx

dt,dy

dt,dz

dt

).

We call parametric representation of the curve C the set of equation x = x(t),y = y(t), and z = z(t). We will say that the curve C is closed if r(a) = r(b).

Example Let us consider a helix which is a curve in R3 with parametric equations

x(t) = cos t, y(t) = sin t, z(t) = 2t t ∈ [0, 4π].

To construct its graph we first observe that x2(t) + y2(t) = 1 and z ∈ [0, 8π]. Thisrepresents the surface of a cylinder of height 8π and the axis of the cylinder coincideswith the z axis. Hence, points of the helix must belong to the surface of this cylinder.By taking different values of the parameter t in the range [0, 4π] we can construct asequence of points for the helix. For instance, if t = 0 we get the point (1, 0, 0), t = π/2yields (0, 1, π) and so on. The complete graph of the helix is represented in Fig. 10.

15

Page 17: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 10: Representation of the helix r(t) = (cos t, sin t, 2t) with t ∈ [0, 4π]. The pointsof the helix belong to the surface of the cylinder with equation x2+y2 = 1 and z ∈ [0, 4π].

The following definition generalizes the concept of line integral along a curve to theEuclidean space R

3.

Definition 3.4 Let F = F (x, y, z) be a scalar field and C a smooth curve in R3 described

by the vector-valued function r(t) = (x(t), y(t), z(t)) with t ∈ [a, b]. The line integral

of F along C is defined as

Cds F (x, y, z) =

b

adt F (x(t), y(t), z(t))

√(dx

dt

)2

+

(dy

dt

)2

+

(dz

dt

)2

. (4)

Example Consider the scalar field F (x, y, z) = xyz. We want to compute the lineintegral of F along the helix C defined in the previous example. Taking into accountthat

ds =

√(dx

dt

)2

+

(dy

dt

)2

+

(dz

dt

)2

dt,

we find that ds =√5dt. Finally, by applying (4) we get

Cds F (x, y, z) = 2

√5

0

dt t cos t sin t =√5

0

dt t sin (2t) = −2π√5,

where in the last step we integrated by parts.

16

Page 18: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Integrals of the form

C(P (x, y) dx+Q(x, y) dy)

with C some smooth curve arise often in Fluid Dynamics and Complex Analysis. Thenext definition tells us how to compute such integrals.

Definition 3.5 Let F = F (x, y) be a scalar field and C a smooth curve described by thevector-valued function r(t) = (x(t), y(t)) with t ∈ [a, b]. The line integral of F with

respect to x along C is defined as

Cdx F (x, y) =

b

adt F (x(t), y(t))

dx

dt. (5)

Similarly, the line integral of F with respect to y along C is defined as

Cdy F (x, y) =

b

adt F (x(t), y(t))

dy

dt. (6)

The above definition can be easily generalized to the case of a scalar field F (x, y, z) anda curve in R

3. In this case the line integral of F with respect to x along C isdefined as

Cdx F (x, y, z) =

b

adt F (x(t), y(t), z(t))

dx

dt. (7)

Similarly, the line integral of F with respect to y along C is defined as

Cdy F (x, y, z) =

b

adt F (x(t), y(t), z(t))

dy

dt. (8)

Finally, the line integral of F with respect to z along C is defined as

Cdx F (x, y, z) =

b

adt F (x(t), y(t), z(t))

dz

dt. (9)

Example We want to evaluate the integral

C(x2y dx+ sin (πy) dy),

where C is the line segment from (0, 2) to (1, 4). The vector-valued function describingthe given line segment is given by

r(t) = (1− t)(0, 2) + t(1, 4) = (t, 2 + 2t), t ∈ [0, 1].

Hence, the parametric equations are given by x(t) = t and y(t) = 2 + 2t with t ∈ [0, 1]and the integral can be written as

C(x2y dx+ sin (πy) dy) =

1

0

dt

(x2(t)y(t)

dx

dt+ sin (πy(t))

dy

dt

).

Taking into account that dx/dt = 1 and dy/dt = 2 we obtain

C(x2y dx+ sin (πy) dy) = 2

1

0

dt[t2(1 + t) + sin 2π(1 + t)

]=

7

6.

17

Page 19: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Let C be a smooth curve described by a vector-valued function r(t) = (x(t), y(t)) witht ∈ [a, b] and F = F (x, y) be some scalar field. Another kind of line integral involvingscalar fields is the following

Cdr T (x, y) =

1

0

dt T (x(t), y(t))dr

dt.

Note that the result will be a vector!

Example We want to compute the integral

Cdr (x+ y2),

where C is the described by the parabola y = x2 connecting the points (0, 0) and (1, 1).We parameterize the curve according to x(t) = t and y(t) = t2 with t ∈ [0, 1]. Then, thevector-valued function describing C is r(t) = (t, t2). At this point our integral becomes

Cdr (x+ y2) =

1

0

dt(x(t) + y2(t))dr

dt=

1

0

dt(t+ t4)(1, 2t) =

1

0

dt (t+ t4, 2t2 + 2t5)

=

(

1

0

dt (t+ t4),

1

0

dt (2t2 + 2t5)

)=

(7

10, 1

).

The next definition tells us how to compute line integrals of vector fields.

Definition 3.6 Let C be a smooth curve in R3 and be described by the vector-valued

function r(t) = (x(t), y(t), z(t)) with t ∈ [a, b]. Suppose that

F(x, y, z) = (Fx(x, y, z), Fy(x, y, z), Fz(x, y, z))

is a vector field. The line integral of F along C is defined as

CF · dr =

b

adt F(x(t), y(t), z(t)) · dr

dt,

where the dot denotes the usual dot product.

Note that the result of integrating a vector field along a curve will be a scalar. Theabove integral has the physical interpretation of the work done by a force F to move anobject along a certain trajectory C with initial and final points identified by the vectorsr(a) and r(b), respectively.

Example We want to evaluate the line integral of the vector field F(x, y, z) = (y, x, z)along the curve C having parametric equations x = t, y = t, and z = 2t2 for t ∈[0, 1]. First, of all the vector-valued function describing our curve is r = (t, t, 2t2)and dr/dt = (1, 1, 4t). On the other side, the vector field restricted to the curve Cis F(x(t), y(t), z(t)) = (t, t, 2t2). Hence,

F(x(t), y(t), z(t)) · drdt

= (t, t, 2t2) · (1, 1, 4t) = t+ t+ 8t3 = 2t+ 8t3.

18

Page 20: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Finally,

CF · dr = 2

1

0

dt (t+ 4t3) = 3.

Another kind of line integrals of vector fields along a smooth curve described by thevector-valued function r(t) = (x(t), y(t), z(t)) with t ∈ [a, b] is the following

CF× dr =

b

adt F(x(t), y(t), z(t)) × dr

dt,

where × denotes the usual cross product. Note that in this case the result will be avector.

Example We want to evaluate the line integral of the vector field F(x, y, z) = (y, x, 0)along a curve C parameterized by x = t, y = sin t, and z = 0 with t ∈ [0, π]. First, of allthe vector-valued function describing our curve is r = (t, sin t, 0) and dr/dt = (1, cos t, 0).On the other side, the vector field restricted to the curve C is F(x(t), y(t), z(t)) =(sin t, t, 0). Hence,

F(x(t), y(t), z(t)) × dr

dt=

e1 e2 e3sin t t 01 cos t 0

= (0, 0, sin t cos t− t),

where e1, e2, e3 is the standard basis in R3. Finally,

CF×dr =

π

0

dt F(x(t), y(t), z(t))×dr

dt=

(0, 0,

π

0

dt (sin t cos t− t)

)=

(0, 0,−π2

2

).

3.2 Surface integrals

3.2.1 Parametric surfaces

We already know an example of a surface in R3, namely the paraboloid of revolution

z = x2 + y2. A further example is given by the equation x2 + y2 + z2 = 1 representinga sphere of radius one and centre at (0, 0, 0). These examples suggest that the equationof a surface S in R

3 should be represented by some relation of the form F (x, y, z) = 0.As the next example shows this is not the only possible representation of a surface.

Example Let us consider a sphere of radius R and centre at (0, 0, 0). Its Cartesianequation is x2 + y2 + z2 = R2. Let us introduce spherical coordinates

x = R cos ϑ sinϕ, y = R sinϑ sinϕ, z = R cosϕ, ϑ ∈ [0, 2π), ϕ ∈ [0, π].

Keep in mind that the radius of the sphere is fixed! Then, each point on the sphere canbe identified by means of a vector-valued function r : R2 −→ R

3 such that

r(ϑ,ϕ) = (R cos ϑ sinϕ,R sinϑ sinϕ,R cosϕ),

where ϑ ∈ [0, 2π) and ϕ ∈ [0, π]. This is what we call a parametric representation of asphere.

19

Page 21: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

The above example motivates the following definition of parametric representation of asurface in the Euclidean space.

Definition 3.7 We call parametric representation of a surface S in R3 the vector-

valued function r : U × V ⊆ R2 −→ R

3 such that for all u ∈ U ⊆ R and for allv ∈ V ⊆ R

r(u, v) = (x(u, v), y(u, v), z(u, v)).

The next example shows how to construct the Cartesian representation of a surface fromits parametric representation.

Example Suppose that a certain surface has parametric representation

r(u, v) = (u, u cos v, u sin v), u, v ∈ R.

Then, x = u, y = u cos v, and z = u sin v. Using these relations we want to find anequation of the form F (x, y, z) = 0. First of all, observe that

y2 + z2 = u2 cos2 v + u2 sin2 v = u2(cos2 v + sin2 v) = u2 = x2.

Hence, the Cartesian representation of the surface is x2 − y2 − z2 = 0. This is a cone

Figure 11: Representation of the cone x2 = y2 + z2.

with axis along the x-axis. The lines y = ±x represent the intersection of the cone withthe xy-plane. Its intersections with planes parallel to the yz-plane are circles.

20

Page 22: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Example We want to find the parametric representation of the paraboloid of revolutionz = x2 + y2. Let z = u with u ∈ [0,+∞) and x =

√u cos v and y =

√u sin v with

v ∈ [0, 2π). Then, it is straightforward to verify that this parametric representationsatisfies the equation z = x2 + y2.

We introduce the concept of normal vector to a given surface.

Definition 3.8 Let S be a surface in R3 described by a vector-valued function r(u, v) =

(x(u, v), y(u, v), z(u, v)) with (u, v) ∈ U × V ⊆ R2. Further, suppose that the first order

partial derivatives of x, y, and z with respect to u and v exist. Introduce the vectors

ru = (∂ux, ∂uy, ∂uz), rv = (∂vx, ∂vy, ∂vz).

The normal vector to the surface S is defined as the cross product n = ru × rv.

As the next example shows the concept of normal vector is useful for the constructionof the plane tangent to a given surface S at a certain point. To this purpose recall fromLinear Algebra that the Cartesian equation of a plane ax+by+cz = d with a, b, c, d ∈ R

3

can also be cast into the formn · (r− r0) = 0, (10)

where n is the normal to the plane and r = (x, y, z), r0 = (x0, y0, z0) are vectors identi-fying two distinct points belonging to the plane. Comparing the Cartesian equation ofthe plane with (10) we see that the normal vector is simply given by n = (a, b, c).

Example We want to find the equation of the tangent plane to the surface describedby the vector-valued function r(u, v) = (u, 2v2, u2 + v) at the point P0 = (2, 2, 3). Wewill use (10) where n is the normal to the surface S at the point P0 identified by thevector r0 = (2, 2, 3) and r = (x, y, z) identifies an arbitrary point on the plane. First ofall, observe that ru = (1, 0, 2u) and rv = (0, 4v, 1). Hence,

n = ru × rv = (−8uv,−1, 4v). (11)

To find the normal at the point P0 we must find out which values of u and v correspondto the choice x = 2, y = 2, and z = 3. Using the parametric representation x = u,y = 2v2, and z = u2 + v we can set up the following system of equations

u = 2, 2v2 = 2, u2 + v = 3.

Substituting u = 2 into the last equation we find v = −1 which in turn satisfies theequation 2v2 = 2. Substituting these values for u and v into (11) yields n = (16,−1,−4).Moreover, r−r0 = (x−2, y−2, z−3). Applying (10) gives (16,−1,−4)·(x−2, y−2, z−3) =0 and expanding the dot product we end up with the following equation for the planetangent to S at the point P0, namely

16x− y − 4z = 18.

21

Page 23: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

The next definition tell us how to compute the area of a given surface.

Definition 3.9 Let S be a surface in R3 described by a vector-valued function r(u, v) =

(x(u, v), y(u, v), z(u, v)) with (u, v) ∈ D = U × V ⊂ R2. The area A of the surface S is

then given by the following integral

A =

DdA|n| =

Udu

Vdv |ru × rv|, (12)

where n is the normal to the surface S.

Example We want to find the surface area of the portion of the sphere x2+y2+z2 = 16that lies inside the cylinder x2 + y2 = 12 and above the xy-plane. The following picturehelps to visualize the problem. First of all, the cylinder axis coincides with the z-axis

Figure 12: Representation of the sphere x2+y2+z2 = 16 and of the cylinder x2+y2 = 12.

and it has radius 2√3 while the radius of the sphere is 4. This implies that a part of

the cylinder will be inside the sphere. Furthermore, the intersections of the cylinder andthe sphere are represented by two circles x2 + y2 = 12 positioned on planes parallel tothe xy-plane. To find the equation of these planes we substitute x2 + y2 = 12 into theequation of the sphere. This yields z2 = 4 and therefore the two circles are positionedon the planes z = −2 and z = 2. The surface we are interested in is the portion ofthe sphere inside the given cylinder and above the plane z = 2. We already know thatpoints on a sphere can be represented by means of the vector-valued function

r(ϑ,ϕ) = (R cos ϑ sinϕ,R sinϑ sinϕ,R cosϕ),

22

Page 24: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

where ϑ ∈ [0, 2π) and ϕ ∈ [0, π]. However, since we are considering only a portion of thesphere there will be some additional restrictions on the range of the angular variablesto be taken into account. In particular, ϕ will start at ϕ = 0 and go down to the planez = 2 where ϕ takes its maximum value ϕmax. Since z = R cosϕ and R = 2, we findthat for z = 2 we have 2 = 4 cosϕmax and hence ϕmax = π/3. We conclude that theportion of the sphere under consideration will be described by

r(ϑ,ϕ) = (4 cos ϑ sinϕ, 4 sin ϑ sinϕ, 4 cosϕ),

where ϑ ∈ [0, 2π) and ϕ ∈ [0, π/3]. In order to apply (12) we identify u with ϑ andv = ϕ. Then,

rϑ = (−4 sin ϑ sinϕ, 4 cos ϑ sinϕ, 0), rϕ = (4 cos ϑ cosϕ, 4 sin ϑ cosϕ,−4 sinϕ).

andrϑ × rϕ = (−16 cos ϑ sin2 ϕ,−16 sin ϑ sin2 ϕ,−16 sinϕ cosϕ).

Finally, we find that |rϑ × rϕ| = 16 sinϕ. Employing (12) yields

A =

0

π/3

0

dϕ|rϑ × rϕ| = 16

0

π/3

0

dϕ sinϕ = 16

0

dϑ (− cosϕ)|π/30

= 8

0

dϑ = 4π.

3.2.2 Surface integrals of scalar fields

The following definition tells us how to compute the surface integral of a scalar field overan arbitrary finite surface in the Euclidean space.

Definition 3.10 Let S be a surface in R3 having parametric representation

r = (x(u, v), y(u, v), z(u, v)), (u, v) ∈ D = U × V ⊆ R2

with U ⊆ R and V ⊆ R. Further suppose that T = T (x, y, z) is a scalar field. We definethe surface integral of T over S as follows

SdS T (x, y, z) =

DdA T (x(u, v), y(u, v), z(u, v)).

Using (12) we can rewrite the surface integral as

SdS T (x, y, z) =

Ddudv T (x(u, v), y(u, v), z(u, v))|ru × rv|. (13)

23

Page 25: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Suppose that the surface S is described by the Cartesian equation z = g(x, y). Then,D represents the region of the shade of the surface S on the xy-plane. Furthermore, Scan be trivially parameterized as u = x, v = y, and z = g(x, y) so that the vector-valuedfunction r describing S takes the form

r(x, y) = (x, y, g(x, y)), x ∈ U, y ∈ V.

Then,rx = (1, 0, ∂xg), ry = (0, 1, ∂yg)

and this implies thatrx × ry = (−∂xg,−∂yg, 1).

Hence,

|rx × ry| =√

1 + (∂xg)2 + (∂yg)2

and the surface integral of a scalar field over S can be cast into the form

SdS T (x, y, z) =

U×Vdxdy T (x, y, g(x, y))

√1 + (∂xg)2 + (∂yg)2. (14)

Similarly, if the surface S is described by the equation x = h(y, z), the region D will bethe shade of S on the yz-plane and the corresponding surface integral of a scalar fieldover S can be written as

SdS T (x, y, z) =

V×Wdydz T (h(y, z), y, z)

√1 + (∂yh)2 + (∂zh)2 (15)

with z ∈ W ⊆ R. Finally, if the surface S is described by the equation y = f(x, z), theregion D will be the shade of S on the xz-plane and the corresponding surface integralof a scalar field over S can be written as

SdS T (x, y, z) =

U×Wdxdz T (x, f(x, z), z)

√1 + (∂xf)2 + (∂zf)2.

Remark The physical interpretation of a surface integral of a scalar field is very simple.Suppose that the scalar field is some mass or charge distribution over some surface S.Then, the corresponding surface integrals of these scalar fields over S will represent thetotal mass and total charge over S, respectively.

Example We want to compute the integral of the scalar field U(x, y) = (x−x2)(y−y2)over the surface S represented by a square with x ∈ U = [0, 1] and y ∈ V = [0, 1] locatedon the plane z = 0. In this case the surface S coincides with its shade D = [0, 1]× [0, 1].Since the equation of the surface is z = 0 and x, y ∈ [0, 1], we conclude that g(x, y) = 0and therefore the square root in formula (14) will be simply one. Finally, the surfaceintegral of U over the given square will be

SdS U(x, y) =

1

0

dx

1

0

dy (x− x2)(y − y2) =

1

0

dx (x− x2)

(y2

2− y3

3

)∣∣∣∣1

0

24

Page 26: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 13: Representation of the scalar field U(x, y) = (x− x2)(y − y2) over the square[0, 1] × [0, 1] on the plane z = 0.

=1

6

1

0

dx (x− x2) =1

36.

Example Let us consider the Gaussian distribution G(x, y) = e−x2−y2 . We want tocompute the surface integral of G over the entire xy-plane. We will use again (14). Inthis case the surface S over which we integrate is the entire xy-plane described by theequation z = 0. Also in this case the square root appearing in (14) takes the valueone and the vector-valued function describing the plane is simply r(x, y) = (x, y, 0) withx ∈ U = R and y ∈ V = R. Hence, the surface integral of G over S is

SdS G(x, y) =

R

dx

R

dy e−x2−y2 .

To solve the above integral we introduce polar coordinates x = r cos ϑ, y = r sinϑ withr ∈ [0,+∞) and ϑ ∈ [0, 2π). In order to know how the infinitesimal surface elementdxdy transforms when we use polar coordinate we need first to construct the Jacobianof the coordinate transformation which is represented by the matrix

J =

(∂rx ∂ϑx∂ry ∂ϑy

)=

(cos ϑ −r sinϑsinϑ r cos ϑ

).

Then, dxdy will transform according to the formula

dxdy = |det(J)|drdϑ = rdrdϑ.

25

Page 27: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 14: Representation of the Gaussian G(x, y) = e−x2−y2 over the xy-plane.

Hence, our original integral becomes

SdS G(x, y) =

+∞

0

dr r

0

dϑ e−r2 = 2π

+∞

0

dr re−r2 = −π e−r2∣∣∣+∞

0

= −π

(lim

r→+∞e−r2 − 1

)= π.

Example Let us compute the surface integral of the scalar field U(x, y, z) = xy overthe surface S represented by the portion of the plane x+ y+ z = 1 in the positive sectorof the Cartesian coordinate system and having as a shade the region D obtained byprojecting S onto the yz-plane. Since D is the projection of S onto the yz-plane, we willwrite the equation of the plane as x = 1 − y − z and use formula (15). In this case wewill have h(y, z) = 1− y − z and

√1 + (∂yh)2 + (∂zh)2 =

√3.

The next step requires that we fix the intervals over which the variables y and z areallowed to take their values. First of all, the plane x+ y+ z = 1 will intersect the planex = 0 along the line y + z = 1. This means that for each y ∈ [0, 1] the correspondingvalue for z is given by z = 1 − y. It would be very silly to consider z in the interval[0, 1] because then the region D would be a square instead of having a triangular shapeas in the present situation! Hence, we have to take z ∈ [0, 1− y] and the surface integralbecomes

SdS U(x, y, z) =

√3

1

0

dy

1−y

0

dz U(h(y, z), y, z).

26

Page 28: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 15: Representation of the plane x+y+z = 1 in the positive sector of the Cartesiancoordinate system.

Since the integral of a scalar field over a surface must be a scalar and the range of thevariable z depends on y we must first integrate over z and then over y. Continuing thecomputation of the above integral yields

SdS U(x, y, z) =

√3

1

0

dy

1−y

0

dz (1− y− z)y =√3

1

0

dy

(z − yz − z2

2

)y

∣∣∣∣1−y

0

=

√3

2

1

0

dy y(1− y)2 =

√3

24.

In the next example we compute the surface integral of a scalar field over a closed surface.

Example We want to compute the surface integral of the vector field U(x, y, z) = y+ zwhere S is the closed surface whose side is the cylinder x2 + y2 = 3, whose bottom sideis the disc x2 + y2 ≤ 3 on the xy-plane, and whose top is the intersection of the planez = 4 − y with the given cylinder. Let S1, S2, and S3 represent the side surface, thebottom surface, and the top surface of the closed surface S, respectively. Then,

SdS U(x, y, z) =

3∑

i=1

Si

dSi U(x, y, z).

For the side surface we will use formula (13) yielding

S1

dS1 U(x, y, z) =

Ddudv U(x(u, v), y(u, v), z(u, v))|ru × rv|.

27

Page 29: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 16: Representation of the cylinder x2+y2 = 3 and its intersection with the planez = 4− y.

First of all we need a parameterization. We start by observing that the cylinder has beencut with the plane z = 4− y thus implying that the height of S1 is not constant and inparticular it must be z ∈ [0, 4− y]. If we introduce cylindrical coordinates x =

√3 cos ϑ,

y =√3 sinϑ and z = z with ϑ ∈ [0, 2π), we can describe points on S1 by means of the

vector-valued function

r(ϑ, z) = (√3 cos ϑ,

√3 sinϑ, z), ϑ ∈ [0, 2π).

Hence,rϑ = (−

√3 sinϑ,

√3 cos ϑ, 0), rz = (0, 0, 1),

and|rϑ × rz| = |(

√3 cos ϑ,

√3 sinϑ, 0)| =

√3.

Since the range of z depends on the variable y which in turn depends on the angularvariable ϑ we must first integrate over z and then over ϑ. Therefore, we find that

S1

dS1 U(x, y, z) =√3

0

4−√3 sinϑ

0

dz(√3 sinϑ+ z) =

29π

2

√3.

To compute the integral over S2 we use formula (14) with g(x, y) = 4 − y. In this casethe region D will be the disc x2 + y2 ≤ 3 on the xy-plane. Taking into account that

√1 + (∂xg)2 + (∂yg)2 =

√2

28

Page 30: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

we have

S2

dS2 U(x, y, z) =√2

x2+y2≤3

dxdy (y + g(x, y)) = 4√2

x2+y2≤3

dxdy.

The last integral is the area of a disc with centre the origin and radius√3 which is

simply 3π. Hence, we conclude that

S2

dS2 U(x, y, z) = 12π√2.

To compute the surface integral on the bottom part we recall that the disc is placed onthe xy-plane where z = 0 and the magnitude of the normal vector is simply one. If weuse polar coordinates and take into account that dxdy = rdrdϑ with r ∈ [0,

√3] and

ϑ ∈ [0, 2π), we find that

S3

dS3 U(x, y, z) =

√3

0

dr

0

dϑ r2 sinϑ = −

√3

0

dr cos ϑ|2π0

= 0.

Finally, the surface integral of the scalar field U over the closed surface will be

SdS U(x, y, z) =

π

2

(29√3 + 24

√2).

3.2.3 Surface integrals of vector fields

We start by defining the concept of surface integral of a vector field.

Definition 3.11 Let S be a surface in R3 described by a vector-valued function r(u, v) =

(x(u, v), y(u, v), z(u, v) where (u, v) ∈ D ⊆ R2. Suppose that F = F(x, y, z) is a vector

field in the Euclidean space. Then, the surface integral of F over S also called theflux of F through S is

SdS F(x, y, z) · n =

Ddudv F(x(u, v), y(u, v), z(u, v)) · (ru × rv),

where n denotes the normal vector to the surface S.

The surface integral of a vector field has the following physical interpretation. Supposethat V is the velocity field of some fluid. Then, the physical dimension of this fieldwill be a length over time and we write [F] = L/T . On the other side, the dimensionof the infinitesimal surface element will be a length squared, i.e. [dS] = L2. Since thedimension of the quantity FdS is

[FdS] = [F][dS] =L3

T=

volume

time,

we conclude that the flux of V through the surface S represents the volume of fluid perunit time crossing the surface S.

29

Page 31: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Example We want to compute the surface integral of F(x, y, z) = (x, z,−y) over thecurved surface S of the cylinder x2 + y2 = 1 between the planes z = 0 and z = 1. Firstof all, we can construct a parameterization of S by introducing cylindrical coordinates(r, ϑ, z) so that the vector-valued function describing S is given by

r(ϑ, z) = (cos ϑ, sinϑ, z), ϑ ∈ [0, 2π), z ∈ [0, 1],

where we took into account that the cylinder has unit radius, that is r = 1. The normalvector to S will be given by n = ru × rv = (cos ϑ, sinϑ, 0) and on the surface S we have

F · n = (cos ϑ, z,− sinϑ) · (cos ϑ, sinϑ, 0) = cos2 ϑ+ z sinϑ.

Taking into account that dudv = dϑdz the surface integral of our vector field will be

SdS F(x, y, z) · n =

1

0

dz

0

dϑ (cos2 ϑ+ z sinϑ).

Since,

0

dϑ cos2 ϑ = π,

0

dϑ sinϑ = 0,

we conclude that

SdS F(x, y, z) · n = π

1

0

dz = π.

Example Let us compute the surface integral of the vector field F(x, y, z) = (y, x2, z2)over the surface S, where S is the triangular surface on the yz-plane with y ≥ 0, z ≥ 0,and y+ z ≤ 1 and the normal vector n to the surface S is taken in the positive directionof the x-axis. In this case the surface S coincides with its shade D and it is representedby the set

S = (0, y, z) ∈ R3| y ∈ [0, 1] and z ∈ [0, 1 − y].

Then, the vector-valued function describing S is r(y, z) = (0, y, z). Furthermore, ry =(0, 1, 0) and rz = (0, 0, 1). Hence, n = ry×rz = (0, 1, 0)×(0, 0, 1) = (1, 0, 0) as expected.Therefore, on the surface S we have

F · n = (y, 0, z2) · (1, 0, 0) = y.

Since the range of the z variable depends on y, we will first integrate on z and then ony. Hence,

SdS F(x, y, z) · n =

1

0

dy

1−y

0

dz y =

1

0

dy y(1− y) =1

6.

Example We want to evaluate the surface integral of the vector field F(x, y, z) =(x, y, z) over the part of the paraboloid z = 1 − x2 − y2 with z ≥ 0 and having normalvector pointing upwards. Since the shade of the portion of the paraboloid consideredin this problem is simply the disc x2 + y2 ≤ 1, this suggest that it might be useful to

30

Page 32: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

use polar coordinates for the computation of the surface integral. First of all, the vectorfield restricted to the surface of the paraboloid is given by F(x, y, z) = (x, y, 1−x2−y2).The vector-valued function describing the surface of the paraboloid is given by r(x, y) =(x, y, 1 − x2 − y2) and the normal to the surface S of the paraboloid will be

n = rx × ry = (1, 0,−2x) × (0, 1,−2y) = (2x, 2y, 1).

This normal vector is pointing upwards since the normal at the vertex of the paraboloid(x = 0, y = 0) is given by the vector (0, 0, 1) pointing in the positive direction of thez-axis. Hence, on S we find

F · n = (x, y, 1− x2 − y2) · (2x, 2y, 1) = 1 + x2 + y2.

Let us parameterize D by means of polar coordinates (r, ϑ). Then, x = r cosϑ andy = r sinϑ with r ∈ [0, 1] and ϑ ∈ [0, 2π). Hence, F · n = 1 + r2 and dxdy = rdrdϑ. Atthis point the surface integral becomes

SdS F(x, y, z) · n =

0

1

0

dr r(1 + r2) =3π

2.

3.3 Volume integrals

Let us first define the concept of volume integral for a finite solid region in the Euclideanspace.

Definition 3.12 Let E be some portion of the Euclidean space whose boundary is givenby some closed surface S. The volume V of the solid region E (see Fig. 17) is

V =

EdV, dV = dxdydz.

Note that dxdydz represents the infinitesimal volume of a cube whose sides have lengthdx, dy, and dz, respectively.

Example We want to find the volume of a tetrahedron with vertices (0, 0, 0), (a, 0, 0),(0, b, 0), and (0, 0, c) where a, b, c > 0. First of all, we need to find the ranges for thevariables x, y, and z. Let x ∈ [0, a]. From Fig. 18 we see that the variable y is boundedby the line through the points A and B whose equation is

y = − b

ax+ b.

Hence, y ∈ [0, b(1 − x/a)]. Concerning the variable z we see that its minimum value iszero and it cannot exceed the value of the z-coordinate of points belonging to the planeABC. In order to find the range of z we must first derive the equation of this plane.The general Cartesian equation of a plane is αx+βy+ γz = δ with α, β, γ, δ ∈ R. Sinceour plane does not pass through the origin, it must be δ 6= 0. Hence, we can divide theequation of the plane by δ. This gives αx+ βy + γz = 1 where α = α/δ, β = β/δ, and

31

Page 33: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 17: Representation of a solid region E in the Euclidean space whose boundary issome closed surface S.

z

y

x

C

A

BO

Figure 18: Representation of a tetrahedron with vertices in O = (0, 0, 0), A = (a, 0, 0),B = (0, b, 0), and C = (0, 0, c).

γ = γ/δ. Furthermore, the points A, B, and C must belong to this plane. Imposing thiscondition yields α = 1/a, β = 1/b, and γ = 1/c. Finally, the equation of the plane is

x

a+

y

b+

z

c= 1.

32

Page 34: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

This implies that

z ∈[0, c(1− x

a− y

b

)].

Since the range of z depends on x and y and the range of y depends on x, we must firstintegrate over z, then over y and finally over x. Hence, we have

V =

a

0

dx

b(1−xa)

0

dy

c(1−xa− y

b )

0

dz = c

a

0

dx

b(1−xa)

0

dy(1− x

a− y

b

)

=bc

2

a

0

dx(1− x

a

)2= −abc

6

(1− x

a

)3∣∣∣∣a

0

=abc

6.

We introduce the concept of volume integrals of scalar and vector fields.

Definition 3.13 Let T = T (x, y, z) be a continuous scalar field in R3 and E be some

portion of the Euclidean space whose boundary is given by some closed surface S andhaving volume V . Then, the volume integral of T is defined as the triple integral

EdV T (x, y, z), dV = dxdydz.

Similarly, if F(x, y, z) is a vector field in R3, volume integral of F is given by

EdV F(x, y, z).

Observe that in the case of a vector field the corresponding volume integral will be avector in R

3. There is also a simple physical interpretation of the volume integral of ascalar field. Let us go back to Fig. 17. Suppose that the solid region E represents amassive object with variable mass density ρ = ρ(x, y, z). Then, the total mass M of theobject will be

M =

EdV ρ(x, y, z). (16)

Similarly, if σ = σ(x, y, z) denotes a variable charge density on E, the total charge Qinside that region will be

Q =

EdV σ(x, y, z).

Example Suppose we have a solid region in R3 represented by the set E = (x, y, z) ∈

R3 | x, y, z ∈ [0, 1] and having variable mass density ρ(x, y, z) = 1+x+ y+ z measured

in kg/m3. We want to find the total mass of the solid region E. Using (16) yields

M =

EdV ρ(x, y, z) =

1

0

dx

1

0

dy

1

0

dz (1+x+y+z) =

1

0

dx

1

0

dy

(3

2+ x+ y

)

=

1

0

dx (2 + x) =5

2kg.

33

Page 35: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

4 Problems to Section 3

Exercise 4.1 Determine the length of the curve x = y2/2 for x ∈ [0, 1/2]. Assume ypositive. Answer: [

√2− ln (

√2− 1)]/2.

Exercise 4.2 Evaluate the integral

C(y dx+ x dy + z dz),

where C is a smooth curve with parametric equations x(t) = cos t, y(t) = sin t, andz(t) = t2 with t ∈ [0, 2π]. Answer: 8π4.

Exercise 4.3 Evaluate the line integral

C F·dr of the vector field F(x, y, z) = (5z2, 2x, x+2y) along the curve C having parametric equations x = t, y = t2, and z = 2t2 witht ∈ [0, 1]. Answer: 4.

Exercise 4.4 Compute the line integral

C F×dr of the vector field F(x, y, z) = (y2, x, z)along the curve C described by z = y = ex from x = 0 to x = 1. Answer: ((3 −e2)/2, (3e − 2− e3)/3, (2e3 − 5)/6).

Exercise 4.5 Give parametric representations for each of the following surfaces

1. x = 5y2 + 2z2 − 10 an elliptic parabolid,

2. y2 + z2 = 25 a cylinder with axis coinciding with the x-axis.

Answer: 1. r(u, v) = (5u2 +2v2 − 10, u, v) with u, v ∈ R; 2. r(u, v) = (u, 5 cos v, 5 sin v)with u ∈ R and v ∈ [0, 2π).

Exercise 4.6 Evaluate the surface integral of the scalar field U(x, y, z) = z over thesurface S represented by the upper half of a sphere with centre the orgin and radius two.For the region D take the projection of S onto the xy-plane. Answer: 8π.

Exercise 4.7 Find the volume integral of the scalar field T (x, y, z) = x2 + y2 + z2 overthe solid region E specified by 0 ≤ x ≤ 1, 1 ≤ y ≤ 2, and 0 ≤ z ≤ 3. Answer: 17.

5 The operators: gradient, divergence, and curl

Topics: definition of directional derivative, the directional derivative expressed in termsof the gradient, maximum value of the directional derivative, orthogonality of the gra-dient to a given surface at a point, construction of a unit normal vector to a surfaceat a point in terms of the gradient, orthogonality of the gradient to a level curve ofa surface, applications of the gradient: study of maxima and minima of a function oftwo variables (relative minima and maxima, saddle points), closed and bounded regions,algorithm to find absolute maxima and minima, Lagrange multipliers, generalization ofthe Fundamental Theorem of Calculus, conservative fields

34

Page 36: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

5.1 The gradient of a scalar field

Definition 5.1 Let f = f(x, y, z) be a scalar field and u = (a, b, c) a unit vector, that is|u| =

√a2 + b2 + c2 = 1. We call the directional derivative of f along the vector u

at the point (x0, y0, z0) the rate at which f changes along the direction of u at the givenpoint, that is

(Duf)(x0, y0, z0) = limh→0

f(x0 + ah, y0 + bh, z0 + ch)− f(x0, y0, z0)

h(17)

The concept of directional derivative generalizes the concept of partial derivative as itcan be seen by considering for instance the directional derivative of a scalar field f alonga unit vector e1 = (1, 0, 0) in the x-direction at an arbitrary point (x0, y0, z0). In thiscase we have

(De1f)(x0, y0, z0) = lim

h→0

f(x0 + h, y0, z0)− f(x0, y0, z0)

h= ∂xf(x0, y0, z0).

In general, if the scalar field f does not exhibit a simple dependence on the variablesx, y, and z, it might result difficult to compute the limit in (17). For this reason it isdesirable to have a more effective formulation of the directional derivative. This willlead us to the concept of the gradient of a scalar field. To this purpose let us consider aunit vector u = (a, b, c) and the differentiable function

g(t) = f(x(t), y(t), z(t)), t ∈ R

withx(t) = x0 + at, y(t) = y0 + bt, z(t) = z0 + ct

Then,dg

dt= lim

h→0

g(t+ h)− g(t)

h

and hence

dg

dt

∣∣∣∣t=0

= limh→0

g(h) − g(0)

h= lim

h→0

f(x(h), y(h), z(h)) − f(x(0), y(0), z(0))

h

= (Duf)(x0, y0, z0).

On the other hand, we can compute dg/dt by means of the chain rule and we obtain

dg

dt= ∂xg

dx

dt+ ∂yg

dy

dt+ ∂zg

dz

dt= a∂xg + b∂yg + c∂zg = u · (∂xg(t), ∂yg(t), ∂zg(t))

and hence

dg

dt

∣∣∣∣t=0

= u·(∂xg(0), ∂yg(0), ∂zg(0)) = u·(∂xf(x0, y0, z0), ∂yf(x0, y0, z0), ∂zf(x0, y0, z0)) .

35

Page 37: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Putting together the two results we obtained for g′

(0) yields

(Duf)(x0, y0, z0) = u · (∂xf(x0, y0, z0), ∂yf(x0, y0, z0), ∂zf(x0, y0, z0)) .

If we define the gradient of f at an arbitrary point (x, y, z) to be the vector

∇f = (∂xf(x, y, z), ∂yf(x, y, z), ∂zf(x, y, z)) , (18)

we can finally write the directional derivative of f along u at the point (x0, y0, z0) as thedot product of the vector u with the gradient of f evaluated at the given point, that is

(Duf)(x0, y0, z0) = (u · ∇f)(x0, y0, z0). (19)

Remark First of all, (19) is more effective than (17) because we only need to com-pute partial derivatives of a scalar field instead of evaluating a limit. Furthermore, theoperator gradient

∇ = (∂x, ∂y, ∂z)

associates to a given scalar field a vector field according to (18). Last but not least,if we look at (19) from the point of view of linear algebra, we see that the directionalderivative can be interpreted as the projection of the gradient of the scalar field alongthe direction of a fixed unit vector.

Example We want to compute the directional derivative of f(x, y) = xexy + y alongthe unit vector in the direction θ = 2π

3at the point (2, 0). In this case the unit vector is

simply

u = (cos θ, sin θ) =

(−1

2,

√3

2

).

Taking into account that

∂xf = (1 + xy)exy, ∂yf = 1 + x2exy,

the gradient of f is(∇f)(x, y) =

((1 + xy)exy, 1 + x2exy

).

Hence, (∇f)(2, 0) = (1, 5) and the directional derivative is

(Duf)(2, 0) =

(−1

2,

√3

2

)· (1, 5) = −1

2+

5

2

√3 =

5√3− 1

2.

The next result tell us for which direction the directional derivative of a scalar field ata point takes its maximum value.

Theorem 5.2 The directional derivative of a scalar field f = f(x, y, z) along a unit vec-tor u at a point (x0, y0, z0) takes its maximum vale |(∇f)(x0, y0, z0)| along the directionof the vector (∇f)(x0, y0, z0).

36

Page 38: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Proof. Let α be the angle between the vectors u and (∇f)(x0, y0, z0). Using the defi-nition of the dot product from linear algebra (19) gives

(Duf)(x0, y0, z0) = (u · ∇f)(x0, y0, z0) = |u||(∇f)(x0, y0, z0)| cosα

= |(∇f)(x0, y0, z0)| cosα,where we took into account that |u| = 1. Since −1 ≤ cosα ≤ 1, the directionalderivative (Duf)(x0, y0, z0) takes its maximum value whenever α = 0, i.e. when u

and (∇f)(x0, y0, z0) have the same direction. Putting α = 0 in the above expression wefind that the maximum value of (Duf)(x0, y0, z0) is |(∇f)(x0, y0, z0)|.

Example We want to compute the directional derivative of f(x, y) = xey along theunit vector in the direction from the point (2, 0) to the point (1/2, 2) at the point (2, 0).What is the maximum value of this directional derivative? Let us first find the vectorfrom the point (2, 0) to the point (1/2, 2). Let OA and OB be the vectors identifyingthe points (2, 0) and (1/2, 2), respectively. Then, the vector AB from the point (2, 0) tothe point (1/2, 2) is

AB = OB−OA = (1/2, 2) − (2, 0) = (−3/2, 2).

Even though this vector does not have unit length, we can construct a unit vector u

having the same direction of the vector AB by dividing AB by its own length

|AB| =√

9

4+ 4 =

5

2.

This gives

u =AB

|AB| =2

5(−3/2, 2) = (−3/5, 4/5).

Moreover,∂xf = ey, ∂yf = xey.

Hence, (∇f)(2, 0) = (1, 2). Finally,

(Duf)(2, 0) = (−3/5, 4/5) · (1, 2) = −3

5+

8

5= 1.

According to Theorem 5.2 the maximum value of (Duf)(2, 0) will be |(∇f)(2, 0) =√1 + 4 =

√5 and it will occur along the direction of the vector (∇f)(2, 0) = (1, 2).

The next result permits to connect the concept of the gradient with the concept of thenormal vector to a given surface.

Theorem 5.3 Let S be a surface in R3 described by the Cartesian equation f(x, y, z) = 0

and (x0, y0, z0) be an arbitrary point belonging to S. Then, the gradient of f evaluatedat (x0, y0, z0) is a vector normal to the surface S at the point (x0, y0, z0).

37

Page 39: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Proof. Take an arbitrary point (x0, y0, z0) ∈ S and let C be an arbitrary curve on Sdescribed by the vector-valued function r(t) = (x(t), y(t), z(t)) with t ∈ I ⊂ R suchthat r(t0) = (x0, y0, z0). Since points of the curve C lie on the surface S we also havef(x(t), y(t), z(t)) = 0. If we differentiate f with respect to t by using the chain rule weget

df

dt= ∂xf

dx

dt+ ∂yf

dy

dt+ ∂zf

dz

dt= [(∇f)(x(t), y(t), z(t))] · dr

dt= 0.

Evaluating the above expression at t = t0 we find that

[(∇f)(x0, y0, z0)] ·dr

dt

∣∣∣∣t=t0

= 0

This means that the vectors (∇f)(x0, y0, z0) and drdt

∣∣t=t0

are orthogonal to each other.

On the other side, the vector drdt

∣∣t=t0

is tangent to the curve C at the point (x0, y0, z0)and since C belongs to S the same vector will be also tangent to S at the same point.This means that the vector dr

dt

∣∣t=t0

belongs to the plane tangent to S at the point

(x0, y0, z0) and we can conclude that (∇f)(x0, y0, z0) is a vector orthogonal to S at thepoint (x0, y0, z0).

This result implies that whenever we have a surface S described by the Cartesian equa-tion f(x, y, z) = 0 the unit normal vector to S at a point P = (x0, y0, z0) ∈ S can beconstructed in terms of the gradient of f as follows

nP =(∇f)(x0, y0, z0)

|(∇f)(x0, y0, z0)|

provided that (∇f)(x0, y0, z0) 6= (0, 0, 0). Observe that according to the above definitionthe normal vector will have unit length.

Example We want to find the unit normal vector to the paraboloid of revolution z =x2 + y2 at the point (1, 1, 2). Let f(x, y, z) = x2 + y2 − z. Then, (∇f)(x, y, z) =(2x, 2y,−1) and (∇f)(1, 1, 2) = (2, 2,−1) with |(∇f)(1, 1, 2)| =

√5. Hence, the unit

normal vector to the given surface at P is

nP =1√5(2, 2,−1) =

(2√5,2√5,− 1√

5

).

This normal vector points inwards to the surface S since at the vertex of the paraboloidof revolution we find that (∇f)(0, 0, 0) = (0, 0,−1). In the case we would like to have anormal vector pointing outwards we only need to choose f(x, y, z) = z − x2 − y2 sincethen at the vertex of the paraboloid of revolution we have (∇f)(0, 0, 0) = (0, 0, 1). Thecorresponding normal vector to the surface at P will be

nP =1√5(−2,−2, 1) =

(− 2√

5,− 2√

5,1√5

).

38

Page 40: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Example We consider again the paraboloid of revolution of the previous example. Wewant to convince ourselves that the gradient of f at a certain point of the surface is alwaysorthogonal to the level curve through that point. Let again f(x, y, z) = x2 + y2 − z andconsider an arbitrary point (x0, y0, z0) belonging to the paraboloid of revolution. Thelevel curve C through this point will be a circle x2 + y2 = z0 obtained by intersectingthe paraboloid of revolution with the plane z = z0 with z0 > 0. Then, C will be pa-rameterized through the vector-valued function r(ϑ) = (cos ϑ, sinϑ, z0) with ϑ ∈ [0, 2π).The point (x0, y0, z0) will be identified for some value ϑ0 ∈ [0, 2π). The vector tangentto C at the point (x0, y0, z0) is

dr

dt

∣∣∣∣t=t0

= (− sinϑ0, cos ϑ0, 0)

and the gradient of f evaluated at the same point is

(∇f)(x0, y0, z0) = (2 cos ϑ0, 2 sinϑ0,−1).

Finally, we have

(∇f)(x0, y0, z0) ·dr

dt

∣∣∣∣t=t0

= (2 cos ϑ0, 2 sin ϑ0,−1) · (− sinϑ0, cos ϑ0, 0)

= −2 cos ϑ0 sinϑ0 + 2 sinϑ0 cosϑ0 = 0

and this shows that the vectors (∇f)(x0, y0, z0) and drdt

∣∣t=t0

are perpendicular to eachother.

Remark We want to understand the meaning of the term√

1 + (∂xg)2 + (∂yg)2 ap-pearing in the definition of surface integral (14) of a scalar field. There, we supposedthat the surface S can be represented by the equation z = g(x, y). The same equationcan be rewritten as f(x, y, z) = z − g(x, y) = 0. In this case the gradient of f will be

∇f = (−∂xg,−∂yg, 1)

and hence the length of this vector is given by

|∇f | =√

1 + (∂xg)2 + (∂yg)2.

This means that the term√

1 + (∂xg)2 + (∂yg)2 in (14) is just the length of the normalvector to the surface S.

The concept of the gradient can also be used to study critical points (maxima/minimaand saddle points) of scalar fields. We will restrict our attention to scalar fields dependingon two variables.

39

Page 41: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Definition 5.4 We say that f = f(x, y) has a relative minimum at a point (a, b) inthe domain of definition of f if f(a, b) ≤ f(x, y) in some region containing the point(a, b). Similarly, we say that (a, b) is a relative maximum if f(a, b) ≥ f(x, y) insome region containing the point (a, b). By a relative extremum we mean a relativeminimum or maximum.

We characterize critical points as follows.

Definition 5.5 We say that a point (a, b) in the domain of definition of f = f(x, y) isa critical point if one of the following conditions is satisfied

1. ∇f(a, b) = (0, 0),

2. ∂xf(a, b) and/or ∂yf(a, b) does/do not exist.

The next result tells us that relative maxima/minima are critical points.

Theorem 5.6 If (a, b) is a relative extremum of the function f = f(x, y), then (a, b) isa critical point of f .

Proof. Let (a, b) be a relative extremum of f . Define the function g = g(x, b). Then, ghas an extremum at x = a and from Real Analysis it follows that g

(a) = 0 where theprime denotes differentiation with respect to x. On the other side, the same derivativecan be expressed as follows

g′

(a) = ∂xf(x, b)|x=a = ∂xf(a, b).

Hence, ∂xf(a, b) = 0. Consider now the function h = h(a, y). Then, h has an extremumat y = b and from Real Analysis it follows that dh/dy|y=b = 0. Moreover, the samederivative can be also written as

dh

dy

∣∣∣∣y=b

= ∂yf(a, y)|y=b = ∂yf(a, b).

Therefore, ∂yf(a, b) = 0. At this point, it follows that ∇f(a, b) = (∂xf(a, b), ∂yf(a, b)) =(0, 0) and this concludes the proof.

The previous result implies that relative extrema are critical points but the converse doesnot need to be true. Consider for instance the function f(x, y) = xy as in Figure 19.Clearly, ∇f(x, y) vanishes at the point (0, 0) indicating that this point is a critical point.However, we cannot conclude that this point is relative minimum or maximum becauseif we look at the function f along the line y = x we obtain the function f(x, x) = x2

which has a minimum at x = 0 and if we look at the same function along the liney = −x we get the function f(x,−x) = −x2 which has a minimum at x = 0. Thisimplies that if we consider a region containing the point (0, 0) there are points in thisregion where f(0, 0) ≤ f(x, y) and f(0, 0) ≥ f(x, y) thus implying that (0, 0) is not arelative extremum of the function f . We call this kind of critical points saddle points.The next result allows us to establish when a critical point is a relative extremum or asaddle point.

40

Page 42: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 19: Graph of f(x, y) = xy.

Theorem 5.7 Let (a, b) be a critical point of the differentiable function f = f(x, y) andH be the Hessian matrix associated to f at the point (a, b) which is defined as follows

H(a, b) =

(∂xxf(a, b) ∂yxf(a, b)∂xyf(a, b) ∂yyf(a, b)

).

Then, the critical point (a, b) can be classified as follows

1. if detH(a, b) > 0 and ∂xxf(a, b) > 0, then (a, b) is a relative minimum,

2. if detH(a, b) > 0 and ∂xxf(a, b) < 0, then (a, b) is a relative maximum,

3. if detH(a, b) < 0, then (a, b) is a saddle point,

4. if detH(a, b) = 0, the test is inconclusive and other techniques must be used todecide if the point is a relative extremum or a saddle point.

Remember that if ∂xyf and ∂yxf are continuous, then Clairaut’s theorem implies thatthey must coincide and therefore the anti-diagonal elements of the Hessian matrix willcoicide.

Example We want to classify the critical point of the function f(x, y). We alreadyknow that there is only one critical point at (0, 0). In this case the Hessian matrix isgiven by

H(0, 0) =

(0 11 0

)

and detH(0, 0) = −1. Hence, according to the previous theorem we conclude that thepoint (0, 0) is a saddle point.

41

Page 43: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Example We want to find and classify all critical points of the function f(x, y) =x3 + y3 − 3xy + 4. First of all, ∇f(x, y) = (3x2 − 3y, 3y2 − 3x). Clearly, the gradientof f will vanish when x2 = y and y2 = x. If we substitute the first equation into thesecond one we obtain the equation x4 − x = 0 whose real solutions are x = 0 and x = 1.Hence, f has two critical points at A = (0, 0) and B = (1, 1). The Hessian matrix f ata point (x, y) is

H(x, y) =

(6x −3−3 6y

)

and hence,

H(0, 0) =

(0 −3−3 0

), H(1, 1) =

(6 −3−3 6

).

Since detH(0, 0) is negative we conclude that A is a saddle point. On the other sidedetH(1, 1) > 0 and ∂xxf(1, 1) > 0, hence (1, 1) is a relative minimum.

Example We want to determine the point on the plane 4x− 2y + z = 1 that is closestto the point (−2,−1, 5). To do that we choose an abitrary point (x, y, z) belonging tothe given plane and minimize its distance from the point (−2,−1, 5) which is given by

d(x, y, z) =√

(x+ 2)2 + (y + 1)2 + (z − 5)2.

Since the point (x, y, z) belongs to the plane 4x − 2y + z = 1, its z coordinate can beexpressed as z = 1− 4x+2y and the distance function will depend only on the variablesx and y, more precisely

d(x, y) =√

(x+ 2)2 + (y + 1)2 + (2y − 4x− 4)2.

Instead of working with the function d, we will compute the critical points of the functiond2 because ∇d2 = 2∇d and therefore these two functions will share the same criticalpoints. Let

f(x, y) = d2(x, y) = (x+ 2)2 + (y + 1)2 + (2y − 4x− 4)2.

Then, ∇f(x, y) = (36 + 34x − 16y,−14 − 16x + 10y) will vanish for x = −34/21 andy = −25/21. The corresponding value of z is obtained by using the equation of the planeand we find that

z = 1− 4x+ 2y =107

21.

In order to establish if the point (−34/21,−25/21, 107/21) is a relative minimum, weconstruct the Hessian matrix of f at that point and we get

H(−34/21,−25/21, 107/21) =

(34 −16−16 10

).

Since detH(−34/21,−25/21, 107/21) > 0 and ∂xxf(−34/21,−25/21, 107/21) > 0, weimmediately conclude that the given point is a relative minimum.

42

Page 44: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

In order to speak of absolute maxima and minima of a function f = f(x, y) we have torestrict f to some region D of R2. Introducing the concept of closed and bounded regionwe can formulate an existence theorem for absolute maxima and minima of a functionwhich generalizes a theorem in Real Analysis concerning the existence of maxima andminima of a continuous function defined on a closed interval.

Definition 5.8 A region D of R2 is closed if it contains its boundary points. It willbe open if it is not closed, i.e. it does not contain its boundary points. Moreover, thesame region is bounded if it can be completely contained in a disk. Finally, the regionD is compact if it is closed and bounded.

Example The disk of radius R given by x2 + y2 ≤ R2 is a closed region because itcontains its boundary points represented by the points lying on the circle x2 + y2 = R2.Furthermore, it is also bounded because we can always construct a larger disk of radiusR + 1 containing the disk x2 + y2 ≤ R2. An example of an open region is given by thedisk x2 + y2 < R2.

Theorem 5.9 Let f = f(x, y) be a continous function on some compact region D ofR2. Then, there exist points (x1, y1) and (x2, y2) in D such that f(x1, y1) and f(x2, y2)

are the absolute maximum and minimum of f on D, respectively.

In principle, the problem of finding absolute maximum and minimum of a given functionon a compact region can be solved by following this algorithm

1. find all critical points of f that lie inside the closed and bounded region D anddetermine the value of the function at each of these points,

2. find all extrema of the function on the boundary and at corner points in the casethe compact region exhibits some corners,

3. the largest and smallest values found in the first two steps are the absolute maxi-mum and minimum of f on D.

Example We want to find absolute maxima and minima of the function f(x, y) =x4 + 4y2 − 2x2y + 4 on the rectangular region given by −1 ≤ x ≤ 1 and −1 ≤ y ≤ 1.Let D denote such region. Clearly, it is closed since it contains its boundary points andit is also bounded because for instance the disk x2 + y2 ≤ 9 contains D. Furthermore, fis continuous on D and hence it must have absolute maximum and minimum on D. Letus first find the critical points of f inside the region D. It can be easily seen that

∇f(x, y) = (2x− 4xy, 8y − 2x2)

will vanish whenever x− 2xy = 0 and 4y − x2 = 0. The first equation is satisfied whenx = 0 or y = 1/2. If x = 0 the second equation gives y = 0. Let A = (0, 0) be such point.If y = 1/2, the equation 4y − x2 = 0 gives x = ±

√2. Clearly, the points (±

√2, 1/2) are

43

Page 45: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

outside the region D and we can disregard them. Hence, inside the region D we haveonly one critical point at A and the Hessian matrix at that point is given by

H(0, 0) =

(2 00 8

).

Furthermore, detH(0, 0) and ∂xxf(0, 0) are both positive and hence we can concludethat A is a relative minimum of f where f(A) = 4. The boundary of the region D

y

x

L2

L1

L4

L3

Figure 20: The boundary of the region D for the function f(x, y) = x4 +4y2− 2x2y+4.

is represented in Fig. 20. On the segment L1 we have x ∈ [−1, 1] and y = −1. Hence,the restriction of f on L1 is represented by the function f(x,−1) = 3x2 + 8 which hasan extremum at x = 0. Let B = (0,−1). Then, f(B) = 8 > f(A). On the segment L2

we have y ∈ [−1, 1] and x = 1. Hence, the restriction of f on L2 is represented by thefunction f(1, y) = 4y2 − 2y + 5 which has an extremum at y = 1/4. Let C = (1, 1/4).Then, f(C) = 19/4 > f(A). On the segment L3 we have x ∈ [−1, 1] and y = 1. Hence,the restriction of f on L3 is represented by the function f(x, 1) = −x2 + 8 which hasan extremum at x = 0. Let E = (0, 1). Then, f(E) = 8. Finally, the segment L4 hasy ∈ [−1, 1] and x = −1. Hence, the restriction of f on L4 is represented by the functionf(−1, y) = 4y2 − 2y + 5 which has an extremum at y = 1/4. Let F = (−1, 1/4). Then,f(F ) = 19/4. At the corners we find that f(1, 1) = 7, f(−1,−1) = 11, f(−1, 1) = 7,

44

Page 46: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 21: Plot of the function f(x, y) = x4+4y2−2x2y+4 over the compact region D.

and f(1,−1) = 11. Comparing all the values found so far we can conclude that (0, 0) isan absolute minimum while (−1,−1) and (1,−1) are absolute maxima as it can be seenfrom Fig. 21.

As a last application of the gradient we look at a special class of vector fields calledconservative fields. These fields play an important role in Physics because the workdone by a force in a conservative field to move a particle along a path with initial andfinal points A, and B, respectively, does not depend on the details of the path but onlyon the initial and final points. The most famous examples of conservative fields arerepresented by the electric and gravitational forces. Last but not least, the concept ofconservative field will allow us to simplify the computation of line integrals of vectorfields.

Definition 5.10 A vector field F = F(x, y, z) is said to be conservative if there existsa scalar field f = f(x, y, z) such that

F = ∇f. (20)

Moreover, U = −f is called the potential function. Finally, we say that the vectorfield F is path-independent if

C1

F · dr =

C2

F · dr

for any choice of smooth curves C1 and C2 sharing the same initial and final points.

Example We want to verify that the vector field F(x, y, z) = (y2, 2xy + e3z, 3ye3z)is conservative. This will be the case if we can construct a scalar field f such that

45

Page 47: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

(20) is satisfied. Condition (20) gives rise to the following system of first order partialdifferential equations

∂xf = y2, (21)

∂yf = 2xy + e3z , (22)

∂zf = 3ye3z . (23)

Integrating (21) with respect to x we obtain that

f(x, y, z) = xy2 + h(y, z)

where h is an unknown functions yet to be determined. Replacing the above expressioninto (22) we obtain

2xy + ∂yh = 2xy + e3z

and therefore∂yh = e3z.

Integrating the above equation with respect to y yields

h(y, z) = ye3z + g(z),

where g is an unknown function. To determine g we replace the above expression into(23) and we get

3ye3z +dg

dz= 3ye3z.

Hence, we havedg

dz= 0

whose solution is g(z) = C where C is an arbitrary integration constant. Hence, weconclude that

f(x, y, z) = xy2 + ye3z + C.

The next result tells us that the work done in a conservative field does not depend onthe path along which we moved a particle but only on the initial and final points of thepath.

Theorem 5.11 Let C be a smooth curve described by r = r(t) with t ∈ [a, b] andF = F(x, y, z) a conservative field. Then,

CF · dr

is path-independent.

46

Page 48: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Proof. Since the vector field is conservative we can construct a scalar field f such thatF = ∇f . Then

CF · dr =

C∇f · dr.

Using the parameterization of the curve C we find that

C∇f · dr =

b

a∇f · dr

dtdt

but

∇f · drdt

= ∂xfdx

dt+ ∂yf

dy

dt+ ∂zf

dz

dt=

df

dt,

where f = f(x(t), y(t), z(t)). Hence,

CF · dr =

b

a

df

dtdt = f(x(b), y(b), z(b)) − f(x(a), y(a), z(a)).

Hence, the line integral of the vector field does not depend on the path C but only onthe values of the scalar field f at the initial and final points of C.

This result also implies that the line integral of a conservative vector field along a closedpath must vanish, that is

CF · dr = 0. (24)

On the other side it is also possible to show that if (24) holds for any closed path C, thenthe vector field must be conservative. Since the proof of this statement becomes verysimple once we introduce the concept of the curl of a vector field, we will postpone itto the section where we will characterize conservative vector fields in terms of vanishingcurls. The next result allows us to transform a line integral of a vector field into anequivalent surface integral.

Theorem 5.12 (Green’s theorem)Let C be a simple closed curve in R

2 followed in the counterclockwise direction and Dthe region inclosed by C. Suppose that the vector field F(x, y) = (P (x, y), Q(x, y)) hascontinuous first order partial derivatives in some region containing D. Then,

CF · dr =

D(∂xQ− ∂yP ) dA.

Example We want to compute the line integral

CF · dr

where F(x, y) = (3y − esinx, 7x +√

y4 + 1) and C is the circle x2 + y2 = 9 followed inthe counterclockwise direction. Note that all requirements to apply Green’s theorem are

47

Page 49: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

satisfied. Since ∂xQ = 7 and ∂yP = 3 and the region D inclosed by C is a disk of radius3 we have

CF · dr = 4

DdA = 36π.

In order to appreciate the utility of the Green’s theorem I advise you to try to computethe same integral by parameterizing C. You will soon realize that the integrals involvedare extremely difficult to be computed!

The next example shows that the Green’s theorem can be also applied to regions Dhaving holes.

Example We want to show that we can apply Green’s theorem to evaluate the lineintegral of the vector field F(x, y) = (y3,−x3) where the path C is made of two circles C1

and C2 of radius 2 and 1,respectively, both centered at the origin as in Fig. 22 where C1 isfollowed in the counterclockwise direction while C2 in the clockwise direction. Let D be

y

x

C1

C2

CI

CII

CIII

CIV

CV

CV I

CV II

CV III

D1

D2

Figure 22: Graphical representation of the integration path C = C1 ∪ C2.

the annular region with boundaries C1 and C2. Suppose we look at D as the sum of tworegions D1 and D2 as in Fig. 22 where the boundary of D1 is Ca = CI ∪CII ∪CIII ∪CIV

and the boundary of D2 is Cb = CV ∪ CV I ∪ CV II ∪ CV III . Consider the scalar fieldf(x, y) = ∂xQ− ∂yP with P (x, y) = y3 and Q(x, y) = −x3. Then,

Df(x, y) dA =

D1

f(x, y) dA+

D2

f(x, y) dA.

48

Page 50: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Since the boundaries of the regions D1 and D2 are made of a single closed path and theoriginal vector field has continuous first order partial derivatives everywhere in R

2 wecan apply Green’s theorem to convert each surface integral into a line integral. Hence,we have

Df(x, y) dA =

Ca

F · dr+

Cb

F · dr =

(

CI

+

CII

+

CIII

+

CIV

+

CV

+

CV I

+

CV II

+

CV III

)F · dr.

It is not difficult to verify that the integrals along CIV and CV cancel out. Observe thatCIV is parameterized by r(t) = (t, 0) with t ∈ [1, 2]. The same parameterization can alsobe used for CV having initial point for t = 2 and final point for t = 1. Then, we obtain

CIV

F · dr+

CV

F · dr =

2

1

F(r(t)) · drdt

dt+

1

2

F(r(t)) · drdt

dt =

2

1

F(r(t)) · drdt

dt−

2

1

F(r(t)) · drdt

dt = 0.

A similar reasoning shows that the integrals along CII and CV II vanish. Hence, we have

Df(x, y) dA =

(

CI

+

CIII

+

CV I

+

CV III

)F · dr.

Taking into account that C1 = CI ∪ CV III and C2 = CIII ∪ CV I yields

Df(x, y) dA =

C1

F · dr+

C2

F · dr =

CF · dr.

Now since ∂xQ = −3x2 and ∂yP = 3y3 we have

CF · dr = −3

D(x2 + y2) dA.

Using polar coordinates with r ∈ [1, 2] and ϑ ∈ [0, 2π) together with dA = rdrdϑ we findthat

CF · dr = −3

0

2

1

r3 dr = −6π

2

1

r3 dr = −45

2π.

Remark Now that we know that the Green’s theorem holds also for regions with holes,we do not need to repeat the first part of the above exercise when we solve a similarproblem!

Another interesting application of the Green’s theorem has to do with the computationof the area of a certain region in R

2. Suppose we have a finite region D with boundaryC. Then, its area is given by

A(D) =

DdA, dA = dxdy.

49

Page 51: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Now, let us construct a vector field F(x, y) = (P (x, y), Q(x, y) such that ∂xQ−∂yP = 1.Then, Green’s theorem implies that

D(∂xQ− ∂yP ) dA =

CF · dr

and since ∂xQ− ∂yP = 1 we have

A(D) =

CF · dr.

In other words the area of a finite region can be computed in terms of a line integral of acertain vector field. A question that arises quite naturally is the following: can we find avector field such that its components satisfy the first order partial differential equation∂xQ − ∂yP = 1? The answer is yes and we can even construct more than one vectorfield satisfying the aforementioned equation. For instance, we might choose

1. P (x, y) = 0 and Q(x, y) = x,

2. P (x, y) = −y and Q(x, y) = 0,

3. P (x, y) = −y/2 and Q(x, y) = x/2,

just to mention some elementary choices. Finally, we obtain the following equivalentformulas for the area of the region D, namely

A(D) =

Cx dy = −

Cy dx =

1

2

C(−y dx+ x dy).

Example We want to find the area of the region D inclosed by the ellipse

x2

a2+

y2

b2= 1, a, b > 0.

Let us introduce the parameterization x = a cos ϑ, y = b sinϑ with ϑ ∈ [0, 2π). Then,

A(D) =1

2

C(−y dx+ x dy) =

1

2

0

(−y

dx

dϑ+ x

dy

)dϑ =

ab

2

0

(sin2 ϑ+ cos2 ϑ) dϑ = πab.

Example Let us consider the vector field F : R2\(0, 0) −→ R2 such that

F(x, y) =

(y

x2 + y2,− x

x2 + y2

).

Is this vector field everywhere conservative on the Euclidean space R2? Can we find

regions where this vector field is conservative? Observe that the vector field will not be

50

Page 52: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

everywhere conservative if we can find a closed curve C along which the line integralof the vector field does not vanish. Let us consider for C a unit circle with centre theorigin where the vector field is not continuous. Then, if we take the parameterizationx = cos ϑ and y = sinϑ with ϑ ∈ [0, 2π) we find that

CF · dr =

0

(sinϑ,− cos ϑ) · (− sinϑ, cos ϑ) dϑ = −

0

(sin2 ϑ+ cos2 ϑ) dϑ = −2π.

Hence, the line integral does not vanish and therefore the vector field cannot be every-where conservative. Note that we could not apply the Green’s theorem to compute theline integral since the vector field was not continuous at the origin. Let C be now anyclosed curve not encircling the origin. Then, the vector field will have continuous firstorder partial derivatives in the region whose boundary is the curve C. Hence, we canapply Green’s theorem with

∂xQ =x2 − y2

x2 + y2= ∂yP

and

CF · dr =

D0 dA = 0.

This means that the vector field is conservative when we restrict it to regions not con-taining the origin.

5.2 The curl of a vector field

Definition 5.13 Let F : R3 −→ R3 be a vector field such that

F(x, y, z) = (P (x, y, z), Q(x, y, z), R(x, y, z)),

where the functions P , Q, and R admit continuous first order partial derivatives. Thecurl is a map sending vector fields into vector fields according to the rule

∇× F =

e1 e2 e3∂x ∂y ∂zP Q R

= (∂yR− ∂zQ, ∂zP − ∂xR, ∂xQ− ∂yP ).

What is the physical interpretation of the curl of a vector field? Let us suppose to havea fluid whose velocity field is represented by V(x, y) = (−y, x). The wind chart forthis vector field can be found in Fig. 23. Now imagine that the surface of the fluid isrepresented by the xy-plane and put a small ship on it. The wind chart suggests thatthe ship will start to rotate around the z-axis with angular velocity ω and one couldeven verify experimentally that ω = ∇ × F. In the present case a simple computationshows that

ω = ∇× F =

e1 e2 e3∂x ∂y ∂z−y x 0

= (0, 0, 2).

51

Page 53: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 23: Wind chart of the velocity field V(x, y) = (−y, x).

This means that no matter how far the ship has been placed from the z-axis, it willrotate at a constant angular velocity. Hence, the curl of a velocity field captures thetendency of a fluid to rotate around an axis parallel to the direction of the curl of thevelocity field.

Definition 5.14 A vector field is said to be irrotational if ∇×F = 0.

The most famous example of an irrotational vector field is represented by the magneticfield B because one of Maxwell’s laws of electromagnetism asserts that ∇×B = 0. Thenext results shows an interesting relation between conservative fields and the curl of avector field.

Theorem 5.15 Let F(x, y, z) be a conservative vector field with associated potentialfunction f(x, y, z) having continuous second order partial derivatives. Then,

∇× F = 0.

Proof. Since F conservative we have that F = ∇f . Observe that

∇× F = ∇× (∇f) =

e1 e2 e3∂x ∂y ∂z∂xf ∂yf ∂zf

=

(∂2yzf − ∂2

zyf, ∂2zxf − ∂2

xzf, ∂2xyf − ∂2

yxf) = (0, 0, 0),

where the last step follows from Clairaut’s theorem.

52

Page 54: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Remark The converse of the above theorem is also true but in order to prove it weneed the Stokes theorem that will be introduced in the next chapter.

Example We want to determine if the vector field F(x, y, z) = (x2y, xy,−x2y2) is aconservative vector field. Using the previous theorem we see that the curl of the givenvector field

∇×F =

e1 e2 e3∂x ∂y ∂zx2y xy −x2y2

= (−2x2y, 2xy2, y − x2)

will not vanish in general. Hence, F is not conservative.

We end by noticing that every irrotational conservative field will be conservative andtherefore the magnetic field is also an example of a conservative field.

5.3 The divergence of a vector field

The divergence is a map sending vector fields into scalar fields. More precisely, we havethe following definition

Definition 5.16 Let F(x, y, z) = (P (x, y, z), Q(x, y, z), R(x, y, z)) be a vector field withcontinuous first order partial derivatives. We define the divergence of the vector fieldF to be the scalar field

∇ · F = div(F) = (∂x, ∂y, ∂z) · (P,Q,R) = ∂xP + ∂yQ+ ∂zR.

Example We want to compute the divergence of the vector field

F(x, y, z) = (x2y, xyz,−x2y2).

Applying the above definition we have

∇ · F = ∂x(x2y) + ∂y(xyz) + ∂z(−x2y2) = 2xy + xz.

Theorem 5.17 Let F(x, y, z) = (P (x, y, z), Q(x, y, z), R(x, y, z)) be a vector field withcontinuous second order partial derivatives. Then,

∇ · (∇× F) = 0.

Proof. Observe that

∇ · (∇× F) = ∇ · det

e1 e2 e3∂x ∂y ∂zP Q R

= ∇ · (∂yR− ∂zQ, ∂zP − ∂xR, ∂xQ− ∂yP ) =

∂2xyR− ∂2

xzQ+ ∂2yzP − ∂2

yxR+ ∂2zxQ− ∂2

zyP =

∂2xyR− ∂2

yxR+ ∂2zxQ− ∂2

xzQ+ ∂2yzP − ∂2

zyP = 0,

where in the last line we applied Clairaut’s theorem.

53

Page 55: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Remark The identity proved in the previous theorem has an important applicationin Electromagnetism. Let B denote the magnetic field. Then, one of Maxwell’s lawtells that ∇ ·B = 0 which is equivalent to say that no magnetic monopoles exist. Thevanishing of the divergence of the magnetic field signalizes that B can be written as thecurl of another vector field A, called the vector potential, that is B = ∇ × A. Theelectric field E is instead expressed in terms of the electric potential φ and the vectorpotential as follows

E = −∇φ− ∂tA.

In the study of heat problem, fluid flows and electrostatic one has often to solve theso-called Laplace equation

∆f = 0, ∆ = ∂2xx + ∂2

yy + ∂2zz

with f = f(x, y, z). It is interesting to observe that the divergence and gradient operatorsallow to write the Laplace operator ∆ in a very compact form as follows

div(gradf) = (∂x, ∂y, ∂z) · (∂xf, ∂yf, ∂zf) = ∂2xxf + ∂2

yyf + ∂2zzf.

Hence, the Laplace equation can be cast into the form div(gradf) = 0. Let us investigatethe physical interpretation of the divergence. Suppose thatV is the velocity field of somefluid. We consider the following cases.

1. Let V = (x, 0). Then, the corresponding wind chart is given by Fig 24. In this

Figure 24: Wind chart of the velocity field V(x, y) = (x, 0).

54

Page 56: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

case ∇ ·V = 1, that is the divergence of the velocity field is positive and from thewind chart we see that the divergence of the velocity field describes the tendencyof the fluid to escape or to diverge from a certain region of the plane described bythe axis x = 0.

2. Let V = (−x, 0). Then, the corresponding wind chart is given by Fig 26. In this

Figure 25: Wind chart of the velocity field V(x, y) = (−x, 0).

case ∇·V = −1, that is the divergence of the velocity field is negative and from thewind chart we see that the divergence of the velocity field describes the tendencyof the fluid to pile up in a certain region of the plane described by the axis x = 0.

3. Let V = (0, x). Then, the corresponding wind chart is given by Fig 26. In thiscase ∇ ·V = 0, and as we can see the fluid is neither contracting nor escaping.

55

Page 57: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

Figure 26: Wind chart of the velocity field V(x, y) = (0, x).

6 Problems to Section 5

Exercise 6.1 Find the gradient of the scalar field f(x, y, z) = xyz and evaluate it at thepoint (1, 2, 3). Hence, find the directional derivative of f at this point in the direction ofthe vector (1, 1, 0). Answer: (∇f)(1, 2, 3) = (6, 3, 2) and (Duf)(1, 2, 3) = 9/

√2.

Exercise 6.2 Find the unit normal vector to the surface y = x+z3 at the point (1, 2, 1).Answer: n = (−1/

√11, 1/

√11,−3/

√11).

Exercise 6.3 Find and classify all critical points for the function f(x, y) = 3x2y+y3−3x2 − 3y2 + 2. Answer: (0, 0) relative maximum, (0, 2) relative minimum, (1, 1) and(−1, 1) saddle points.

Exercise 6.4 Find the absolute maximum and minimum of the function f(x, y) = 2x2−y2+6y on the bounded and closed region D represented by the disk x2+y2 ≤ 16. Answer:absolute minimum at (0,−4) and absolute maxima at (±

√15, 1).

Exercise 6.5 Is the vector field F(x, y, z) = (y, x + z, y) conservative? Motivate youranswer!

Exercise 6.6 Evaluate the line integral of F(x, y) = (xy, x2y3) where C is the boundaryof the triangle with vertices (0, 0), (1, 0), and (1, 2). Answer: 2/3.

Exercise 6.7 Use Green’s theorem to find the area of a disk of radius a.

56

Page 58: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

7 Some integral theorems

This section is devoted to the Stokes and the Divergence Theorem and their applications.

7.1 The Stokes theorem

The Stokes theorem can be seen as a higher dimensional version of the Green’s theorem.

Theorem 7.1 (Stokes Theorem)Let C be a simple closed path followed in the counterclockwise direction and S be a smoothsurface whose boundary curve is represented by C. Further suppose that n is the normalvector to S pointing outwards. Then,

CF · dr =

S(∇× F) · n dS.

Note that Stokes theorem reduces to the Green’s theorem when F = (P (x, y), Q(x, y), 0)and n = e3. In this case S is the surface enclosed by the curve C.

Example We want to use Stokes theorem to evaluate

S(∇× F) · n dS,

where F(x, y, z) = (z2,−3xy, x3y3) and S is the part of the paraboloid of revolutionz = 5 − x2 − y2 above the plane z = 1. The boundary curve C is represented by thecircle x2 + y2 = 1 located at the height z = 1. We can parameterize C according tor(t) = (2 cos t, 2 sin t, 1) with t ∈ [0, 2π). Then,

S(∇× F) · n dS =

CF · dr =

0

F(r(t)) · drdt

dt =

=

0

(1,−12 sin t cos t, 64 sin3 t cos3 t) · (−2 sin t, 2 cos t, 0) dt =

−2

0

(sin t+ 12 sin t cos2 t) dt = 0.

Example We want to verify Stokes theorem by evaluating both the line and surfaceintegrals for the vector field F(x, y, z) = (2x−y,−y2,−y2z) where the surface S is givenby the disk x2 + y2 ≤ 1 located on the plane z = 0. We have to verify that

CF · dr =

S(∇× F) · n dS.

Concerning the line integral we can parameterize the boundary of the disk by means ofthe vector-valued function r(t) = (cos t, sin t, 0) with t ∈ [0, 2π). Then,

CF · dr =

0

F(r(t)) · drdt

dt ==

0

(2 cos t− sin t,− sin2 t, 0) · (− sin t, cos t, 0) dt =

57

Page 59: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

=

0

(−2 sin t cos t+ sin2 t− sin2 t cos t) dt = π.

On the other side we also have

∇× F = det

e1 e2 e3∂x ∂y ∂z

2x− y −y2 −y2z

= (−2yz, 0, 1)

and as a normal vector to the surface of the disk we can take n = e3 = (0, 0, 1). Hence,(∇× F) · e3 = 1 and

S(∇× F) · n dS =

x2+y2≤1

dS = π.

Example We want to use Stokes theorem to evaluate the line integral

C F · dr whereF(x, y, z) = (z2, y2, x) and C is the boundary curve of the triangular region with ver-tices at (1, 0, 0), (0, 1, 0), and (0, 0, 1). Hence, we have to compute the surface integral

S(∇× F) · n dS where ∇× F = (0, 2z − 1, 0). To compute the normal vector to thetriangular surface we need to find the equation of the plane passing through the points(1, 0, 0), (0, 1, 0), and (0, 0, 1). Taking into the account that the general equation of aplane is Ax+By+Cz = D and that our plane does not pass through the origin, it mustbe D 6= 0 and therefore we can rewrite the equation of the plane as

(A

D

)x+

(B

D

)y +

(C

D

)z = 1.

If we require that this plane passes through the points (1, 0, 0), (0, 1, 0), and (0, 0, 1), weobtain

A

D=

B

D=

C

D= 1

and the equation of the plane is x + y + z = 1 from which we immediately read thenormal vector n = (1, 1, 1). Hence, (∇×F) ·n = 2z− 1. Remember that to perform thesurface integral the scalar field 2z− 1 must be evaluate on the plane x+ y+ z = 1 wherez = 1− (x+ y). Hence, we have to integrate the scalar field 2z(x, y) − 1 = 1− 2(x+ y)over the shade D of the surface S on the (x, y)-plane. Taking into account that the planeintersects the (x, y)-plane along the line y = −x+ 1 we conclude that

D = (x, y) ∈ R2 | x ∈ [0, 1] and y ∈ [0,−x+ 1].

Hence,

S(∇× F) · n dS =

1

0

dx

−x+1

0

dy (1− 2x− 2y) = −1

6

and by Stokes theorem we conclude that

CF · dr = −1

6.

58

Page 60: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

7.2 The Divergence theorem

This theorem relates the flux of a vector field or equivalently the surface integral of avector field with the volume integral of a certain scalar field. It finds several applicationstogether with the Stokes theorem in the theory of electromagnetism and fluid dynamics.

Theorem 7.2 (Divergence theorem)Let E be a solid region and S the boundary surface of E with normal vector pointingoutwards. If F is a vector field with continuous first order partial derivatives, then

Æ

S

F · n dS =

E∇ · F dV.

Example We want to use the divergence theorem to evaluate the surface integral

S

F ·

n dS where F(x, y, z) = (xy,−y2/2, z) and S consists of the surfaces

1. S1 represented by the paraboloid of revolution z = 4− 3x2 − 3y2 with z ∈ [1, 4],

2. S2 is the surface of the cylinder x2 + y2 = 1 with z ∈ [0, 1],

3. S3 is the disk x2 + y2 ≤ 1 located on the plane z = 0.

It is not difficult to verify that ∇ · F = 1 and the Divergence theorem implies thatÆ

S

F · n dS =

EdV.

At this point the problem reduces to the computation of the volume of the solid regionE enclosed by the closed surface S. This volume can be seen as the sum of the volumeof a cylinder of radius one and unit height and the volume of the region E1 enclosedby the surface of the paraboloid of revolution. The volume of the cylindrical region issimply π(1)21 = π. To compute the volume of E1 we introduce cylindrical coordinates(r, ϑ, z) such that x = r cos ϑ, y = r sinϑ, z ∈ [1, 4 − 3r2], r ∈ [0, 1], and ϑ ∈ [0, 2π).Then, taking into account that dV = rdrdϑdz we have

E1

dV =

0

1

0

dr r

4−3r2

1

dz = 3

0

1

0

dr r(1− r2) =3π

2.

We conclude thatÆ

S

F · n dS = π +3π

2=

2.

Example We want to use the divergence theorem to compute the surface integral

S

F ·

n dS where F(x, y, z) = (x+y, z2, x2), S is the surface of the hemisphere x2+y2+z2 = 1with z > 0 and n is the outward pointing normal vector. In this case the surface S is

59

Page 61: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

not closed and therefore to apply the divergence theorem we need to close the surfaceS by considering for example the surface S

represented by the disk x2 + y2 ≤ 1 on theplane z = 0. Then,

Æ

S∪S′

F · n dΣ =

E∇ · F dV

and therefore the flux of our vector field through S is

Æ

S

F · n dS =

E∇ · F dV −

Æ

S′

F · n dS′

.

Taking into account that ∇ · F = 1 the volume integral reduces to the volume of half-sphere of radius one and it will be given by

EdV =

3.

Hence,Æ

S

F · n dS =2π

3−Æ

S′

F · n dS′

.

To compute the flux of F through the disk S′

we can take as normal vector the vectorn = (0, 0,−1). Then, F · n = −x2. Introducing polar coordinates we find that

Æ

S′

F · n dS′

= −Æ

S′

x2 dS′

= −

0

dϑ cos2 ϑ

1

0

dr r3 = −π

4.

Finally, we conclude that

Æ

S

F · n dS =2π

3+

π

4=

11

12π.

8 Applications

8.1 Electromagnetism

Example Let E denote the electric field and S be a closed smooth surface with outwardspointing normal vector n. Then, the flux of E across S will be

S

E · n dS and Gauss’

law states that the total charge Q inside S is

Q = ǫ0

Æ

S

E · n dS

60

Page 62: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

where ǫ0 is the dielectric constant. We want to find the total charge inside the hemisphereE represented by x2 + y2 + z2 ≤ R with z ≥ 0 if E(x, y, z) = (x, y, 2z). By applying thedivergence theorem and taking into account that ∇ ·E = 4 we find that

Q = ǫ0

Æ

S

E · n dS = ǫ0

E∇ ·E dV = 4ǫ0

EdV =

8

3πǫ0R

3.

Example Suppose that E is a constant electric field. We want to show that its fluxthrough any closed surface S vanishes. Let E = (a1, a2, a3) with constants ai ∈ R for alli = 1, 2, 3. Then, ∇ · E = 0 and the divergence theorem implies that

Æ

S

E · n dS =

E∇ ·E dV =

E0 dV = 0.

Example Let c denote the speed of light. Maxwell’s equations

∇ ·E = 0, ∇ ·B = 0, ∇×E = −1

c∂tB, ∇×B =

1

c∂tE

describe how the electric and magnetic fields E and B vary in time and space in somesolid region containing no charges and no currents. Further suppose that E and B havecontinuous second order partial derivatives. We want to show that these fields satisfythe wave equations

∆E− 1

c2∂ttE = 0, ∆B− 1

c2∂ttB = 0

and find the corresponding solutions. Using the following identity

∇× (∇× F) = grad(divF)−∆F

where F is an arbitrary vector field whose second order partial derivatives exist, and theMaxwell’s equations we find that

∇× (∇×E) = grad(divE)−∆E = grad(div0)−∆E = −∆E,

∇× (∇×E) = −1

c∇× ∂tB = −1

c∂t∇×B = −1

c∂t

(1

c∂tE

)= − 1

c2∂ttE.

Hence, we have

∆E− 1

c2∂ttE = 0.

Similarly, we have for the magnetic field

∇× (∇×B) = grad(divB)−∆B = grad(div0)−∆B = −∆B,

∇× (∇×B) =1

c∇× ∂tE =

1

c∂t∇×E =

1

c∂t

(−1

c∂tB

)= − 1

c2∂ttB.

Hence, we have

∆B− 1

c2∂ttB = 0.

61

Page 63: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

To find a solution of the wave equation governing the electric field we try the guess

E(t, r) = E0 cos (k · r− ωt),

where r = (x, y, z), k = (kx, ky, kz) is the wave number vector and ω the frequency ofthe wave. Note that the argument of the cosine function must be adimensional. Thiswill be the case if the dimensions of the frequency and the wave number vector are

[ω] =1

T, [k] =

1

L.

Since

∆E = E0(∂xx+∂yy+∂zz) cos (kxx+ kyy + kzz − ωt) = E0(−k2x−k2y−k2z) cos (k · r− ωt)

= −|k|2Eand

1

c2∂ttE =

E0

c2∂tt cos (k · r− ωt) = −ω2

c2E,

we discover that our original guess will be a solution of the wave equation if the frequencyand the wave number vector satisfy the condition

|k|2 − ω2

c2= 0

which is called the dispersion relation of an electromagnetic wave in the vacuum. Asimilar treatment can be applied to derive a solution representing the magnetic field.

Example Suppose that E is an electric field satisfying the equation ∇·E = 0. We wantto find a solution of this equation by using the guess

E = kr

|r|p , r = (x, y, z)

with k and p real numbers. Taking into account that |r| =√

x2 + y2 + z2 we can rewritethe electric field as

E =

(kx

(x2 + y2 + z2)p/2,

ky

(x2 + y2 + z2)p/2,

kz

(x2 + y2 + z2)p/2

).

Since

∂x

(kx

(x2 + y2 + z2)p/2

)=

k

(x2 + y2 + z2)p/2− kpx2

(x2 + y2 + z2)p/2+1,

∂y

(ky

(x2 + y2 + z2)p/2

)=

k

(x2 + y2 + z2)p/2− kpy2

(x2 + y2 + z2)p/2+1,

∂z

(kz

(x2 + y2 + z2)p/2

)=

k

(x2 + y2 + z2)p/2− kpz2

(x2 + y2 + z2)p/2+1,

we conclude that

∇ · E =3k

|r|p − kp(x2 + y2 + z2)

(x2 + y2 + z2)p/2+1= k

3− p

|r|p .

Hence, our guess will satisfy the equation ∇ · E = 0 whenever p = 3.

62

Page 64: Lecture Notes Multivariable Calculus · Lecture Notes Multivariable Calculus II ... in a structured form and with the hope of reducing the ... circles appearing in Fig. 2 are the

References

[1] P. C. Matthews, Vector Calculus, Springer Verlag (2005)

[2] J. Stewart, Calculus: Early Transcendentals, Brooks and Cole Publishers (1999)

63