<<

Vector Math  Course Notes

Cary Ross Humber

November ,  Humber ma  course notes

ii Preface

iii Humber ma  course notes

iv Contents

Preface iii

 Linear Algebra Primer   Vectors......  §.. Vector Operations......  §.. Some Geometric Concepts......  §.. Linear Independence, Bases, other definitions......  §.. Projection......   A little about matrices......  §.. Determinant Formulas......  §.. Determinant Geometry......  §.. Cross product, triple product......  §.. Lines and Planes...... 

 Multivariable functions  §.. Level Sets......  §.. Sections......   ......  §.. What’s wrong with partial derivatives?......  §.. Directional derivatives...... 

v Humber ma  course notes

 Tangent vectors and planes......  §.. Surfaces in R3 ......   Coordinates......   Parametric Curves......   Parametric surfaces......   Practice problems...... 

 Exterior Forms   Constant Forms......  §.. 1-Forms......   2-Forms......  §.. Wedge (Exterior) product......   k-forms......  §.. Wedge product again......   Vector fields...... 

 Differential forms......  §.. Exterior ......  §.. Pullbacks/Change of coordinates......   Practice problems...... 

 Integration and the fundamental correspondence   The correspondence between vector fields and differential forms......   Flux ......  §.. Line integrals and work......  §.. Orientations......  §.. Integration of 3-forms......   Practice problems...... 

vi Humber ma  course notes

 Stokes’ Theorem   Surfaces with boundary......   The generalized Stokes’ Theorem......  §.. Stokes’ Theorem for 1-surfaces......  §.. Stokes’ Theorem for 2-surfaces......  §.. Stokes’ Theorem for 3-surfaces...... 

A Coordinate representations 

B Some applications of differential forms and   Extreme values......  §.. Constrained Extrema......   Maxwell’s equations...... 

vii Humber ma  course notes

viii Chapter 

Linear Algebra Primer

§ Vectors

The majority of our calculus will take place in -dimensional and -dimensional space. Occasionally, we may work in higher dimensions. For our purposes, a vector is like a point in space, along with a direction. Other information, such as magnitude or length of a vector, can be determined from this point and direction. We visualize a vector as an arrow emanating from the origin, which we often denote as O, and ending at this point. The space (so called vector space)

R2 = (x ,x ) x ,x R { 1 2 | 1 2 ∈ } consists of pairs of real numbers. Such a pair, which we often denote by a single letter (bold, hatted, arrow on top), is a vector in R2. The convention taken for these notes is to denote vectors by bold letters. It is typical to express a vector x in column form

x x = 1 x2 ! on a chalkboard/whiteboard, or whenever space is not a concern. Whenever space is at a premium, it is just as typical to denote the same vector x in row form x = (x1,x2). The space R3 consists of 3-tuples of real numbers, or real 3-component vectors. Just as with R2, we can express R3 as the set

R3 = (x ,x ,x ) x ,x ,x R . { 1 2 3 | 1 2 3 ∈ } Each vector x R3 consists of three components, each of which is a real number. ∈  Humber ma  course notes

In general, the space Rn consists of n-tuples of real numbers, or real n-component vectors, Rn = (x ,...,x ) x R,j = 1,...,n . { 1 n | j ∈ } The higher the dimension, the more space is preserved by using row form x = (x1,...,xn).

§.. Vector Operations

There are two basic vector operations, that of vector addition and scalar multiplication. Both operations are defined component-wise. Given two vectors a,b Rn with component ∈ forms a = (a1,a2,...,an) and b = (b1,b2,...,bn), the vector sum a + b is the vector obtained by adding the components of a to those of b,

a + b = (a1 + b1,a2 + b2,...,an + bn). Similarly, if α R is a scalar, the scalar multiple αa is obtained by multiplying each ∈ component of a by α, αa = (αa1,αa2,...,αan). In what follows, whether we are discussing R2,R3 or Rn, in general, we denote the zero vector by 0, which is simply the vector with 0 in every component. With respect to vector addition and scalar multiplication, the following conditions are satisfied for all α,β R ∈ and a,b,c Rn ∈ V1) a + b = b + a V2) (a + b) + c = a + (b + c) V3) a + 0 = a V4) a + ( a) = 0 − V5) 1a = a V6) α(βa) = (αβ)a V7) (α + β)a = αa + βa V8) α(a + b) = αa + αb.

Example . Let a = (2,1) and b = ( 3,4). Then, − a + b = (2 3,1 + 4) = ( 1,5). − − The vector a + b is the diagonal of the parallelogram with sides a and b as depicted in Figure .. ȴ

 Humber ma  course notes

y a + b b

a

x

Figure .: The vector a + b is the diagonal of the parallelogram with sides a,b.

§.. Some Geometric Concepts

Rn Given two vectors x = (x1,...,xn) and y = (y1,...,yn) in , we define their inner product by n x,y = x y . h i j j Xj=1 The term inner product is synonymous with scalar product. If we input two vectors, the output is a scalar (real number). This particular inner product is often called the dot product in vector calculus texts. So, the same formula may be denoted

k x y = x y . · j j Xj=1 Soon, we will see what the inner product tells us about the geometric relationship between two (or more) vectors. Another important scalar quantity is the length or magnitude of a vector. This is a scalar associated with a single vector, whereas the inner product is a scalar associated with two vectors. However, these quantities are related. The norm (in particular, Euclidean norm)

 Humber ma  course notes

of the vector x Rn is 1 ∈ n /2 1/2 2 x = x,x = xj . k k h i   Xj=1    2   In other words, the quantity x is the inner product  of x with itself. Geometrically, the norm x represents the lengthk k of x. k k The Cauchy-Schwarz inequality gives another relationship between the norm and inner product, namely a,b a b (.) |h i| ≤ k kk k for any a,b Rn. Though simple, the Cauchy-Schwarz inequality is very powerful. Another powerful∈ inequality is the triangle inequality

a b a b a + b . (.) k k − k k ≤ k ± k ≤ k k k k

Theorem . (Properties of the inner product) . Let α,β be real numbers and let a,b,c Rn. ∈

. αa,b = α a,b h i h i . a,βb = β a,b h i h i . a + b,c = a,c + b,c h i h i h i . a,b + c = a,b + a,c h i h i h i

These properties highlight why it is often preferrable to work with inner products, rather than norms. With inner products, scalars factor out of both arguments. In contrast, the analogous property for norms is

αa = α a , k k | |k k only the absolute value factors out, in general. Since inner products have nicer properties, whenever it makes sense to do so, we will often square norms so that they become inner products.

Definition .. A vector a Rn is called a unit vector if a = 1. From any vector b Rn ∈ k k ∈ we can obtain a unit vector by normalizing it. The vector u = b/ b has norm 1. k k

2 Let a = (a1,a2),b = (b1,b2) be two vectors in R . We want to determine an expression for the angle, ϕ, between the vectors a and b. Let ϕa,ϕb be the angles between the positive x-axis (e1-axis) and a,b, respectively. To each vector there corresonds a right triangle,

 Humber ma  course notes

y a b

a2 b2 ϕ ϕa ϕb x a1 b1

Figure .: The angle ϕ between a and b

whose side lengths correspond to the components of the vector and hypotenuse is the norm, as depicted in Figure .. This gives the following trigonometric relations

a b sinϕ = 2 , sinϕ = 2 a a b b k k k k a b cosϕ = 1 , cosϕ = 1 a a b b k k k k a2 b2 tanϕa = , tanϕb = . a1 b2

If ϕ is the angle between a and b, then ϕ = ϕ ϕ . Thus, a − b cosϕ = cos(ϕ cosϕ ) = cosϕ cosϕ + sinϕ sinϕ a − b a b a b a b a b = 1 1 + 2 2 a b a b k k k k k k k k a b + a b = 1 1 2 2 , a b k kk k where the numerator in the last expression is a,b . Note that this analysis holds in h i higher dimensions, as well. Thus, the angle ϕ between vectors a,b Rn is determined by ∈ a,b cosϕ = h i , (.) a b k kk k where ϕ (0,π). We can just as well let ϕ be in the closed interval [0,π], which includes ∈ the possibility that a,b lie on the same line. If the angle between a and b is 0 or π, a and b are called parallel.

 Humber ma  course notes

Proof of Cauchy-Schwarz inequality. The Cauchy-Schwarz inequality is a direct consequence of the cosine identity (.). By (.), for vectors a,b Rn we have ∈ a,b cosϕ = h i . a b k kk k Since 1 cosϕ 1, this yields − ≤ ≤ a,b 1 h i 1, − ≤ a b ≤ k kk k hence a b a,b a b −k kk k ≤ h i ≤ k kk k which is equivalent to a,b a b . |h i| ≤ k kk k

Definition .. Two vectors a,b Rn are called orthogonal (or perpendicular) if ∈ a,b = 0. Note that, in this case, by (.) h i a,b π cosϕ = h i = 0 = ϕ = . a b ⇒ 2 k kk k If a and b are orthogonal, we denote this by a b. ⊥

Example . Let’s compute the angle ϕ between a = (1,1) and

1 √3 1 √3 b = + , + . −2 2 2 2 ! We have norms a = √12 + 12 = √2 k k and

2 2 1 √3 1 √3 b = + + + k k s −2 2 2 2 ! ! 1 √3 3 1 √3 3 = + + + + 4 − 2 4 4 2 4 s ! ! = √2.

The inner product is 1 √3 1 √3 a,b = 1 + + 1 + = √3. h i −2 2 2 2 ! !  Humber ma  course notes

Thus, the angle ϕ between a and b is determined by

a,b √3 √3 cosϕ = h i = = . a b √2√2 2 k kk k π ȴ Keeping in mind that ϕ must be in the interval (0,π), we have ϕ = 6 .

Proposition . (Parallelogram Law).

a + b 2 + a b 2 = 2 a 2 + 2 b 2 (.) k k k − k k k k k Proof. We will give a proof of the parallelogram law using the law of cosines. For a triangle with angles A,B,C with opposing sides of length a,b,c, respectively, such as the triangle depicted in Figure ., the law of cosines states

a2 = b2 + c2 2bc cosA − b2 = a2 + c2 2ac cosB (.) − c2 = a2 + b2 2ab cosC. −

The geometric relationship between the vectors a,b,a + b and a b is depicted in Figure .. − First, let ϕ denote the angle between a and a + b. By (.),

a,a + b cosϕ = h i . (.) a a + b k kk k By the law of cosines, we have

b 2 = a 2 + a + b 2 2 a a + b cosϕ k k k k k k − k kk k a,a + b = a 2 + a + b 2 2 a a + b h i k k k k − k kk k a a + b k kk k! = a 2 + a + b 2 2 a,a + b k k k k − h i = a 2 + a + b 2 2( a 2 + a,b ). (.) k k k k − k k h i Thus, we have a 2 + b 2 = a + b 2 2 a,b . (.) k k k k k k − h i Now, let θ denote the angle between a and b. By (.), a,b cosθ = h i . (.) a b k kk k  Humber ma  course notes

B a c C

A b

Figure .: Relationship between A,B,C and a,b,c for the law of cosines.

a + b

a b b −

a

Figure .: The parallelogram generated by a,b with diagonals a + b and a b. −

By the law of cosines, we have

a b 2 = a 2 + b 2 2 a b cosθ k − k k k k k − k kk k a,b = a 2 + b 2 2 a b h i k k k k − k kk k a b k kk k! = a 2 + b 2 2 a,b . (.) k k k k − h i Thus, we have a 2 + b 2 = a b 2 + 2 a,b . (.) k k k k k − k h i Adding equation (.) and (.) we arrive at the parallelogram law

2 a 2 + 2 b 2 = a + b 2 + a b 2. k k k k k k k − k

Proposition .. The vectors a,b are orthogonal if and only if

a + b 2 = a 2 + b 2. k k k k k k  Humber ma  course notes

Proof. By the parallelogram law (.)

a + b 2 + a b 2 = 2 a 2 + 2 b 2. k k k − k k k k k If a,b are orthogonal a,b = 0. If we expand the term a b 2 in terms of inner products, we have h i k − k

a b 2 = a b,a b k − k h − − i = a,a b b,a b h − i − h − i = a,a a,b b,a + b,b h i − h i − h i h i = a 2 + b 2, k k k k since a,b = 0 = b,a . Since a b 2 = a 2 + b 2, the parallelogram law reduces to h i h i k − k k k k k a + b 2 = a 2 + b 2. k k k k k k

§.. Linear Independence, Bases, other definitions

Definitions.

Rn ..) Given a collection of vectors v1,...,vk in , a linear combination of these vectors is an expression of the form{ }

k α v = α v + + α v , j j 1 1 ··· k k Xj=1 where α R for j = 1,...,k. j ∈

..) A collection of vectors v ,...,v in Rn is called linearly independent if { 1 k} k αjvj = 0 implies α1 = ... = αk = 0. Xj=1 Otherwise, the collection is called linearly dependent. Geometrically, any two vectors are linearly independent if they do not lie on the same line. Suppose a,b Rn are ∈ linearly dependent. This means that we can find α,β R which are not both 0 such that ∈ αa + βb = 0. Then, by rearranging the previous equality, β a = b, −α  Humber ma  course notes

or, equivalently, α b = b. − β Thus, the vectors a,b are scalar multiples of each other, so they lie on the same line.

..) The span of v ,...,v in Rn is the set of all linear combinations of v ,...,v , { 1 k} { 1 k} span v ,...,v = α v + + α v α R,j = 1,...,k . { 1 k} { 1 1 ··· k k | j ∈ } We say Rn (or a subspace of Rn; see below) is spanned by v ,...,v if any vector x Rn { 1 k} ∈ can be expressed as a linear combination of v1,...,vk; that is,

k x = αjvj Xj=1 for some scalars α ,...,α R. 1 k ∈ The span of a single vector a Rn is simply the (infinite) line on which a lies. Since ∈ span a = αa α R is the set of all scalar multiples of a and scalar multiples of a vector lie on{ the} { same| line.∈ } Let’s look at the span of two linearly independent vectors. First, why do we want them to be linearly independent? Well, if we take two linearly dependent vectors, they lie on the same line. That is, if a,b Rn are linearly dependent, then ∈ span a,b = span a = span b . { } { } { } Geometrically, we do not gain any new information by considering a linearly dependent collection. Now, if a,b Rn are linearly independent, then span a,b generates a plane. ∈ { }

..)A basis for Rn is a collection of linearly independent vectors that span Rn. In Rn Rn other words, a collection of vectors v1,v2,...,vn is a basis for if every vector a is uniquely expressible as a linear combination{ of the} basis vectors. This means, given∈ any vector a Rn we can find unique scalars α ,α ,...,α such that ∈ 1 2 n a = α v + α v + + α v . (.) 1 1 2 2 ··· n n

In this case, the scalars (α1,α2,...,αn) are called the coordinates of a relative to the basis v ,...,v (or simply coordinates). { 1 n} It is a basic theorem of linear algebra that any basis for Rn consists of exactly n vectors. We often deal with the canonical basis e ,...,e , where e Rn has a 1 in the j-th { 1 n} j ∈ component and 0 in all other components. For R2, this is e ,e where e = (1,0) and { 1 2} 1  Humber ma  course notes

e = (0,1). For R3, the canonical basis is e ,e ,e , where e = (1,0,0), e = (0,1,0) and 2 { 1 2 3} 1 2 e = (0,0,1). The canonical basis e ,e ,e consists of unit vectors directed along the x,y 3 { 1 2 3} and z axes, respectively. The notation i,j,k for the canonical basis of R3 (in that order) is quite common in vector calculus texts,{ as} well as other texts that rely heavily on vector calculus (e.g. electrodynamics and other physics texts).

..) A collection of vectors v ,...,v in Rn is called orthonormal if v ,v = 0 for { 1 k} h i ji i , j and v ,v = v 2 = 1 for all j = 1, ,k. Equivalently, this collection is orthonormal h j ji k jk ··· if v ,v = δ , where h i ji ij 1, i = j δ = ij 0, i , j. ( In other words, an orthonormal collection is a collection of mutually orthogonal unit vectors. The canonical bases for R2 and R3 are both orthonormal.

Rn To any collection v1,...,vk of vectors in there is an associated n k matrix whose columns are the vectors{ } × A = v v v . 1 2 ··· k For instance, the canonical basis e ,e,e for R3 corresonds to the matrix { 1 2 3} 1 0 0 A = e1 e2 e3 = 0 1 0 . 0 0 1           Given this correspondence, numerous statements about collections of vectors can be translated into statements about the corresponding matrix (and vice versa). Rn Rn n Theorem .. Let v1,...,vn be a collection of vectors in . Let A × be the matrix associated with this{ collection} ∈ A = v v . 1 ··· n The following statements are equivalent.  

. The collection v ,...,v is a basis for Rn. { 1 n} . The matrix A is invertible.

. det(A) , 0 . For any b Rn, the nonhomogeneous system Ax = b has a solution. Moreover, the solution x∈ Rn is unique. ∈ . The homogeneous system Ax = 0 has only the trivial solution x = 0.

 Humber ma  course notes

§.. Projection

Suppose a,b R3 are linearly independent (hence, not on the same line). Since a,b are linearly independent,∈ they span (or generate) a plane in R3. Let

M = span a,b = αa + βb α,β R { } { | ∈ } denote this plane. By definition, a,b is a basis for M (the vectors are lin early { } independent and span M); however, as we will see, it is often convenient to have an orthonormal basis. Another linear algebra fact, that we will not cover in detail at this point, is that we can always determine an orthonormal basis. Let v ,v be an { 1 2} orthonormal basis for M, where v = b/ b . At this point, we do not need to know what v 1 k k 2 is; we can use the fact the v ,v is orthonormal to determine v ! Since v ,v is a basis { 1 2} 2 { 1 2} for M a = α1v1 + α2v2, (.) for some α ,α R. First, take the inner product of the previous equation ( both sides) 1 2 ∈ with v1. Then,

a,v = α v ,v + α v ,v (.) h 1i 1h 1 1i 1h 2 1i = α1, (.) which follows since v is a unit vector ( v = 1) and v ,v are orthogonal to each other 1 k 1k 1 2 ( v ,v = 0). Similarly, if we take the inner product of (.) with v , we have h 1 2i 2 a,v = α v ,v + α v ,v (.) h 2i 1h 1 2i 2h 2 2i = α2, (.) which also follows by the orthonormality of v ,v . Now, if we go back to the equation { 1 2} a = α1v1 + α2v2, we know the values of the scalars α1,α2 and the vector v1. We can now solve for v2. But first, let’s rewrite α1 as

b a,b α = a,v = a, = h i. 1 h 1i h b i b k k k k

Then, solving for v2, we have

1 α1 a α1v1 v2 = a v1 = − (.) α2 − α2 α2 a,b b a h b i b = − k k k k (.) a,b b a h b,bi k − h i k

 Humber ma  course notes

We have done several things here. First of all, we have determined formulae for an orthonormal basis of the plane spanned by a,b , namely { } a,b b b a h b i b v = , v = − k k k k . 1 b 2 a,b b a h b,bi k k k − h i k

Secondly, α1 is the component of the vector a parallel to the vector b, while a,b α v = h i b (.) 1 1 b,b h i is the orthogonal projection of a onto b. The orthogonal projection of a onto b may be denoted projb a.

Example . Let a = (1,1) and b = (2,1). We have

a,b = 1 2 + 1 1 = 3 h i · · and b,b = 2 2 + 1 1 = 5. h i · · So the projection of a onto b is

a,b 3 6 3 h i b = (2,1) = , , b,b 5 5 5 h i   as depicted in Figure .. ȴ

The projection of one vector onto another yields another geometric interpretation of the inner product, as depicted in Figure .. It is straightforward to verify that

a,b = proj a b (.) h i k b kk k = proj b a . (.) k a kk k

§ A little about matrices

Although we will not cover the details (yet), at first glance a matrix may seem a mere “bookkeeping” strategy, yet matrices are much more. At this point, it is perfectly acceptable to think of a matrix as a collection of numbers, organized by rows and

 Humber ma  course notes

y

a b

projb a

x

Figure .: The orthogonal projection of a onto b.

y

b

`

a

x

Figure .: The inner product a,b equals ` times the length of b. The length ` is pre- cisely proj a . h i k b k columns (as with a spreadsheet). As with vectors, we denote a matrix by a single letter,

 Humber ma  course notes

often a capital letter. For instance, 2 3 − A = 7 1 0 4  −    is what we call a real 3 2 matrix; real since each entry is a real number and 3 2 to ×   × denote that A has 3 rows and 2 columns. A real m n matrix has m rows and n columns. × We denote the (vector) space of all real m n matrices by Rm n. When speaking of an × × arbitrary (non-specific) matrix A, we denote the corresponding entries by the lower case counterpart with indices. For instance, if A Rm n, we may express this in the form ∈ × a a a a 11 12 13 ··· 1n a21 a22 a23 a2n A =  . . . ··· . .  . . . .   ···  a a a a   m1 m2 m3 mn  ···    That is, the entry in the ith row and jth column is denoted by aij. So, the first index is for the row and the second index for the column. If we wish to be more concise, we may write A = (aij)i=1,...,m. A matrix is called square if it has an equal number of columns and j=1,...,n rows.

§.. Determinant Formulas

As with vectors, we would like to associate to any given matrix a scalar which tells us something about the matrix. For vectors, we have norms and inner products which yield information in the form of a scalar number. We can, in fact, define norms and inner products for matrices, but these do not suffice for our purposes. What we need is the determinant of a square matrix. The determinant of a square matrix tells us when a matrix is invertible or not (see the discussion in the previous section). More importantly for our purposes, the determinant yields useful geometric information. Arguably, the determinant of a square 2 2 matrix is the most important, as the formula for larger matrices relies on the 2 2× case. So, we’ll start with 2 2. An arbitrary real 2 2 matrix takes the form × × × a b A = , c d ! where a,b,c,d R. In this case, the determinant of A, denoted det(A) is ∈ det(A) = ad bc. (.) − For example, if 2 3 A = , 1− 7 !  Humber ma  course notes

then det(A) = 2(7) ( 3)1 = 17. − − Now, suppose A R3 3 is the matrix ∈ × a11 a12 a13 A = a21 a22 a23 . a a a   31 32 33     Then, the determinant of A is given by 

a22 a23 a21 a23 a21 a22 det(A) = a11 det a12 det + a13 det a32 a33 − a31 a33 a31 a32 (.) ! ! ! = a (a a a a ) a (a a a a ) + a (a a a a ). 11 22 33 − 32 23 − 12 21 33 − 31 23 13 21 32 − 31 22 Let’s take a closer look at (.)

a11 a12 a13 a11 a12 a13 a11 a12 a13 det(A) = a11 det a21 a22 a23 a12 det a21 a22 a23 + a13 det a21 a22 a23 (.) a a a  − a a a  a a a   31 32 33  31 32 33  31 32 33             Formula (.) computes the determinant of A by expansion along the first row. Notice that there are three terms, each one corresponding to an entry in the first row of A. For the first entry in row one, a11, we remove row 1 and column 1 to obtain the submatrix a a 22 23 . a32 a33 ! Then, we multiply a11 by the determinant of this submatrix. For the next entry in row one, a12, we remove row 1 and column 2 to obtain the submatrix a a 21 23 . a31 a33 ! Now, we multiply a12 by the determinant of this submatrix. However, this time there is a negative thrown in front. Why?...

More importantly, what we should see is that the the indices for each aij coefficient tell us which row and column to remove.

So, for the last term in (.) corresponding to a13, we remove row 1 and column 3 to obtain a a 21 22 . a31 a32 ! Again, we compute the determinant of this 2 2 submatrix, then multiply by the × corresponding coefficient a13. Notice that this term does not have a negative in front.

 Humber ma  course notes

Working our way from left to right along the first row, the sign in front of each term alternates between + and . If there were more terms in the determinant formula, this alternating behavior would− continue. Indeed, this must be taken into account when computing the determinant of a matrix larger than 3 3. However, knowing the × determinant formula for a matrix no larger than 3 3 is sufficient for our needs. × Example . Let 1 2 8 A = 0 1 3 .  1 3− 5    −    We will compute det(A) by (.). We have 

1 3 0 3 0 1 det(A) = 1det − 2det − + 8det 3 5 − 1 5 1 3 ! − ! − ! = 1(5 ( 9)) 2(0 3) + 8(0 ( 1)) − − − − − − = 28.

ȴ

§.. Determinant Geometry

So, what can the determinant tell us geometrically? We will first show that if a,b R2, ∈ then the determinant of the matrix whose columns are a,b is the area of the parallelogram they generate. First, let’s assume one of the vectors is directed along a coordinate axis, namely, let a = (a1,0) and b = (b1,b2). Moreover, let’s assume a1,b1,b2 are all positive. We will compute the area of the parallelogram depicted in Figure .. Without referring to a known area formula, there are several ways to determine the area of the shaded region. One way is to decompose the parallelogram into a smaller rectangle and two right triangles (however, this only works if b1 < a1). One can also determine the area of a larger rectangle and subtract the area of two right triangles, which works no matter how a1 and b1 compare. Using this method, as depicted in Figure ., we find that the area of the large rectangle is (a1 + b1)b2, while each right triangle has area 1 b b . Thus, the area of the parallelogram is (a + b )b b b = a b . 2 1 2 1 1 2 − 1 2 1 2 Of course, in general, such a parallelogram may be in any quadrant, such as the parallelogram depicted in Figure .. You should convince yourself that if the vectors a,b were rotated so that a is on the positive x-axis, the area of the parallelogram would not change. It turns out that if a = (a1,a2) and b = (b1,b2), the area of this parallelogram

 Humber ma  course notes

y

b

x a

Figure .: Any two linearly independent vectors a,b R2 generate a parallelogram. ∈ y

b2

b1

x

a1 + b1

Figure .: The area of the parallelogram can be computed by subtracting the area of the shaded triangular regions from the rectangle of area (a1 + b1)b2. is given by a1 b1 det = a1b2 a2b1 . a2 b2 | − | !

 Humber ma  course notes

y

x

a

b

Figure .: An arbitrary parallelogram in the plane, generated by two linearly indepen- dent vectors a,b R2. ∈

 Humber ma  course notes

Note that the absolute value is necessary, so that a positive value is yielded for the area, regardless of the sign of the vector components.

§.. Cross product, triple product

One of the primary reasons we need matrices is to define the determinant, which in turn, we need to define the cross product of vectors. 3 Definition .. Given two vectors a = (a1,a2,a3), b = (b1,b2,b3) in R , we define the cross product of a and b as the vector a b = (a b a b ,a b a b ,a b a b ). (.) × 2 3 − 3 2 3 1 − 1 3 1 2 − 2 1 We will see later in the semester, after introducing differential forms, that the cross product is a particular type of wedge product. For this reason, the cross product may also be denoted a b ∧ A convenient method for computing the cross product is to compute

e1 e2 e3 a b = det a1 a2 a3 . (.) × b b b   1 2 3   Caution must be exercised when using formula (.)! When expanding the   determinant, the e1,e2,e3 are symbolic, in a sense; these vectors tell us which component the resulting scalars belong to.

Example . Let a = (1, 2,1) and b = (2,1,1). To compute the cross product a b, we compute − ×

e1 e2 e3 det 1 2 1 = ( 2 1)e1 (1 2)e2 + (1 ( 4))e3  2− 1 1  − − − − − −       = 3e1 + e2 + 5e3   − = ( 3,1,5). − ȴ The following properties of the cross product hold,

C1) b a = (a b) × − × C2) a b,a = 0 = a b,b h × i h × i C3) a,b are linearly dependent if and only if a b = 0 × C4) a (b + c) = a b + a c × × × C5) (a + b) c = a c + b c × × × C6) (αa) b = α(a b) = a (αb), where α R. × × × ∈

 Humber ma  course notes

Property C) states that a b is orthogonal to both a and b. Going back to Example ., × one can directly verify that a b = ( 3,1,5) is orthogonal to both a and b. These vectors are depicted in Figure .. × −

a b ×

z

a b

x y

Figure .: The vectors a,b and a b. × The standard basis vectors e ,e ,e for R3 satisfy { 1 2 3} e e = e (.) 1 × 2 3 e e = e (.) 3 × 1 2 e e = e . (.) 2 × 3 1

Let ϕ denote the angle between a and b, then

a b = a b sinϕ. (.) k × k k kk k Furthermore, if a,b are linearly independent, (.) yields the area of the parallelogram generated by a and b. Consider the parallelogram generated by two linearly independent vectors a,b in R3, such as depicted in Figure .. As we did in the planar case, we can decompose the parallelogram into a rectangular region and two right triangular regions. Notice that the base of the right triangle corresponds precisely to proja b, the projection of b onto a, as depicted in Figure .. Moreover, if ϕ is the angle between a and b, the height of this triangle is b sinϕ. k k Definition .. Given vectors a,b,c R3, the quantity a,b c is called the scalar triple product. ∈ h × i

 Humber ma  course notes

a

b z

proja b y

x

Figure .: The parallelogram.

b k k ϕ proj b k a k

Figure .: The right triangular portion of the parallelogram generated by a and b.

If a,b,c R3 are linearly independent, then the volume of the parallelepiped generated ∈ by a,b,c, as depicted in Figure ., is given by

a,b c . |h × i| Equivalently, the volume can be computed by the triple product c,a b . |h × i|

§.. Lines and Planes

In this section we will derive various equations of lines and planes in space. Whether or not not we distinguish notationally, we must be careful to conceptually distinguish between points and vectors in R3.

 Humber ma  course notes

c z

a x y b

Figure .: The parallelepiped generated by a,b,c.

Given two vectors a and b, the vector starting at the tip of a and ending at the tip of b is b a. Recall that we can define a line in the plane by specifing two points, a point and a − slope, or a slope and an intercept. For instance, the line through (a1,a2) and (b1,b2) is

b a y = a + 2 − 2 (x a ). (.) 2 b a − 1 1 − 1

Notice that the graph of this line goes through the tips of the vectors a = (a1,a2) and b = (b1,b2). In addition to the form given above, we can express the same line in parametric form; that is, in terms of a real parameter t on which both coordinates may depend. Rather than specifying a point and slope, we can specify a point and a direction. Since the line goes through the tips of a and b, the line is parallel to the vector b a (equivalently, a b). The parametric equation − − (x(t),y(t)) = (a ,a ) + t(b a ,b a )(.) 1 2 1 − 1 2 − 2 where t R defines the same line in terms of vectors. The algebraic equivalence of this ∈ x a equation and (.) follows from setting t = − 1 . Making this substitution in (.) b1 a1 yields y = a + t(b a ), which is exactly the second− coordinate of (.). Similarly, if 2 2 − 2 x a t = − 1 b a 1 − 1

then x = a1 + t(b1 a1). Since both the x and y coordinates depend on the parameter t, this dependence is− denoted in the parametric equation (.). We define lines in space by similar means.

 Humber ma  course notes

Equation of line through a point in direction of a vector: The line ` through the point (x1,x2,x3) in the direction a = (a1,a2,a3) is given by the equation `(t) = (x ,x ,x ) + t(a ,a ,a ) for t R. (.) 1 2 3 1 2 3 ∈

In this case, the line ` may be expressed as `(t) = (x(t),y(t),z(t)), in terms of its coordinate functions. Thus, the coordinate functions x(t),y(t),z(t) are given by

x(t) = x1 + ta1, y(t) = x2 + ta2, z(t) = x3 + ta3.

Although the line ` goes through the point corresponding to the vector x = (x1,x2,x3), it is also common to express this line as `(t) = x + ta, t R, (.) ∈ since the coordinate expressions are equivalent. Now, if we want the line passing through the tips of two vectors a and b, we need the line pointed in the direction b a (or a b). This line passes through the points corresponding to the vectors a−and b. −

Equation of line through tips of vectors: The line ` through the tips of the vectors a = (a1,a2,a3) and b = (b1,b2,b3) is given by the equation `(t) = a + t(b a) for t R. (.) − ∈ In terms of the coordinate functions, ` has the form

`(t) = (x(t),y(t),z(t)) = (a + t(b a ),a + t(b a ),a + t(b a )). (.) 1 1 − 1 2 2 − 2 3 3 − 3

The same line is defined by any one of the following expressions `(t) = a + t(a b) − = b + t(b a) − = b + t(a b). − In terms of an infinite line, any one of these equations will typically suffice. However, if we want a line segment (that is, a finite line) we often want the segment directed as we see fit. A line segment can be obtained by restricting the values of the parameter t. For instance, the line segment beginning at the tip of a and ending at the tip of b is given by `(t) = a+t(b a), for t [0,1]. Notice that `(0) = a and `(1) = b. The line segment directed − ∈ from b to a may be obtained by traversing `(t) = a + t(b a) backwards. That is, take − `˜(t) = `(1 t) = a + (1 t)(b a). − − −  Humber ma  course notes

Then, `˜(0) = b and `˜(1) = a. There are various ways of describing any given plane in R3. For instance, the x,y-plane may be expressed as the set of points in R3 for which the z-coordinate is 0, (x,y,0) x,y R . { | ∈ } More formally, this means the x,y-plane is the span of e ,e . Similarly, if we fix z = α, { 1 2} where α is a fixed real number, the set (x,y,α) x,y R { | ∈ } is a plane in R3, parallel to the x,y-plane and shifted vertically by α. This seems simple enough, but what if we took the x,y-plane and tilted it about the origin. The result would still be a plane, but it would not be as straightforward to describe this plane by simply fixing one of the coordinates. We need to know what distinguishing characteristics can be used to fully and unambiguously describe a plane in R3. One such characteristic is any vector which is orthogonal to the plane. For instance, any vector in the x,y-plane is orthogonal to the z-axis (more particularly, orthogonal to the vector e3). Any vector which is parallel to e3 is also orthogonal to the x,y-plane. However, this characteristic alone is not enough to uniquely define the x,y-plane. The vector e3 (or any parallel vector) is also parallel to all of the planes (x,y,α) x,y R , { | ∈ } where α is fixed. We need more information to completely define a plane. Specifying a point contained in the plane, along with an orthogonal vector, provides enough information to completely define a plane in R3. For instance, there is only one plane in R3 which is orthogonal to e and contains the point (1, 2,0), the x,y-plane. 3 − Suppose we want to determine an equation defining the plane in R3 which contains the point (x1,x2,x3) and which is orthogonal to the vector a = (a1,a2,a3). Let (x,y,z) be any other point in this plane. Then, the vector b = (x x1,y x2,z x3), directed from one point to the other, must lie on this plane. Since the− vector− a is− orthogonal to all vectors on this plane, we must have a,b = 0, hence h i a (x x ) + a (y x ) + a (z x ) = 0. (.) 1 − 1 2 − 2 3 − 3 Any point (x,y,z) on this plane must satisfy equation (.).

Equation of plane orthogonal to given vector: The plane in R3 containing the point (x ,x ,x ) which is orthogonal to the vector P 1 2 3 a = (a1,a2,a3) satisfies the equation

a (x x ) + a (y x ) + a (z x ) = 0. (.) 1 − 1 2 − 2 3 − 3

 Humber ma  course notes

Suppose (p1,p2,p3) is a point in space and let p denote the corresponding vector. We would like to determine the distance between this point and the plane defined by P (.). If (x ,x ,x ) is a point on , let u = (x p ,x p ,x p ) denote the vector 1 2 3 P 1 − 1 2 − 2 3 − 3 directed from (p ,p ,p ) to (x ,x ,x ). The distance from p to is the norm of 1 2 3 1 2 3 P u,a proj u = h ia, a a,a h i the projection of u onto a. We have

x p,a 2 proj u,proj u = h − i a,a h a a i a,a 2 h i h i x p,a 2 = h − i , a 2 k k where x is the vector with coordinates (x1,x2,x3). Hence, the distance from p = (p1,p2,p3) to the plane is given by P x p,a |h − i|. (.) a k k

 Chapter 

Multivariable functions

We are interested in defining functions of more than one variable, for the purpose of calculus in multiple variables (vector calculus). A real-valued function f in n variables, x1,x2,...,xn, is a map which sends n real numbers (the inputs) to a single real number (the output), wherever f is defined. We denote the fact that f accepts n variables as inputs and outputs a single real number by f : Rn R, which is read as “f maps Rn to → R”. For example, f (x,y) = x2 + y2 is a real-valued function of 2 variables, so we would write f : R2 R. → Definition .. A real-valued function, f , from Rn to R is a mapping sending each n-tuple of real numbers to a single real number, wherever defined. In this case, we write f : Rn R. Equivalently, if f : Rn R, f sends a vector x Rn to a real number, which → → ∈ we denote as f (x). Thus, if x = (x1,x2,...,xn), the output may be expressed as f (x1,x2,...,xn) or f (x).

The fact is, we have already dealt with a function which maps vectors to scalars, namely the norm. If we temporarily define f : R3 R by → 2 2 2 f (a) = f (a1,a2,a3) = a1 + a2 + a3, q then f (a) = a is the real valued function which determines the length of a given vector a. k k We will also deal with maps which output multiple variables, in addition to accepting multiple inputs. If we write g : Rn Rm, then g accepts n real numbers as inputs and → outputs m real numbers. When m = 1, g is exactly a real-valued function defined on Rn, as above. Definition .. A vector-valued function, g, from Rn to Rm is a mapping sending each n-tuple of real numbers to an m-tuple of real numbers, wherever defined. In this case,

 Humber ma  course notes

we write g : Rn Rm. Here, the inputs and the outputs can be regarded as vectors. If → x Rn, then the output f (x) is a vector in Rm. ∈ Remark .. Before discussing numerous examples, let’s address one technical detail. When we write g : Rn Rm, we do not necessarily mean that the domain of g is all of Rn, → nor do we mean that the range of g is all of Rm. Rather, if g : Rn Rm, then the domain → of g is a subset of Rn and the range of g is a subset of Rm. Also note that, whenever necessary, we will denote the domain of a function g by dom(g).

The equation of a line in R3 is an example of a vector-valued function. Specifically, the line ` : R R3 defined by →

`(t) = (x1 + ta1,x2 + ta2,x3 + ta3) = (x(t),y(t),z(t))

is a function which maps a single real number t to a vector (x(t),y(t),z(t)) in R3. Before diving deeper into the subject of vector-valued functions, we will discuss real-valued functions in more detail. Eventually, we want to develop a calculus for multivariable functions, both real and vector valued. As in single variable calculus, we want to develop limits, differentiation, extreme values, integration, etc. and see how these ideas come up in applications. First, how can we visualize a function of more than one variable? In particular, what does the graph of a function f : Rn R look like? → Definition .. If f : Rn R is a real-valued function, the graph of f is the subset of Rn+1 defined by →

graph(f ) = (x ,x ,...,x ,f (x ,x ,...,x )) x ,...,x R . (.) { 1 2 n 1 2 n | 1 n ∈ }

Equivalently, if we express the input as a vector x = (x1,...,xn), then the graph of f may be expressed more concisely as

graph(f ) = (x,f (x)) x Rn . (.) { | ∈ }

Since x Rn and f (x) R, graph(f ) is indeed a subset of Rn+1. Many of our examples ∈ ∈ will be functions from R2 to R. If f : R2 R, then → graph(f ) = (x,y,f (x,y)) x,y R { | ∈ } is a subset of R3. In this particular case, a point (x,y,z) in R3 lies on the graph of f if z = f (x,y). Thus, the function value f (x,y) determines the z component, or height.

 Humber ma  course notes

§.. Level Sets

One particular method for determining graphical information about f is to determine the level sets of f . Determining the level sets of f is analogous to determining x and y intercepts of a single variable function h : R R. → Definition .. If f : Rn R and α R, the α-level set of f is the set of (x ,...,x ) such → ∈ 1 n that f (x1,...,xn) = α. If we denote the α-level set of f by Lα(f ) then

L (f ) = (x ,...,x ) f (x ,...,x ) = α . α { 1 n | 1 n } If f : R2 R, the α-level set of f is the set → L (f ) = (x,y) R2 f (x,y) = α , α { ∈ | } which is often called a level curve in this particular case. If f : R3 R, the α-level set of → f L (f ) = (x,y,z) R3 f (x,y,z) = α α { ∈ | } is called a level surface.

For a function f : R2 R, the α-level curve of f corresponds to setting z = α. → Example . Let z = f (x,y) = x2 + y2. The 0-level curve, L (f ), is the set of (x,y) R2 0 ∈ for which x2 + y2 = 0. The equation x2 + y2 = 0, equivalently x2 + y2 = 0, is only p satisfied for (x,y) = (0,0). This tells us that the point (0,0,0) (i.e., the origin) is on the graph of fpand, moreover, it is the onlyp point on the graph with z coordinate 0. ȴ

§.. Sections

In addition to determining level sets of a multivariable function f , we can determine more graphical information by determining cross-sections of the graph. A cross-section (or slice) of the graph of f is the intersection of a plane with graph(f ). For level sets, we determine the intersection of graph(f ) with a plane parallel with the xy-plane. In contrast, for cross-sections we determine the intersection of graph(f ) with a ’vertical’ plane. In this context, a vertical plane is any plane which is not parallel with the xy-plane. For example, the intersection of graph(f ) with the yz-plane is a cross-section. The yz-plane is the set (0,y,z) y,z R and the intersection with graph(f ) is the set { | ∈ } (0,y,f (0,y)) y R . (.) { | ∈ }  Humber ma  course notes

2

1

y 0

1 −

2 1 0 1 2 − − x

Figure .: The 0,1 and 2 level curves of f (x,y) = x2 + y2. p

2 z

1

y x

Figure .: The 0,1 and 2 level sets of f (x,y) = x2 + y2 lifted to the corresponding z values. p This cross-section is precisely the portion of the graph which lies on the yz-plane. Another common cross-section is the intersection of graph(f ) with the xz-plane. The xz-plane is the set (x,0,z) x,z R and the intersection with graph(f ) is the set { | ∈ } (x,0,f (x,0)) x R , (.) { | ∈ } which is the portion of the graph which lies on the xz-plane. Typically, level sets give enough information that, along with one or two cross-sections, we can sketch the graph of f fairly accurately. Example (. Continued). Returning to Example ., for which f (x,y) = x2 + y2, let’s determine the cross-sections of graph(f ) with the yz and xz planes. A point on the graph p  Humber ma  course notes of f is of the form (x,y, x2 + y2). For the yz-plane cross-section, we simply substitute x = 0 which yields the set of points p

(0,y, y2) y R = (0,y, y ) y R . { | ∈ } { | | | ∈ } q This is the graph of the absolute value function, z = y , placed on the yz-plane. Similary, | | the xz-plane cross-section can be obtained by substituting y = 0, which yields the set of points (x,0,√x2) x R = (x,0, x ) x R . { | ∈ } { | | | ∈ } This is the graph of the absolute value function, z = x , placed on the xz-plane. These cross-sections, along with the previously determined| level| curves, are depicted in Figure .. A full surface plot of f (x,y) = x2 + y2 can be seen in Figure .. p

2 z

1

y x

Figure .: The 0,1 and 2 level sets, along with the xz and yz cross-sections of graph(f ). The graph of f (x,y) = x2 + y2 is a cone. p

z

2

y x

Figure .: A surface plot of z = f (x,y).

 Humber ma  course notes

2 Example . Let g : R R be defined by g(x,y) = 1/3 36 4x2 y2. The 0-level set, → − − L0(g), is the set of (x,y) for which p 1 0 = 36 4x2 y2, 3 − − q hence 4x2 + y2 = 36. Equivalently, 1 1 x2 + y2 = 1, 9 36 which is the equation of an ellipse with radii rx = 3 and ry = 6. The α-level set, Lα(g), is characterized by the equation 3α = 36 4x2 y2, − − hence q 4x2 + y2 = 36 9α2. − Equivalently, for (x,y) to be in Lα(g) we must have 4 1 x2 + y2 = 1. 36 9α2 36 9α2 − − Again, this is the equation of an ellipse, but with radii

36 9 2 3 α √ 2 √ 2 √ 2 rx = − = 4 α , ry = 36 9α = 3 4 α . r 4 2 − − − From this we see that the we must have 2 α 2. For instance, if α = 1 the 3 − ≤ ≤ corresponding ellipse has radii rx = /2√3 and ry = 3√3. For the xz-plane cross-section, where y = 0, we have 1 z = √36 4x2, 3 − which becomes the ellipse 1 1 x2 + z2 = 1 9 4 with radii rx = 3 and rz = 2 in the xz-plane. Similarly, the yz-plane cross-section is characterized by 1 z = 36 y2, 3 − corresponding to the ellipse q 1 1 y2 + z2 = 1 36 4 with radii ry = 6 and rz = 2 in the yz-plane. The corresponding cross-sections, level sets and surface plot are depicted in Figures .-.. ȴ

 Humber ma  course notes

2 z 1 y x 1 − 2 − Figure .: The xz and yz cross-sections of graph(g). The graph of g(x,y) = 1/3 36 4x2 y2 is an ellipsoid. − − p z

1

y x

Figure .: The 0,1 and 1.5 level sets of graph(g). The graph of g(x,y) = 1/3 36 4x2 y2 is an ellipsoid. − − p § Derivatives

Some of the techniques used for visualizing multivariable functions can help us make sense of derivatives/rates of change for multivariable functions. In particular, if f : R2 R is a real-valued function, if we slice the graph of f we obtain a single variable → function. The intersection of graph(f ) with a plane parallel to the yz-plane yields a curve depending only on z and y. Equivalently, taking x to be a fixed number yields the corresponding single variable function. The intersection of graph(f ) with a plane parallel to the xz-plane yields a curve depending only on z and x, which corresponds to the single variable function obtained by fixing y. In the same manner, we may regard x as fixed and then compute a derivative as we would in single variable calculus. That is, if x is not changing, f (x,y) is a function depending only on y, so we may compute the instantaneous rate of change of f with respect to y by f (x,y + h) f (x,y) lim − . (.) h 0 h →  Humber ma  course notes

Figure .: A surface plot of z = g(x,y).

If the limit in (.) exists, we call this the of f with respect to y, at the ∂f point (x,y), which we denote by ∂y (x,y). Whenever the point at which a partial derivative is evaluated need not be specified, it is conventional to denote the partial ∂f derivative as simply ∂y . Similarly, if we regard y as fixed, f (x,y) depends only on changes in x. The instantaneous rate of change of f with respect to x is given by

f (x + h,y) f (x,y) lim − . (.) h 0 h →

If the limit in (.) exists, this is the partial derivative of f with respect to x, at the point ∂f ∂f (x,y), which is denoted by ∂x (x,y) or ∂x whenever it is unnecessary to specify the point.

Example . Let f : R2 R be the real-valued function f (x,y) = x2 cosy. By definition, →  Humber ma  course notes

we have ∂f (x + h)2 cosy x2 cosy = lim − ∂x h 0 h → (2xh + h2)cosy = lim h 0 h → = lim(2x + h)cosy h 0 → = 2x cosy.

Notice that the same result is obtained by y as a constant and differentiating as usual, using the in this case.

∂f In the same way, we may compute ∂y without resorting to limits. Thus, ∂f = x2 siny. ∂y −

ȴ

The definition of partial derivatives is analogous for any real-valued function f : Rn R. → Definition .. Let f : Rn R be a real-valued function. The partial derivative of f → with respect to xj, at the point (x1,...,xn), is defined by

∂f f (x1,...,xj + h,...,xn) f (x1,...,xn) = lim − , (.) ∂x h 0 h j → which is the result of differentiating f with respect to xj, regarding all other variables as fixed. Whenever it is necessary to denote the point at which the partial derivative is evaluated, we denote (.) by ∂f (x1,...,xn). ∂xj The limit definition of ∂f can also be expressed as ∂xj

∂f f (x + hej) f (x) = lim − , (.) ∂x h 0 h j → Rn where ej = (0,...,1,...,0) is the jth standard basis vector for . We denote the operation ↑ jth comp. of partial differentiation with respect to the jth variable by ∂ . ∂xj

 Humber ma  course notes

By only considering the rate of change of f as the variable xj changes, we are computing the rate of change in a direction parallel to the respective coordinate axis. For example, if f : R2 R, then ∂f and ∂f are rates of change parallel to the x-axis and y-axis, → ∂x ∂y respectively. That is, if we consider a particle moving along the graph of f , then we only know how much the height (z-coordinate) of the particle changes as the particle moves parallel to the x and y axes.

3 √z2 xy Example . Let f : R R be defined by f (x,y,z) = a− − where a > 0 is a constant. Recall the exponential derivative→ formula d at = ln(a)at. dt Then,

∂f √z2 xy ∂ 2 = ln(a)a− − ( z xy) ∂x ∂x − − q √z2 xy 1 ∂ 2 = ln(a)a− − (z xy) −2 z2 xy ∂x −  −    √z2 xy  1  = ln(a)a− −  p ( y) −2 z2 xy −  −  √z2 xy  ln(a)ya− −  p  =  .  2 z2 xy − Similarly, we have p

∂f √z2 xy ∂ 2 = ln(a)a− − ( z xy) ∂y ∂y − − q √z2 xy 1 ∂ 2 = ln(a)a− − (z xy) −2 z2 xy ∂y −  −  √z2 xy  ln(a)xa− −  p  =   2 z2 xy − and p ∂f √z2 xy ∂ 2 = ln(a)a− − ( z xy) ∂z ∂z − − q √z2 xy 1 ∂ 2 = ln(a)a− − (z xy) −2 z2 xy ∂z −  −  √z2 xy  ln(a)za− − p  =  .  − z2 xy − p  Humber ma  course notes

ȴ

Of course, we can take multiple partial derivatives of a function f , whenever the corresponding limits are defined, in the same way that we compute multiple derivatives of a single variable function. For instance, if f : Rn R we can differentiate with respect → to xj, then differentiate with respect to xk. If the corresponding limit exists, this is a second order partial derivative of f , denoted by

∂ ∂f ∂2f = . ∂x ∂x ∂x ∂x k j ! k j Notice that the order in which we differentiate is from right to left, or inside to outside. If k = j, we denote this as ∂2f 2 , ∂xj R2 R which is the second partial derivative of f with respect to xj. If f : , there are 4 second order partial derivatives, namely →

∂2f ∂2f ∂2f ∂2f , , , . ∂x2 ∂y∂x ∂x∂y ∂y2

Remark .. Depending on the properties of the real-valued function f , the order in which we take partial derivatives may matter! For a function f : R2 R, we may have → ∂2f ∂2f , , ∂y∂x ∂x∂y

in general. However, we will discuss a particular class of functions for which these mixed partial derivatives are equal.

Example (. continued). Consider f (x,y) = x2 cosy. In Example . we computed the first partials ∂f ∂f = 2x cosy, = x2 siny. ∂x ∂y − The mixed second derivatives are

∂2f ∂ = (2x cosy) = 2x siny ∂y∂x ∂y −

and ∂2f ∂ = ( x2 siny) = 2x siny, ∂x∂y ∂x − −

 Humber ma  course notes

so ∂2f ∂2f = ∂y∂x ∂x∂y in this case. The remaining second derivatives are ∂2f ∂2f = 2cosy, and = x2 cosy. ∂x2 ∂y2 −

Now, if f : Rn Rm is a vector-valued function, we can define partial derivatives → similarly. Since the output f (x) is a vector in Rm for each x Rn, it is convenient to introduce the notation ∈ f (x) = (f 1(x),f 2(x),...,f m(x)), where each f i : Rn R is a real-valued function, i = 1,...,m. We call f i the ith coordinate → function of f . Rather than defining derivatives of f directly, we can use existing derivative definitions for each of the m coordinate functions. Since each coordinate function maps Rn to R, there are n partial derivatives for each of the m coordinate functions.

Remark .. The coordinate functions can also be denoted using subscripts, fi, rather than superscripts, f i. However, the use of subscripts can be confusing when we opt to denote partial derivatives with subscripts. For example, we will represent the partial derivative of the 2nd coordinate function with respect to x3 by 2 ∂f 2 or f3 . ∂x3 Definition .. If f : Rn Rm is a vector-valued function, the Jacobian of f at the → point x is the m n matrix ×

∂f 1 ∂f 1 ∂f 1 ∂x1 ∂x2 ··· ∂xn    ∂f 2 ∂f 2 ∂f 2     ∂x1 ∂x2 ··· ∂xn  Df (x) =  , (.)  . . .   . .. .       m m m   ∂f ∂f ∂f   ∂x ∂x ∂x   1 2 ··· n      where each partial derivative is evaluated at the point x. The (i,j)-entry in Df (x) is ∂f i . ∂xj The Jacobian of f is also called, simply, the matrix of partial derivatives of f .

 Humber ma  course notes

The Jacobian of a real-valued function f : Rn R has a special name, the of f , → denoted gradf or f . In accordance with the above definition, the gradient of f is the row vector ∇ ∂f ∂f ∂f gradf = , ,..., . (.) ∂x ∂x ∂x 1 2 n ! If p is a point, we denote the gradient of f evaluated at p by grad f , or f (p). p ∇

Example . If r : R3 R is defined by r(x,y,z) = x2 + y2 + z2 then → ∂r x p = , ∂x x2 + y2 + z2 ∂r y = p , ∂y x2 + y2 + z2 ∂r z = p , ∂z x2 + y2 + z2

hence p x y z gradr = , , . 2 2 2 2 2 2 2 2 2  x + y + z x + y + z x + y + z      If p = (1,2, 1), then grad r=p1/√6(1,2, 1).p p  ȴ − p −

Example . Let f : R2 R2 be the vector-valued function defined by → f (x,y) = (x2 cosy,y2 sinx).

In this case, we have two coordinate functions

f 1(x,y) = x2 cosy and f 2(x,y) = y2 sinx.

The corresponding partial derivatives are

∂f 1 ∂f 1 = 2x cosy, = x2 siny ∂x ∂y −

and ∂f 2 ∂f 2 = y2 cosx, = 2y sinx. ∂x ∂y

 Humber ma  course notes

Hence, the Jacobian of f is the 2 2 matrix × ∂f 1 ∂f 1 ∂x ∂y Df =  2 2   ∂f ∂f   ∂x ∂y        2x cosy  x2 siny − =  .  2  y cosx 2y sinx        1 2 Notice that the rows of the Jacobian are precisely the  of f and f , respectively. ȴ

§.. What’s wrong with partial derivatives?

Computing partial derivatives is relatively straightforward, albeit time consuming. As mentioned previously, the partial derivatives yield rates of change parallel with the coordinate axes. This straightforward process gives us some useful information about rates of change, but not quite enough. In single variable calculus, a derivative at a point yields a rate of change which corresponds to the slope of the tangent line at that point. In the sense of slopes, partial derivatives only yield slopes in directions parallel to the coordinate axes. We would like to be able to determine slopes/rates of change in any direction, as rates of change can certainly depend on a particular direction. Moreover, we would like to generalize the local (tangent line approximation)

g(x) g(c) + g0(c)(x c) ≈ − of a single variable function g : R R to a local approximation for f : Rn R. → → In what follows, we will give a definition of differentiability which is consisten with these goals. But first, let’s briefly revisit differentiability for a single variable function g : R R. If the function g is differentiable at x R, then → ∈ g(x + h) g(x) g0(x) = lim − . h 0 h → Equivalently, g is differentiable at x if and only if there exists a number L and a function r(h) such that g(x + h) g(x) = Lh + r(h)(.) − and r(h) lim = 0. (.) h 0 h →  Humber ma  course notes

In this case, g(x + h) g(x) r(h) lim − = lim L + = L, h 0 h h 0 h → → 2 so L = g0(x). To see this equivalent definition in action, take g(x) = x . Corresponding to (.), we have (x + h)2 x2 = 2xh + h2 = (2x)h + h2. − For this example, r(h) = h2 and we do have

r(h) lim = 0, h 0 h → and L = 2x = g0(x).

Definition .. If f : Rn Rm is a function (possibly vector-valued), then we say f is → differentiable at x O Rn if there exists a matrix L and a function r(h) such that ∈ ⊂ f (x + h) f (x) = Lh + r(h)(.) − and r(h) lim = 0. (.) h 0 h → k k Equivalently, f (x + h) f (x) Lh lim − − = 0. (.) h 0 h → k k If f is differentiable at x, the matrix L is unique and we denote it by f 0(x) or Df (x). If f is differentiable at every x O, then we simply say f is differentiable (or f is ∈ differentiable on O). When f is differentiable, we refer to Df as the total derivative of f .

In the previous definition, the set O is an open subset contained in the domain of f . Since x is in the domain of f , we can at least be assured that f (x) is defined. The fact that O is open has to do with convergence and the limits being defined, but this is beyond the scope of our course, so we need not worry about this technical detail. However, do take note that h is a vector, so we divide by h , whereas h is a scalar in (.)-(.). k k Theorem .. If f : Rn Rm is differentiable at x dom(f ), then f is continuous at x. → ∈

Example . To illustrate how definition . yields the appropriate derivative, consider f : R2 R2 defined by f (x,y) = (x2 y2,2xy). Let h = (h ,h ) R2 and denote → − 1 2 ∈  Humber ma  course notes

by x the vector with components x and y. The corresponding difference in the left-hand side of (.) is f (x + h) f (x) = ((x + h )2 (y + h )2,2(x + h )(y + h )) (x2 y2,2xy) − 1 − 2 1 2 − − = (2xh + h2 2yh h2,2xh + 2yh + 2h h ) 1 1 − 2 − 2 2 1 1 2 = (2xh 2yh ,2xh + 2yh ) + (h2 h2,2h h ) 1 − 2 2 1 1 − 2 1 2 2x 2y h = − 1 + r(h), (.) 2y 2x h2 ! ! 2 2 where r(h) = (h1 h2,2h1h2). Although we have not formalized the notion limits for multivariable functions,− it is indeed the case that r(h) lim = 0. h 0 h → k k Thus, the total derivative of f is the 2 2 matrix × 2x 2y Df = − . 2y 2x ! Notice that Df is precisely the Jacobian of f . For those with some background in linear algebra, note there is an abuse of notation in (.), the last line in the computation of Df . Namely, the matrix vector product should be transposed to be consistent with the previous line and consistent with our convention of expressing vectors in row form. However, the end result will be the same. ȴ Theorem .. Let f : Rn Rm, where dom(f ) = O is a subset of Rn. If the partial → ∂f i derivatives exist and are continuous, for each i = 1,...,m and j = 1,...,n, near x O, ∂xj ∈ then f is differentiable at x. In this case, the total derivative at x, Df (x), is the Jacobian evaluated at x.

According to this theorem, for a function f to be differentiable, not only should each partial derivative exists, but they must all be continuous. Moreover, it is possible for all (first-order) partial derivatives of a function to exist and the function be non-differentiable. This is possible if, for example, if one of the partial derivatives has a discontinuity. Definition .. We say a function f : Rn Rm is of class 1 if all first order partial i → C derivatives ∂f exist and are continuous on some open subset O Rn. In some ∂xj ⊂ circumstances, we say f is of class 1(O) to be clear about what the set O is. If f is of C class 1, we may simply say f is 1 or that f is continuously differentiable. C C Based on the previous definition, Theorem . can be stated more concisely. 1 Theorem .. If f : Rn Rm is , then f is differentiable. → C  Humber ma  course notes

§.. Directional derivatives

Suppose f : Rn R. We want a quantity representing the instantaneous rate of change → of f in a particular direction. For instance, if f : R2 R represents the temperature of a → rectangular plate at the (x,y) location. If we specify a direction in the form of a vector v R2, we want to know how much the temperature changes as a particle moves parallel ∈ to v. In the general case, f : Rn R, let’s assume v Rn is a unit vector. We will justify this choice soon. → ∈

Definition .. The of f at x in the direction v, which we will denote by Dvf (x), is defined by

f (x + λv) f (x) Dvf (x) = lim − . (.) λ 0 λ →

Analogous to the notation f for the gradient of f , the notation vf (x) is also used to denote the directional derivative.∇ ∇

Thankfully, by the following theorem, we do not need to use the previous limit definition for computing directional derivatives.

Theorem .. If f : Rn R is differentiable, then all directional derivatives exist. → Furthermore, the directional derivative of f in the direction v at x can be computed by

D f (x) = grad f ,v . (.) v h x i

Theorem .. Suppose gradx f , 0, then gradx f points in the direction along which f increases the fastest.

Proof. Let v Rn be a unit vector. Then, by (.) we have ∈ D f (x) = grad f ,v (.) v h x i and hence

D f (x) = grad f cosϕ (.) v k x k by (.), where ϕ is the angle between v and gradx f . Thus, Dvf (x) is maximal when ϕ = 0, that is, when v is parallel to gradx f . By the same reasoning, f decreases most rapidly in the direction grad f , for then cosϕ = 1. − x −  Humber ma  course notes

§ Tangent vectors and planes

Consider a single-variable function f : R R, for which → graph(f ) = (x,f (x)) x R { | ∈ } is a subset of the plane. If f is differentiable at a point a R, the tangent line at a is given by the equation ∈ y = f (a) + f 0(a)(x a). − Just as when we derived (.), the tangent line equation can be put in parametric form by setting t = x a. Then y = f (a) + tf (a) and the tangent line can be parametrized by − 0 `(t) = (a + t,f (a) + tf 0(a)) = (a,f (a)) + t(1,f 0(a)). Comparing this parametric form with (.), we see that the tangent line passes through the point (a,f (a)) and is in the direction of the vector (1,f 0(a)). The vector (1,f 0(a)) is tangent to the graph of f at a, hence we call it a tangent vector. Let τ(a) = (1,f 0(a)) denote this tangent vector. A point (x,y) is on the graph of f if y = f (x). Let g : R2 R be defined by → g(x,y) = f (x) y, then (x,y) is on the graph of f if g(x,y) = 0. Moreover, − gradg = (f (x), 1) and grad g = (f (a), 1). Notice that 0 − a 0 − grad g,τ(a) = f 0(a) f 0(a) = 0. h a i − This shows that a vector which is tangent to the graph of f at a is orthogonal to the gradient at a.

§.. Surfaces in R3

Now, suppose f : R2 R and consider the surface corresponding to the graph of f , → where as usual, we set z = f (x,y). Let p = (x0,y0,z0) be a point on graph(f ), so ∂f z0 = f (x0,y0). Then ∂x represents the rate of change, with respect to x, parallel to (x0,y0) the xz-plane. In particular, we imagine slicing graph(f ) with the plane y = y0. The

intersection of y = y0 and graph(f ) (which is a cross-section) is a curve. This curve is the ∂f graph of a single-variable function. Define g(x) = f (x,y0). Then g0(x) = ∂x and, in ∂f particular, g0(x0) = ∂x . Thus, the slope of this curve’s tangent line at x0 is (x0,y0) g (x ) = ∂f . The tangent line is defined by the two conditions 0 0 ∂x (x0,y0)

z = g(x0) + g0(x0)(x x0), y = y0. −  Humber ma  course notes

In parametric form, the tangent line is given by

`x(t) = (x0 + t,y0,g(x0) + tg0(x0)) ∂f = x0,y0,f (x0,y0) + t 1,0, . (.) ∂x (x ,y ) 0 0 !   Hence, the corresponding tangent vector is ∂f u = 1,0, . (.) ∂x (x0,y0) !

∂f Similarly, ∂y represents the rate of change, with respect to y, parallel to the (x0,y0) yz-plane. In this case, we slice graph(f ) with the plane x = x0. The intersection of x = x0 and graph(f ) is also a curve, which is the graph of a single-variable function. Define ∂f ∂f h(y) = f (x0,y). Then h0(y) = ∂y and h0(y0) = ∂y . So, the slope of this curve’s tangent (x0,y0) line is h (y ) = ∂f . In parametric form, the tangent line is given by 0 0 ∂y (x0,y0)

`y(t) = (x0,y0 + t,h(y0) + th0(y0)) ∂f = x0,y0,f (x0,y0) + t 0,1, (.) ∂y (x ,y ) 0 0 !   Hence, the corresponding tangent vector is ∂f w = 0,1, . (.) ∂y (x ,y ) 0 0 !

The point p = (x0,y0,z0) on graph(f ) is on both tangent lines, (.) and (.). We define the tangent plane to graph(f ) at p to be the plane containing both tangent vectors (equivalently, containing both tangent lines). In linear algebra lingo, the tangent plane is spanned by u and w, the tangent vectors given by (.) and (.). Since u and w are both on the tangent plane, their cross product u w must be orthogonal to the tangent plane. We have × ∂f ∂f u w = , ,1 , (.) × − ∂x − ∂y ! where the partial derivatives are evaluated at (x0,y0). Now, a point (x,y,z) is on graph(f ) if z = f (x,y) or, equivalently, if f (x,y) z = 0. Let F(x,y,z) = f (x,y) z, then − − ∂f ∂f gradF = , , 1 . ∂x ∂y − !  Humber ma  course notes

Thus, the gradient of F (evaluated at (x0,y0)) is orthogonal to the tangent plane! We also know that the tangent plane passes through the point p, since both tangent lines pass through p. Thus, the tangent plane is characterized as the plane orthogonal to gradF and passing through p = (x0,y0,f (x0,y0)). According to (.), the equation of the tangent plane is determined by gradF,p = 0. Thus, we have the following: h i

Equation of tangent plane to graph(f ) at (x0,y0,z0): If f : R2 R, the tangent plane at (x ,y ,z ), where z = f (x ,y ), satisfies → 0 0 0 0 0 0 ∂f ∂f (x x ) + (y y ) (z f (x ,y )) = 0, (.) ∂x − 0 ∂y − 0 − − 0 0

where both partial derivatives are evaluated at (x0,y0).

§ Coordinates

When specifying a point (or vector) in the plane, R2, we typically use use rectangular coordinates (or Cartesian coordinates). If p is a point in R2, we specify how to get from the origin to p in terms of how many units to move along the x-axis and y-axis. Another natural choice for specifyin the location of a point in R2 is given via the identification between x,y and cosθ,sinθ. If (x,y) is on the unit circle, then (x,y) is at a radial distance of 1 from the origin. The radial line connecting (0,0) to (x,y) forms an angle θ with the positive x-axis. For an arbitrary point in the plane, we can specify a radial distance r from the origin and an angle θ formed between the positive x-axis and the radial line from (0,0) to (x,y).

Polar coordinates in R2: The location of a point is specified as (r,θ) in polar coordinates, in terms of the radius and angle. We can determine the polar coordinates of a point from its Carte- sian coordinates (x,y) and vice-versa via:

x = r cosθ r = x2 + y2

q 1 y y = r sinθ θ = tan− . x   When specifying (x,y,z) coordinates of a point in R3, we are using rectangular/Cartesian

 Humber ma  course notes

y

r y

θ x x

Figure .: Cartesian coordinates (x,y) versus polar coordinates (r,θ).

coordinates. One alternative is to use polar coordinates for x,y and stick with Cartesian for z.

Cylindrical coordinates in R3: The location of a point is specified as (r,θ,z) in cylindrical coordinates, in terms of the radius, angle and Cartesian z coordinate. We can determine the cylindrical coordinates of a point from its Cartesian coordinates (x,y,z) and vice-versa, in the same way as for polar, since z remains unchanged:

x = r cosθ r = x2 + y2

q 1 y y = r sinθ θ = tan− x z = z z = z.  

The third coordinate system for R3 that we will use often, requires a radius and two angles.

 Humber ma  course notes

z

(r,θ,z)

z θ r y

x

Figure .: Cylindrical coordinates

Spherical coordinates in R3: The location of a point, with Cartesian coordinates (x,y,z), is specified as (r,θ,ϕ) in spherical coordinates. Here, r is the straight line distance from (0,0,0) to the point; θ is the angle between the projection of (x,y,z) onto the xy-plane and the positive x-axis; ϕ is the angle between the positive z-axis and the radial line from (0,0,0) to (x,y,z). We can determine the spherical coordinates of a point from its Cartesian coordinates (x,y,z), and vice-versa,via the coordinate transformations:

x = r sinϕ cosθ r = x2 + y2 + z2

q 1 y y = r sinϕ sinθ θ = tan− x   2 2 1 x + y z = r cosϕ ϕ = tan− 2 . r z         Humber ma  course notes

z

ϕ p

r

θ y

x

Figure .: Spherical coordinates

§ Parametric Curves

A path is a continuous mapping γ :[a,b] Rn. The image γ([a,b]) is a curve in Rn. That → is, as t varies over the interval [a,b], a curve is traced out by the values γ(t) Rn. If we ∈ denote this curve by C, then γ :[a,b] Rn is also called a parametrization of C. Note → that our textbook assumes γ is differentiable, which means the associated curve is smooth. A parametrization of a curve is simply a vector-valued function. As with other vector-valued functions, we sometimes express γ in terms of its coordinate functions

γ(t) = (x1(t),x2(t),...,xn(t)). If γ is differentiable, then the derivative is

γ0(t) = (x10 (t),x20 (t),...,xn0 (t)), which is a tangent vector to the curve at the point γ(t). If γ(t) represents the position of a particle (displacement) at time t, then γ0(t) may be called the velocity vector at time t. In this case, the quantity γ (t) represents the speed of the particle at time t. Moreover, k 0 k γ00(t) would be the acceleration vector at time t.

Examples.

..) The mapping γ : [0,1] R3 defined by → γ(t) = a + t(b a) −  Humber ma  course notes

is a parametrization of the line segment joining a and b.

..) The mapping γ : [0,2π] R2 defined by → γ(t) = (cost,sint) is a parametrization of the unit circle. In terms of the terminology defined above, the unit circle is the curve, while the function γ is the parametrization or path.

..) Given a function y = f (x), whose graph is in the plane, we may always define a parametrization of the corresponding curve by defining

γ(t) = (t,f (t)).

Notice that γ0(t) = (1,f 0(t)), which is precisely the tangent vector we defined in §.

ȴ

§ Parametric surfaces

A parametrization of a surface is a map ψ : R2 R3 of the form → ψ(u,v) = (x(u,v),y(u,v),z(u,v)).

In general, each component of a point on the surface depends on both u and v. Each of the vectors ∂ψ ∂x ∂y ∂z = , , ∂u ∂u ∂u ∂u ! and ∂ψ ∂x ∂y ∂z = , , ∂v ∂v ∂v ∂v ! is a tangent vector to the surface at the point ψ(u,v). Hence, the vector

∂ψ ∂ψ (.) ∂u × ∂v is orthogonal to the tangent plane, as depicted in Figure ..

 Humber ma  course notes

∂ψ ∂ψ ∂u × ∂v ∂ψ ∂ψ ∂v ∂u

Figure .: The cross product (.) is orthogonal to the surface parametrized by ψ.

Examples.

..) If f : R2 R is a real-valued function of 2 variables, a point (x,y,z) is on the → graph of f if z = f (x,y). The graph of f may be parametrized by x = u,y = v,z = f (u,v). The corresponding parametrization would be

ψ(u,v) = (u,v,f (u,v)).

Notice that the tangent vectors

∂ψ ∂f = 1,0, ∂u ∂u ! and ∂ψ ∂f = 0,1, ∂v ∂v ! are precisely what we found in (.) and (.), since u = x and v = y.

..) The surface determined by

x2 y2 z2 + + = 1 9 12 9 is an ellipsoid. The upper half of the ellipsoid can be parametrized by

ψ(u,v) = u,v, 9 u2 3/4v2 . − −  p   Humber ma  course notes

..) Let’s determine the tangent plane to the cone 2z2 = x2 + y2 at (1,1,1). The cone may be parametrized as in the previous examples. However, in many cases, parametrizing a surface (just like a curve) via non-rectangular coordinates can simplify matters. Using cylindrical coordinates, since x = r cosθ and y = r sinθ, we have z = r/√2. So, we will use the parametrization

r ψ(r,θ) = r cosθ,r sinθ, . √2 ! The derivatives are ∂ψ 1 = cosθ,sinθ, ∂r √2 ! and ∂ψ = ( r sinθ,r cosθ,0). ∂θ − Now, since we want the tangent plane at the point (1,1,1), we must determine r and θ such that ψ(r,θ) = (1,1,1). Equating components, we must have

r cosθ = 1, r sinθ = 1, and r = 1. √2 ∂ψ ∂ψ Clearly, r = √2 so cosθ = 1/√2 = sinθ, hence θ = π/4. Evaluating and at r = √2 and ∂r ∂θ θ = π/4, we have ∂ψ √2 √2 1 = , , ∂r (r,θ) 2 2 √2 !

and ∂ψ = ( 1,1,0). ∂θ (r,θ) −

The cross product of the previous two tangent vectors is

1 1 , ,√2 . −√2 −√2 !  Humber ma  course notes

Thus, the equation of the tangent plane is 1 1 (x 1) (y 1) + √2(z 1) = 0, −√2 − − √2 − − which simplifies to x + y 2z = 0. −

ȴ

z

y

x

Figure .: The portion of the sphere ρ = 2 above the xy-plane and below the graph of z = r.

§ Practice problems

P -. For each of the following functions, determine at least 3 level sets and at least 2 cross-sections. Sketch the graph as best you can, based on the level sets and cross-sections. Check your answer with Mathematica or other software. a) f (x,y) = x2 y2 −  Humber ma  course notes b) f (x,y) = x2 + xy c) f (x,y) = cos(xy)

1 d) f (x,y,z) = x2 + y2 + z2 p P -. For each of the following functions determine the gradient. a) f (x,y) = x2y sin(x2y)

x2 2xy b) f (x,y) = − x3 + y3

xyz c) f (x,y,z) = x2 + y2 + z2

P -. Sketch the following surfaces. a) r = 4sinθ b) ρ sinϕ = 2 c) ρ = cos2θ d) ρ = 1 + 2cos2ϕ

sin5θ e) ρ = 1 + 5

P -. Determine an equation of the plane z = x in cylindrical coordinates and spherical coordinates.

P -. Determine the surface parametrized by

ψ(θ,ϕ) = (cosϕ cosθ,cosϕ sinθ,sinϕ),

 Humber ma  course notes with 0 θ 2π and π/4 ϕ π/4. ≤ ≤ − ≤ ≤

P -. Determine a parametrization for the portion of the plane 2x + 3y z 3 = 0 that lies above the square − − (x,y) 0 x 1,0 y 1 . { | ≤ ≤ ≤ ≤ } In other words, the portion of the plane 2x + 3y z 3 = 0 for which the projection onto − − the xy-plane is the above square.

P -. Determine a parametrization of the graph of z = x2 + y2 that lies above the rectangle (x,y) 0 x 1,0 y 2 . { | ≤ ≤ ≤ ≤ }

P -. Consider the parametrization

ψ(u,v) = (2u,v,u2 + v3), where 0 u 1,0 v 2. Determine a function f (x,y) whose graph is the parametrized surface. ≤ ≤ ≤ ≤

 Humber ma  course notes

 Chapter 

Exterior Forms

A tangent vector at a point p gives us directional information about rates of change, locally, near p. Due to this fact (and many others that will become clear as we proceed), it makes more sense to have a tangent vector emanate from p rather than the origin, as depicted in Figure .. Moreover, since a tangent vector lies on the tangent line, this choice is much more natural than having tangent vectors emanate from the origin.

z

y x

Figure .: Rather than the tangent vector emanating from the origin in xyz-space, the tangent vector emanates from the point γ(t) on the curve.

Let’s fix some notation. Let M be a geometric object in Rn, e.g. a curve, a surface, a region. All of these geometric objects are particular types of manifolds, a topic which is beyond the scope of our course. However, the machinery we will develop in Chapters  and beyond will extend to more arbitrary manifolds in a straightforward way. If p is a point Rn in M, we will denote the tangent space to M at p by TpM, which is the subspace of spanned by all the tangent vectors at p. For example, if M is a curve, then TpM is a line. If M is a surface (graph of a function), then TpM is a plane.

 Humber ma  course notes

Now, if p M and X is a tangent vector at p, we write X T M and we imagine X ∈ ∈ p emanating from p. More formally, if M is a subset of Rn, we have another copy of Rn which is translated so that the origin is at p, as depicted in Figure .. Since tangent vectors technically live in a different copy of Rn, we will represent tangent vectors by Rn capital letters. Whenever it is irrelevant, we may refer to tangent vectors in Tp to be clear that these tangent vectors are in the ambient space Rn.

y

X

p

x

Figure .: A second copy of R2 with its origin at p, where all tangent vectors at p emanate from.

§ Constant Forms

In this section, we will discuss constant forms, which is precisely what Chapter 3 is all about in our textbook. Constant forms are a special case of differential forms, which is the machinery we will be using for vector calculus. The concept of a form can be a bit strange at first, as it is likely quite different than any mathematical structure we have seen before. However, forms are an incredibly powerful tool and they are used throughout and physics. For this reason, we will become acquainted with constant forms first, as they are easier to deal with and this will give us the opportunity to slowly adjust to their nuances.

§.. 1-Forms

Definition .. An exterior 1-form, or simply a 1-form, is a linear function ω : Rn R → which maps a (tangent) vector to a real number. To say that ω is a linear function is to

 Humber ma  course notes

say that the following conditions are satisfied:

ω(x + y) = ω(x) + ω(y) (L) ω(αx) = αω(x) (L) for all x,y Rn and α R. Note that the two conditions (L)-(L) are equivalent to the single condition∈ ∈ ω(αx + βy) = αω(x) + βω(y) (L’) for all x,y Rn and α,β R. ∈ ∈

If ω and η are two 1-forms, we can add them

(ω + η)(x) = ω(x) + η(x),

and we can multiply 1-forms by constants

(αω)(x) = αω(x).

Any vector x Rn induces a canonical 1-form ∈ ω (y) = x,y (.) x h i obtained by fixing one entry in the inner product and allowing the other entry to vary. In particular, to each standard basis vector ej, j = 1,...,n, corresponds the canonical 1-form

ω (y) = e ,y . (.) ej h j i

Since ej = (0,...,1,...,0), the canonical 1-form ωej simply returns the jth component of ↑ jth comp. the evaluated vector, ωej (y) = yj.

Definition .. For reasons to be discussed later, we denote the 1-form defined by (.) as dxj, which we call the jth coordinate 1-form. That is, the coordinate 1-form dx : Rn R is defined by j → dxj(y) = yj. (.) The coordinate 1-forms are also referred to as elementary 1-forms. Any 1-form ω on Rn can be expressed as ω = a dx + a dx + + a dx , 1 1 2 2 ··· n n where a1,...,an are real numbers.

 Humber ma  course notes

R2 On Tp , in order to agree with earlier notation, we denote the coordinate 1-forms by dx R3 and dy. Similarly, the coordinate 1-forms on Tp will be denoted by dx, dy and dz.

R2 Example . Suppose ω = a1 dx + a2 dy is a 1-form on Tp . Then, the 1-form ω can be identified with the vector a = (a1,a2) in the following way. If c = (c1,c2) is an arbitrary R2 vector in Tp then

ω(c) = a1 dx(c) + a2 dy(c) = a1c1 + a2c2, which is precisely a,c . Hence, the action of the 1-form ω on an arbitrary vector c can be interpreted in termsh i of the inner product. Recall that, by (.)-(.), c,a = proj c a . Thus, the value of the inner product c,a is proportional to the h i k a kk k h i length of the projection of c onto a and, in turn, the value of ω(c) is proportional to the length of this projection. ȴ

Example . Experimental evidence shows that the work, W , done by a constant force F in moving an object through a distance d is W = Fd, assuming the force is directed along the line of motion of the object. If the force is constant, but otherwise directed, we think of force as a vector F. Suppose an object is at position x and a force F, directed along u, applied to the object moves it from x to v. The displacement of the object is v x , the magnitude of the vector from x to v. If we let d = v x be the displacement vector,k − k the work done is −

W = d proj F k kk d k = F,d h i

The work done in moving an object by a displacement d,

W (d) = F,d , h i is a particular example of a 1-form. Here, we are regarding the force vector F as fixed. The 1-form W yields a scalar (the work) when given a displacement vector d. ȴ

 Humber ma  course notes

F (force)

W (d) = F,d h i

d (displacement)

Figure .: The work of a force F is a 1-form acting on the displacement vector.

§ 2-Forms

Definition .. An exterior 2-form, or simply a 2-form, is a function ω : Rn Rn R on pairs of vectors which is linear in each component (bilinear) and skew-symmetric:× →

ω(αx + βy,v) = αω(x,v) + βω(y,v) (linear in 1st component) (F) ω(x,αy + βv) = αω(x,y) + βω(x,v) (linear in 2nd component) (F) ω(x,y) = ω(y,x) (skew-symmetric) (F) −

Example . The signed area of the projection of the parallelogram with sides a,b R3 ∈ on the xy-plane is a 2-form. When we speak of a signed area (sometimes referred to as an oriented area), we allow for the area to be negative. If a = (a1,a2,a3) and b = (b1,b2,b3), then the projected vectors have components (a1,a2,0) and (b1,b2,0), respectively. The signed area is a b a b (whereas the unsigned area would be a b a b ). ȴ 1 2 − 2 1 | 1 2 − 2 1|

Example . Suppose v R3 is a fixed vector. The 2-form ω defined by ∈ ω(a,b) = v,a b h × i corresponds to the scalar triple product. This 2-form comes up when v is a uniform velocity vector for the flow of fluid over the area of the parallelogram spanned by a,b. ȴ

§.. Wedge (Exterior) product

Many of the forms we are interested in are the result of combining 1-forms.

 Humber ma  course notes

Definition .. Let ω,η be 1-forms on Rn. The value of ω η (pronounced ω wedge η) ∧ on the pair of vectors a,b Rn is the signed area of the image of the parallelogram with ∈ sides (ω(a),η(a)) and (ω(b),η(b)) on the ωη-plane. That is,

ω(a) η(a) (ω η)(a,b) = det . (.) ∧ ω(b) η(b) ! By its very definition, ω η is a 2-form on Rn. Forming the wedge product of two 1-forms yields a 2-form.∧

Example . Let ω be the 2-form defined by ω = dx dy + 3dx dz. If a = (a ,a ,a ) and ∧ ∧ 1 2 3 b = (b1,b2,b3), then

dx(a) dy(a) (dx dy)(a,b) = det ∧ dx(b) dy(b) ! a a = det 1 2 b1 b2 ! = a b a b . 1 2 − 2 1 Similarly,

dx(a) dz(a) 3(dx dz)(a,b) = det ∧ dx(b) dz(b) ! a a = det 1 3 b1 b3 ! = a b a b . 1 3 − 3 1 Combining the results, we have

ω(a,b) = (a b a b ) + 3(a b a b ). 1 2 − 2 1 1 3 − 3 1 ȴ

Lemma .. Every (constant) 2-form ω on R3 can be expressed as

ω = ω1 dx dy + ω2dy dz + ω3dz dx, ∧ ∧ ∧ for some real numbers ω1,ω2,ω3.

 Humber ma  course notes

§ k-forms

A k-form on Rn is a mapping which accepts k vectors, outputs a scalar, and is multilinear and alternating:

˜ ˜ ω(X1,...,Xj + Xj,...,Xk) = ω(X1,...,Xj,...,Xk) + ω(X1,...,Xj,...,Xk), (kF)

ω(X1,...,αXj,...,Xk) = αω(X1,...,Xj,...,Xk), (kF) ω(X ,...,X ,...,X ,...,X ) = ω(X ,...,X ,...,X ,...,X ), (kF) 1 i j k − 1 j i k for j = 1,...,k. The conditions (kF) and (kF) state that ω is linear in the jth component. Since j = 1,...,k, ω is linear in each component. In other words, ω is multilinear. The condition (kF) states that ω is alternating. If we swap the order of two vectors, we introduce a negative.

Remark .. If ω is a k-form on Rn and k > n, then ω 0. For instance, any 3-form on R2 is 0 (meaning its action on every vector in R2 results≡ in 0). This also tells us that we need only concern ourselves with 1,2 and 3-forms on R3.

In general, a k-form is a machine that accepts any k (tangent) vectors X1,...,Xk at a point and returns a number ω(X1,...,Xk) which can be thought of as the signed volume of the parallelepiped spanned by the vectors, according to a particular scale.

§.. Wedge product again

Just as we can take the wedge product of two 1-forms to yields a 2-form, we can compute the wedge product of arbitrary forms in a simliar fashion. To be perfectly honest, the formal definition of the wedge product for arbitrary forms can appear a bit daunting at first. Rather than giving the formular right away, we will proceed with a more constructive approach. Let’s look at some of the properties of the wedge product.

 Humber ma  course notes

Properties of the wedge product: Let ω be a k-form on Rn, let η be an `-form on Rn, and let ν be an s-form on Rn. Let a,b R be scalars. ∈ W. The wedge product ω η is a (k + `)-form. ∧ W.( aω + bη) ν = a(ω ν) + b(η ν) ∧ ∧ ∧ W. ν (aω + bη) = a(ν ω) + b(ν η) ∧ ∧ ∧ W. ω (η ν) = (ω η) ν ∧ ∧ ∧ ∧ W. ω η = ( 1)k`η ω ∧ − ∧ 1 k W. If ω ,...,ω are 1-forms and v1,...,vk are vectors, then

1 2 k ω (v1) ω (v1) ω (v1) 1 2 ··· k ω (v2) ω (v2) ω (v2) ω1 ωk(v ,...,v ) = det ···  (.) 1 k . . .. . ∧ ··· ∧  . . . .    ω1(v ) ω2(v ) ωk(v )  k k k   ···      The formula (.) is particularly important, as it tells us how to compute the action of a k-form produced from k 1-forms on k vectors. In this way, we avoid the technical details of defining a k-form as the wedge product of 1-forms, directly, and focus on the action of the resulting k-form on vectors. Also, this allows us to progress from 1-forms to 2-forms to 3-forms, and so on, via the wedge product.

Lemma .. If ω is a k-form and k is odd, then ω ω = 0. ∧

2 Proof. ByW ., we know ω ω = ( 1)k ω ω. Since k is odd, k2 is also odd, hence 2 ∧ − ∧ ( 1)k = 1. Thus, ω ω = ω ω, which implies 2(ω ω) = 0. Hence, ω ω = 0. − − ∧ − ∧ ∧ ∧

Examples.

..) Let ω = 3dx dy dz be a 3-form on R3 and let ∧ ∧

X = (1, 3,4),X = (2,5, 2),X = ( 1,3,6). 1 − 2 − 3 −

 Humber ma  course notes

According to (.),

dx(X1) dy(X1) dz(X1)

ω(X1,X2,X3) = 3detdx(X ) dy(X ) dz(X )  2 2 2    dx(X ) dy(X ) dz(X )  3 3 3       1 3 4  = 3det 2− 5 2   1 3− 6    −  = 3(36 + 30 + 44)    = 330.

Note that we have used formula (.) for the determinant of a 3 3 matrix. ×

..) Let ω = 2dx dy + 4dz, η = dx + 2dy dz, and ν = 2dx + 3dy + 2dz. Given − − − vectors X ,X ,X , we may determine the action of ω η ν on these vectors by using 1 2 3 ∧ ∧ (.). However, we may also determine the wedge product ω η ν directly. By Lemma ∧ ∧ ., the wedge product of any 1-form with itself is 0. In particular, dx dx = 0 , ∧ dy dy = 0 and dz dz = 0. Using propertiesW .-W., we have ∧ ∧

ω η =(2dx dy + 4dz) ( dx + 2dy dz) ∧ − ∧ − − = 2(dx dx) + 4(dx dy) 2(dx dz) − ∧ ∧ − ∧ + (dy dx) 2(dy dy) + (dy dz) (byW . andW .) ∧ − ∧ ∧ 4(dz dx) + 8(dz dy) (dz dz) − ∧ ∧ − ∧ =4(dx dy) 2(dx dz) + (dy dx) + (dy dz) ∧ − ∧ ∧ ∧ (by Lemma .) 4(dz dx) + 8(dz dy) − ∧ ∧ =4(dx dy) (dx dy) + 2(dz dx) 4(dz dx) ∧ − ∧ ∧ − ∧ (byW .) + (dy dz) 8(dy dz) ∧ − ∧ =3(dx dy) 2(dz dx) 7(dy dz). ∧ − ∧ − ∧

Thus, ω η is the 2-form ∧

ω η = 3(dx dy) 2(dz dx) 7(dy dz). ∧ ∧ − ∧ − ∧  Humber ma  course notes

Similarly, we can compute (ω η) ν using properties of the wedge product, ∧ ∧ (ω η) ν =(3(dx dy) 2(dz dx) 7(dy dz)) (2dx + 3dy + 2dz) ∧ ∧ ∧ − ∧ − ∧ ∧ =6(dx dy dx) + 9(dx dy dy) + 6(dx dy dz) ∧ ∧ ∧ ∧ ∧ ∧ 4(dz dx dx) 6(dz dx dy) 4(dz dx dz) (byW . andW .) − ∧ ∧ − ∧ ∧ − ∧ ∧ 14(dy dz dx) 21(dy dz dy) 14(dy dz dz) − ∧ ∧ − ∧ ∧ − ∧ ∧ =6(dx dy dz) 6(dz dx dy) 14(dy dz dx) (by Lemma .) ∧ ∧ − ∧ ∧ − ∧ ∧ =6(dx dy dz) 6(dx dy dz) 14(dx dy dz) (byW .) ∧ ∧ − ∧ ∧ − ∧ ∧ = 14(dx dy dz). − ∧ ∧ Thus, the wedge product ω η ν is the 3-form given by ∧ ∧ ω η ν = 14(dx dy dz). (.) ∧ ∧ − ∧ ∧ Now, let’s consider an alternate method for determining (.). Let’s compute the action of ω η ν on the standard basis vectors e ,e ,e . By (.), we have ∧ ∧ 1 2 3

ω(e1) η(e1) ν(e1)

(ω η ν)(e1,e2,e3) = detω(e ) η(e ) ν(e ) ∧ ∧  2 2 2    ω(e ) η(e ) ν(e )  3 3 3       2 1 2  = det 1− 2 3  −4 1 2    −  = 14.  −   Notice that the resulting scalar is precisely the scalar appearing in (.)! ȴ

§ Vector fields

A vector field on Rn is a continuous mapping X : U Rn Rn, where U is an open ⊂ → subset of Rn. The vector field X assigns to each point p a vector in Rn, which we will denote by Xp. Vector fields can be visualized as attaching an arrow (vector) to each point in U. A vector field X can be expressed in terms of component functions

X = X1,X2,...,Xn , where each Xi : U R, i = 1,...,n. We let X(M) denote the vector space of all vector → fields defined on M. For instance, if X is a vector field on R3, we may write X X(R3). ∈  Humber ma  course notes

Remark .. If M is a geometric object, we may want vectors which are tangent to M at some point. In this context, if p is a point in M, the vector Xp is a tangent vector to M at p, hence we write X T M. The set of all tangent vectors to M at all points of M is p ∈ p denoted by TM. In this sense, a vector field X can be regarded as a map from M to TM, which we express by X : M TM. More often, when chances of confusion are at a → minimum, we will write X T M, in which case it should be understood that X is ∈ p evaluated at p.

Examples.

..) An example of a vector field on R2 is

x y X = (sinx,e − ).

π/2 If p = (π/2,0), then Xp = (1,e ).

..) An example of a vector field on R3 is

X = (x2z,x,2yz).

If p = (1,1,1), then Xp = (1,1,2) and if q = (2,0,3) then Xq = (12,2,0).

ȴ

In fact, we have seen lots of vector fields, we use them all the time. If f : Rn R is a → real-valued function, then gradf is a vector field, which is often reffered to as, simply, the gradient field of f . At any point p, the gradient vector at p is denoted gradp f .

Example . If f (x,y) = x2 + y2, then

p x y gradf = , . 2 2 2 2  x + y x + y    p p  The vector field gradf is visualized by attaching the vector gradp f to each point p, as depicted in Figure .. In this particular figure, two level sets of f are also depicted. Notice that each gradient vector is orthogonal to the level curves! ȴ

If γ : R R3 is a parametrization of a curve, then γ (t) is a vector field. For each point → 0 γ(t) on the curve, there corresponds a tangent vector γ0(t). For example, if

 Humber ma  course notes

2

1

0

1 − 2 − 2 1 0 1 2 − −

Figure .: The gradient field for f (x,y) = x2 + y2 depicted with two level curves. p

Figure .: The tangent vector field for the parametrization γ(t) = (cost,sint).

γ(t) = (cost,sint) is the counterclockwise parametrization of the unit circle, then the tangent vector field is γ (t) = ( sint,cost), which is depicted in Figure .. 0 − Definitions.

..) Let X = (X1,...,Xn) be a vector field on Rn. The of X, denoted divX, is the scalar function defined by

n ∂Xi divX = . (.) ∂xi Xi=1

 Humber ma  course notes

..) Let X = (X1,X2,X3) be a vector field on R3. The of X, denoted curlX, is the vector field defined by

e1 e2 e3 curlX = det ∂ ∂ ∂ . (.) ∂x ∂y ∂z    1 2 3 X X X      As with the cross product, the determinant in (.) should be understood as a formal   expression. By expanding (.) along the first row and treating the second row entries as partial differential operators, we have ∂X3 ∂X2 ∂X1 ∂X3 ∂X2 ∂X1 curlX = , , (.) ∂y − ∂z ∂z − ∂x ∂x − ∂y !

Both the divergence and curl can be expressed in terms of the del operator ∂ ∂ ∂ = , , . (.) ∇ ∂x ∂y ∂z ! The divergence of X can be expressed by divX = ,X , (.) h∇ i while the curl of X can be expressed by curlX = X. (.) ∇ × The curl of a vector field only makes sense in R3, but divergence can be defined on Rn. On Rn, the del operator is ∂ ∂ ∂ = , ,..., (.) ∇ ∂x ∂x ∂x 1 2 n ! and divX can still be defined by (.) for a vector field on Rn, by using the correct del operator. Now, if X is a vector field on Rn, it is also commonplace to use the notation n ∂ X = Xi (.) ∂xi Xi=1 as an alternative to X = (X1,...,Xn). The notation (.) is particularly useful in the following context. If f : Rn R is a continuously differentiable (smooth) function, then → X maps f to a new function Xf defined by

Xf (p) = Xpf .

 Humber ma  course notes

At this point, we will briefly discuss the meaning of divergence and curl of a vector field. The (physical) interpretation of the divergence and curl of a vector field should become more clear after studying Stokes’ Theorem and its consequences. The divergence of a vector field measures how much of the field is flowing out of a region. As the name might suggest, the curl of a vector field tells us if a particle placed in the field will rotate, or curl. More particularly, at a point p, the vector curlp X defines an axis around which particles in the vicinity of p will rotate. Moreover, curlp X measures how quickly particles rotate around this axis. k k

§ Differential forms

In this section, we extend the constant forms of the last section to families of forms. If M is a geometric object (manifold) and p is a point on M, we want to define forms that vary as a tangent vector X T M varies. Recall that T M denotes the set of all tangent vectors ∈ p p at p. If ω is a 1-form, in addition to the criteria (L)-(L), we want ω(X) to vary smoothly as the tangent vector X varies. In short, what this requires is that the coefficients of ω be smooth functions. The definition of smooth can vary depending on the context, but a function must be at least differentiable to be considered smooth. Unless otherwise stated, we will assume smooth functions are infinitely differentiable, thus we can take as many derivatives as necessary. Thus, a differential 1-form on Rn, or simply a 1-form, is a linear function ω : Rn R which maps a (tangent) vector to a real number and which can be expressed as →

ω = ω1 dx + ω2 dx + + ωn dx , (.) 1 2 ··· n where each ωi is a real-valued, continuously differentiable function on Rn, i = 1,...,n. The coordinate 1-forms are defined, as before, by (.). Differential 1-forms are also referred to as covector fields, since the input of a 1-form is really a vector field, in general. The vector space of all 1-forms on Rn will be denoted by Λ1(Rn). If ω is a 1-form and X T M, then ∈ p ω(X) = ω1(p)dx (X) + ω2(p)dx (X) + + ωn(p)dx (X). 1 2 ··· n Notice that each component function ωi is evaluated at the point p, while the coordinate 1-forms are evaluated at the vector X.

Example . Suppose γ(t) = (t,t2,t3) and let M be the corresponding curve. Then,

2 γ0(t) = (1,2t,3t )

 Humber ma  course notes

is the vector field which defines the tangent vector at each point on M. Let ω = 2xyz dx y2 dy (yz 30)dz be a covector field (1-form) on R3. At t = 2, the point − − − p = γ(2) = (2,4,8) has tangent vector γ0(2) = (1,4,12). Hence, 2 ω(γ0(2)) = 2(2 4 8)dx(γ0(2)) (4) dy(γ0(2)) (4 8 30)dz(γ0(2)) · · − − · − = 128(1) 16(4) 2(12) − − = 40. Again, notice that the component function 2xyz was evaluated by using the x,y,z coordinates of p = γ(2), respectively. ȴ

A differential k-form on Rn, or simply a k-form, is a mapping which accepts k vectors, outputs a scalar, and is multilinear and alternating, for which the component functions are continuously differentiable. A k-form on Rn can be expressed I ω = ω dxI , XI where we are summing over all indices I = i ,i ,...,i with i < i < < i and the ωI { 1 2 k} 1 2 ··· k are component functions. The notation dx is an abbreviation for dx dx , which I i1 ∧ ··· ∧ ik is an elementary k-form. There are n n! = k k!(n k)! ! − many elementary k-forms on Rn, where n! denotes n factorial. The vector space of all k-forms on Rn is denoted Λk(Rn). Remark .. A 0-form on Rn is simply a real-valued function defined on Rn.

Example . Let ω = y dx x dy and η = x2y dy xz2 dz be 1-forms on R3. Then, − − ω η = x2y2 dx dy xyz2 dx dz x3y dy dy + x2z2 dy dz ∧ ∧ − ∧ − ∧ ∧ = x2z2 dy dz + xyz2 dz dx + x2y2 dx dy. ∧ ∧ ∧ ȴ

§..

Let f : Rn R be a real-valued function. The differential of f is the covector field, → denoted df , which is defined by n ∂f df = dxi. (.) ∂xi Xi=1  Humber ma  course notes

Example . If f (x,y) = cos(xy), then df is given by

∂f ∂f df = dx + dy ∂x ∂y = y sin(xy)dx x sin(xy)dy. − − ȴ

Proposition . (Properties of the differential). Let f ,g be continuously differen- tiable functions on Rn.

. For any a,b R, d(af + bg) = adf + b dg. ∈ . d(f g) = f dg + g df .

. d(f /g) = (g df f dg)/g2 whenever g , 0. −

Example . Let f (x,y) = cos(xy) and g(x,y) = xy. By virtue of ..., we may compute the differential of (f g)(x,y) = xy cos(xy) by a . In the previous example, we found that df = y sin(xy)dx x sin(xy)dy. − − Since dg = y dx + x dy, we have

d(f g) = f dg + g df = cos(xy)(y dx + x dy) + xy ( y sin(xy)dx x sin(xy)dy) − − = y cos(xy) xy2 sin(xy) dx + x cos(xy) x2y sin(xy) dy. − −     One can readily verify that computing the differential of xy cos(xy), directly, produces the same result. ȴ

Definition .. If ω is a k-form on Rn given by

I ω = ω dxI , XI then the exterior derivative of ω is the (k + 1)-form dω defined by

dω = dωI dx . (.) ∧ I XI  Humber ma  course notes

The differential of a real-valued function f is a special case of the exterior derivative. Since the exterior derivative of a k-form ω is a (k + 1)-form, d maps k-forms to (k + 1)-forms; that is,

d : Λk(Rn) Λk+1(Rn). →

Examples.

..) If η = (x2 + y2)dz then

dη = d(x2 + y2) dz ∧ = (2x dx + 2y dy) dz ∧ = 2x dx dz + 2y dy dz. ∧ ∧

..) Let ω = 2xyz dx, then

dω = d(2xyz) dx ∧ = (2yz dx + 2xz dy + 2xy dz) dx ∧ = 2yz dx dx + 2xz dy dx + 2xy dz dx ∧ ∧ ∧ = 2xz dx dy + 2xy dz dx. − ∧ ∧

..) An arbitrary differential 1-form on R3 can be expressed as

ω = ω1 dx + ω2 dy + ω3 dz,

 Humber ma  course notes where the component functions ωi depend on x,y and z. According to (.), we have

dω = dω1 dx + dω2 dy + dω3 dz ∧ ∧ ∧ ∂ω1 ∂ω1 ∂ω1 = dx + dy + dz dx ∂x ∂y ∂z ∧ ! ∂ω2 ∂ω2 ∂ω2 dx + dy + dz dy ∂x ∂y ∂z ∧ ! ∂ω3 ∂ω3 ∂ω3 dx + dy + dz dz ∂x ∂y ∂z ∧ ! ∂ω1 ∂ω1 ∂ω2 = dy dx + dz dx + dx dy ∂y ∧ ∂z ∧ ∂x ∧ ∂ω2 ∂ω3 ∂ω3 + dz dy + dx dz + dy dz ∂z ∧ ∂x ∧ ∂y ∧ ∂ω3 ∂ω2 ∂ω1 ∂ω3 ∂ω2 ∂ω1 = dy dz + dz dx + dx dy. ∂y − ∂z ∧ ∂z − ∂x ∧ ∂x − ∂y ∧ ! ! !

..) An arbitrary differential 2-form on R3 can be expressed as

ω = ω1 dy dz + ω2 dz dx + ω3 dx dy, ∧ ∧ ∧ where the component functions ωi depend on x,y and z. According to (.), we have

dω = dω1 dy dz + dω2 dz dx + dω3 dx dy ∧ ∧ ∧ ∧ ∧ ∧ ∂ω1 ∂ω1 ∂ω1 = dx + dy + dz dy dz ∂x ∂y ∂z ∧ ∧ ! ∂ω2 ∂ω2 ∂ω2 dx + dy + dz dz dx ∂x ∂y ∂z ∧ ∧ ! ∂ω3 ∂ω3 ∂ω3 dx + dy + dz dx dy ∂x ∂y ∂z ∧ ∧ ! ∂ω1 ∂ω2 ∂ω3 = dx dy dz + dy dz dx + dz dx dy ∂x ∧ ∧ ∂y ∧ ∧ ∂z ∧ ∧ ∂ω1 ∂ω2 ∂ω3 = + + dx dy dz. ∂x ∂y ∂z ∧ ∧ !

ȴ

 Humber ma  course notes

Theorem .. For an arbitrary k-form ω

d(dω) = 0.

Proposition . (Properties of the exterior derivative).

. If f is a smooth function on Rn and X is a smooth vector field on Rn, then

df (X) = Xf .

. If ω Λk(Rn), η Λ`(Rn), then ∈ ∈ d(ω η) = dω η + ( 1)kω dη. (.) ∧ ∧ − ∧ . d d = 0. ◦

Proposition . (Exterior derivative of 1-forms). For any 1-form ω and vector fields X and Y , dω(X,Y ) = X(ω(Y )) Y (ω(X)) ω(XY YX). (.) − − −

Definitions.

..) A 1-form ω is called exact if there exists a real-valued function f : Rn R such → that df = ω, in which case f is called a potential for ω. In general, a k-form ω is called exact if there exists a k 1-form η such that ω = dη. Note that the general case agrees − with the definition for a 1-form, since a real-valued function f is a 0-form.

..) On the other hand, a vector field X is called conservative if there exists a real-valued function f : Rn R such that gradf = X, in which case f is called a → potential for X.

Proposition ..

a) If the vector field X X(R3) is conservative, then curlX = 0. ∈ b) If a k-form ω is exact, then dω = 0.

Proof.

 Humber ma  course notes

a) Since X = gradf , curlX = curl(gradf ) = 0, since curl(gradf ) = 0 for any f : R3 R. → b) If ω is a 1-form, then ω = df for some function f , hence dω = d(df ) = 0, by Theorem ..

The same logic holds if ω is an exact k-form, since d d = 0. ◦ Definition .. A differential k-form η is called closed if dη = 0.

Thus, the statement of Proposition .-b) takes the following form. Proposition .. Every exact differential form is closed.

§.. Pullbacks/Change of coordinates

Let F : Rm Rn be a smooth, vector-valued mapping, which we will consider as a → change of coordinates (or change of variables). If ω is k-form on Rn, we want to determine how ω changes under this change of coordinates. More specifically, the mapping F sends coordinates in Rm to coordinates in Rn (the forward direction). The k-form ω is defined in terms of Rn-coordinates and we want to represent ω in terms of Rm-coordinates, thus we have to convert back to Rm-coordinates. In this context, we are pulling back coordinates in Rn to those in Rm.

Example . Consider the following example of changing coordinates (the substitution rule) from single-variable calculus. To compute the x dx, x2 + 4 Z we may set u = x2 + 4. In order to appropriately represent the integrand in terms of the new variable u, we compute du = 2x dx. In this way, we are pulling back from the u-coordinate to the x-coordinate, to give an expression for the differential form du in terms of x-coordinates. From this, we find x 1 dx, = du x2 + 4 2u Z Z1 = ln(u). 2

 Humber ma  course notes

ȴ

Examples. change of coordinate mappings

..) Let F : R2 R2 be defined by F(r,θ) = (r cosθ,r sinθ), which changes → x y coordinates from polar to Cartesian. In this context, we think of F as mapping |{z} |{z} (r,θ)-coordinates to (x,y)-coordinates (the forward direction). Given a k-form defined in (x,y)-coordinates, we want to pull back to (r,θ)-coordinates.

..) If F : R3 R2 is defined by F(x,y,z) = ( x2y ,y sinz), then u = x2y, v = y sinz and → u v we want to pull back a k-form from (u,v)-coordinates to (x,y,z)-coordinates. |{z} |{z}

ȴ

 Humber ma  course notes

Proposition . (Computing the pullback).

Rm Rn Let F : be a smooth mapping with component functions Fi, so F = (F1,...,Fn). → Rn Let ω be a differential form on . The pullback of ω by F, denoted F∗ω, satisfies the following properties.

. If ω = dxi, the ith coordinate 1-form, then

F∗dxi = dFi, (.)

the differential of the ith component of F. n i . If ω = ω dxi, then i=1 n P i F∗ω = (ω F)dF . (.) ◦ i Xi=1 . If g : Rn R is continuous and ω is a covector field (1-form), then →

F∗(gω) = (g F)F∗ω. (.) ◦ If g is also differentiable, then

F∗dg = d(g F). (.) ◦

. If F : Rm Rn, G : Rn Rp and ω is a differential form on Rp, then → →

(G F)∗ω = F∗(G∗ω). (.) ◦ . If ω is a k-form and η is an `-form, then

F∗(ω η) = (F∗ω) (F∗η). (.) ∧ ∧

Example . (Polar coordinates.) Consider the elementary 2-form on R2 ω = dx dy. ∧ Let F(r,θ) be as in Example .. and let F1(r,θ) = r cosθ, F2(r,θ) = r sinθ be the coordinate functions. The pullback of ω by F can be determined by using the previous

 Humber ma  course notes

properties. We have

F∗ω = F∗(dx dy) ∧ = (F∗dx) (F∗dy) by (.) ∧ = (dF ) (dF ) by (.) 1 ∧ 2 = d(r cosθ) d(r sinθ) ∧ = (cosθ dr r sinθ dθ) (sinθ dr + r cosθ dθ) − ∧ = r cos2 θ dr dθ r sin2 θ dθ dr ∧ − ∧ = r(cos2 θ + sin2 θ)dr dθ ∧ = r dr dθ. ∧

This yields an expression for ω in polar coordinates. Since ω is an elementary form, computing the pullback F∗ω simply involves making the substitutions x = r cosθ, y = r sinθ and computing the exterior derivative (differential) of each component, in terms of the variables r and θ. ȴ

Example . Consider the 1-form on R2 ω = v du + u dv. Let F(x,y,z) be as in Example ... The pullback F∗ω can be computed as follows, 2 2 F∗ω = y sinz d(x y) + x y d(y sinz) = y sinz(2xy dx + x2 dy) + x2y(sinz dy + y cosz dz) = 2xy2 sinz dx + 2x2y sinz dy + x2y2 cosz dz.

Notice that, since ω is not constant, we also must substitute for the component functions, according to (.). ȴ

§ Practice problems

P -. For the given forms ω,η compute ω η and simplify. ∧ a) ω = 2dx 7dy, η = 3dx + 5dy − −

b) ω = y dx x dy, η = xy dx + y dy −  Humber ma  course notes

c) ω = dx 4dz, η = 6dy dz dz dx + 2dx dy − ∧ − ∧ ∧

d) ω = xz dx + yz dy, η = y dy dz + z2 dz dx x3 dx dy ∧ ∧ − ∧

e) ω = cosy dx x siny dy, η = siny dx + x cosy dy −

P -. Let ω = η ψ, where η,ψ are the (constant) 1-forms ∧

η = n1 dx + n2 dy + n3 dz ψ = p1 dx + p2 dy + p3 dz.

a) Compute the wedge product η ψ algebraically to determine a simplified expression ∧ for ω of the form ω = ady dz + b dz dx + c dx dy. ∧ ∧ ∧

b) Let n = (n ,n ,n ) and p = (p ,p ,p ). Show that (a,b,c) = n p. 1 2 3 1 2 3 ×

P -. For each of the following functions, determine the gradient vector field and sketch the vector field.

a) f (x,y,z) = x2 + y2 + z2

b) f (x,y,z) = 1 √x2+y2+z2 c) f (x,y,z) = log(x2 + y2)

P -. Compute the divergence and curl of each vector field from the previous problem. Note that the gradient field resulting from the function inP -c should be defined on R3, even though f is independent of z.

P -. Compute the divergence and curl of the vector field

X = (x,y,z).

 Humber ma  course notes

P -. Compute the divergence and curl of the vector field

X = (x2 + 1,xyz,sin(x + y)).

P -. For each of the following functions determine the differential. a) f (x,y) = x2y sin(x2y)

x2 2xy b) f (x,y) = − x3 + y3

xyz c) f (x,y,z) = x2 + y2 + z2

d) f (x,y,z) = exy + cos(xyz)

e) f (x,y,z) = x2y3z 2xyz2 −

P -. Show that d2f = d(df ) = 0 for an arbitrary function f : R3 R (0-form). →

P -. Compute the exterior derivative of the following 1-forms, which are defined on R3 unless otherwise stated. a) ω = 2x2 dx + (x + y)dy on R2 b) η = x dx + (x 2y)dy on R2 − − c) ω = x3 dx + yz dy + (x2 + y2 + z2)dz d) ψ = y2z dx xz dy + (2x + 1)dz − e) η = x dx + y2 dy + z3 dz f) ψ = 2dx dy + 4dz −  Humber ma  course notes

g) ω = x2yz dx 2xy3z dy + 3xyz4 dz − h) η = yz2 dx + (x + z2)dy + (x2 y)dz −

P -. Show that d2ω = d(dω) = 0 for an arbitrary 1-form ω = ω1 dx + ω2 dy + ω3 dz on R3. If the superscripts bother you, let ω = f dx + g dy + hdz, where f ,g,h are all functions from R3 to R.

P -. Compute the exterior derivative of the following 2-forms on R3.

a) ω = x dx dy + z dy dz + y dz dx ∧ ∧ ∧

b) η = (x2 + y2)dy dz ∧

c) ω = (x2 y2)dy dz + (x y2)dz dx + 3z dx dy − ∧ − ∧ ∧

d) ψ = (x2 + y2)dy dz + (x + y z2)dz dx 6xy dx dy ∧ − ∧ − ∧

e) η = (9xz2 4xy)dx dy + (x + 2y 3z)dy dz (3x + 4yz2)dz dx − ∧ − ∧ − ∧

P -. Let ψ and ω be as inP -d andP -a, respectively. Compute the following:

dψ, ψ dψ, dω, ψ ω ∧ ∧

P -. Let ω = dx z dy and ν = (x2 + y2 + z2)dz dx + (xyz)dy dz. Compute the following: − ∧ ∧ dω, ω dω, dν, ω ν ∧ ∧

P -. Let ω = x dy dz + y dz dx + z dx dy. ∧ ∧ ∧ a) Determine an expression for ω in spherical coordinates. In other words, if F : R3 R3 is defined by → F(ρ,θ,ϕ) = (ρ sinϕ cosθ,ρ sinϕ sinθ,ρ cosϕ),

x y z | {z } | {z } | {z }  Humber ma  course notes

compute the pullback, F∗ω, of ω by F. b) Compute dω in both Cartesian and spherical coordinates, then check that they represent the same 2-form.

 Humber ma  course notes

 Chapter 

Integration and the fundamental correspondence

§ The correspondence between vector fields and differential forms

If f : Rn R, we have already noted similarities between the gradient vector field → ∂f ∂f gradf = ,..., ∂x ∂x 1 n ! and the differential ∂f ∂f df = dx1 + + dxn. ∂x1 ··· ∂xn Likewise, if X = (P,Q,R) is a vector field on R3, there seems to be a correspondence between curlX and the exterior derivative of ω = P dx + Q dy + Rdz. In this section, we discuss this correspondence in detail and show how we can use this correspondence in practice for certain types of integrals. Moreover, this correspondence will aid in understanding and deciphering the many faces of Stokes Theorem. In order to make the correspondence clear, we will introduce three operators.

Definitions.

..) Let X = (X1,X2,X3) be a vector field on R3 and let X[ (“X flat”) denote the corresponding covector field (1-form) X[ = X1 dx + X2 dy + X3 dz. (.)

 Humber ma  course notes

..) On the other hand, if ω = ω1 dx + ω2 dy + ω3 dz is a covector field on R3, let ω] (“ω sharp”) denote the corresponding vector field

ω] = (ω1,ω2,ω3). (.)

For example, if f : R3 R, then → ∂f ∂f ∂f gradf = , , ∂x ∂y ∂z ! and ∂f ∂f ∂f (gradf )[ = dx + dy + dz. ∂x ∂y ∂z

That is, (gradf )[ = df . On the other hand, (df )] = gradf .

grad f gradf −−−−−→ [ f df  −−−−−→d y Definition .. The Hodge star operator, , on R3 takes k-forms to (3 k)-forms. If η is a ∗ − k-form on R3, then η is a (3 k)-form on R3. In terms of elementary forms on R3, we have ∗ −

1 = dx dy dz, ∗ ∧ ∧ dx = dy dz, (dy dz) = dx, ∗ ∧ ∗ ∧ dy = dz dx, (dz dx) = dy, ∗ ∧ ∗ ∧ dz = dx dy, (dx dy) = dz, ∗ ∧ ∗ ∧ (dx dy dz) = 1. ∗ ∧ ∧

For example, if ω is an arbitrary 1-form on R3, given by

ω = ω1 dx + ω2 dy + ω3 dz, where the component functions ωi depend on x,y and z, then ω is the 2-form ∗ ω = ω1 dx + ω2 dy + ω3 dz ∗ ∗ ∗ ∗ = ω1 dy dz + ω2 dz dx + ω3 dx dy. ∧ ∧ ∧

 Humber ma  course notes

On the other hand, if η is an arbitrary 2-form on R3, given by

η = η1 dy dz + η2 dz dx + η3 dx dy, ∧ ∧ ∧ then η is the 1-form ∗ η = η1 (dy dz) + η2 (dz dx) + η3 (dx dy) ∗ ∗ ∧ ∗ ∧ ∗ ∧ = η1 dx + η2 dy + η3 dz.

Remark .. Notice the similarity between the relations

(dy dz) = dx, e e = e , ∗ ∧ 2 × 3 1 (dz dx) = dy, and e e = e , ∗ ∧ 3 × 1 2 (dx dy) = dz, e e = e . ∗ ∧ 1 × 2 3

If f : R3 R is a real-valued function (0-form), then f is the 3-form f = f dx dy dz. → ∗ ∗ ∧ ∧ On the other hand, if ψ is an arbitrary 3-form on R3, given by

ψ = g dx dy dz, ∧ ∧ then ψ is the 0-form ψ = g, where g : R3 R is a real-valued function. ∗ ∗ → Proposition .. If X = (P,Q,R) is a vector field on R3, where P,Q,R are functions of x,y,z, then

] curlX = d(X[) (.) ∗ or, equivalently,  

(curlX)[ = d(X[). (.) ∗ The divergence of X satisfies d( X[) = divX. (.) ∗ ∗

§ Flux integrals

Suppose X X(R3) is a vector field on R3 and let M be a surface. If the vector field X represents the∈ velocity vectors of a fluid, we want to determine the rate at which the fluid moves across the surface. This type of calculation corresponds to the physical quantity of flux, which is the amount of fluid that crosses the surface per unit of time.

 Humber ma  course notes

Let the surface M be parametrized by a map ψ : D R2 R3, ⊂ → ψ(u,v) = (x(u,v),y(u,v),z(u,v)), where D is the subset of R2 on which ψ is defined. In this context, D may be referred to as the domain of integration. Then each of the vectors ∂ψ ∂x ∂y ∂z = , , ∂u ∂u ∂u ∂u ! and ∂ψ ∂x ∂y ∂z = , , ∂v ∂v ∂v ∂v ! is a tangent vector to the surface at the point ψ(u,v). The vector ∂ψ ∂ψ ∂u × ∂v is orthogonal (recall that normal and orthogonal are synonymous) to the tangent plane at this point. Define the unit normal vector to M at the point ψ(u,v) by

∂ψ ∂ψ N(u,v) = ∂u × ∂v , (.) ∂ψ ∂ψ k ∂u × ∂v k where all the partial derivatives are evaluated at (u,v). The flux of the vector field X across the surface M, in the direction of the unit normal vector N, is defined by the integral ∂ψ ∂ψ X(ψ),N du dv. (.) h i ∂u × ∂v D † If D is the rectangle D = (u,v) a u b,c v d , { | ≤ ≤ ≤ ≤ } then (.) can be expressed as the double integral

d b ∂ψ ∂ψ X(ψ),N du dv. c a h i ∂u × ∂v Z Z Integrating over more general regions will be discussed in the sequel.

Example . Determine the flux of the vector field X = (x,y,2z) across the surface M, which is the portion of the unit sphere in the first octant. In terms of Cartesian coordinates, the first octant is characterized by x 0, y 0 and z 0. The mapping ≥ ≥ ≥ ψ(θ,ϕ) = (sinϕ cosθ,sinϕ sinθ,cosϕ)

 Humber ma  course notes

parametrizes the unit sphere in spherical coordinates. The first octant is obtained by the restriction 0 ϕ π/2 and 0 θ π/2. The tangent vectors are ≤ ≤ ≤ ≤ ∂ψ = ( sinϕ sinθ,sinϕ cosθ,0) ∂θ − and ∂ψ = (cosϕ cosθ,cosϕ sinθ,2cosϕ). ∂ϕ The unit normal vector is 1 N = ( sin2 ϕ cosθ, sin2 ϕ sinθ, sinϕ cosϕ) sinϕ − − − = ( sinϕ cosθ, sinϕ sinθ, cosϕ). − − − We have X(ψ) = (sinϕ cosθ,sinϕ sinθ,2cosϕ), hence

X(ψ),N = sin2 ϕ cos2 θ sin2 ϕ sin2 θ 2cos2 ϕ h i − − − = sin2 ϕ 2cos2 ϕ − − = (1 + cos2 ϕ). − Thus, to determine the flux, we compute

π/2 π/2 = sinϕ(1 + cos2 ϕ)dϕ dθ 0 0 − Z π 2 Z / π/2 3 = (cosϕ + 1/3 cos ϕ) dθ 0 0 Z π 2 / 4 = dθ −3 Z0 2π = . − 3

The amount of fluid crossing the surface per unit of time is 2π . Note that the chosen − 3 normal vector N is inward pointing, so our calculation tells us how much fluid is entering the surface, but the value is negative which tells us that fluid is, in fact, exiting the surface. The same calculation can be performed by integrating a differential form. According to the previous section, the vector field X = (x,y,2z) corresponds to the differential 2-form

ω = X[ = x dy dz + y dz dx + 2z dx dy. ∗ ∧ ∧ ∧  Humber ma  course notes

The flux integral of X over M is precisely the same as the integral of the pullback ψ∗ω. Note that

ψ∗(x dy dz) = (sinϕ cosθ)d(sinϕ sinθ) d(cosθ) ∧ ∧ = (sinϕ cosθ)((cosϕ sinθ dϕ + sinϕ cosθ dθ) ( sinϕ dϕ)) ∧ − = sin3 ϕ cos2 θ dθ dϕ, − ∧ ψ∗(y dz dx) = (sinϕ sinθ)d(cosϕ) d(sinϕ cosθ) ∧ ∧ = (sinϕ sinθ)(( sinϕ dϕ) (cosϕ cosθ dϕ sinϕ sinθ dθ)) − ∧ − = sin3 ϕ sin2 θ dθ dϕ, − ∧ ψ∗(2z dx dy) = (2cosϕ)d(sinϕ cosθ) d(sinϕ sinθ) ∧ ∧ = 2cosϕ((cosϕ cosθ dϕ sinϕ sinθ dθ) (cosϕ sinθ dϕ + sinϕ cosθ dθ)) − ∧ = ( 2sinϕ cos2 ϕ sin2 θ 2sinϕ cos2 ϕ cos2 θ)dθ dϕ − − ∧ = 2sinϕ cos2 ϕ dθ dϕ. − ∧ Thus, the pullback is given by

3 2 ψ∗ω = ( sin ϕ 2sinϕ cos ϕ)dθ dϕ − − ∧ = sinϕ(sin2 ϕ + cos2 ϕ + cos2 ϕ)dθ dϕ − ∧ = sinϕ(1 + cos2 ϕ)dθ dϕ, − ∧ hence we integrate

π/2 π/2 2 ψ∗ω = sinϕ(1 + cos ϕ)dθ dϕ. − Z Z0 Z0

ȴ

Surface area and integrating over simple domains

Let M be a surface parametrized by a map ψ : D R2 R3, ⊂ → ψ(u,v) = (x(u,v),y(u,v),z(u,v)),

where D is the subset of R2 on which ψ is defined. The surface area of M os given by

∂ψ ∂ψ du dv. (.) ∂u × ∂v D †  Humber ma  course notes

Example . Let M be the surface parametrized by

ψ(r,θ) = (r cosθ,2r cosθ,θ)

for 0 r 1 and 0 θ 2π. Then, the tangent vectors are ≤ ≤ ≤ ≤ ∂ψ = (cosθ,2cosθ,0) ∂r ∂ψ = ( r sinθ, 2r sinθ,1) ∂θ − − and the normal vector is ∂ψ ∂ψ = (2cosθ, cosθ,0). ∂r × ∂θ − The norm of the normal vector, ∂ψ ∂ψ , is ∂r × ∂θ cosθ, 0 θ π and 3π θ 2π, √ 2 √ √ 2 2 5cos θ = 5 cosθ = 5 π ≤ ≤ 3π ≤ ≤ | |  cosθ, 2 θ 2 . − ≤ ≤  The absolute value is important here, as without it, we would get the wrong answer.  Now, the first case is equivalent to cosθ for π/2 θ π/2, so the area is − ≤ ≤ 2π 1 π/2 3π/2 √5 cosθ dr dθ = √5 cosθ dθ + √5 cosθ dθ 0 0 | | π/2 π/2 − Z Z Z− Z π 3π 2 2 = √5 sinθ sinθ π π −2 − 2 ! = 4√5.

ȴ

Suppose f : R2 R is a real-valued function and we want to compute → f (x,y)dx dy, (.) ∧ ZD where D is a domain of integration in R2. The integral (.) represents the volume in R3 bounded by the graph of f and the region D in the xy-plane. So far, we have only encountered the case when D is a rectangular region, corresponding to the intervals a x b and c y d. We want to allow for more general domains of integration. First, consider≤ ≤ the case≤ when≤ D = (x,y) 0 y g(x), a x b , { | ≤ ≤ ≤ ≤ } where g is a real-valued function of x. The idea is to parametrize the domain D, then compute the pullback of the differential form f (x,y)dx dy. In this case, the region D ∧  Humber ma  course notes

can be parametrized by the map ψ(u,v) = (u,vg(u)), where a u b and 0 v 1. The pullback is given by ≤ ≤ ≤ ≤

ψ∗(f (x,y)dx dy) = f (u,vg(u))d(u) d(vg(u)) ∧ ∧ = f (u,vg(u))du (vg0(u)du + g(u)dv) ∧ = f (u,vg(u))g(u)du dv. ∧ Hence, the integral of f over D becomes

f = ψ∗(f (x,y)dx dy) D ∧ Z Z 1 b = f (u,vg(u))g(u)du dv. Z0 Za

On the other hand, if D = (x,y) 0 x h(y), c y d , { | ≤ ≤ ≤ ≤ } then the region D can be parametrized by the map ψ(u,v) = (uh(v),v), where 0 u 1 ≤ ≤ and c v d. In this case, the integral of f over D becomes ≤ ≤

f = ψ∗(f (x,y)dx dy) D ∧ Z Z d 1 = f (uh(v),v)h(v)du dv. Zc Z0

Example . The portion of the cone x2 + y2 = z2 above z = 0 and inside the sphere x2 + y2 + z2 = 4ax, where a > 0, can be parametrized by

F(r,θ) = (r cosθ,r sinθ,r),

for π/2 θ π/2 and 0 r 2acosθ. If M is the portion of the cone and η = z dx dy, let’s− compute≤ ≤ . ≤ ≤ ∧ M η R Method ) First, we compute the pullback of η by F,

F∗η = rd(r cosθ) d(r sinθ) ∧ = r2 dr dθ. ∧ The domain of integration is

D = (r,θ) π/2 θ π/2 and 0 r 2acosθ , { | − ≤ ≤ ≤ ≤ }  Humber ma  course notes

which can be parametrized by ψ(u,v) = (2au cosv,v), where 0 u 1 and ≤ ≤ π/2 v π/2. Using this parametrization, we can compute the pullback of the −pullback≤ ,≤

2 ψ∗(F∗η) = ψ∗(r dr dθ) ∧ = (2au cosv)2 d(2au cosv) dv ∧ = 8a3u2 cos3 v du dv. ∧ Hence, the integral of η over M becomes

π/2 1 3 2 3 ψ∗(F∗η) = 8a u cos v du dv π/2 0 Z Z− Z 8a3 π/2 = cos3 v dv 3 π/2 Z− 3 π 8a 1 2 = sinv sin3 v π 3 − 3 −2   32a3 = . 9

Method ) The same answer can be found by directly integrating F∗η over D, making sure to first integrate with respect to the variable bounded by functions. In this case,

π/2 2acosθ 2 F∗η = r dr dθ D π/2 0 Z Z−π Z /2 1 2acosθ = r3 dθ 0 π/2 3 − Z  π  8a3 /2 = cos 3 θ dθ 3 π/2 Z− 32a3 = . 9

ȴ

Example . Let’s compute the area of the surface in Example .. Given the parametrization F(r,θ) = (r cosθ,r sinθ,r),

 Humber ma  course notes we have tangent vectors ∂F = (cosθ,sinθ,1) ∂r and ∂F = ( r sinθ,r cosθ,0). ∂θ − The normal vector ∂F ∂F = ( r cosθ, r sinθ,r) ∂r × ∂θ − − has norm ∂F ∂F = r2 cos2 θ + r2 sin2 θ + r2 = √2r. ∂r × ∂θ p Given the bounds for r and θ from the previous example, we have

π 2 2 cos π 2 / a θ / √2 2acosθ √2r dr dθ = r2 dθ 0 π/2 0 π/2 2 − − Z Z Z π /2 = 2√2a2 cos2 θ dθ π/2 Z− π/2 = √2a2 (1 + cos(2θ))dθ π/2 Z− 1 π/2 = √2a2 θ + sin(2θ) 2 π/2   − = √2πa2.

ȴ

Example . Compute the area of the portion of 4z2 = x2 + y2 inside the cylinder (x 1)2 + y2 = 1. The cylinder has radius 1 and is centered at (1,0,0), so x 0. Choosing − ≥ spherical coordinates, the equation 4z2 = x2 + y2 becomes 4ρ2 cos2 ϕ = ρ2 sin2 ϕ, hence tan2 ϕ = 4, which implies tanϕ = 2. Since x 0, we only need to consider tanϕ = 2 or ± ≥ ϕ = arctan2. Before proceeding, the problem can be restated: Determine the surface area of the portion of the cone ϕ = arctan2 which is inside the given cylinder. Converting the equation of the cylinder to spherical coordinates, we have

(ρ sinϕ cosθ 1)2 + ρ2 sin2 ϕ sin2 θ = 1. − Simplifying and solving this equation for ρ yields two solutions 2cosθ ρ = 0 and ρ = . sinϕ

 Humber ma  course notes

2 Since ϕ = arctan2 is fixed, the denominator of the second solution is sin(arctan2) = , √5 hence ρ = √5cosθ 2 1 is the second solution and 0 ρ √5cosθ. Now, sinϕ = and cosϕ = , so the ≤ ≤ √5 √5 portion of the cone inside the cylinder can be parametrized by 2ρ 2ρ ρ F(ρ,θ) = cosθ, sinθ, , √5 √5 √5 ! where 0 ρ √5cosθ and π/2 θ π/2. Notice that the bounds for θ correspond to ≤ ≤ − ≤ ≤ x 0. ≥ With the parametrization taken care of, we are now ready to compute the surface area, starting with the tangent vectors

∂F 2 2 1 = cosθ, sinθ, ∂ρ √5 √5 √5 ! and ∂F 2ρ 2ρ = sinθ, cosθ,0 . ∂θ −√5 √5 ! The corresponding normal vector is

∂F ∂F 2ρ 2ρ 4ρ = cosθ, sinθ, , ∂ρ × ∂θ − 5 − 5 5 ! with norm ∂F ∂F 2 = ρ. ∂ρ × ∂θ √5

Hence, the surface area is

π/2 √5cosθ 2 π/2 5 ρ dρ dθ = cos2 θ dθ π/2 0 √5 π/2 √5 Z− Z Z− π √5 1 2 = θ + sin(2θ) π 2 2 2   − √5 = π. 2

ȴ

 Humber ma  course notes

§.. Line integrals and work

If γ :[a,b] Rn parametrizes a curve, where [a,b] R, and ω is a covector field on Rn, → ⊂ then the (or path integral) of ω over the curve (parametrized by) γ is

b

ω = γ∗ω, (.) γ Z Za

where γ∗ω is the pullback of ω by γ.

Example . Consider the covector field ω = x dx y dy on R2 and let − γ(t) = (cost,sint), 0 t 2π, parametrize the unit circle, oriented counterclockwise. To compute the line integral≤ ≤ ω, Zγ we first compute the pullback

γ∗ω = cost d(cost) sint d(sint) − = cost( sint dt) sint(cost dt) − − = 2sint cost dt. − Thus, we have 2π ω = γ∗ω Zγ Z0 2π = 2 sint cost dt − 0 Z 2π = sin2 t − 0 = 0.

ȴ

Now, suppose ω = P dx + Q dy + Rdz is a covector field on R3, where P,Q,R are real-valued functions of x,y,z. The covector field ω corresponds to the vector field ω] = (P,Q,R). If γ(t) = (x(t),y(t),z(t)) parametrizes a curve in R3, then

γ∗ω = P (γ(t))d(x(t)) + Q(γ(t))d(y(t)) + R(γ(t))d(z(t)) = P (γ(t))x0(t)dt + Q(γ(t))y0(t)dt + R(γ(t))z0(t)dt (.) = (P (γ(t))x0(t) + Q(γ(t))y0(t) + R(γ(t))z0(t)) dt ] = ω (γ(t)),γ0(t) dt. h i

 Humber ma  course notes

What this tells us is that computing the pullback of the covector field ω by a parametrized curve γ is the same as evaluating the corresponding vector field at γ(t) and taking the inner product with the tangent vector γ0(t). In general, if X is a vector field on Rn and γ :[a,b] Rn, the line integral of X over γ, denoted X ds, is defined by → · Zγ b X ds = X(γ(t)),γ0(t) dt. (.) · h i Zγ Za By (.), the line integral of a covector field is the same as the line integral of the corresponding vector field and vice versa. If X is a vector field, then

X ds = X[. (.) · Zγ Zγ Equivalently, if ω is covector field, then

ω = ω] ds. (.) · Zγ Zγ If the vector field X is a force field and γ(t) is the position of a particle at time t, the line integral X ds represents the work done on the particle as it traverses from γ(a) to · Zγ γ(b).

Example . Let’s compute the work done by the force field X = (x,y,z) in moving a particle along y = x2, z = 0, from x = 1 to x = 2. Whether we prefer to use the vector − field X or the covector field X[ = x dx + y dy + z dz, we must first determine a parametrization for the curve. Take γ(t) = (t,t2,0), with 1 t 2. The pullback of X[ − ≤ ≤ by γ is [ 2 γ∗(X ) = t dt + t (2t dt) + 0, hence the work done is

2 2 [ 3 γ∗(X ) = (t + 2t )dt 1 1 Z− Z− 1 1 2 = t2 + t4 2 2 1 − = (2 + 8) (1/2 + 1/2) − = 9.

ȴ

 Humber ma  course notes

γ

M

Figure .: The region M is bounded by the simple closed curve parametrized by γ.

Definitions.

..) A curve parametrized by γ :[a,b] Rn is called simple if it does not cross, or → intersect, itself. In other words, the curve is simple if γ is one-to-one (i.e., γ(t) = γ(s) if and only if t = s), except possibly at the endpoints of [a,b].

..) A curve parametrized by γ :[a,b] Rn is called closed if γ(a) = γ(b). → Remark .. If γ parametrizes a closed curve, the notations

ω, ω γ γ are sometimes used to denote the line integrals of ω with respect to the clockwise and counterclockwise orientations, respectively.

For example, the unit circle, parametrized by γ(t) = (cost,sint), 0 t 2π, is simple and ≤ ≤ closed. The helix γ(t) = (cost,sint,t), 0 t 2π, is simple but not closed. There are certainly examples of closed curves which≤ ≤ are not simple, such as a figure eight in the plane. Suppose M is a region in the plane bounded by a simple closed curve, which is parametrized by γ(t) = (x(t),y(t)), where a t b. A region of this type is depicted in Figure .. ≤ ≤ The area of M can be found by integrating the 2-form dx dy over M. That is, if A(M) ∧ denotes the area of M, then A(M) = dx dy. (.) ∧ ZM  Humber ma  course notes

Since the boundary of M is the image of γ, the solid region M may be parametrized by F(r,t) = (rx(t),ry(t)), where 0 r 1 and a t b. Thus, the area of M satisfies ≤ ≤ ≤ ≤

A(M) = dx dy = F∗(dx dy). (.) ∧ ∧ ZM Z The pullback of dx dy by F is ∧ F∗(dx dy) = d(rx(t)) d(ry(t)) ∧ ∧ = (x(t)dr + rx0(t)dt) (y(t)dr + ry0(t)dt) ∧ = (rx(t)y0(t) rx0(t)y(t))dr dt. − ∧ Hence, the area of M is given by

b 1 F∗(dx dy) = r(x(t)y0(t) x0(t)y(t))dr dt ∧ − Z Za Z0 1 b = (x(t)y0(t) x0(t)y(t))dt. 2 − Za This proves the first part of the following proposition. Proposition .. Let γ(t) = (x(t),y(t)) be a parametrization of a simple, closed plane curve, where a t b. Assume the curve is positively oriented (counterclockwise). ≤ ≤

. The area bounded by γ is given by

1 b (x(t)y0(t) x0(t)y(t))dt. (.) 2 − Za . The area bounded by γ is given by the line integral

ω, (.) Zγ where ω is the covector field 1 ω = ( y dx + x dy). (.) 2 −

Proof. To show that (.) holds, we first compute the pullback 1 γ∗ω = ( y(t)d(x(t)) + x(t)d(y(t))) 2 − 1 = ( y(t)x0(t)dt + x(t)y0(t)dt). 2 −

 Humber ma  course notes

By definition, b ω = γ∗ω, Zγ Za which is precisely the same as (.).

We will soon see that the above formulas for the area bounded by a simple, closed plane curve can also be seen as a consequence of Stokes Theorem.

Examples.

..) Let M be the disc of radius a > 0 in the xy-plane, which can be parametrized by F(r,θ) = (r cosθ,r sinθ) for 0 r a and 0 θ 2π. According to (.), since ≤ ≤ ≤ ≤ F (dx dy) = r dr dθ, the area of the disc is ∗ ∧ ∧ 2π a 2π a2 r dr dθ = dθ 2 Z0 Z0 Z0 = πa2.

..) Let’s compute the area bounded by the plane curve defined by the polar equation r = 1 + sinθ. Since x = r cosθ and y = sinθ, we can parametrize the curve with γ(θ) = ((1 + sinθ)cosθ,(1 + sinθ)sinθ), where 0 θ 2π. If ω is given by (.), the ≤ ≤ pullback by γ is

1 γ ω = (cosθ + sinθ cosθ)(cosθ + 2sinθ cosθ)dθ ∗ 2 (sin θ + sin2 θ)( sinθ + cos2 θ sin2 θ)dθ − − − 1 = (1 + 2sinθ cos2 θ + sin2 θ cos2 θ + 2sin3 θ + sin4 θ)dθ 2 1 = (1 + 2sinθ cos2 θ + sin2 θ + 2sin3 θ)dθ 2 1 = (1 + 2sinθ + sin2 θ)dθ. (.) 2

2 After applying the identity sin θ = 1/2 1/2 cos2θ, we integrate − 2 π 3 1 3 1 2π + sinθ cos2θ dθ = θ cosθ sin2θ 4 − 4 4 − − 8 0 Z0   3π  = . 2

 Humber ma  course notes

ȴ

Consider the special case of a simple, closed plane curve which can be expressed in terms of a polar equation r = f (θ), where a θ b. The curve can be parametrized by ≤ ≤ γ(θ) = (f (θ)cosθ,f (θ)sinθ), where a θ b. Then, ≤ ≤ γ0(θ) = (f 0(θ)cosθ f (θ)sinθ,f 0(θ)sinθ + f (θ)cosθ). − hence, we have

x(θ)y0(θ) x0(θ)y(θ) =f (θ)cosθ (f 0(θ)sinθ + f (θ)cosθ) − (f 0(θ)cosθ f (θ)sinθ)f (θ)sinθ − − 2 2 =f (θ)f 0(θ)sinθ cosθ + f (θ) cos θ 2 2 f (θ)f 0(θ)sinθ cosθ + f (θ) sin θ − =f (θ)2(sin2 θ + cos2 θ) =f (θ)2. Applying (.), the area bounded by the curve is given by b b 1 1 2 (x(θ)y0(θ) x0(θ)y(θ))dθ = f (θ) dθ. (.) 2 − 2 Za Za The area bounded by the curve of Example .. can be computed by (.). Here, f (θ) = 1 + sinθ, where 0 θ 2π. The area is ≤ ≤ 1 2π 1 2π f (θ)2 dθ = (1 + sinθ)2 dθ 2 2 Z0 Z0 1 2π = (1 + 2sinθ + sin2 θ)dθ, 2 Z0 which is the integral of the differential form obtained in (.).

Arc length

Let γ :[a,b] Rn be a parametrization of a curve, where [a,b] R. The arc length of γ, → ⊂ denoted L(γ), is defined by b L(γ) = γ0(t) dt. (.) k k Za Recall that γ (t) is the speed. If γ (t) 1 (for all t), then γ is called a unit speed k 0 k k 0 k ≡ curve, or, more precisely, a unit speed parametrization of a curve. If γ is a unit speed curve, then b L(γ) = dt = b a. − Za  Humber ma  course notes

Since the arc length equals the length of the interval [a,b], a unit speed curve is also called parametrized by arc length.

Examples.

..) Let γ(t) = (acost,asint), where a > 0, which parametrizes the circle of radius a, 2 2 2 2 centered at the origin. Then γ0(t) = ( asint,acost) and γ0(t) = √a sin t + a cos t = a. Hence, − k k

2π L(γ) = adt = 2πa. Z0

..) Let γ(t) = (et cost,et sint) for 0 t 1. The tangent (velocity) vector is ≤ ≤ γ (t) = (et cost et sint,et sint + et cost) and 0 − 1 2t 2 2t 2 /2 γ0(t) = e (cost sint) + e (sint + cost) k k − 1/2 = e2t(cos2 t 2cost sint + sin2 t + sin2t + 2cost sint + cos2 t) − = √2e2t  = √2et.

So, the length of the curve is

1 1 L(γ) = √2et dt = √2et = √2(e 1). 0 − Z0

ȴ

§.. Orientations

In many cases, in order to properly integrate differential forms over surfaces and parametrized curves, we need to discuss how to orient them, when possible. In particular, when we are calculating a physical quantity, such as flux or work, the wrong answer can cause misinterpretation. Luckily, if the opposite orientation is chosen and all other information is correct, our calculation will only differ from the true answer by a negative. For instance, if γ(t) = (cost,sint) is a parametrization of the unit circle, representing the position of a particle, then the particle travels counterclockwise. On the other hand, we can just as well parametrize the unit circle by γ˜(t) = (cost, sint), for −  Humber ma  course notes

which a particle would travel clockwise. By choosing γ or γ˜, we are orienting the unit circle which, among other things, will allow us to appropriately define a path integral with respect to the oriented unit circle. For our purposes, we are mainly interested in orienting curves,surfaces and other geometric objects in R2 or R3. However, we may benefit from a brief discussion of orienting vector spaces. If V is a vector space, such as R2 or R3, then specifying an ordered basis of V determines an orientation of V . For instance, e1,e2 and e2,e1 are two, distinct ordered bases for R2 and, as it turns out, these two{ bases} determine{ } different orientations of R2. An orientation of R2 (or a 2-dimensional subspace) is determined by the direction of rotation from the first basis vector to the second. By orienting R2 in this way, we are assigning a positive direction for the measurement of angles from a fixed axis. For the ordered basis e1,e2 , the direction of rotation is counterclockwise, which agrees with our convention{ } that the positive direction for angles in the plane is counterclockwise. On the other hand, the ordered basis e2,e1 specifies a clockwise direction of rotation, as depicted in Figure .. A geometric{ object} in R2 whose orientation agrees with the ordered basis e ,e will be called positively { 1 2} oriented. For example, the parametrization γ(t) = (cost,sint) is positively oriented, as a particle would travel in the counterclockwise direction. A geometric object in R2 whose orientation agrees with the ordered basis e ,e will be called negatively oriented. For { 2 1} example, the parametrization γ˜(t) = (cost, sint) is negatively oriented, as a particle would travel in the clockwise direction. − y

e2 e ,e { 2 1}

e2 e1

x e1 e ,e { 1 2}

Figure .: The positive orientation of R2 is specified by the ordered basis e ,e , while { 1 2} the negative orientation is specified by the ordered basis e ,e . { 2 1} In general, to orient a curve, we specify a direction of traversal. To specify this direction, imagine the tangent line to the curve. If we ignore the zero tangent vector, at each point on the curve, the tangent line consists of two half-lines. At each point, the tangent vectors on these half-lines are pointed in opposing directions, as depicted for the unit

 Humber ma  course notes

circle in Figure .. By picking one of these half-lines, we specify a direction of traversal, and thus, an orientation.

y

x

Figure .: Orientations specified by two tangent half-lines along the unit circle.

An orientation of a surface M in R3 is a continuous assignment of a direction of rotation, to the tangent space TpM at each point p of M. In other words, we choose a direction of rotation between the basis vectors for TpM and this choice varies continuously over the surface. This choice varies continuously in the sense that it does not change abruptly. If such a continuous assignment can be made, the surface is called orientable. If a surface consists of more than one piece (e.g. a cylinder with a top), it is orientable if each piece can be assigned an orientation. A surface consisting of multiple smooth pieces is called piecewise smooth. One way to specify such a direction of rotation, is to specify a vector which is orthogonal (or normal) to the tangent space. If a surface M is parametrized by ∂F ∂F F : R2 R3, F(u,v) = (x(u,v),y(u,v),z(u,v)), then and are tangent vectors. These → ∂u ∂v two vectors form a basis for the tangent space at each point. Just as with R2, if we

 Humber ma  course notes

specify an ordered basis for TpM, we specify a direction of rotation. Now, the vector ∂F ∂F is orthogonal to the tangent space, but so is ∂u × ∂v ∂F ∂F ∂F ∂F = . −∂u × ∂v ∂v × ∂u

When we specify a direction of rotation between the basis vectors for TpM, we are implicity choosing ∂F ∂F ∂F ∂F or . ∂u × ∂v ∂v × ∂u So, which one do we choose? We choose the normal vector, so that when taken with the R3 chosen ordered basis for TpM, we obtain a basis for that agrees with the right-hand rule. For example, if we choose the ordered basis

∂F ∂F , ∂u ∂v ( ) ∂F ∂F for T M, then we should choose since p ∂u × ∂v

∂F ∂F ∂F ∂F , , ∂u ∂v ∂u × ∂v ( ) is a right-handed basis of R3. If we had chosen the ordered basis

∂F ∂F , ∂v ∂u ( ) ∂F ∂F for T M, then we should choose since p ∂v × ∂u

∂F ∂F ∂F ∂F , , ∂v ∂u ∂v × ∂u ( ) is a right-handed basis of R3. A surface M whose orientation agrees with the right-hand rule is called positively oriented. Likewise, any right-handed basis of R3 corresponds to the positive orientation of R3. This discussion relies on properties of the cross product, which are summed up in the following proposition.

3 Proposition .. If v1 and v2 are linearly independent vectors in R , then the ordered basis v ,v ,v v is positively oriented. { 1 2 1 × 2}  Humber ma  course notes

Based on this proposition and (.)-(.) in §§ .., the ordered bases e ,e ,e , { 1 2 3} e ,e ,e and e ,e ,e are right-handed, or positively oriented. On the other hand, the { 2 3 1} { 3 1 2} bases e ,e ,e , e ,e ,e and e ,e ,e are left-handed, or negatively oriented. { 2 1 3} { 3 2 1} { 1 3 2} In textbooks, it is conventional to specify an orientation by choosing a normal vector to the surface. For a surface, the choice of normal vector is specified as upward or downward, whenever it is clear which one is which. If a surface is closed, such as a sphere, the choice is betwen inward or outward normal. If a normal vector is specified first, we imagine that it points out of one side of the surface. When the surface is viewed from this side, the direction of rotation between tangent vectors is counterclockwise. Below, we outline a simple procedure for ensuring the correct answer is obtained when integrating over oriented surfaces.

When integrating over a surface with respect to a given orientation, or normal vec- tor:

. Choose a parametrization for the surface.

. If the parametrization agrees with the specified orientation (or normal vector) then integrate as usual.

. If the parametrization does not agree, then choose a new parametrization that does agree or simply integrate as usual and negate the final answer!

Example . Let X = (xzey, xzey,z). Determine the flux across the portion of the plane − x + y + z = 1 in the first octant, oriented according to the downward normal. The projection of the plane x + y + z = 1, in the first octant, onto the xy-plane is the triangular region where 0 x 1 and 0 y 1 x. The most straightforward parametrization is given by ≤ ≤ ≤ ≤ − ψ(u,v) = (u,v,1 u v), − − where 0 u 1 and 0 v 1 u. The tangent vectors are ≤ ≤ ≤ ≤ − ∂ψ = (1,0, 1) ∂u − and ∂ψ = (0,1, 1). ∂v − The cross product ∂ψ ∂ψ = (1,1,1) ∂u × ∂v  Humber ma  course notes

is normal to the surface, but it is upward pointing. Using this parametrization, the flux is

1 1 u 1 − 1 1 u 1 u v dv du = (1 u)v v2 − du 0 0 − − 0 − − 2 0 Z Z Z   1 1 = (1 u)2 du 0 2 − Z1 = . 6 But, since the chosen parametrization has opposite orientation, the flux according to the 1 downward normal is . ȴ −6

Now, suppose M is a solid body in R3. For example, the unit ball, defined by

(x,y,z) x2 + y2 + z2 1 { | ≤ } in Cartesian coordinates, is a solid body. The boundary of M is denoted ∂M. If M is the unit ball, then ∂M is the unit sphere. If M is an oriented solid body, with boundary ∂M, then the orientation of M induces an orientation on ∂M. The induced orientation on ∂M is such that the outward pointing normal to M at ∂M, followed by the orientation of ∂M, agrees with the orientation of M. For instance, consider the top of a cylinder (a disc), the boundary of which is the outer circle. The induced orientation on the boundary is such that rotation is counterclockwise, when viewed from the side the normal vector points out of. In this way, the induced orientation followed by the chosen normal vector agrees with the right hand rule. Now, for piecewise smooth surfaces, the boundaries which are common to two pieces are oriented in opposing directions. For example, see the oriented cylinder depicted in Figure ..

Example . Let the surface M be the graph of z = x2 y2 over the region x2 + y2 1, − ≤ y 0. Determine the flux of X = (x,y, 2y2) across M with respect to the upward ≥ − pointing normal. In cylindrical coordinates, z = r2 cos2 θ r2 sin2 θ = r2 cos(2θ), hence − F(r,θ) = (r cosθ,r sinθ,r2 cos(2θ))

parametrizes M. Since x2 + y2 1, we must have 0 r 1 and since y 0, we need ≤ ≤ ≤ ≥ 0 θ π. The tangent vectors are ≤ ≤ ∂F = (cosθ,sinθ,2r cos(2θ)) ∂u and ∂F = r sinθ,r cosθ, 2r2 sin(2θ) . ∂v − −    Humber ma  course notes

n

n

n

Figure .: The common boundaries of the cylinder are oriented in opposite directions with respect to the corresponding pieces of the surface.

Taking ∂F ∂F , ∂u ∂v ( ) as an ordered basis for the tangent space, TpM, the basis

∂F ∂F ∂F ∂F , , ∂u ∂v ∂u × ∂v ( ) for R3 is right-handed, where

∂F ∂F = 2r2(sinθ sin(2θ) + cosθ cos(2θ)), 2r2(sinθ cos(2θ) cosθ sin(2θ)),r ∂u × ∂v − − − =  2r2 cosθ,2r2 sinθ,r .  −    Humber ma  course notes

∂F ∂F Since r > 0, the z-component is positive, hence is an upward pointing normal. ∂u × ∂v Now, X(F) = (r cosθ,r sinθ, 2r2 sin2 θ), − so ∂F ∂F X(F), = 2r3 cos2 θ + 2r3 sin2 θ 2r3 sin2 θ = 2r3 cos2 θ. ∂u × ∂v − − − * + So, the flux is given by 1 π π 1 1 2r3 cos2 θ dr dθ = r4 cos2 θ dθ − −2 0 Z0 Z0 Z0 1  π  = cos2 θ dθ −2 Z0 1 π 1 = (1 + cos(2θ)) −2 2 Z0 1 1 π = θ + sin(2θ) −4 2 0 π  = . − 4 Since the chosen parametrization for M agrees with the specified orientation, the flux of X across M in the direction of the upward pointing normal is π/4. Since this answer is negative, the net flow is actually in the opposite direction; in− the direction of the downward pointing normal. ȴ

Suppose, in the last example, we had been asked to determine the flux of X across M in the direction of the downward pointing normal. Using the same parametrization for M, we would have to negate the final answer, since ∂F ∂F is upward pointing. The numeric ∂u × ∂v answer would be different, but the result would be the same. Indeed, we would arrive at an answer of π/4. Since the answer is positive, the flow is in the direction of the downward normal.

§.. Integration of 3-forms

Suppose M is a (solid) 3-dimensional region and ω is a 3-form on R3. If F : D R3 R3 ⊂ → is a parametrization of M, then the integral of ω over M can be computed by the same general procedure used to integrate 1-forms and 2-forms. The integral of ω over M is

ω = F∗ω. (.) ZM ZD  Humber ma  course notes

Recall that any 3-form ω on R3 can be expressed as ω = f dx dy dz, where f : R3 R ∧ ∧ → is a real-valued function of x,y,z. In particular, if V (M) denotes the volume of M, then

V (M) = dx dy dz. (.) ∧ ∧ ZM For this reason, the elementary 3-form dx dy dz is referred to as the volume form. ∧ ∧ Example . ȴ

Example . Let M be the unit ball (the solid sphere of radius 1) and let

1 ω = dx dy dz. 2 + x2 + y2 + z2 ∧ ∧

Let’s compute p ω. ZM For the unit ball, M, the radius satisfies 0 ρ 1. We take the standard spherical coordinate parametrization ≤ ≤

F(ρ,θ,ϕ) = (ρ sinϕ cosθ,ρ sinϕ sinθ,ρ cosϕ),

with 0 ρ 1, 0 θ 2π and 0 ϕ π. As with integrating 1-forms and 2-forms, the ≤ ≤ ≤ ≤ ≤ ≤ first step is to compute the pullback of ω by F. First, we compute F∗(dx dy dz), where we use (.) and (.). We have ∧ ∧

F∗dx = sinϕ cosθ dρ + ρ cosϕ cosθ dϕ ρ sinϕ sinθ dθ − F∗dy = sinϕ sinθ dρ + ρ cosϕ sinθ dϕ + ρ sinϕ cosθ dθ F∗dz = cosϕ dρ ρ sinϕ dϕ. −

Taking the wedge product of F∗dx with F∗dy, we have

F∗(dx dy) = (F∗dx) (F∗dy) ∧ ∧ = (ρ sinϕ cosϕ sinθ cosθ ρ sinϕ cosϕ sinθ cosθ) dρ dϕ − ∧ + ρ sin2 ϕ cos2 θ + ρ sin2 ϕ sin2 θ dρ dθ ∧ + ρ2 sinϕ cosϕ cos2 θ + ρ2 sinϕ cos ϕ sin2 θ dϕ dθ ∧ = ρ sin 2 ϕ dρ dθ + ρ2 sinϕ cosϕ dϕ dθ.  ∧ ∧

 Humber ma  course notes

Taking the wedge product of F (dx dy) with F dz, we have ∗ ∧ ∗ 2 2 F∗(dx dy dz) = ρ sin ϕ dρ dθ + ρ sinϕ cosϕ dϕ dθ (cosϕ dρ ρ sinϕ dϕ) ∧ ∧ ∧ ∧ ∧ − = (ρ2 sin3 ϕ + ρ2 sinϕ cos2 ϕ)dρ dϕ dθ  ∧ ∧ = ρ2 sinϕ dρ dϕ dθ. ∧ ∧ Finally, using (.), we have

1 2 F∗ω = ρ sinϕ dρ dϕ dθ. 2 + ρ2 ∧ ∧ Thus, to compute the integral of ωpover M, we compute the triple integral

2π π 1 ρ2 sinϕ dρ dϕ dθ. (.) 0 0 0 2 + ρ2 Z Z Z The integral with respect to ρ is given by thep formula

ρ2 ρ 2 + ρ2 dρ = log ρ + 2 + ρ2 , 2 + ρ2 2 − Z p  q  hence, the innermost integralp evaluated between 0 and 1 is

√3 log(1 + √3) + log(√2). 2 − ! Let √3 C = log(1 + √3) + log(√2). 2 − ! Then, the triple integral (.) becomes

2π π 2π π C sinϕ dϕ dθ = ( C cosϕ) dθ − 0 Z0 Z0 Z0 2π = 2C dθ Z0 = 4πC. Hence, the final answer is

√3 4π log(1 + √3) + log(√2) . 2 − ! ! ȴ

 Humber ma  course notes

§ Practice problems

P -. Compute the surface area of the surface described in Example ..

P -. Let ω = x dx y dy and γ(t) = (cost,sint) for 0 t 2π. Compute − ≤ ≤ ω. Zγ

P -. Let ω = yz dx + xz dy + xy dz and let γ(t) be a parametrization of the path from (1,0,0) to (0,1,0) to (0,0,1). Compute

ω. Zγ

2 4 4 P -. Let γ : [0, π/2] R be defined by γ(t) = (sin t,cos t). → a) Determine whether the curve is oriented counterclockwise or clockwise.

b) Compute the area bounded by γ.

P -. Determine the area of the following surfaces. a) The part of the sphere x2 + y2 + z2 = 4z that lies inside the paraboloid z = x2 + y2.

b) The part of the sphere x2 + y2 + z2 = a2 that lies inside the cylinder x2 + y2 = ax, where a > 0. c) The part of the cone z = x2 + y2 that lies between the plane y = x and the cylinder y = x2. p

d) The part of the paraboloid y = x2 + z2 that lies within the cylinder x2 + z2 = 16.

e) The part of the paraboloid z = x2 + y2 between z = 0 and z = 1, including the top( the intersection of z = 0 and z = x2 + y2).

 Humber ma  course notes

f) The surface described by z = xy, where x2 + y2 2. ≤

(x2+y2) P -. Let ω = e− dx dy and let M be the half-disc in the plane described by ∧ x2 + y2 1, y 0. Compute ≤ ≤ ω. ZM

P -. Determine the area bounded by the lemniscate (x2 + y2)2 = 2a2(x2 y2), a > 0. −

P -. Determine the area bounded by the curve described by the polar equation r = 1 + sinθ.

P -. Determine the flux of curlX across the surface x2 + y2 + 3z2 = 1, z 0, with ≤ respect to the upward pointing normal, where X = (y, x,zx3y2). −

 Humber ma  course notes

 Chapter 

Stokes’ Theorem

§ Surfaces with boundary

In order to specialize the generalized Stokes’ theorem to particular cases, we will unify some of the terminology and notation for the geometric objects we have been studying. Let M be such a geometric object. We will refer to M as an n-dimensional surface, in general, or an n-surface, for short. Here, the word surface can be replaced with manifold. We are primarily interested in the types of n-surfaces that are subsets of R3. In R3, there are 4 types of n-surfaces that we discuss.

Types of n-surfaces in R3:

.( n = 0) A 0-surface in R3 is simply a point, or collection of points.

.( n = 1) A 1-surface is a curve, such as a line segment or any parametrized curve.

.( n = 2) A 2-surface is, up until this point, what we have called, simply, a sur- face. Examples of 2-surfaces include planes, cones and cylinders.

.( n = 3) A 3-surface is a solid region, e.g. the unit ball.

Some surfaces have a boundary. If M is an n-surface with boundary,where n 1, then ≥ the boundary of M, ∂M, is an (n 1)-dimensional surface. For example, suppose M is a − curve (a 1-surface) which can be parametrized by γ(t), where a t b. Then ≤ ≤ ∂M = γ(a),γ(b) . That is, the boundary of the 1-surface M is the 0-surface consisting of { } just the end points γ(a) and γ(b). As another example, suppose M is the upper

 Humber ma  course notes

hemisphere of radius 1, centered at the origin. Then M is a 2-surface and ∂M is the equator; the unit circle in the xy-plane, which is a 1-surface.

§ The generalized Stokes’ Theorem

Theorem . (Stokes’ Theorem). Suppose M is an oriented surface of dimension n with an (n 1)-dimensional boundary ∂M. If ω is a smooth (n 1)-form on M, then − −

dω = ω. (.) ZM Z∂M Remark .. A few comments are in order before we delve into the different cases of Stokes’ Theorem. The boundary ∂M should be understood to have the induced orientation. The di erential form ω in the right hand side of (.) is really ω , the ff ∂M restriction of ω to the boundary. If M does not have a boundary (∂M = ), then the right ∅ hand side is 0. If M is 1-dimensional, then the right hand side of (.) is a finite sum.

§.. Stokes’ Theorem for 1-surfaces

Let us first consider the case when M is a 1-surface in R3 and ω is a 0-form on M. Recall that a 0-form is just a function, which we will denote by f instead of ω. Suppose γ :[a,b] R3 parametrizes M, so M = γ([a,b]). The left hand side of (.) is → b df = γ∗(df ), Zγ Za which is just the line integral of the 1-form df . Now, as we mentioned in the last section, the boundary of M = γ([a,b]) consists of the endpoints, ∂M = γ(a),γ(b) . Then, Stokes’ Theorem says { } b df = γ∗(df ) = f = f (γ(b)) f (γ(a)). − Zγ Za Z∂M This version of Stokes’ Theorem is called the Fundamental Theorem for line integrals.

Theorem . (Fundamental Theorem for line integrals). Suppose f : Rn R is a smooth → real-valued function and γ :[a,b] Rn is smooth parametrization of a curve in Rn. Then →

df = f (γ(b)) f (γ(a)). (.) − Zγ  Humber ma  course notes

Corollary .. If ω is an exact covector field on Rn with potential function f , then

ω = f (γ(b)) f (γ(a)). (.) − Zγ

Example . Let γ(t) = (cos4 t,sin2 t + cos3 t,t), 0 t π, and ω = x dx + y dy + z dz. We want to compute the line integral ≤ ≤ ω. Zγ The covector field ω is exact, since the function 1 1 1 f (x,y,z) = x2 + y2 + z2 2 2 2 is a potential for ω. That is,

df = x dx + y dy + z dz = ω.

The end points of γ (the boundary) are

γ(0) = (1,1,0) and

γ(π) = (1, 1,π). − By Theorem .,

ω = f (γ(π)) f (γ(0)) − Zγ 1 1 = 12 + 12 + 02 12 + ( 1)2 + π2 2 − 2 − 1 = π 2.    2

ȴ

Example . As another example, consider the covector field ω = 2xyz dx + x2z dy + x2y dz and the curve γ(t) = (t2 + 1,t2 1,t5 + 1) for 1 t 2. Computing the line integral − ≤ ≤ ω Zγ  Humber ma  course notes directly, we first compute the pullback

2 2 5 2 2 5 2 2 2 4 γ∗ω = 2(t + 1)(t 1)(t + 1)2t dt + (t + 1) (t + 1)2t dt + (t + 1) (t 1)5t dt − − = 4t(t4 1)(t5 + 1) + 2t(t4 + 2t + 1)(t5 + 1) + 5t4(t4 1)(t2 + 1) dt − − = 4t10 + 4t5 4t6 4t + 2t10 + 2t5 + 4t8 + 4t3 + 2t6 + 2t + 5t10+ 5t8 5t6 5t4 dt − − − − = 11t10 + 9t8 7t6 + 6t5 5t4 + 4t3 2t dt.  − − − Hence, the line integral is 

2 ω = 11t10 + 9t8 7t6 + 6t5 5t4 + 4t3 2t dt − − − Zγ Z1  2  = t11 + t9 t7 + t6 t5 + t4 t2 − − − 1 = 211 + 29 27 + 26 25 + 24 2 2 111 + 19 17 + 16 15 + 14 12 = 2476 1 − − − − − − − − = 2475 .    Clearly, if ω is exact, it should take less effort to compute the line integral. If f is a potential for ω, then df = ω, so ∂f = 2xyz ∂x ∂f = x2z ∂y ∂f = x2y. ∂z Integrating with respect to x,y and z, or possibly by inspection, we find a candidate f (x,y,z) = x2yz. Indeed, we can quickly verify that df = ω, so f is a potential for ω. With

γ(1) = (2,0,2) and

γ(2) = (5,3,33), by the fundamental theorem for line integrals, we have

ω = f (γ(2)) f (γ(1)) = 52(3)(33) 22(0)(2) = 2475. − − Zγ ȴ

The following corollary explains why the line integral in Example . is 0.

 Humber ma  course notes

Corollary .. If ω is an exact covector field on Rn and γ :[a,b] Rn is a closed curve, then → ω = 0. (.) Zγ Proof. Since ω is exact, ω = df for some potential function f : Rn R. By Theorem ., → ω = df = f (γ(b)) f (γ(a)), − Zγ Zγ but γ(b) = γ(a) since the curve is closed. Thus

ω = 0. Zγ

Although our attention is focused on R3, Theorem . is valid on Rn. Consider the special case when γ :[a,b] R is given by γ(t) = t. If f : R R is a real-valued function → → (0-form), df = f 0(x)dx. Moreover, γ∗(df ) = f 0(t)dt. Hence, in this specific case, Stokes’ Theorem reduces to b df = γ∗(df ) Zγ Za b = f 0(t)dt Za = f (γ(b)) f (γ(a)) − = f (b) f (a). − Stokes’ theorem, and hence the fundamental theorem for line integrals, reduces to the Fundamental Theorem of Calculus! For vector fields, the conclusion of Theorem . is

b gradγ(t) f ,γ0(t) dt = f (γ(b)) f (γ(a)). (.) a − Z D E In general, if X is a conservative vector field with potential f , then

b X(γ(t)),γ0(t) dt = f (γ(b)) f (γ(a)). (.) − Za Both (.) and (.) are analogous to (.) and (.), hence direct consequences of Stokes’ theorem. Note that the vector field version of the fundamental theorem for line integrals

 Humber ma  course notes

can be seen as a direct consequence of the single-variable fundamental theorem of calculus. Indeed, if f : R3 R is a differentiable function and γ :[a,b] R3 is a smooth path, it follows from the chain→ rule that → d f (γ(t)) = grad f ,γ0(t) . dt γ(t) Hence, D E b b d grad f ,γ0(t) dt = f (γ(t)) dt γ(t) dt Za Za D E b = f (γ(t)) a = f (γ(b)) f (γ(a)), − by the fundamental theorem of calculus. Now, when a vector field X is conservative, hence the corresponding covector field is exact, we have seen that the line integral over any closed path is 0, by Corollary .. In fact, we can conclude more than this. Theorem .. Let ω be a continuous covector field on Rn. The following statements are equivalent.

a) ω is an exact covector field. b) ω = 0 Zγ for any closed path γ :[a,b] Rn. → c) If γ1 and γ2 are any two smooth paths with the same endpoints, then

ω = ω. Zγ1 Zγ2 The statements analogous to a)-c) for a continuous vector field X are also equivalent. A 1-form satisfying c) of Theorem . is called path independent (or independent of path). Analogously, a vector field X satisfying

X ds = X ds, · · Zγ1 Zγ2 for any two paths with common endpoints, is called path independent. Theorem . states that a vector field (covector field) is conservative (exact) if and only if it is path independent.

 Humber ma  course notes

γ1 γ1

γ2 a) γ2 b)

e

ξ

c)

Figure .: a) Two smooth paths, γ1 and γ2, with the same endpoints. b) The path γ2 has the opposite orientation as γ2. c) The closed path ξ, which is the union of γ1 and γ2. e e Proof. The proof of Corollary . shows that a) implies b). We will show that b) implies c). Suppose

ω = 0 Zγ for any smooth, closed path. Let γ :[a,b] Rn and γ :[c,d] Rn be smooth paths 1 → 2 → with common endpoints; that is, γ1(a) = γ2(c) and γ1(b) = γ2(d). Since these paths start and end at the same points, both paths are oriented from the initial point to the final point. Let γ2 denote a parametrization of the path γ2 with the opposite orientation, as depicted in Figure .. Then, the path ξ :[a,b] [c,d] Rn defined by ∪ → e γ (t), a t b, ξ(t) = 1 ≤ ≤ γ2(t), c t d  ≤ ≤    is a closed curve. Hence, e

ω = 0. Zξ  Humber ma  course notes

Moreover, since γ2 and γ2 have opposite orientations, we have

e 0 = ω Zξ = ω + ω Zγ1 Zγ2 = ω ω, − e Zγ1 Zγ2 thus ω = ω. Zγ1 Zγ2

Conservation of Energy

Suppose X is a vector force field on Rn acting on a particle traversing a curve parametrized by γ :[a,b] Rn. We now know that the work done by X on the particle → as it moves from γ(a) to γ(b) is given by the line integral

b X = X(γ),γ0 dt. h i Zγ Za

If the particle has mass m, then the kinetic energy of the particle, Ek(t), is given by

1 2 E (t) = m γ0(t) . (.) k 2 k k Rn R If f : is a potential for X, then the potential energy of the particle, Ep(t), is given by → E (t) = f (γ(t)). (.) p − The total energy, E(t), is the sum of the kinetic and potential energies

E(t) = Ek(t) + Ep(t). (.)

Consider that the rate of change in the kinetic energy is

d 1 E (t) = m( γ00(t),γ0(t) + γ0(t),γ00(t) ) dt k 2 h i h i = m γ00(t),γ0(t) . h i

 Humber ma  course notes

By Newton’s Second Law (force=mass acceleration), X(γ(t)) = mγ (t), hence × 00 d E (t) = X(γ(t)),γ0(t) . (.) dt k h i Integrating the left-hand side of (.), we have

b d E (t)dt = E (b) E (a), dt k k − k Za by the fundamental theorem of calculus. Integrating the right-hand side of (.), we have

b X(γ(t)),γ0(t) dt = f (γ(b)) f (γ(a)) by (.) h i − Za = E (a) E (b) by (.). p − p Thus, by (.), we have

E (b) E (a) = E (a) E (b) k − k p − p which implies

Ek(b) + Ep(b) = Ek(a) + Ep(a), or E(b) = E(a). This shows that the total energy remains the same, that is, energy is conserved. This is precisely the reason X is called a conservative vector field.

§.. Stokes’ Theorem for 2-surfaces

Suppose M is a 2-surface parametrized by F : R2 R3, → F(u,v) = (x(u,v),y(u,v),z(u,v)).

Let ∂M be parametrized by γ :[a,b] R3, unless M does not have a boundary. Let ω be → the 1-form ω = f dx + g dy + hdz, where f ,g,h are real-valued functions of x,y and z. By the correspondence between differential forms and vector fields, ω] = X, where X = (f ,g,h). Moreover, the exterior derivative of ω,

∂h ∂g ∂f ∂h ∂g ∂f dω = dy dz + dz dx + dx dy, ∂y − ∂z ∧ ∂z − ∂x ∧ ∂x − ∂y ∧ ! ! !  Humber ma  course notes corresponds to the curl of X; specifically,

curlX = ( dω)]. ∗ According to Stokes’ Theorem ., we have

dω = ω. (.) ZM Z∂M Since dω is a 2-form, the left hand side of (.) is equivalent to the flux integral of the corresponding vector field

∂F ∂F curlX, du dv, (.) ∂u × ∂v * + where curlX is evaluated on F.† Now the right hand side of (.) is the integral of a 1-form over a 1-surface, that is, a line integral. The line integral of ω is equivalent to the line integral of the corresponding vector field

b X(γ),γ0 dt, (.) Za where γ([a,b]) = ∂M. The equality of (.) and (.) is the original form of Stokes’ Theorem. Since the following version of Stokes’ theorem involves the curl of a vector field, it is unique to R3.

Theorem . (Classical Stokes’ theorem). Let M be a smooth surface in R3 (a 2-surface), parametrized by F : R2 R3, with boundary ∂M, parametrized by γ :[a,b] R3. If X is a → → smooth vector field on M, then

∂F ∂F b curlX, du dv = X(γ),γ0 dt. (.) ∂u × ∂v M * + Za † The classical version of Stokes’ theorem is often stated in the following manner. Suppose M is a smooth surface, with boundary, in R3 which is oriented according to the unit normal vector N. If X is a smooth vector field on M, then

curlX,N = X,T , (.) h i h i M Z∂M where T is the unit tangent to†∂M compatible with the induced orientation of ∂M.

Example . (ProblemP -) Let M be the surface x2 + y2 + 3z2 = 1, z 0, and let ≤ X = (y, x,zx3y2). In problemP - we were asked to compute the flux of curlX across M −  Humber ma  course notes

with respect to the upward pointing normal. That is, if F : R2 R3 is a parametrization → of M compatible with the upward normal, we computed ∂F ∂F curlX, du dv. ∂u × ∂v M * + Since z 0, M is the lower half† of an ellipsoid, hence it has a boundary. The boundary of ≤ M is ∂M = (x,y,0) x2 + y2 = 1 , { | } which is the unit circle in the plane z = 0. For a parametrization of ∂M to be compatible with the induced orientation, when viewed from above (since the normal to M is upward) the circle should be oriented counterclockwise. Thus, γ(t) = (cost,sint,0), 0 t 2π, is a parametrization of ∂M compatible with the induced orientation. Since ≤ ≤ X(γ) = (sint, cost,0) − and

γ0(t) = ( sint,cost,0), − according to Theorem . we have ∂F ∂F 2π curlX, du dv = X(γ),γ0 dt ∂u × ∂v h i M * + Z0 † 2π = sin2 t cos2 t dt − − Z0 = 2π. − ȴ

The following theorem is a special case of Stokes’ theorem, applied to regions in R2. Theorem . (Green’s Theorem). If M is a simple plane region, where the boundary, ∂M, is a simple closed curve, oriented counterclockwise, then ∂Q ∂P P dx + Q dy = dx dy (.) ∂x − ∂y Z∂M M ! for any real-valued differentiable functions P and† Q.

Proof. Any 1-form, ω, on R2 can be expressed as ω = P dx + Q dy, where P and Q are functions from R2 to R. Since ∂P ∂P ∂Q ∂Q dω = dx + dy dx + dx + dy dy ∂x ∂y ∧ ∂x ∂y ∧ ! ! ∂Q ∂P = dx dy, ∂x − ∂y ∧ !

 Humber ma  course notes

Stokes’ Theorem . says

∂Q ∂P P dx + Q dy = ω = dω = dx dy. ∂x − ∂y Z∂M Z∂M ZM M ! †

Suppose ω is a closed covector field on R2, that is, dω = 0. Since any covector field on R2 can be expressed as ω = P dx + Q dy, we have

∂Q ∂P dω = dx dy = 0, ∂x − ∂y ∧ ! which implies ∂Q ∂P = 0, ∂x − ∂y or ∂Q ∂P = . ∂x ∂y Now, suppose ω is closed and exact. Since ω is exact,

∂f ∂f ω = df = dx + dy, ∂x ∂y

for some function f : R2 R. Since ω is closed, dω = 0, thus → ∂ ∂f ∂ ∂f = . ∂x ∂y ∂y ∂x

So, the mixed partial derivatives of f are equal

∂2f ∂2f = . ∂x∂y ∂y∂x

§.. Stokes’ Theorem for 3-surfaces

Let M be a 3-surface in R3. If F : R3 R3 parametrizes M, let dV = F (dx dy dz) → M ∗ ∧ ∧ denote the volume form on M. That is, dVM is the 3-form such that the volume of M equals

dVM. ZM  Humber ma  course notes

For example, if M can be parametrized by the spherical change of coordinates F(ρ,ϕ,θ) = (ρ sinϕ cosθ,ρ sinϕ sinθ,ρ cosϕ), then dV = ρ2 sinϕ dρ dϕ dθ. If M has a boundary, ∂M, let dV denote the induced M ∧ ∧ M volume form on ∂M. For example, the ball of radius a has volume form e dV = ρ2 sinϕ dρ dϕ dθ. M ∧ ∧ The boundary is the sphere of radius a. Since the radius is now fixed, ρ = a, the volume form collapses to dV = a2 sinϕ dϕ dθ. M ∧ Now, if ω = P dy dz + Q dz dx + Rdxe dy is a 3-form on R3, where P,Q,R are ∧ ∧ ∧ functions of x,y,z, recall that ∂P ∂Q ∂R dω = + + dx dy dz. ∂x ∂y ∂z ∧ ∧ ! As detailed in §  of Chapter , ω corresponds to the vector field X = (P,Q,R) and dω corresponds to the function divX. In terms of the Hodge star operator and musical notation, ( ω)] = X and (dω) = divX. Since ω and dω correspond to X and divX, ∗ ∗ respectively, Stokes’ Theorem . relates the integral of X to the integral of divX. Theorem . (). If X is a smooth vector field on a 3-surface M, then

(divX)dV = X,N dV , (.) M h i M ZM Z∂M where N is the outward-pointing unit normal vector field alonge∂M.

This statement of the Divergence Theorem is given in terms of 3-surfaces (volumes) in R3. In this particular case, Theorem . is often called Gauss’ Theorem or Gauss’ Divergence Theorem. Moreover, the equality (.) may take the form

( X)dVM = (X N)dVM˜ . (.) M ∇ · ∂M · Recall, however, that divergenceˆ of a vector field† on Rn can always be defined, in contrast to the curl, which is only defined on R3. Hence, Theorem . holds when X is a vector field on Rn and M is a smooth n-surface on Rn.

Example . Consider the radial vector field X = (x,y,z). First, let’s directly compute the flux of X across the sphere of radius a, centered at the origin. Let F(θ,ϕ) = (asinϕ cosθ,asinϕ sinθ,acosϕ) for 0 θ 2π and 0 ϕ π. Since ≤ ≤ ≤ ≤ X(F) = (asinϕ cosθ,asinϕ sinθ,acosϕ)

 Humber ma  course notes and ∂F ∂F = ( a2 sin2 ϕ cosθ, a2 sin2 ϕ sinθ, a2 sinϕ cosϕ), (.) ∂θ × ∂ϕ − − − we have ∂F ∂F X(F), = a3 sinϕ. ∂θ × ∂ϕ − * + Because

2π π 2π π a3 sinϕ dϕ dθ = a3 cosϕ dθ − 0 Z0 Z0 Z0 2π = 2a3 dθ − Z0 = 4πa3, − the flux is 4πa3, depending on the orientation. Notice that the direction of the normal ± vector (.) depends on cosϕ, since a2 > 0 and sinϕ 0 for ϕ [0,π]. Now, cosϕ 0 for ≥ ∈ ≥ ϕ [0, π/2], on the upper hemisphere, while cosϕ 0 for ϕ [π/2,π], on the lower ∈ ≤ ∈ hemisphere. Due to the negative sign in the z-component of (.), the normal vector will point downward in the upper hemisphere and point upward in the lower hemisphere. That is, we have used the inward pointing normal. Now, let’s use the Divergence Theorem . to compute the flux. The sphere of radius a is the boundary of the ball of radius a. Our direct computation of the flux corresponds to the right hand side of (.). Since divX = 3, we need to compute

3dVM, ZM where M is the ball of radius a. Here, we must exercise caution. The volume form dVM depends on the chosen coordinate system (parametrization) for M. Using spherical coordinates, dV = ρ2 sinϕ dρ dϕ dθ, hence the flux is M ∧ ∧

2π π a 2π π a 3ρ2 sinϕ dρ dϕ dθ = ρ3 sinϕ dϕ dθ 0 0 0 0 0 0 Z Z Z Z 2 Z π π = a3 cos ϕ dθ 0 − 0 Z = 4πa3.

Stokes’ theorem assumes the outward-pointing normal, hence this answer agrees with the direct computation of the flux above. ȴ

 Humber ma  course notes

Suppose X = (P,Q,R) is a smooth vector field on R3 and f : R3 R is differentiable. Then → ∂ ∂ ∂ div(f X) = (f P ) + (f Q) + (f R) ∂x ∂y ∂z ∂f ∂P ∂f ∂Q ∂f ∂R = P + f + Q + f + R + f ∂x ∂x ∂y ∂y ∂z ∂z ∂f ∂f ∂f ∂P ∂Q ∂R = P + Q + R + f + + ∂x ∂y ∂z ∂x ∂y ∂z ! ! = gradf ,X + f divX. h i Now, by the Divergence Theorem . we have

(divf X)dV = f X,N dV , M h i M ZM Z∂M which becomes e

gradf ,X dV + f divX dV = f X,N dV . h i M M h i M ZM ZM Z∂M The last equality is usually expressed as e

gradf ,X dV = f X,N dV f divX dV . (.) h i M h i M − M ZM Z∂M ZM The formula (.), which holds on Rn, is sometimes callede “”. The identity (f X) = gradf ,X + f divX ÷ h i also holds on Rn. Suppose f : Rn R is smooth. The operator ∆, defined by → ∆f = div(gradf ), (.) is called the , or simply Laplacian. In Cartesian coordinates, ∂f ∂f gradf = ,..., , ∂x ∂x 1 n ! hence ∂ ∂f ∂ ∂f div(gradf ) = + ... + ∂x1 ∂x1 ∂xn ∂xn ∂2f ∂2f = 2 + ... + 2 . ∂x1 ∂xn

 Humber ma  course notes

So, the Laplacian of f in Cartesian coordinates is simply the sum of its second partial derivatives n ∂2f ∆ f = 2 . (.) ∂xi Xi=1 In particular,

∂f ∂f ∆f = + ∂x ∂y

and ∂f ∂f ∂f ∆f = + + ∂x ∂y ∂z

on R2 and R3, respectively. A function f satisfying ∆f = 0 is called harmonic. Let g : Rn R. Setting X = gradg in (.), we obtain →

gradf ,gradg dV + f ∆g dV = f gradg,N dV , (.) h i M M M ZM ZM Z∂M which is one of Green’s identities. Swapping the roles of f and g, we havee

gradg,gradf dV + g∆f dV = g gradf ,N dV . (.) h i M M M ZM ZM Z∂M

The difference of (.) and (.) yields another of Green’s identities, e

(f ∆g g∆f )dV = f gradg g gradf ,N dV . (.) − M − M ZM Z∂M e

Green’s Identities: Expressed in more compact form, we have

. f , g dV + f ∆g dV = f g,N dV h∇ ∇ i M M ∇ M ZM ZM Z∂M . e (f ∆g g∆f )dV = f g g f ,N dV − M ∇ − ∇ M ZM Z∂M e

 Appendix A

Coordinate representations

Polar coordinates: For standard polar coordinates on R2,

x = r cosθ, r2 = x2 + y2, 1 y y = r sinθ, θ = tan− , x   we have the following.

. dV = r dr dθ M ∧ . ∂f 1 ∂f gradf = , , ∂r r2 ∂θ ! where f : R2 R is a function of r and θ. → . If X = (P,Q) is a vector field on R2, where P,Q are functions of r and θ, then

1 ∂P ∂Q divX = P + + . r ∂r ∂θ

 Humber ma  course notes

Cylindrical coordinates: For standard cylindrical coordinates on R3,

x = r cosθ, r2 = x2 + y2, 1 y y = r sinθ, θ = tan− , x z = z, z = z,  

we have the following.

. dV = r dr dθ dz M ∧ ∧ . ∂f 1 ∂f ∂f gradf = , , , ∂r r2 ∂θ ∂z ! where f : R3 R is a function of r, θ and z. → . If X = (P,Q,R) is a vector field on R3, where P,Q,R are functions of r, θ and z, then 1 ∂P ∂Q ∂R divX = P + + + . r ∂r ∂θ ∂z . If X is a vector field in cylindrical coordinates, then

1 ∂R ∂Q ∂ curlX = r r ∂θ − ∂z ∂r ! 1 ∂P ∂R ∂ + r ∂z − ∂r ∂θ ! ∂Q 1 ∂P ∂ + 2Q + r . ∂r − r ∂θ ∂z !

 Humber ma  course notes

Spherical coordinates: For standard spherical coordinates on R3,

x = ρ sinϕ cosθ, ρ2 = x2 + y2 + z2, 2 2 1 x + y y = ρ sinϕ sinθ, ϕ = tan− , z p  1 y  z = ρ cosϕ, θ = tan−  ,  x    we have the following.

. dV = ρ2 sinϕ dρ dϕ dθ M ∧ ∧ . ∂f 1 ∂f 1 ∂f gradf = , , , ∂ρ ρ2 ∂ϕ ρ2 sin2 ϕ ∂θ ! where f : R3 R is a function of ρ, ϕ and θ. → . If X = (P,Q,R) is a vector field on R3, where P,Q,R are functions of ρ, ϕ and θ, then 2 ∂P ∂Q ∂R divX = P + + Q cotϕ + + . ρ ∂ρ ∂ϕ ∂θ

. If X is a vector field in spherical coordinates, then

∂R 1 ∂Q ∂ curlX = 2cosϕ R + sinϕ ∂ϕ − sinϕ ∂θ ∂ρ ! 1 ∂P 2sinϕ ∂R ∂ + R sinϕ ρ2 sinϕ ∂θ − ρ − ∂ρ ∂ϕ ! 2 1 ∂Q 1 ∂P ∂ + Q + . ρ sinϕ sinϕ ∂ρ − ρ2 sinϕ ∂ϕ ∂θ !

 Humber ma  course notes

 Appendix B

Some applications of differential forms and vector calculus

§ Extreme values

Analogous to single-variable calculus, one of the key ideas for determining extrema of is the rate of change. For a function f : Rn R, recall that the gradient of f at a point p, → gradp f , is pointed in the direction of steepest ascent. If f obtains an extreme value at a point p, then the gradient should be 0 at p, since a particle on the graph of f could not ascend higher (or descend lower). Indeed, this is the case, hence determining the points p where gradp f is 0 is the starting place for extreme value theory. Since we now know that the vector field gradf corresponds to the covector field df , we will use differential forms to develop a brief survey of extreme value theory and optimization. Definition B.. Suppose f : Rn R.A local minimum occurs at x Rn if f (x) f (u) → ∈ ≤ for all u in some open set U Rn containing x.A local maximum occurs at x Rn if ⊂ ∈ f (x) f (u) for all u in some open set U Rn containing x. A point x Rn is a critical ≥ ⊂ ∈ point for f if either f is not differentiable at x or gradx f = 0. A critcal point a at which f does not attain a local extreme value is called a saddle point. Theorem B.. Suppose f : Rn R is differentiable on an open set U Rn containing x. If f → ⊂ achieves a local extremum at x, then gradx f = 0.

This theorem states that any extrema of f occur at critical points. For, if f achieves a local extremum at a point x where it is not differentiable, then x is still a critical point.

2 2 Example B. Let f : R2 R be defined by f (x,y) = e (x +y ). The differential of f is → − (x2+y2) (x2+y2) df = 2xe− dx 2ye− dy. − −  Humber ma  course notes

The covector field df equals 0 if and only if each coefficient is 0. Hence, to determine any critical points, we start by solving

(x2+y2) (x2+y2) 2xe− = 0 and 2ye− = 0, − − (x2+y2) which yields x = 0 and y = 0, since e− , 0. The function f is differentiable everywhere, so (x,y) = (0,0) is the only critical point. Indeed, f achieves a local (in fact, global) maximum at (0,0), where f (0,0) = 1. ȴ

Definition B.. If f : Rn R is defined on a set U Rn containing a, the second → ⊂ derivative matrix (or ) of f at a is

∂2f ∂2f ∂2f 2 (a) ∂x ∂x (a) ∂x ∂x (a) ∂x1 1 2 ··· 1 n  ∂2f ∂2f ∂2f  ∂x ∂x (a) 2 (a) ∂x ∂x (a) H (a) =  2 1 ∂x2 ··· 2 n . (B.) f  . . .   . .. .   . .   2 2 ··· 2   ∂ f ∂ f ∂ f   (a) (a) 2 (a)   ∂xn∂x1 ∂xn∂x2 ··· ∂xn    2   If f is on U, then H is a symmetric matrix at all points of U.  C f Theorem B.. Suppose f : R2 R is a 2 function defined on a set U R2 containing a, → C ⊂ where grada f = 0.

∂2f a) If (a) > 0 and det(H (a)) > 0, then f attains a local minimum at a. ∂x2 f ∂2f b) If (a) < 0 and det(H (a)) > 0, then f attains a local maximum at a. ∂x2 f

c) If det(Hf (a)) < 0, then f has a saddle point at a.

Example B. Consider the function f : R2 R defined by f (x,y) = x siny. Then → df = siny dx + x cosy dy. Any critical point (x,y) of f must satisfy siny = 0 x cosy = 0. Since siny and cosy cannot simulataneously equal 0, we must have x = 0 and siny = 0, hence the critical points are (0,nπ) for any integer n. Now, the Hessian matrix of f is

0 cosy cosy x siny, − !  Humber ma  course notes

which has determinant cos2 y < 0, hence f has only saddle points. ȴ − This last example gives a little insight into saddle points for a function of two variables. If f : R2 R is 2, then the mixed partial derivatives are equal. Furthermore, if ∂2f → C (a) = 0, then ∂x2 2 ∂ f 2 2 0 ∂x∂y ∂ f det(Hf (a)) = det 2 2 = < 0.  ∂ f ∂ f  − ∂x∂y ∂y∂x ∂y2 !     In this particular scenario, any critical point must be a saddle point.   Recall that, if a f : R R is defined on a closed interval [a,b] then f attains global extreme values (the single-variable→ Extreme Value Theorem). The global extrema occur either at a critical point in the open interval (a,b) or at one of the two enpoints. Similar to the closed interval method of single-variable calculus, determining global extrema for a multivariable function f , using first derivative information only, involves determining critical points and comparison of function values. If f : Rn R is → defined on a set U Rn, we compare the value of f at critical points and compare with ⊂ the value of f at points on the boundary, ∂U. There is a theorem, comparable to the Extreme Value Theorem of single-variable calculus, that ensures the existence of extreme values, given assumptions on f and the set U. However, finding these extreme values can be another issue altogether. When n 2, the boundary of U consists of an infinite number of points, in general, so techniques≥ beyond a simple comparison of critcal values and boundary values of f are often needed. Consider the following example.

Example B. Determine extrema of f (x,y) = 8x + 3y defined on the disc x2 + y2 1. ≤ First, note that f does not have any critical points, since df = 8dx + 3dy , 0. If U = (x,y) x2 + y2 1 is the disc, the boundary is the unit circle ∂U = (x,y) x2 + y2 = 1 . { | ≤ } { | } The boundary ∂U can be parametrized by γ(t) = (cost,sint), where 0 t 2π. What we ≤ ≤ need to do is determine the maximum and minimum values of f on the boundary. If we restrict f to points on ∂U only, we obtain a new function called the restriction of f to ∂U, denoted f . A formula for f can be obtained by evaluating f γ, the composition ∂U ∂U ◦ of f with γ. We have f (γ(t)) = 8cost + 3sint, which has critical points where the differential is 0 (or undefined). The differential of f γ is d(f γ) = ( 8sint + 3cost)dt, ◦ ◦ − which is 0 when tant = 3/8. Since x = cost, y = sint, this yields 3 8 x = cos arctan = 8 ±√73  3  3 y = sin arctan = . 8 ±√73   Since the value of tant is positive, x and y have the same sign. The maximum value of f occurs for the positive x,y values, while the minimum occurs for the negative x,y values.

 Humber ma  course notes

Now, several comments are in order. First, note that d(f γ) is precisely the pullback of ◦ df by γ. Indeed, df = 8dx + 3dy, hence

γ∗(df ) = 8d(cost) + 3d(sint) = ( 8sint + 3cost)dt. − Second, the equation defining the boundary, x2 +y2 = 1, can be considered as a constraint. We could arrive at the same answer as follows. Let F(x,y) = x2 + y2. It can be shown that an extreme value may occur where the wedge product, df dF, equals 0. Here, we have ∧ df dF = (8dx + 3dy) (2x dx + 2y dy) ∧ ∧ = (16y 6x)dx dy, − ∧ 3 which is 0 when y = x. Plugging this in to the boundary equation yields 8 3 2 x2 + x = 1, 8   which, upon solving for x and then y, gives the same solutions as above. As a final note, 3 if we had not already ruled out any critical points for f , we could have plugged y = x 8 into f to determine where extreme values may occur in the interior of U. ȴ

§.. Constrained Extrema

Suppose we want to determine extrema of a function f : Rn R subject to a constraint. For instance, it may be desired to maximize the volume of a→ container, while keeping the surface area of the container fixed, or within certain limits. If f is defined on a set U Rn, determining the maximum and minimum values on the boundary ∂U is a type of⊂ constrained extreme value problem. In practical applications, there may be multiple constraints to consider. In some cases, the method of the previous section can be succesfully applied. For example, if we want to determine extreme values of f subject to the constraint F(x) = c, where F : Rn R and c is a constant, we can attempt solving → df dF = 0. The case of more constraints can be handled similarly. We will assume that all∧ constraints can be represented as some function equaling a constant. Suppose we want to minimize f (x) subject to

F1(x) = c1 F2(x) = c2 . .

Fk(x) = ck,

 Humber ma  course notes

where the constraints correspond to the functions F : Rn R and constants c , i → i i = 1,...,k. Using the above method, we would seek solutions to

df dF dF dF = 0. ∧ 1 ∧ 2 ∧ ··· ∧ k Equivalently, if F : Rn Rk is a vector-valued function with component functions → F1, ,Fk, we can seek solutions to df dF = 0. However, the method of Lagrange multipliers··· is more suitable for constrained∧ optimization, particularly when there are multiple constraints. Theorem B. (Method of Lagrange multipliers). Consider the problem of minimizing (or maximizing) f : Rn R subject to constraints F = c , where F : Rn R and c is constant, → i i i → i for i = 1,...,k, where n > k. If p = (x1,...,xn) is a local solution, then there exist scalars λ1,...,λk such that df = λ1 dF1 + ... + λk dFk, (B.) evaluated at p.

In TheoremB. , the scalars λ1,...,λk are called Lagrange multipliers.

Example B. Determine the extrema of f (x,y,z) = x2 + y2 + z2 x + y on the set − U = (x,y,z) x2 + y2 + z2 1 . { | ≤ } The set U is the unit ball and the boundary

∂U (x,y,z) x2 + y2 + z2 = 1 { | } is the unit sphere. Determining any extreme values in the interior of U can be done by solving df = 0. We have

df = (2x 1)dx + (2y + 1)dy + 2z dz, − hence the only critical point is (1/2, 1/2,0), at which f (1/2, 1/2,0) = 1/2. We will determine the extrema on the boundary in two− ways. − −

Method ) Considering the boundary as a constraint, define

F(x,y,z) = x2 + y2 + z2.

The equation F(x,y,z) = 1 represents the boundary constraint, which is the only constraint in this example. By TheoremB. , there exists a scalar λ such that df = λdF, hence we solve

(2x 1)dx + (2y + 1)dy + 2z dz = λ(2x dx + 2y dy + 2z dz). −  Humber ma  course notes

Equivalently, by combining components, we have

(2x 1 λ2x)dx + (2y + 1 λ2y)dy + (2z λ2z)dz = 0, − − − − which reduces to the three equations

2x 1 = λ2x, 2y + 1 = λ2y, 2z = λ2z. − The last equation holds if λ = 1 or z = 0, but if λ = 1 the first two equations have no solution, hence we assume z = 0 (and λ , 1). Solving the first two equations for λ, we have 2x 1 2y + 1 λ = − and λ = . 2x 2y Setting these equations equal yields y = x, which, when substituted into the − boundary equation along with z = 0, yields

√2 x = . ± 2 So, the two points √2 √2 , ,0 ± 2 ∓ 2 ! on the boundary may correspond to extreme values. We will check after completing the second method.

Method ) One might call this the direct method, as we will not be using Lagrange multipliers. With f and F as defined above, we compute

df dF = ((2x 1)dx + (2y + 1)dy + 2z dz) ((2x dx + 2y dy + 2z dz)) ∧ − ∧ = 2z dy dz + 2z dz dx (2x + 2y)dx dy. ∧ ∧ − ∧ Thus, if df dF = 0, we must have z = 0 and y = x. Substituting z = 0 and y = x ∧ − − into the boundary equation x2 + y2 + z2 = 1, we obtain 2x2 = 1, hence

√2 x = , ± 2 as before.

No matter which method we prefer, there are three points to consider, namely the interior point 1 1 , ,0 2 −2    Humber ma  course notes

and the boundary points √2 √2 √2 √2 , ,0 , , ,0 . 2 − 2 − 2 2 ! ! The corresponding function values are

1 1 1 f , ,0 = (minimum) 2 −2 −2 √2 √2  f , ,0 = 1 √2 2 − 2 − ! √2 √2 f , ,0 = 1 + √2 (maximum) − 2 2 ! ȴ

§ Maxwell’s equations

Let E = (E1,E2,E3) and B = (B1,B2,B3) be vector fields on R3. Here, the components Ei : R4 R and Bi : R4 R, i = 1,2,3, are functions of t (time) and x,y,z (Cartesian → → coordinates for R3). The vector fields E and B represent the (time-variable) electric and magnetic field strength, respectively. Let ρ : R4 R be a real-valued function (the charge → density) and let j = (j1,j2,j3) be a vector field on R3 (the current density). Note that the components of j are independent of time, t. Maxwell’s equations of electromagnetism are given by

divE = ρ (Coulomb’s Law) ∂B curlE = (Faraday’s Law) − ∂t (B.) divB = 0 (absence of magnetic monopoles) ∂E c2 curlB = j + (Ampere’s Law) ∂t where div,curl are defined in terms of the spatial variables (x,y,z). Suppose M is a 2-surface in R3 with boundary ∂M. Let F(u,v) = (x(u,v),y(u,v),z(u,v)) parametrize M and let γ :[a,b] R3 parametrize ∂M. The voltage around ∂M is given by the line integral → b E ds = E(γ),γ0 dt. · h i Zγ Za  Humber ma  course notes

The magnetic flux across M is given by the flux integral

∂F ∂F B(F), du dv. ∂u × ∂v M * + †

