Lecture Notes First Six Weeks

58
MATHS 340 Revision questions Easy 1. If v = [1, 2, 3, 4, 5] and u = [1.5,π, exp(1), 0, 2], what is v · u? 2. If v = [1, 2] T and w = [0, 1, 2] T , what is v T w? 3. If a = [1, 2, 2, 4], what is a? 4. If a = [1, 2] and b =[1, 2] what is the angle between a and b? 5. Do the three vectors a = [1, 0, 0] T , b = [0, 1, 0] T and c = [1, 1, 0] T form a basis for R 3 ? You can answer this question by inspection. 6. Let a = [1, 0, 0] T , b = [1, 1, 0] T and c = [0, 0, 1] T . Write d = [3, 4, 3] T in terms of a, b and c. You can answer this question by inspection. 7. Are a = [1, 2, 3] and b = [1, 0, 4] orthogonal? You can do the calculations in your head. 8. Show that f = ln(x 2 + y 2 ) satisfies the partial differential equation f xx + f yy = 0 except possibly at (0, 0). 9. Find the equation of the straight line through the points (1, 2) and (3, 3). Medium 1. Find the equation of the plane through the points (1, 0, 0), (0, 2, 0) and (0, 0, 3). 2. Sketch the plane x + y + z = 2; 3. Use the double angle formula to evaluate the following cos 4 x dx 4. Use substitution to evaluate the following sin 5 θ dθ 5. Use integration by parts to evaluate the following ln x dx 1

description

First six weeks vector calculus.

Transcript of Lecture Notes First Six Weeks

Page 1: Lecture Notes First Six Weeks

MATHS 340

Revision questions

Easy

1. If v = [1, 2, 3, 4, 5] and u = [1.5, π, exp(1), 0, 2], what is v · u?

2. If v = [1, 2]T and w = [0, 1, 2]T , what is vTw?

3. If a = [1, 2, 2, 4], what is ‖a‖?

4. If a = [1, 2] and b = [−1,−2] what is the angle between a and b?

5. Do the three vectors a = [1, 0, 0]T , b = [0, 1, 0]T and c = [1, 1, 0]T form a basis for R3? You can answer

this question by inspection.

6. Let a = [1, 0, 0]T , b = [1, 1, 0]T and c = [0, 0, 1]T . Write d = [3, 4,−3]T in terms of a, b and c. You can

answer this question by inspection.

7. Are a = [1, 2, 3] and b = [1, 0, 4] orthogonal? You can do the calculations in your head.

8. Show that f = ln(x2 + y2) satisfies the partial differential equation fxx + fyy = 0 except possibly at

(0, 0).

9. Find the equation of the straight line through the points (1, 2) and (3,−3).

Medium

1. Find the equation of the plane through the points (1, 0, 0), (0,−2, 0) and (0, 0, 3).

2. Sketch the plane x+ y + z = 2;

3. Use the double angle formula to evaluate the following

∫cos4 x dx

4. Use substitution to evaluate the following

∫sin5 θ dθ

5. Use integration by parts to evaluate the following

∫lnx dx

1

Page 2: Lecture Notes First Six Weeks

Difficult

1. Sketch the region bounded by the planes z = 0, x = 1, y = 1 and the plane that contains the line

y = 1− x and the point (1, 1, 1);

2. Evaluate ∫ √exp(2t)− 9 dt

2

Page 3: Lecture Notes First Six Weeks

Revision answers

Easy

1. If v = [1, 2, 3, 4, 5] and u = [1.5, π, exp(1), 0, 2], what is v · u?

Answer:

v · u = 1× 1.5 + 2× π + 3× exp(1) + 4× 0 + 5× 2 = 11.5 + 2π + 3 exp(1)

2. If v = [1, 2]T and w = [0, 1, 2]T , what is vTw?

Answer: The dot product is not defined since v and w have a different number of components.

3. If a = [1, 2, 2, 4], what is ‖a‖?

Answer:

‖a‖ =√12 + 22 + 22 + 42 = 5

4. If a = [1, 2] and b = [−1,−2] what is the angle between a and b?

Answer: Let θ be the angle between a and b. Then

cos(θ) =a · b

‖a‖‖b‖

=1(−1) + 2(−2)√

12 + 22√(−1)2 + (−2)2

=−5√5√5

Hence θ = cos−1(−1) = π.

5. Do the three vectors a = [1, 0, 0]T , b = [0, 1, 0]T and c = [1, 1, 0]T form a basis for R3? You can answer

this question by inspection.

Answer: No. The three vectors are not linearly independent since c = a+ b. Equivalently, the third

component of all three vectors a, b and c is zero which means an arbitrary vector with a non-zero third

component could not be written as a linear combination of a, b and c.

6. Let a = [1, 0, 0]T , b = [1, 1, 0]T and c = [0, 0, 1]T . Write d = [3, 4,−3]T in terms of a, b and c. You can

3

Page 4: Lecture Notes First Six Weeks

answer this question by inspection.

Answer: (The long way) We want to find α, β and γ such that

d = αa+ βb+ γc

Now substitute for d, a, b and c. Get

3

4

−3

= α

1

0

0

+ β

1

1

0

+ γ

0

0

1

This can be written as the following system of three linear equations for α, β and γ

3 = α+ β

4 = β

−3 = γ

You can solve this system of equations anyway you want to. Should get γ = −3, β = 4 and α = −1.

This means

d = −a+ 4b− 3c

7. Are a = [1, 2, 3] and b = [1, 0, 4] orthogonal?

Answer: Very simple - just check if a · b is zero. We have

a · b = 1(1) + 2(0) + 3(4) = 13

Hence a and b are not orthogonal.

8. Show that f = ln(x2 + y2) satisfies the partial differential equation fxx + fyy = 0 except possibly at

(0, 0).

Answer: By inspection fx = 2x(x2+y2)−1. Now use the product rule to get fxx. We get fxx = 2(x2+

y2)−1−4x2(x2+y2)−2. Because f is symmetric in x and y, we have fyy = 2(x2+y2)−1−4y2(x2+y2)−2.

Hence

fxx + fyy = 4(x2 + y2)−1 − 4(x2 + y2)(x2 + y2)−2 = 0

The function is not defined for (0, 0).

4

Page 5: Lecture Notes First Six Weeks

9. Find the equation of the straight line through the points (1, 2) and (3,−3).

Answer: You can use the standard formula or you can use the following approach. The equation will

be of the form

y = c+mx

By inspection, m = −5/2. Hence the equation is of the form

y = c− 5

2x

To find c, use the fact that y = 2 when x = 1. This means

2 = c− 5

21

and hence c = 9/2. Thus the equation is

y =9

2− 5

2x

Medium

1. Find the equation of the plane through the points (1, 0, 0), (0,−2, 0) and (0, 0, 3).

Answer: The equation of a plane has the form

d = ax+ by + cz

Now substitute in the three points. For (1, 0, 0), we get

d = a

For (0,−2, 0), we get

d = −2b

and for (0, 0, 3), we get

d = 3c

Hence the equation has the form

d = dx− d

2y +

d

3z

Since the plane does not go through the origin, we can divide both sides of the above equation by d.

5

Page 6: Lecture Notes First Six Weeks

Get

1 = x− y

2+

z

3z

Can re-arrange this as

6 = 6x− 3y + 2z

2. Sketch the plane x+ y + z = 2;

Answer: One way to sketch the plane is to find any three non-collinear points in the plane, plot them

on a set of x − y − z axis, and then draw a plane through these points. If x = y = 0, z = 2. If

x = z = 0, y = 2. If y = z = 0, x = 2. Now straightforward to sketch the plane.

3. Use the double angle formula to evaluate the following

∫cos4 x dx

Answer: We have cos 2x = 2 cos2 x− 1. Hence cos2 x = (1 + cos 2x)/2 and

∫cos4 x dx =

1

4

∫(1 + cos 2x)2 dx

=1

4

∫(1 + 2 cos 2x+ cos2 2x) dx

Now use the double angle formula again: cos 4x = 2 cos2 2x− 1. Substitute the expression for cos2 2x

into the above integral, then integrate. Get, after a few lines of manipulation

∫cos4 x dx =

3x

8+

1

4sin 2x+

1

32sin 4x

4. Use substitution to evaluate the following

∫sin5 θ dθ

6

Page 7: Lecture Notes First Six Weeks

Answer: Let x = cos θ Then dx = − sin θdθ and we have

∫sin5 θ dθ =

∫(1− cos2 θ)2 sin θ dθ

= −∫(1− x2)2 dx

= −∫(1− 2x2 + x4) dx

......

= −1

5sin4 x cosx− 4

15sin2 x cosx− 8

15cosx

5. Use integration by parts to evaluate the following

∫lnx dx

Answer: We have

∫lnx dx = x lnx−

∫x1

xdx

= x lnx− x

Difficult

1. Sketch the region bounded by the planes z = 0, x = 1, y = 1 and the plane that contains the line

y = 1− x and the point (1, 1, 1);

Answer: Done in class. If you did not come to class, you can come and see me. Here is a sketch of

the region without the labels (to avoid cluttering the diagram).

7

Page 8: Lecture Notes First Six Weeks

2. Evaluate ∫ √exp(2t)− 9 dt

Answer: Start with the substitution u =√exp(2t)− 9. Get the answer

√e2 t − 9− 3 arctan

(1/3

√e2 t − 9

)

8

Page 9: Lecture Notes First Six Weeks

Taylors formula: one and two variables

One variable

If you know about about Taylor polynomials and Taylor’s formula for functions of one variable, you can

skip the material in this section.

You should know from previous courses that given a differentiable function f and a

f(x) ≈ f(a) + (x− a)f ′(a) (1)

This is a linear approximation to f(x) about x = a.

As an example, suppose f(x) = sin(x) and a = 0. By inspection, we have f ′(x) = cos(x) and the linear

approximation (1) to sin(x) about x = 0 is

sin(0) + (x− 0) cos(0)

This simplifies to

x

i.e. sin(x) ≈ x.

Since a in (1) is known, the linear approximation is a linear polynomial in x. We can generalise to a

polynomial of degree n− 1. The formula for this is

f(x) ≈ f(a) + (x− a)f ′(a) +(x− a)2

2!f ′′(a) + · · ·+ (x− a)(n−1)

(n− 1)!f (n−1)(a) (2)

We denote this approximation by Pn−1(x) and refer to it as the Taylor polynomial of degree n− 1.

Example: Find the Taylor polynomial of degree two for sin(x) about x = π2 .

Answer: Let f(x) = sin(x). We have f ′(x) = cos(x) and f ′′ = − sin(x). Hence the required Taylor

polynomial is

sin(π

2) + (x− π

2) cos(

π

2) +

(x− π2 )

2

2!(− sin(

π

2))

This simplifies to

1− (x− π2 )

2

2

Begin optional material

The remainder term Rn(x) often gives students bother. Rn(x) is defined as the difference between f(x) and

9

Page 10: Lecture Notes First Six Weeks

Pn−1(x) (the Taylor polynomial of degree n− 1) i.e.

Rn(x) = f(x)− Pn−1(x)

Re-arranging gives

f(x) = Pn−1(x) +Rn(x)

The above formula is called Taylor’s formula. Can show that

Rn(x) =f (n)(ξ)

n!(x− a)n

where ξ ∈ [a, x]. The value of ξ is usually unknown.

Example: Approximate sin(x) over 0 ≤ x ≤ π by a third degree Taylor polynomial expanded about x = π2 ,

and obtain a bound on the error.

Answer: Let f(x) = sin(x). We have f ′ = cos(x), f ′′ = − sin(x) and f (3) = − cos(x). Hence the required

Taylor polynomial is

sin(π

2) + (x− π

2) cos(

π

2)− (x− π

2 )2

2sin(

π

2)− (x− π

2 )3

3!cos(

π

2)

This simplifies to

1− (x− π2 )

2

2!

So, the third degree Taylor polynomial is the same as the second degree Taylor polynomial for this function

and choice of a.

The remainder is

R4(x) =f (4)(ξ)

4!(x− π

2)4

where ξ = [π/2, x] (this could be written as ξ = [0, π] but this is not as precise for a given value of x).

Now substitute for f (4) into Rn(x). Get

R4(x) =sin(ξ)

4!(x− π

2)4

The largest possible value of | sin(ξ)| is 1. Hence an upper bound on Rn(x) as a function of x is

(x− π2 )

4

4!,

10

Page 11: Lecture Notes First Six Weeks

and an upper bound for x ∈ [0, π] is(π − π

2 )4

4!

which is the same as(0− π

2 )4

4!

The numerical value of the upper bound is 0.25 . . .. This value is large which suggests that the Taylor

polynomial is not a very accurate approximation. However, it could be that the upper bound is unduly

pessimistic. How would you decide if it was? Also, how would you get a more accurate Taylor approximation

to sin(x) for 0 ≤ x ≤ π2 ?

End optional material

Two variables

Let (fx, y) be a function that is sufficiently differentiable. The Taylor Series expansion of f(x, y) about

the point (a, b) can be written as

f(a, b)+1

1![fx(a, b)(x− a) + fy(a, b)(y − b)]

1

2!

[fxx(a, b)(x− a)2 + 2fxy(a, b)(x− a)(y − b) + fyy(a, b)(y − b)2

]+ · · ·

(3)

Note: The formula (3) assumes fxy = fyx which is true since f(x, y) is sufficiently differentiable.

MES: Extend the formula (3) by writing down the cubic terms (the terms that involve fxxx, fxxy etc).

Example: Let f(x, y, z) be a function that is sufficiently differentiable. What is the linear Taylor formula

for f about the point (a, b, c).

Answer: The formula is a simple extension of the formula for two variables. Get

f(a, b, c) + fx(a, b, c)(x− a) + fy(a, b, c)(y − b) + fz(a, b, c)(z − c) (4)

HES: Extend the formula for the example we have just done up to and including the cubic terms.

Example: Let S be a surface defined by the equation f(x, y, z) = 0 (this is more general than z = f(x, y)

- why?). The tangent plane to S at (a, b, c) is defined by the linear Taylor formula of f about (a, b, c) i.e.

0 = f(a, b, c) + fx(a, b, c)(x− a) + fy(a, b, c)(y − b) + fz(a, b, c)(z − c) (5)

11

Page 12: Lecture Notes First Six Weeks

What is the tangent plane at (1, 3,−2) for 3x2 + y2 + z2 = 16?

Answer: We have f(x, y, z) = 3x2 + y2 + z2 − 16. By inspection fx = 6x, fy = 2y and fz = 2z. Hence

fx(1, 3,−2) = 6, fy(1, 3,−2) = 6 and fz(1, 3,−2) = −4. Since f(1, 3,−2) = 0, the equation for the tangent

plane is

6(x− 1) + 6(y − 3)− 4(z + 2) (6)

An important theorem for functions of n variables is the Mean Value Theorem (MVT). When n = 2,

the MVT can be stated as

Theorem

Let f(x, y) and its first-order partial derivatives be continuous in an open region R and let (a, b) and

(x, y) be points in R such that the straight line joining these points lies entirely within R. Then there exists

a point (ξ, η) on that line between the endpoints such that

f(x, y) = f(a, b) + fx(ξ, η)(x− a) + fy(ξ, η)(y − b) (7)

Notes

1. The point (ξ, η) is usually unknown.

2. The theorem is used extensively in proofs.

12

Page 13: Lecture Notes First Six Weeks

Vector products

Cross product

Let u and v be two n-vectors where n = 3 in this course. Their cross-product, denoted by u × v, is

defined as

u× v =

{‖u‖‖v‖ sin(θ)e if u, v 6= 0, θ 6= 0 and θ 6= π

0 if u = 0, v = 0, θ = 0, or θ = π(8)

where e is a unit vector normal to the plane of u and v, directed in such a way that u, v, e form a right-handed

system.

MES: Why is the cross-product not defined just as ‖u‖‖v‖ sin(θ)e?

HES: Read about and use the seven dimensional cross product.

Example: Consider the parallelogram defined by the vectors u and v

v

u

Show that ‖u× v‖ is equal to the area of the parallelogram.

Answer: The height of the parallelogram is ‖v‖ sin(θ) where θ is the angle between u and v. The area of

the parallelogram is then |‖u‖‖v‖ sin(θ)| which is ‖u× v‖.

Example: (Ex. 6, p 691) Let R0 be a given point in R3 and let v be a given non-zero vector. The locus of

points R for a straight line L through R0 parallel to v is

R = R0 + tv (9)

where t is a real scalar. Show that the locus of points is also defined by

(R−R0)× v = 0 (10)

Then find the equation of the line that goes through (2, 5,−1) and is parallel to the vector 4i − k where i

and k are the usual unit vectors.

Answer:

13

Page 14: Lecture Notes First Six Weeks

First part: If R = R0 + tv, R−R0 = tv. Hence (R−R0)× v = tv × v = 0 as required.

Second part: Let a point on the line be (x, y, z). Then

(x, y, z) = (2, 5,−1) + t(4, 0,−1). (11)

Hence the line is defined by the parametric equations x = 2 + 4t, y = 5 and z = −1− t.

In three-dimensional Cartesian coordinates the cross-product u× v of u = [u1, u2, u3] and v = [v1, v2, v3]

is defined as

(u2v3 − u3v2)i− (u1v3 − u3v1)j + (u1v2 − u2v1)k (12)

This can be expressed as the third-order determinant

∣∣∣∣∣∣∣∣

i j k

u1 u2 u3

v1 v2 v3

∣∣∣∣∣∣∣∣(13)

if we ignore the fact that i, j and k are vectors.

Example: What is [1, 2, 3]× [−1, 3, 0].

Answer: The cross product is

∣∣∣∣∣∣∣∣

i j k

1 2 3

−1 3 0

∣∣∣∣∣∣∣∣(14)

which is [−9,−3, 5]T .

Scalar triple product

Let u, v and w be three n-vectors where n = 3. The scalar triple product of the three vectors is defined

as

u · (v × w) (15)

Example: Is the triple product a scalar or vector?

Answer: There are two ways we might consider calculating the triple product

1. First calculate a = u · v, then try a× w.

2. First calculate a = v × w, then try u · a.

14

Page 15: Lecture Notes First Six Weeks

The first way will not work because a will be a scalar, and hence a×w will not be defined. The second way

will work because a is a vector and hence u · a will be defined. Hence the scalar triple product is a scalar.

Example: What is a geometrical interpretation of |u · v × w|?

Answer: It is the volume of the parallelepiped defined by the vectors u, v and w. In class, I used a diagram

and visual aids to explain the interpretation.

Example: Find [1, 2, 3] · [−1, 2, 3]× [0, 4, 5].

Answer: All we have to do is evaluate the determinant

∣∣∣∣∣∣∣∣

1 2 3

−1 2 3

0 4 5

∣∣∣∣∣∣∣∣(16)

This is 1(−2)− 2(−5) + 3(−4) = −4

Exercise: Use a determinant to show that u · v × w = u× v · w.The three things you should remember about the scalar triple product are a) its geometrical interpreta-

tion, b) how to calculate it, and c) the property in the above exercise.

15

Page 16: Lecture Notes First Six Weeks

Differentiation of a vector

Let u be a vector whose components depend on τ . For example, u might be

[τ, cos(τ), exp(τ)]T (17)

The derivative of u with respect to τ is denoted by du/dτ or u′ and defined as

du

dτ= lim

∆τ→0

u(τ +∆τ)− u(τ)

∆τ(18)

Example: What is the derivative of u = [τ2, (1 + τ)2, cos(τ)]T ?

Answer: The definition of the derivative implies we differentiate each component of u with respect to τ .

Hence

u′ = [2τ, 2(1 + τ),− sin(τ)]T (19)

Example: What is the derivative of f(τ)u(τ) where f is a scalar, u is an n-vector?

Answer: Begin with the definition and then manipulate

d(fu)

dτ= lim

∆τ→0

f(τ +∆τ)u(τ +∆τ)− f(τ)u(τ)

∆τ

= lim∆τ→0

f(τ +∆τ)[u(τ) + (u(τ +∆τ)− u(τ))]− f(τ)u(τ)

∆τ

= lim∆τ→0

(f(τ +∆τ)− f(τ))u(τ) + f(τ +∆τ)(u(τ +∆τ)− u(τ))

∆τ

= lim∆τ→0

f(τ +∆τ)− f(τ)

∆τu(τ) + lim

∆τ→0f(τ +∆τ)

u(τ +∆τ)− u(τ)

∆τ= f ′(τ)u(τ) + f(τ)u′(τ)

The table below lists similar results to that above. In the table f , u, v and w are functions of τ , and α

and β are constant scalars.

Function Derivativeαu+ βv αu′ + βv′

u · v u′ · v + u · v′u× v u′ × v + u× v′

u · v × w u′ · v × w + u · v′ × w + u · v × w′

u(f(τ)) dudf f

′(τ)

16

Page 17: Lecture Notes First Six Weeks

Example: Let u = [τ, 2τ, 3]T , v = [cos(2τ), 0, τ3]T , w = [exp(τ), (1 + τ)−1, τ ]T . What is (u · v × w)′?

Answer: At least two possible ways to answer the equation. One is to use the result that

(u · v × w)′ = u′ · v × w + u · v′ × w + u · v × w′ (20)

By inspection, we have u′ = [1, 2, 0]T , v′ = [−2 sin(2τ), 0, 3τ2]T and w′ = [exp(τ),−(1 + τ)−2, 1]T . The

derivative (u · v × w)′ is then

∣∣∣∣∣∣∣∣

1 2 0

cos(2τ) 0 τ3

exp(τ) (1 + τ)−1 τ

∣∣∣∣∣∣∣∣+

∣∣∣∣∣∣∣∣

τ 2τ 3

−2 sin(2τ) 0 3τ2

exp(τ) (1 + τ)−1 τ

∣∣∣∣∣∣∣∣+

∣∣∣∣∣∣∣∣

τ 2τ 3

cos(2τ) 0 τ3

exp(τ) −(1 + τ)−2 1

∣∣∣∣∣∣∣∣(21)

The determinants are −τ3(1+ τ)−1+2τ3 exp(τ)−2τ cos(2τ), −3τ3(1+ τ)−1+2τ(3τ2 exp(τ)+2τ sin(2τ))−6 sin(2τ)(1+ τ)−1 and τ4(1+ τ)−2+2τ(τ3 exp(τ)− cos(2τ))−3 cos(2τ)(1+ τ)−2 and the required derivative

is the sum of these three determinants.

Example: Derive the formula

‖u‖′ = u · u′‖u‖ (22)

Answer: By definition

‖u‖ = (u · u)1/2 (23)

The derivative of the right hand side is

1

2(u′ · u+ u · u′)(u · u)−1/2 (24)

This simplies to

(u · u′)(u · u)−1/2 (25)

which can be written asu · u′‖u‖ (26)

and hence

‖u‖′ = u · u′‖u‖ (27)

Example: If ‖u‖ is a non-zero constant, show that either u′ is perpendicular to u or is zero.

Answer: If ‖u‖′ = 0, then from the previous example u · u′ = 0. There are three possibilities to consider

a) u = 0 - this is ruled out because ‖u‖ is non-zero and the only way a vector norm can be zero is if the

vector is the zero vector;

17

Page 18: Lecture Notes First Six Weeks

b) u′ = 0 - this is acceptable;

c) u′ and u are perpendicular - this is acceptable.

18

Page 19: Lecture Notes First Six Weeks

Non-cartesian coordinates

Introduction

Let r(t) be the position of a particle in R3 where the position depends on time t. The particle’s position

in Cartesian coordinates can be written as

r(t) = x(t)i+ y(t)j + z(t)k

where i, j and k are the usual unit vectors.

The velocity v(t) of the particle is defined as r′(t). Since i, j and k are independent of time, we have

r′(t) = x′(t)i+ y′(t)j + z′(t)k

In a similar way, the acceleration a(t) of the particle is defined as v′(t). This is

r′′(t) = x′′(t)i+ y′′(t)j + z′′(t)k

Differentiating with respect to t is simple because the unit vectors i, j and k do not depend on t, Hence,

it might seem a good idea to use Cartesian coordinates all of the time. However, using other coordinate

systems such as spherical coordinates can lead to simpler expressions and give more unsight. The main

complication with these other coordinate systems is that the unit vectors depend on time.

Plane polar coordinates

Plane polar coordinates are illustrated in the figure below. R is the position vector of a point and θ is

the angle between R and the x-axis. I have used R instead of r for the position to avoid confusion with the

distance r. The coordinates of the point are given as (r, θ).

x

y

R

r

For this coordinate system, we introduce the two unit vectors er and eθ:

19

Page 20: Lecture Notes First Six Weeks

• er - parallel to R;

• eθ - perpendicular to er, pointing in an anti-clockwise direction.

Notes

1. The definition of er implies R = rer.

2. As θ changes, er and eθ will change. Hence er and eθ are both functions of θ i.e. er = er(θ) and

eθ = eθ(θ).

Velocity and acceleration

By definition, the velocity v of the particle is R′. Since R = rer, we have

v(t) = r′er + re′r

The big question is - what is e′r? Try the chain rule, remember that er is a function of θ and θ will be a

function of t (time). We have

e′r ≡ d

dter(θ(t))

=derdθ

dt

= θ′derdθ

We have made progress but now we need to work out what der/dθ is. We can do this as follows

• We have that er = cos(θ)i + sin(θ)j (you can see this from the previous figure). Hence der/dθ =

− sin(θ)i+ cos(θ)j.

• EES: Show that − sin(θ)i+ cos(θ)j = eθ.

• Hence der/dθ = eθ. This means

v(t) = r′er + rθ′eθ

Example: Suppose the plane polar coordinates of a particle are (t2, t) i.e. r = t2 and θ = t. What is the

velocity of the particle?

Ans: Just a matter of plugging into the above formula. Get, since r′ = 2t, r = t2 and θ′ = 1, that

v(t) = 2ter + t2eθ

20

Page 21: Lecture Notes First Six Weeks

MES: Show that in plane polar coordinates, the acceleration is given by

a(t) = (r′′ − r(θ′)2)er + (rθ′′ + 2r′θ′)eθ

The term −r(θ′)2er is called the centripetal acceleration and the term 2r′θ′eθ the Coriolis acceleration.

Example: If a particle moves in a circle with constant angular velocity, what can you say about the

particle’s velocity and acceleration?

Answer: If the particle is moving in a circle r′ = r′′ = 0. If the angular velocity is constant θ′′ = 0.

Hence v(t) = rθ′eθ and a(t) = −r(θ′)2er. Furthermore, v(t) is perpendicular to R(t) (show this) and a(t) is

anti-parallel to R(t) (show this).

Cylindrical coordinates

The cylindrical coordinates are r, θ and z, where r and θ are as for plane polar coordinates and z, not

surprisingly, is in the z-direcion. The unit vectors are er, eθ and ez, where er and eθ are as for plane polar

coordinates and ez is a unit vector in the (positive) z-direction.

I gave a diagram in lectures to illustrate cylindrical coordinates.

Notes:

1. The unit vector er is not parallel to R. Instead it is a unit vector in the x− y plane.

2. r is not ‖R‖. It is the norm of the projection of R on to the x− y plane.

3. θ is not the angle R makes with the x-axis. Instead, θ is the angle, the projection of R makes relative

to the x-axis. This means θ is measured in the x− y plane.

You should see now that R is not ‖R‖er. Instead

R = rer + zez

This is the same expression as for plane polar coordinates except for the addition of the term zez.

Example: A particle’s position in Cartesian coordinates is [2 cos(2t), 2 sin(2t), t]. What is its position in

cylindrical coordinates?

Answer: (You might like to draw a diagram) We have x = 2 cos(2t), y = 2 sin(2t) and z = t. Hence r

21

Page 22: Lecture Notes First Six Weeks

which is just√x2 + y2 is

√4 cos2(2t) + 4 sin2(2t) = 2. Now what about θ? We have

tan θ =y

x

=sin(2t)

cos(2t)

= tan(2t)

Hence θ = 2t and the particle’s position in cylindrical coordinates is [2, 2t, t].

Example: What is the velocity and acceleration in cylindrical coordinates?

Answer: Since R = rer + zez where er (and eθ) are the same as for plane polar coordinates, we have (ez

is a constant, why?)

v(t) = r′er + rθ′eθ + z′ez

a(t) = (r′′ − r(θ′)2)er + (rθ′′ + 2r′θ′)eθ + z′′ez

Example: A particle is moving in a helix and its position in Cartesian coordinates is [sin(3t), cos(3t),−2t].

What is its velocity in cylindrical coordinates?

Answer: We first need to work out the positionR in cylindrical coordinates. We have r =√sin2(3t) + cos2(3t) =

1 and z = −2t. Need to find θ. You can do so in a similar way to the previous example, remembering that

tan(π/2− θ) = cot(θ). Get θ = π/2− 3t. Hence R in cylindrical coordinates is

R = er − 2tez

Now need to differentiate this. Use the expression v(t) = r′er + rθ′eθ + z′ez. We have r′ = 0, θ′ = −3 and

z′ = −2. Hence the velocity in cylindrical coordinates is v(t) = 1(−3)eθ − 2ez.

EES Find the acceleration for the previous example.

Spherical coordinates

The spherical coordinates are ρ, φ and θ where

• ρ = ‖R‖

• φ is the angle between R and the z-axis.

• θ is the angle between the x-axis and the projection of R on to the x− y plane

The unit vectors are denoted by eρ, eφ and eθ. As with plane polar and cylindrical coordinates, the unit

22

Page 23: Lecture Notes First Six Weeks

vectors point in the direction of increasing coordinate i.e. eρ points in the direction of increasing ρ, eθ points

in the direction of increasing θ and eφ points in the direction of increasing φ. I drew a diagram in class.

Example: As R changes, the unit vectors clearly change. Which of ρ, φ and θ do eρ, eφ and eθ depend on?

Answer:

• If you change ρ none of the unit vectors will change.

• If φ changes, the direction of eρ and eφ changes.

• If θ changes, the direction of eρ, eθ and eφ all change. Hence all three unit vectors depend on θ.

In summary, eρ = eρ(φ, θ), eφ = eφ(φ, θ), eθ = eθ(θ).

The table below gives the partial derivatives of the unit vectors with respect to ρ, φ and θ. You might

like to think about how you would work out the partial derivatives.

∂eρ∂ρ = 0

∂eρ∂φ = eφ

∂eρ∂θ = sin(φ)eθ

∂eφ∂ρ = 0

∂eφ∂φ = −eρ

∂eφ∂θ = cos(φ)eθ

∂eθ∂ρ = 0 ∂eθ

∂φ = 0 ∂eθ∂θ = − sin(φ)eρ − cos(φ)eφ

Example: Let R = [x, y, z] in Cartesian coordinates. Write x, y and z in terms of ρ, φ and θ coordinates.

Answer: Clearly z = ρ cos(φ). The norm of the projection of R onto the x − y plane is ρ sin(φ). Hence

x = ρ sin(φ) cos(θ) and y = ρ sin(φ) sin(θ).

Example: Let R = [1, 2, 3]. Write R in spherical coordinates.

Answer: We have ρ =√12 + 22 + 32 =

√14. Since the projection of R on to the x − y plane lies in the

first quadrant, θ = cos−1(1/√5). To finish off, φ = cos−1(3/

√14).

Example: What is the velocity of R in spherical coordinates?

Answer: Since R = ρeρ, we have v(t) = ρ′eρ + ρe′ρ. Need to work out e′ρ. Use the chain rule.

e′ρ =∂eρ∂φ

dt+

∂eρ∂θ

dt

= φ′eφ + θ′ sin(φ)eθ

23

Page 24: Lecture Notes First Six Weeks

Hence

v(t) = ρ′eρ + ρφ′eφ + ρθ′ sin(φ)eθ

EES-MES: Show the acceleration in spherical coordinates is

a(t) = (ρ′′ − ρ(φ′)2 − ρ(θ′)2 sin2(φ))eρ + (ρφ′′ + 2ρ′φ′ − ρ(θ′)2 sin(φ) cos(φ))eφ +

(ρθ′′ sin(φ) + 2ρ′θ′ sin(φ) + 2ρθ′φ′ cos(φ))eθ

24

Page 25: Lecture Notes First Six Weeks

Types of integrals

Page 26: Lecture Notes First Six Weeks

Name Notation Comments

Definite integral

∫ b

af(x) dx

Double integral

∫∫

R

f(x, y) dA R is in the xy plane; solve using it-

erated integrals. Can be used to cal-

culate volumes.

Triple integral

∫∫∫

R

f(x, y, z) dV R is in the xyz 3-space; solve using

iterated integrals. Can be used to

calculate volumes.

Line integral

∫ b

a

√1 + (y′)2 dx Like a definite integral. Many of you

would have seen this type of integral

in previous courses. The integral is

special case of the next type.

Line integral

∫ u

u0

f(u)√

R′(u) ·R′(u) du Like a definite integral.

Surface integral

∫∫

S

f(x(u, v), y(u, v), z(u, v)) dA Use iterated integrals in the uv

plane. A generalisation of double in-

tegrals.

Volume integral

∫∫∫

V

f(x(u, v, w), y(u, v, w), z(u, v, w)) dV Use iterated integrals in the uvw 3-

space. A generalisation of triple in-

tegrals.

Page 27: Lecture Notes First Six Weeks

Curves and line integrals

Curves

Definition: Let

x = x(τ), y = y(τ), z = z(τ) (28)

be continuous functions of a real parameter τ where a ≤ τ ≤ b. The points P (τ) = [x(τ), y(τ), z(τ)] for

a ≤ τ ≤ b form a curve joining P (a) and P (b). Call (28) a parameterisation of the curve.

Types of curves include

• closed curve: P (b) = P (a)

• simple curve: does not intersect itself.

Arc length

Consider the curve in the diagram below

B

A

P

Let RA(τ) and RB(τ +∆τ) be the position vector of the points A and B respectively. The length s of the

curve, also called the arc length, from A to B is approximately

‖RB −RA‖ ≡ ‖∆R‖

=√∆R ·∆R

=

√∆R

∆τ· ∆R

∆τ∆τ

Now take the limit as ∆τ → 0 (this means RB moves towards RA). We have

ds =√R′ ·R′ dτ

Page 28: Lecture Notes First Six Weeks

This is called the differential form for the arc length. This form leads to the Riemann Integral

s =

∫ τ1

τ0

√R′(τ) ·R′(τ) dτ

This is the arc length from τ0 to τ1.

Example: A particle moves in a circular helix. Its position at time t is R = [3 sin(2t), 3 cos(2t), 4t]. What

distance d does the particle move along the helix from t = 0 to t = 3?

Answer: Straightforward. We have R′ = [6 cos(2t),−6 sin(2t), 4]. Hence

d =

∫ 3

0

√[6 cos(2t),−6 sin(2t), 4] · [6 cos(2t),−6 sin(2t), 4] dt

=

∫ 3

0

√36 cos2(2t) + 36 sin2(2t) + 16 dt

=

∫ 3

0

√52 dt

Hence d =√52(3− 0) = 3

√52.

Example: Find the arc length s from 0 to τ for the curve defined by x = 1, y = t and z = t2.

Answer: The arc length s is

s =

∫ τ

0

√[0, 1, 2t] · [0, 1, 2t] dt

=

∫ τ

0

√1 + 4t2 dt

Could try the substitution t = tan(θ)/2. Alternatively, you could use the matlab commands

syms x tau real; int(sqrt(1+4*x^2),x,0,tau);

Get the answerτ√(1 + 4τ2)

2+

1

4sinh−1(2τ)

Page 29: Lecture Notes First Six Weeks

Example: Repeat the previous example with the z = t2 replaced by z = t5.

Answer: We have

s =

∫ τ

0

√[0, 1, 5t4] · [0, 1, 5t4] dt

=

∫ τ

0

√1 + 25t8 dt

Hmmmm, this integral is difficult. I used the matlab command

syms x tau real; int(sqrt(1+25*x^8),x,0,tau);

and got an answer involving the generalised hypergeometric function. You do not need to know about such

functions for this course.

MES: Read the Wikipedia entry about hypergeometric series and functions.

Line integrals

Let C be a curve parameterised with respect to τ . This means x = x(τ), y = y(τ) and z = z(τ). The

line integral of f(x, y, z) along C from τ = τ0 to τ = τ1 is defined as

∫ τ1

τ0

f(x(τ), y(τ), z(τ))√

R′(τ) ·R′(τ) dτ

Example: (essentially Example 5, p 719). Find the line integral when f = (c/b)z, x = a cos(τ), y = a sin(τ),

z = bτ , τ0 = 0 and τ1 = 2Nπ.

Answer: We have f = (c/b)bτ = cτ . We also have R(τ) = [a cos(τ), a sin(τ), bτ ]. This means R′(τ) =

[−a sin(τ), a cos(τ), b] and √R′(τ) ·R′(τ) =

√b2 + a2

Hence the line integral is ∫ 2Nπ

0cτ√a2 + b2 dτ = c

√a2 + b2

(2Nπ)2

2

Example: Repeat the previous example with f = cτ replaced by f = c sin(τ).

Answer: The curve is the same, all that has changed is f . Hence by inspection the line integral is

∫ 2Nπ

0c sin(τ)

√a2 + b2 dτ = c

√a2 + b2(− cos(τ))

∣∣∣2Nπ

0

= 0

Note: Even though the line integral is zero, the arc length is positive.

Page 30: Lecture Notes First Six Weeks

Double integrals

Introduction

Let R be a closed, bounded region in the x−y plane. A closed region contains all of its boundary points

and a bounded region is one that can be enclosed in a sufficiently large circle.

The double integral of the function f(x, y) over R is written as

∫ ∫

R

f(x, y)dA

For example, suppose R is the region bounded by the x-axis, the y-axis, y = 1 and x = 1 (this means R

is the unit square). The double integral of x2y2 over R would be written as

∫ ∫

R

x2y2dA

Evaluating a double integral

A double integral can be evaluated by first imposing a rectangular grid on R. A Reimann sum is then

formed and the limit as the grid spacing goes to zero is taken.

Using Reimann sums is fine in principle but they are an impractical way of evaluating double integrals.

A far more practical way is to use an iterated integral. This has two forms

Form 1:

∫ ∫

R

f(x, y)dA =

∫ y2

y1

{∫ x2(y)

x1(y)f(x, y)dx

}dy

Form 2:

∫ ∫

R

f(x, y)dA =

∫ x2

x1

{∫ y2(x)

y1(x)f(x, y)dy

}dx

The constants x1, x2, y1, y2 and the functions x1(y), x2(y), y1(x) and y2(x) define the region R (see

examples later).

With Form 1, you integrate with respect to x first, then with respect to y. In Form 2, you integrate with

respect to y first, then with respect to x.

Example Use both forms of the iterated integral to evaluate

I =

∫ ∫

R

xy2dA

Page 31: Lecture Notes First Six Weeks

where R is the region bounded by the x-axis, the line x = 1 and the line y = 2x.

Answer: When answering questions of this type, you may find it useful to draw the region R. If I integrate

with respect to x then y, the integral is

∫ ∫

R

xy2dA =

∫ y2

y1

{∫ x2(y)

x1(y)xy2dx

}dy

For this integral y1 = 0, y2 = 2, x1(y) = y/2 and x2(y) = 1. Hence

∫ y2

y1

{∫ x2(y)

x1(y)xy2dx

}dy =

∫ 2

0

{∫ 1

y/2xy2dx

}dy

=

∫ 2

0

{x2y2

2

∣∣∣∣1

y/2

}dy

=

∫ 2

0

(y2

2− y4

8

)dy

=8

15

If I integrate with respect to y then x, the integral is

∫ ∫

R

xy2dA =

∫ x2

x1

{∫ y2(x)

y1(x)xy2dy

}dx

For this integral x1 = 0, x2 = 1, y1(x) = 0 and y2(x) = 2x. Hence

∫ x2

x1

{∫ y2(x)

y1(x)xy2dy

}dx =

∫ 1

0

{∫ 2x

0xy2dy

}dx

=

∫ 1

0

{xy3

3

∣∣∣∣2x

0

}dx

=8

15

Example Evaluate the integral

I =

∫ 4

2

∫ √y

y/2exp(y/x)dxdy

Answer: First draw the graph of the region R. You will find the region is bounded by the lines y = 2x,

y = x2 and y = 2. Now have a whack at doing the integration. For the inner integration, we need to perform

∫ √y

y/2exp(y/x)dx

Page 32: Lecture Notes First Six Weeks

where y is treated as a constant. This integral is next to impossible to do analytically, so we will try inverting

the integral. This means we integrate with respect to y first, then x i.e.

I =

∫ ∫exp(y/x)dydx

You should be able to see that integrating exp(y/x) with respect to y and holding x constant is simple. The

difficult part is working out the limits of integration. If you look at your graph of R, you can see that we

will have to split R into two parts. This means we have split the integral into two parts. The integral then

becomes

I =

∫ √2

1

∫ 2x

2exp(y/x)dydx+

∫ 2

√2

∫ 2x

x2

exp(y/x)dydx

=

∫ √2

1

{{x exp(y/x)|2x2

}dx+

∫ 2

√2

{x exp(y/x)|2xx2

}dx

=

∫ √2

1(x exp(2)− x exp(2/x))dx+

∫ 2

√2(x exp(2)− x exp(x))dx

=

∫ √2

1x exp(2)dx+

∫ 2

√2x exp(2)dx−

∫ 2

√2x exp(x)dx−

∫ √2

1x exp(2/x)dx

=exp(2)

2+ exp(2)−

∫ 2

√2x exp(x)dx−

∫ √2

1x exp(2/x)dx

The first integral on the right is done using integration by parts. Get

∫ 2

√2x exp(x) = (

√2− 1) exp(

√2)− exp(2)

This leaves the integral

−∫ √

2

1x exp(2/x)dx

This integral is readily calculated using the matlab commands

syms x real; int(x*exp(2/x),x=1..sqrt(2));

Get an answer involving the function Ei. This is the exponential integral and you do not need to know

about this integral for 340.

Page 33: Lecture Notes First Six Weeks

Surfaces and surface integrals

Surfaces

Definition

Let

R(u, v) = x(u, v)i+ y(u, v)j + z(u, v)k

where u and v are parameters. The set of points R(u, v) over some interval of u and v is a surface. Denote

by S.

For example

x = sin v cosu

y = sin v sinu

z = cos v

where 0 ≤ u ≤ π/2 and 0 ≤ v ≤ π/2 specifies one-eighth of a sphere, radius 1 and centred at the origin.

Refer to u and v as curvilinear coordinates. In the example above, u and v are φ and θ of spherical

coordinates.

Definition

Let Ru be the partial derivative of R with respect to u. Since v is held constant when doing the partial

differentiation, Ru, if it exists and is non-zero, is a tangent vector to S along the u coordinate. Rv is defined

similarly. Ru and Rv are not necessarily orthogonal.

Definition

The vector

n = Ru ×Rv

is a normal vector to S provided Ru and Rv are linearly independent.

Example: Find a normal vector for the surface

x = sin v cosu

y = sin v sinu

z = cos v

Page 34: Lecture Notes First Six Weeks

Answer: We have

Ru = [− sin v sinu, sin v cosu, 0], Rv = [cos v cosu, cos v sinu,− sin v]

A normal vector is then

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

i j k

− sin v sinu sin v cosu 0

cos v cosu cos v sinu − sin v

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

= [− sin2 v cosu,− sin2 v sinu,− sin v cos v] (29)

EES: Form a unit normal vector for the above example.

Surface integrals

Want to find

I =

∫∫

S

f dA

where f is defined on the surface S.

Partition S into N parts S1, S2, . . ., SN . If ∆Ai is the area of Si and (xi, yi, zi) is an arbitrary point on

Si, we can form the summationN∑

i=1

f(xi, yi, zi)∆Ai

Now take the limit of this sum as N → ∞ in such a way that the largest dimension of each ∆Ai approaches

zero. The limit, if it exists, is defined as I.

We evaluate I by using an iterated integral. To do this, we first parameterise S in the form R(u, v).

Now suppose we move along a distance du in the u-direction from u, and a distance dv in the v-direction

from v. We can define dA as the area of the parallelogram with sides of length du and dv and vectors Ru

and Rv. In mathematical notation

dA = ‖Ru ×Rv‖ dudv

Page 35: Lecture Notes First Six Weeks

The surface integral I becomes

I =

∫∫

R

f(x(u, v), y(u, v), z(u, v))‖Ru ×Rv‖ dudv

where R is the region in the u− v plane that corresponds to S in 3-space.

Example: Let S be the circular cylinder x2 + y2 = 1 between z = 0 and z = 1 + y. Evaluate the surface

area of S.

Answer: Let x = cosu. This implies y = sinu. Also let z = v. We then have Ru = [− sinu, cosu, 0] and

Rv = [0, 0, 1]. From this (after a few lines of manipulation) that

‖Ru ×Rv‖ = 1

Hence the surface integral is ∫ 2π

0

∫ 1+sinu

01(1) dvdu

The inner integral is 1 + sinu. This means the outer integral is 2π.

Example: Let S be the quadric x2 + y2 = z2 between z = 0 and z = h. Evaluate the surface area of S.

Answer: Let x = u cos v and y = u sin v. This implies z = u. We then have Ru = [cos v, sin v, 1] and

Rv = [−u sin v, u cos v, 0]. From this (after a few lines of manipulation) that

‖Ru ×Rv‖ =√2u

Hence the surface integral is ∫ 2π

0

∫ h

01(√2u) dudv

The inner integral is h2/√2. This means the outer integral is

√2πh2.

Example: Repeat the previous example with f(x(u, v), y(u, v), z(u, v)) = u.

Answer: By inspection, the surface integral is

∫ 2π

0

∫ h

0u(√2u) dudv

Very easy to evaluate this. Get 2√2h3π/3.

Page 36: Lecture Notes First Six Weeks

Triple integrals

Example Evaluate ∫ ∫ ∫

R

yz2 dV

where R is the (closed) region bounded by the planes x = 0, y = 0, z = 0 and 3x+ 2y + 6z = 6.

Answer: First draw the region R. You should have little difficulty doing this. The region is a right

tetrahedron with the right corner at the origin.

Next, re-write the integral as the iterated integral

∫ {∫ {∫

R

yz2dx

}dy

}dz

and consider the inner-most integral ∫yz2dx

What are the limits for this integral? From the schematic of R, the lower limit is 0 and the upper limit is

the value of x on the plane 3x+ 2y + 6z = 6. This value is x = (6− 2y − 6z)/3 = 2− 2y/3− 2z. Hence the

inner-most integral is

∫ 2−2y/3−2z

0yz2 dx = yz2x

∣∣2−2y/3−2z

0

= yz2(2− 2

3y − 2z

)

Now do the integration with respect to y i.e.

∫yz2

(2− 2

3y − 2z

)dy

What are the limits for this integral?

We want the maximum possible range of y for a given value of z

The lower limit is obviously 0. We need to choose the upper limit so that we range over all the values of

y. The largest possible value of y is on the plane 3x + 2y + 6z = 6 when x = 0. This value of y is 3 − 3z.

Hence the integral with respect to y is

∫ 3−3z

0yz2

(2− 2

3y − 2z

)dy = z2(y2 − 2

9y3 − zy2)

∣∣∣∣3−3z

0

= z2[9(1− z)2 − 6(1− z)3 − 9(1− z)2z

]

Page 37: Lecture Notes First Six Weeks

This leaves the integral with respect to z. The limits of integration are clearly 0 and 1. This gives the

maximum possible range of z. Hence the integral with respect to z is

∫ 1

0z2

[9(1− z)2 − 6(1− z)3 − 9(1− z)2z

]dz

Make sure you understand how the limits for y were found.

EES: Show the above integral is 1/20.

MES: Repeat the question with the order of integration being y, x and z.

Example:. Evaluate ∫ 1

0

∫ πz

0

∫ z

y/πsin

y

xdxdydz

Answer: The integration with respect to x is difficult. So change the order of integration, gives

∫ 1

0

∫ ∫sin

y

xdydxdz

Need the limits of integration for y and x. To do this, we draw the region of integration for z equal to a

constant value. In what follows think of z as having a numerical value between 0 and 1, say 0.6.

We do not need to draw the three-dimensional region because the integration with respect to z is done

after the integration with respect to x and y.

In the original integral, the integration with respect to

• x was from x = y/π (hence y = πx) to x = z where z can be thought of as a constant at this point in

the integration.

• y was from y = 0 to y = πz where z can be thought of as a constant at this point in the integration.

Hence the region projected into the x − y plane is a triangle bounded by the lines y = πx, the x-axis and

the line x = z. Since z can be thought of as a constant, the line x = z is a vertical line in the x− y plane.

The diagram below depicts the region.

Page 38: Lecture Notes First Six Weeks

y = pi x

x = z = constant

x

y

Thus the integral is ∫ 1

0

∫ z

0

∫ πx

0sin

y

xdydxdz

Start with the inner integral. We have

∫ πx

0sin

y

xdy = − x cos

y

x

∣∣∣πx

0

= 2x

Next is the middle integral. We have ∫ z

02xdx = z2

Now the final integral. We have ∫ 1

0z2dz =

1

3

Example: Evaluate ∫ ∫ ∫

Vxy dV

where V is the region bounded by the planes x = 0, x = 1, y = 0, y = 1, z = 0 and z = 1.

Answer: The first step is to draw the volume. This is the unit cube. The limits of integration of therefore

easy to work out. Each of x, y and z varies from 0 to 1 and it matters little which order you do the

integration in. I decided, for no particular reason, to use the order x, y and z.

The inner integral is therefore ∫ 1

0xydx =

x2

2y

∣∣∣∣1

0

=y

2

Page 39: Lecture Notes First Six Weeks

The middle integral is then ∫ 1

0

y

2dy =

y2

4

∣∣∣∣1

0

=1

4

Finally, the outer integral is ∫ 1

0

1

4dz =

1

4

Page 40: Lecture Notes First Six Weeks

Volumes and volume integrals

In this section of the course we are interested in evaluating

∫ ∫ ∫

V

f(x(u, v, w), y(u, v, w), z(u, v, w))dV

where V is the volume formed by the points R = x(u, v, w)i+ y(u, v, w)j + z(u, v, w)k

We will begin with finding the volume of V . A good place to start is by analogy with surface integrals

Surface integrals Volume integrals

Figure given in class Figure given in class

dA = ‖Ru ×Rv‖ dudv dV = |Ru ·Rv ×Rw| dudvdw

Page 41: Lecture Notes First Six Weeks

We have

|Ru ·Rv ×Rw| =

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

det

xu yu zu

xv yv zv

xw yw zw

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

=

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

det

xu xv xw

yu yv yw

zu zv zw

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

=

∣∣∣∣det(∂(x, y, z)

∂(u, v, w)

)∣∣∣∣

The scalar ∣∣∣∣det(∂(x, y, z)

∂(u, v, w)

)∣∣∣∣

is called the Jacobian.

Thus

dV =

∣∣∣∣∂(x, y, z)

∂(u, v, w)

∣∣∣∣ dudvdw

V ≡∫ ∫ ∫

V

dV =

∫ ∫ ∫

R

∣∣∣∣∂(x, y, z)

∂(u, v, w)

∣∣∣∣ dudvdw∫ ∫ ∫

V

fdV =

∫ ∫ ∫

R

f

∣∣∣∣∂(x, y, z)

∂(u, v, w)

∣∣∣∣ dudvdw

Page 42: Lecture Notes First Six Weeks

where R is the region in u− v − w space corresponding to the region V in x− y − z space.

Example: Find the Jacobian when u, v, w are the r, θ, z of cylindrical coordinates respectively. Hence find

dV .

Answer: We have x = u cos v, y = u sin v and z = w. Then

∣∣∣∣det(∂(x, y, z)

∂(u, v, w)

)∣∣∣∣ =

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

det

xu xv xw

yu yv yw

zu zv zw

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

=

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

det

cos v −u sin v 0

sin v u cos v 0

0 0 1

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣= |u|

Hence

dV = |u| dudvdw = r drdθdz

EES: Repeat the previous exercise for spherical coordinates and show

dV = |ρ2 sinφ| dρdφdθ

Since 0 ≤ φ ≤ π, the absolute value signs are not needed in practice.

Example: Consider two coaxial cylinders of height h and radii r1 and r2. Find the volume integral of the

Page 43: Lecture Notes First Six Weeks

function f(x, y) = x2 + y2 over the volume contained between the two cylinders.

Answer: First draw a schematic of the two cylinders.

Will use cylindrical coordinates. Let x = u cos v, y = u sin v and z = w (u, v and w are equivalent to r,

θ and z of cylindrical coordinates). The required integral is (x2 + y2 = u2)

∫ h

0

∫ 2π

0

∫ r2

r1

u2 ududvdw

Straightforward to evaluate

∫ h

0

∫ 2π

0

∫ r2

r1

u2ududvdw =

∫ h

0

∫ 2π

0

u4

4

∣∣∣∣r2

r1

dvdw

= πh

[r422

− r412

]

Example: Consider two concentric spheres of radii r1 and r2. Find the volume integral of the function

f(x, y) = x2 + y2 over the volume contained between the two spheres.

Answer: First draw a schematic of the two spheres.

Will use spherical coordinates. Let x = ρ cos(θ) sin(φ), y = ρ sin(θ) sin(φ) and z = ρ cos(φ) (you could

use u, v and w in place of ρ, φ and θ). We know from earlier that the jacobian for this set of coordinates is

|ρ2 sin(φ)|. And from the expressions for x and y we have f(x, y) = x2 + y2 = ρ2 sin2(φ). Thus the required

Page 44: Lecture Notes First Six Weeks

integral is of the form ∫ ∫ ∫(ρ2 sin2(φ))(ρ2 sin(φ))dθdρdφ

You could have done the integrations in a different order, such as ρ, then θ and ρ.

We now need to work out the limits. These can read off the schematic by inspection. We have θ varying

between 0 and 2π, ρ between r1 and r2, and φ between 0 and π. The integral becomes

∫ π

0

∫ r2

r1

∫ 2π

0(ρ2 sin2(φ))(ρ2 sin(φ))dθdρdφ

The integrations are easy to do. Get the answer

8

15π(r52 − r51)

Page 45: Lecture Notes First Six Weeks

Case study I

The Earth’s Mass

The problem

Use the data in the following table to estimate Earth’s mass M .

Polar radius 6,356.750 km

Equatorial radius 6,378.135 km

Earth’s density d1 at Earth’s centre 13 g cm−3

Earth’s density d2 at Earth’s surface 2.7 g cm−3

One possible answer

Assumptions

1. Earth is a sphere with a radius R equal to the average of the the equatorial and polar radii.

2. The density d varies linearly from the centre to the surface and is independent of the lattitude and

longitude.

The first part of assumption 2 imples d is a function of just the radial distance from Earth’s centre. The

second part of assumption 2 then implies

d(ρ) = a− bρ

where ρ is the radial distance. We then have

M =

∫∫∫

Vd(ρ) dV

where V is the sphere approximating Earth. Given the model, spherical coordinates are a natural choice for

coordinates. Since the Jacobian for spherical coordinates is |ρ2 sinφ|, we have

M =

∫∫∫

Vd(ρ)ρ2 sinφ dρdφdθ

Page 46: Lecture Notes First Six Weeks

We now need to work out the limits of integration. By inspection ρ varies from 0 to R, φ from 0 to π and

θ from 0 to 2π. Hence

M =

∫ 2π

0

∫ π

0

∫ R

0d(ρ)ρ2 sinφ dρdφdθ

=

∫ 2π

0

∫ π

0

∫ R

0(a− bρ)ρ2 sinφ dρdφdθ

=

∫ 2π

0

∫ π

0

(a

3ρ3 − b

4ρ4)sinφ

∣∣∣∣R

0

dφdθ

=

∫ 2π

0

∫ π

0R3

(a

3− b

4R

)sinφ dφdθ

=

∫ 2π

0R3

(a

3− b

4R

)(− cosφ)

∣∣∣∣π

0

=

∫ 2π

02R3

(a

3− b

4R

)dθ

= (2π)2R3

(a

3− b

4R

)

We now have to substitute for the constants a, b and R. I will use one metre as the unit of length and one

kilogram per cubic metre as the unit of density (one gram per cubic centimetre is 1000 kilograms per cubic

metre). With this choice of units

R = (6, 356, 750 + 6, 378, 135)/2

≈ 6, 367, 443

a = 13, 000

b = (13, 000− 2, 700)/6, 367, 443

≈ 0.0016176

When I substituted these values into the expression for M I got

M = 5.70× 1024kg

to two decimal places.

The generally accepted value for M is approximately 5.9742× 1024kg.

Page 47: Lecture Notes First Six Weeks

Grad, div and curl

Scalar and vector fields

A scalar field is a scalar-valued function over a region R in one, two or three dimensions, and a vector

field is a vector-valued function over a region R in one, two or three dimensions.

Two examples of scalar fields are:

• the air temperature at each point on the surface of New Zealand

• the function

H(x, y) = exp(−x2 − y2)

Two examples of vector fields are

• the wind velocity at each point on the surface of New Zealand

• the function

v(x, y, z) = cos(y) i+ sin(x) j + xyz k

Graident of a scalar field

Let u(x, y, z) be a scalar field. The gradient of u is defined as

∂u

∂xi+

∂u

∂yj +

∂u

∂zk

The gradient is denoted by ∇u or grad u.

Example: Find ∇u when

1. u = xyz

2. u = y exp(z)

Answer: Just a matter of using the definition. For u = xyz, we have

∇u = yz i+ xz j + xy k

and for u = y exp(z) we have

∇u = 0 i+ exp(z) j + y exp(z) k

Page 48: Lecture Notes First Six Weeks

EES: If u = x2 + y2 + z2, find ∇u.

Directional derivatives

Let C be a curve in three-dimensional space with points R(s) defined as (x(s), y(s), z(s)) where s is the

arc length. An important question that arises in many applications is

What is the rate of change of u along C?

To answer this question, we need to use the chain rule. We have

du(x(s), y(s), z(s))

ds=

∂u

∂x

dx

ds+

∂u

∂y

dy

ds+

∂u

∂z

dz

ds

=

(∂u

∂xi+

∂u

∂yj +

∂u

∂zk

)·(dx

dsi+

dy

dsj +

dz

dsk

)

The first vector in the dot product above is ∇u and the second vector is dR/ds. Since s is the arc length,

dR/ds is a unit vector (why?). I will denote this unit vector by s. We then have

du(x(s), y(s), z(s))

ds= ∇u · s

The quantity du/ds is called the directional derivative of u. It gives the rate of change of u in the direction

s.

Note: The gradient is a vector and the directional derivative is a scalar.

Example: Let u(x, y, z) = x2 − 3yz. What is the directional derivative at the point (2,−1, 4) if s for a

curve at the point is (i+ j − 2k)/√6?

Answer: By inspection

∇u = 2x i− 3z j − 3y k

Hence, at (2,−1, 4)

∇u = 4i− 12j + 3k

and the required directional derivative is

(4i− 12j + 3k) · i+ j − 2k√6

= − 14√6

Example: Let u = xyz and let C be the curve whose points are

R(s) = [3 sin(2s/√52), 3 cos(2s/

√52), 4s/

√52]

Page 49: Lecture Notes First Six Weeks

What is the directional derivative when s =√52π?

Answer: We have

∇u = yz i+ xz j + xy kdR

ds=

1√52

[6 cos(2s/√52),−6 sin(2s/

√52), 4]

(check that dR/ds is a unit vector).

If s =√52π, R = [0, 3, 4π]. This means ∇u = 12π i + 0 j + 0 k and dR/ds = [6, 0, 4]/

√52. Hence the

directional derivative is

(12π i+ 0 j + 0 k) · 6 i+ 0 j + 4 k√52

=72π√52

Div

Let v(x, y, z) be a vector field. The divergence of v is denoted by div v and is defined as

∂v1∂x

+∂v2∂y

+∂v3∂z

Since ∇ can be written as

i∂

∂x+ j

∂y+ k

∂z

we can write

div v = ∇ · v

Note: The divergence of v is a scalar.

Example: Suppose

1. v = xy i+ cos(z) j + 2z k

2. v = 6 i+ 7 j + 3 k

What is ∇ · v?

Answer: Use the definition.

1. ∇ · v = y + 0 + 2 = y + 2

2. ∇ · v = 0 + 0 + 0 = 0

Curl

Page 50: Lecture Notes First Six Weeks

Let v(x, y, z) be a vector field. The curl of v is ∇× v and denoted by curl v.

Example: Express curl v in terms of partial derivatives.

Answer: Let v = (v1, v2, v3). We have

curl v =

(i

∂x+ j

∂y+ k

∂z

)× (v1 i+ v2 j + v3 k)

=

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

i j k

∂∂x

∂∂y

∂∂z

v1 v2 v3

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

Note: The curl of v is a vector.

Example: What is the curl of the vector field v(x, y, z) = xyz i+ x2z j + exp(y) k

Answer: We have

curlv =

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

i j k

∂∂x

∂∂y

∂∂z

xyz x2z exp(y)

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

=

[∂(exp(y)

∂y− ∂(x2z)

∂z,∂(xyz)

∂z− ∂ exp(y)

∂x,∂(x2z)

∂x− ∂(xyz)

∂y

]

= [exp(y)− x2, xy − 0, 2xz − xz]

Page 51: Lecture Notes First Six Weeks

Theorems

Name Statement Comments

Divergence Theorem∫∫∫

Vdiv v dV =

∫∫Sn · v dA

1. V is the volume bounded by S.

2. n is the outward unit normal

(vector) to the closed surface S.

3. v is a continuous function of x, y

and z.

Stokes’ Theorem∫∫Sn · ∇ × v dA =

∮C

v · dR1. S is an open surface.

2. C is the edge of S.

3. n is a unit normal (vector) to S.

4. The direction of n and the orien-

tation of C must obey the right

hand rule (see later).

Green’s theorem in the plane∮C

M dx+N dy =∫∫R

(∂N∂x

− ∂M∂y

)dxdy

1. R is a closed region of the xy

plane bounded by C.

2. C is a simple closed curve.

3. M and N are continuous func-

tions of x and y.

Example: Evaluate ∫∫

S

v · n dS

where v = 4xzi− y2j + yzk and S is the surface of the cube bounded by x = 0, x = 1, y = 0, y = 1, z = 0

Page 52: Lecture Notes First Six Weeks

and z = 1.

Answer: By the divergence theorem

∫∫

S

v · n dS =

∫∫∫

V∇ · v dV

=

∫∫∫

V

[∂

∂x(4xz) +

∂y(−y2) +

∂z(yz)

]dV

=

∫∫∫

V(4z − y) dV

=

∫ 1

0

∫ 1

0

∫ 1

0(4z − y) dzdydx

=

∫ 1

0

∫ 1

0(2z2 − yz)

∣∣10dydx

=

∫ 1

0

∫ 1

0(2− y) dydx

=...

=3

2

Example: Verify the divergence theorem for v = 4x i − 2y2 j + z2 k taken over the region bounded by

x2 + y2 = 4, z = 0 and z = 3. You may assume that

∫∫∫

Vdiv v dV = 84π

Answer: Let S1 be the base (z = 0) of the cylinder, S2 the top (z = 3) and S3 the side (x2+ y2 = 4). Then

∫∫

S

n · v dA =

∫∫

S1

n · v dA1 +

∫∫

S2

n · v dA2 +

∫∫

S3

n · v dA3

On S1, n = −k and v = 4x i− 2y2 j. Hence v · n = 0 and the surface integral over S1 is zero.

On S2, n = k and v = 4x i− 2y2 j + 9 k. Hence v · n = 9 and

∫∫

S2

n · v dA2 =

∫∫

S2

9 dA2

= 36π

Page 53: Lecture Notes First Six Weeks

On S3

n =∇(x2 + y2)

‖∇(x2 + y2)‖

=2xi+ 2yj√4x2 + 4y2

=x

2i+

y

2j

Hence

v · n = (4xi− 2y2j + z2k) ·(x2i+

y

2j)= 2x2 − y3

Now need to evaluate ∫∫

S3

n · v dA3

Let x = 2 cosu, y = 2 sinu and z = v. Then R = [2 cosu, 2 sinu, v] and hence Ru = [−2 sinu, 2 cosu, 0],

Rv = [0, 0, 1]. This means Ru ×Rv = [2 cosu, 2 sinu, 0] and ||Ru ×Rv|| = 2. Thus

∫∫

S3

n · v dA3 =

∫ 2π

0

∫ 3

0

[2(2 cosu)2 − (2 sinu)3

]2 dvdu

=

∫ 2π

0(48 cos2 u− 48 sin3 u) du

=

∫ 2π

048 cos2 u du

=...

= 48π

Hence the integral over the cylinder is 36π + 48π = 84π, verifying the divergence theorem.

What was ALF’s (Alien Life Form) name in the TV series?

MES: Let v = x i+ 2y j. Verify the divergence theorem for the cube |x| ≤ 1, |y| ≤ 1, |z| ≤ 1.

Example: Verify Stokes’ theorem for v = (x+2y) i+3z j + yz k where S is the surface of the cube x = 0,

y = 0, z = 0, x = 1, y = 1, z = 1 above the plane. You may assume the curl of v is (z − 3) i− 2 k.

Answer: First draw S

Page 54: Lecture Notes First Six Weeks

A

O

H

B

D

EF

G

Stokes’ theorem states ∫∫

S

n · ∇ × v dA =

C

v · dR

For this problem we have

∫∫

S

n · ∇ × v dA =

∫∫

OAGF

n · ∇ × v dA+

∫∫

ABHG

n · ∇ × v dA+

∫∫

BDEH

n · ∇ × v dA+

∫∫

ODEF

n · ∇ × v dA+

∫∫

EFGH

n · ∇ × v dA

OAGF

For the OAGF face, n = −j. Hence

∫∫

OAGF

n · ∇ × v dA =

∫∫

OAGF

(−j) · ((z − 3) i− 2 k) dA

= 0

ABHG

For the ABHG face, n = i. Hence

∫∫

ABHG

n · ∇ × v dA =

∫∫

ABHG

i · ((z − 3) i− 2 k) dA

=

∫ 1

0

∫ 1

0(z − 3) dydz

= −5

2

Other faces

• For the face BDEH the surface integral is 0.

• For the face ODEF, the surface integral is 5/2.

Page 55: Lecture Notes First Six Weeks

• For the face EFGH, the surface integral is −2.

Hence ∫∫

S

n · ∇ × v dA = 0− 5/2 + 0 + 5/2− 2 = −2

Now we have to work out the integral around the curve C. We go around C in an anti-clockwise direction

since the direction and the normal vector n must obey the right hand rule.

Hence the line integral is

OABDv · dr =

OAv · dr +

ABv · dr +

BDv · dr +

DOv · dr

Since C is in the xy plane, v = (x+ 2y)i.

Along OA, y = 0 and dr = dx i. Hence

OAv · dr =

∫ 1

0x dx

=1

2

Along AB, dr = dy j. Hence

ABv · dr =

∫ 1

00 dy

= 0

The integral along BD is −5/2 (the limits of integration are 1 and 0, not 0 and 1) and that along DO is

0. This means ∮

OABDv · dr = 1/2 + 0− 5/2 + 0 = −2

Example: Evaluate ∫∫

S

∇× v · n dS

where v = (x2 + y + 2) i+ 2xy j − (3xyz + z3) k and S is the surface of the hemisphere x2 + y2 + z2 = 9.

Answer: If we were to evaluate the surface integral directly, we would have to find the curl of v and the

normal vector n, and do the integration. For this example, it will be easier to evaluate

C

v · dr

Page 56: Lecture Notes First Six Weeks

Since C is the circle x2 + y2 = 9, I will introduce the polar coordinates

x = 3 cos t, y = 3 sin t

We then have dx = −3 sin t dt, dy = 3 cos t dt and

v = (9 cos2 t+ 3 sin t+ 2) i+ 18 sin t cos t j

Then, remembering that dr = [dx, dy]

C

v · dr =

∫ 2π

0(9 cos2 t+ 3 sin t+ 2)(−3 sin t)dt+ (18 sin t cos t)(3 cos t) dt

=

∫ 2π

0(27 cos2 t sin t− 9 sin2 t− 6 sin t) dt

= [−27cos3 t

3− 9

(t

2− 1

4sin 2t

)− 6(− cos t)]

∣∣∣∣2π

0

= −9π

Example: Verify Green’s theorem in the plane for

C

(x2y + y)dx+ y2dy

where C is the closed curve formed from y = x2 and y = x (the curve is traversed in an anti-clockwise

direction).

Answer: Green’s theorem states that

C

Mdx+Ndy =

∫ ∫

R

(∂N

∂x− ∂M

∂y

)dxdy

Page 57: Lecture Notes First Six Weeks

Here we have M = x2y + y and N = y2. Hence we have

C

Mdx+Ndy =

C

(x2y + y)dx+ y2dy

=

y=x2

(x2y + y)dx+ y2dy +

y=x(x2y + y)dx+ y2dy

=

y=x2

(x2x2 + x2)dx+ (x2)22xdx+

y=x(x2x+ x)dx+ x2dx

=

∫ 1

0(2x5 + x4 + x2)dx+

∫ 0

1(x3 + x2 + x)dx

=13

15− 13

12

= −13

60

Now for the double integral. Since M = x2y + y and N = y2, we have

∂M

∂y= x2 + 1,

∂N

∂x= 0

Hence

∫∫

R

(∂N

∂x− ∂M

∂y

)dxdy =

∫∫

R

(−x2 − 1) dxdy

=

∫ 1

0

∫ x

y=x2

(−x2 − 1) dydx

=

∫ 1

0(x4 − x3 + x2 − x)dx

=1

5− 1

4+

1

3− 1

2

= −13

60

Example: Use Green’s theorem in the plane to evaluate

C

(y − sin(x))dx+ cos(x)dy

where C is the perimeter of the triangle with vertices at (0, 0), (π/2, 0) and (π/2, 1). The perimeter is

traversed anti-clockwise.

Answer: We have M = y − sin(x) and N = cos(x). Hence

∂N

∂x= − sin(x),

∂M

∂y= 1

Page 58: Lecture Notes First Six Weeks

and

C

(y − sin(x))dx+ cos(x)dy =

∫∫

R

(− sin(x)− 1)dydx

=

∫ π/2

x=0

[∫ 2x/π

y=0(− sin(x)− 1)dy

]dx

=

∫ π/2

x=0(−y sin(x)− y)|2x/π0 dx

=

∫ π/2

0

(−2x

πsin(x)− 2x

π

)dx

= − 2

π(−x cos(x) + sin(x))− x2

π

∣∣∣∣π/2

0

= − 2

π− π

4