MAST10006 Calculus 2 Lecture Slides 2023S1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 384

THE UNIVERSITY OF MELBOURNE

SCHOOL OF MATHEMATICS AND STATISTICS

MAST10006 Calculus 2
Lecture Notes

STUDENT NAME: EMAIL:

This compilation has been made in accordance with the provisions of Part VB of the copyright act for the teaching purposes of the University.
These notes are for the use of students of the University of Melbourne enrolled in the subject MAST10006 Calculus 2.
© School of Mathematics and Statistics, University of Melbourne, 2023.

These notes have been written by Christine Mangelsdorf, Anthony Morphett, TriThang Tran and Binzhou Xia. Reproduction of
any part of this work other than that authorised by Australian Copyright Law without permission of the copyright owners is
unlawful.

Edition 23, February 2023.


Table of Contents

Section 0 - Notation used in MAST10006 Calculus 2 2

Section 1 - Limits, Continuity, Sequences and Series 7

Section 2 - Hyperbolic Functions 92

Section 3 - Complex Numbers 119

Section 4 - Integral Calculus 142

Section 5 - First Order Ordinary Differential Equations 180

Section 6 - Second Order Ordinary Differential Equations 247

Section 7 - Functions of Two Variables 308

1 / 382
Section 0 - Notation used in MAST10006 Calculus 2

Standard Abbreviations
1. such that or given that: |

2. for all: ∀

3. there exists: ∃

4. equivalent to: ≡

5. that is: i.e

6. approximate: ≈

7. much smaller than: ≪

2 / 382
Standard Notation for Sets of Numbers

1. natural numbers: N = {1, 2, 3, . . . }

2. integers: Z = {0, ±1, ±2, . . . }

3. rational numbers: Q = { mn | m, n ∈ Z, n , 0}

4. real numbers: R (rational numbers plus irrational numbers)

5. complex numbers: C = {x + iy | x, y ∈ R, i2 = −1}

6. R2 = {(x, y) | x, y ∈ R} (xy plane)

7. R3 = {(x, y, z) | x, y, z ∈ R} (3 dimensional space)

3 / 382
Standard Notation for Intervals

1. element of: ∈
so a ∈ X means “a is an element of the set X ”

2. open interval: (a, b)


so x ∈ (0, 1) means “0 < x < 1”

3. closed interval: [a, b]


so x ∈ [0, 1] means “0 ≤ x ≤ 1”

4. partial open and closed interval: (a, b] or [a, b)


so x ∈ [0, 1) means “0 ≤ x < 1”

5. not including: \
so x ∈ R \ {0} means “x is any real number excluding 0”.
Alternatively, we could write (−∞, 0) ∪ (0, ∞) where ∪
means the ”union of the two intervals”.

4 / 382
More Standard Notation
1. natural logarithm (base e): log x
base 10 logarithm: log10 x
Alternative notations for natural logarithms used in
textbooks: loge x, ln x

2. inverse trigonometric functions: arcsin x, arctan x etc


Alternative notations used in textbooks: sin−1 x, tan−1 x etc

3. implies: ⇒
so p ⇒ q means “p implies q”

4. if and only if (iff): ⇔ (means both ⇐ and ⇒)


so p ⇔ q means “p implies q” AND “q implies p”

5. approaches: →
so f (x) → 1 as x → 0 means “f (x) approaches 1 as x
approaches 0”
5 / 382
Greek Alphabet

α alpha ν nu
β beta ξ xi
γ gamma o omicron
δ delta π pi
ϵ or ε epsilon ρ rho
ζ zeta σ sigma
η eta τ tau
θ theta υ upsilon
ι iota ϕ phi
κ kappa χ chi
λ lambda ψ psi
µ mu ω omega

6 / 382
Section 1: Limits, Continuity, Sequences, Series
Why do we study limits and continuity in calculus?

7 / 382
Definition of limit of a function
Let f be a real-valued function.

The limit of f (x) as x approaches a is L, written

lim f (x) = L
x→a

if f (x) gets arbitrarily close to L whenever x is close enough to a


but x , a.

Note:
If it exists, the limit L must be a unique finite real number.

8 / 382
(
2x x , 1
Example 1.1: Let f (x) = . Evaluate lim f (x).
4 x=1 x→1

f HxL

4
3
2
1
x
-3 -2 -1 1 2 3
-1
Solution:

Note:
The limit of f as x approaches a does not depend on f (a). The
limit can exist even if f is undefined at x = a.
9 / 382
1
Example 1.2: Let f (x) = . Evaluate lim f (x).
x2 x→0
f HxL

Solution:

10 / 382
1 x<0
(
Example 1.3: Let f (x) = . Evaluate lim f (x).
2 x≥0 x→0

f HxL

Solution:

11 / 382
We can describe this behaviour in terms of one-sided limits.
We write

Theorem:
lim f (x) = L if and only if lim− f (x) = L and lim+ f (x) = L.
x→a x→a x→a

Thus the limit exists if and only if the left and right hand limits
exist and are equal.

12 / 382
Limit Laws
Let f and g be real-valued functions and let c ∈ R be a constant.
If lim f (x) and lim g(x) exist, then
x→a x→a

1. lim [f (x) + g(x)] = lim f (x) + lim g(x).


x→a x→a x→a

2. lim [cf (x)] = c lim f (x).


x→a x→a

3. lim [f (x)g(x)] = lim f (x) · lim g(x).


x→a x→a x→a

" # lim f (x)


f (x) x→a
4. lim = provided lim g(x) , 0.
x→a g(x) lim g(x) x→a
x→a

5. lim c = c.
x→a

6. lim x = a.
x→a

13 / 382
x3 + 2x2 − 1
Example 1.4: Use the limit laws to evaluate lim .
x→2 5 − 3x

Solution:

14 / 382
Limits as x Approaches Infinity
The limit of f (x) as x approaches positive infinity is L,

lim f (x) = L
x→∞

if f (x) gets arbitrarily close to L whenever x is sufficiently large


and positive.
The limit of f (x) as x approaches negative infinity is M,

lim f (x) = M
x→−∞

if f (x) gets arbitrarily close to M whenever x is sufficiently large


and negative.
Note:
1. L and M must be finite.
2. Limit laws (1)-(5) apply to limits as x → ±∞.
3. lim f (x) = lim f (−x).
x→−∞ x→∞ 15 / 382
Example 1.5: Evaluate lim e−x .
x→∞

y = e-x

H0,1L

x
Solution:

16 / 382
Some Standard Limits

We can use the following standard limits without further proof:

1
(1) lim =0 (p > 0)
x→∞ xp

(2) lim rx = 0 (0 ≤ r < 1)


x→∞

We will see more standard limits later.

17 / 382
Terminology
The following are all equivalent ways of expressing lim f (x) = L:
x→a
▶ The limit of f (x) as x approaches a is L
▶ f (x) converges to L as x approaches a
▶ f (x) → L as x → a
These all mean the same thing.

If the limit lim f (x) exists, we say that


x→a
f (x) converges as x approaches a.

If the limit lim f (x) does not exist, we say that


x→a
f (x) diverges as x approaches a.

Similarly for limits as x → ±∞.

Note:
Diverges simply means does not converge.
18 / 382
More about divergence
How do we show that a limit lim f (x) diverges?
x→a

19 / 382
Example 1.6: Explain why the following limits diverge.
1. lim sin x
x→∞
1
2. lim
x→0 x2

Solution:

20 / 382
Notation and ∞
∞ is not a number, and should not appear as a number in your
writing.
1
In other textbooks, you will often see the notation lim = ∞ to
x→0 x2
1
mean that x2
diverges to infinity.
You should not use this notation in Calculus 2 and will lose
notation marks for this!
Why?

21 / 382
f (x) ∞
We say a function has indeterminate form as x → a if
g(x) ∞
f (x) → ∞ and g(x) → ∞.
3x2 − 2x + 3
Example 1.7: Evaluate lim 2 .
x→∞ x + 4x + 4

Solution:

22 / 382
We say a function f (x) − g(x) has indeterminate form ∞ − ∞ as
x → a if f (x) → ∞ and g(x) → ∞.
√ 
Example 1.8: Evaluate lim x2 + 1 − x .
x→∞

Solution:

We will finish this example later.


23 / 382
Sandwich Theorem (version for x → a)
If g(x) ≤ f (x) ≤ h(x) when x is near a but x , a, and

lim g(x) = lim h(x) = L


x→a x→a
then
lim f (x) = L.
x→a

hHxL
f HxL
L

gHxL
a x

Note: “x is near a but x , a” means that x ∈ (b, a) ∪ (a, c) for


some b < a < c.
24 / 382
Sandwich Theorem (version for x → ∞)
A version of the Sandwich Theorem also works for limits as
x → ∞.

If g(x) ≤ f (x) ≤ h(x) when x is sufficiently large, and

lim g(x) = lim h(x) = L


x→∞ x→∞
then
lim f (x) = L.
x→∞

Similarly, the theorem holds for x → −∞.

Note: “x is sufficiently large” means x ∈ (c, ∞) for some real


number c.

25 / 382
1
  
Example 1.9: Evaluate lim x2 sin .
x→0 x

Solution:

26 / 382
1
  
Example 1.10: Evaluate lim x sin .
x→0 x

Solution:

27 / 382
Example 1.8 (continued)
√  1
lim x2 + 1 − x = lim √
x→∞ x→∞
x2 +1+x

28 / 382
Continuity

Definition of continuity
Let f be a real-valued function.

The function f is continuous at x = a if

lim f (x) = f (a).


x→a

29 / 382
Example 1.11: Let f HxL

( 4
2x x,1
f (x) = 3
4 x = 1. 2

Is f continuous at x = 1? 1
x
-3 -2 -1 1 2 3
-1
Solution:

30 / 382
 2
 x −4
x,2



 x−2
Example 1.12: Let f (x) = 



x = 2.

 4

Is f continuous at x = 2?

Solution:

31 / 382
Theorem:
The following function types are continuous at every point in
their domains:
▶ polynomials
▶ trigonometric functions: sin x, cos x, tan x, sec x, cosec x,
cot x, arcsin x, arccos x, arctan x
▶ exponential functions: ax for a > 0
▶ logarithm functions: loga x for a > 0

▶ nth root functions: n x for n ∈ {2, 3, 4, ...}
▶ absolute value function: |x|
▶ hyperbolic functions: sinh x, cosh x, tanh x, sech x, cosech x,
coth x, arcsinh x, arccosh x, arctanh x

32 / 382
Let f and g be real-valued functions and b ∈ R.

Theorem:
If lim g(x) = b and f is continuous at b then
x→a
   
lim f g(x) = f lim g(x) = f (b).
x→a x→a

Note:
This theorem also holds for limits as x → ∞.

33 / 382
Example 1.13: Evaluate lim sin (e−x ) .
x→∞

Solution:

34 / 382
Let f and g be real-valued functions and c ∈ R be a constant.

Theorem:
If the functions f and g are continuous at x = a, then the
following functions are continuous at x = a:

1. f + g,

2. cf ,

3. fg,

f
4. if g(a) , 0.
g

35 / 382
Recall that ( g ◦ f )(x) = g( f (x)).

Theorem:
If f is continuous at x = a and g is continuous at x = f (a), then
g ◦ f is continuous at x = a.

36 / 382
Example 1.14: Let h(x) = sin 2 log x .


Prove that h is continuous at all x > 0.

Solution:

37 / 382
x+2


 x≤1
Example 1.15: Let f (x) = 


 (x − 3)2 + c x>1

For which values of c is f continuous at all x ∈ R?


Justify your answer.

See here for an interactive graph of f (x):


https://desmos.com/c/urqgrxiui0

Solution:

38 / 382
39 / 382
40 / 382
Differentiability

Definition of derivative
Let f be a real-valued function whose domain contains an open
interval around x = a. The derivative of f at x = a is defined by

f (a + h) − f (a)
f ′ (a) = lim .
h→0 h
The function f is differentiable at x = a if this limit exists.

41 / 382
Where does this definition come from?

Before seeing what is filled in from the lectures, try to come up


with a picture that explains where the definition comes from.

42 / 382
Geometrically, f is differentiable at x = a if the graph y = f (x)
has a tangent line at x = a.
f HxL f HxL

x x
a
Not differentiable
Differentiable at x=a at x=0

If f is differentiable at x = a, then
y = f (a) + f ′ (a)(x − a)
is the tangent line to the curve y = f (x) at the point x = a, and
f (x) ≃ f (a) + f ′ (a)(x − a)
when x is close to a.

That is, the tangent line is a linear approximation for the


function close to the point x = a.
43 / 382
Differentiability and Continuity
Theorem:
If f is differentiable at x = a, then f is continuous at x = a.

What about the converse?

f HxL f HxL

x x
a
Not differentiable
Differentiable at x=a at x=0

44 / 382
L’Hôpital’s Rule
L’Hôpital’s rule is a technique for evaluating limits of the form
f (x)
lim when f and g are differentiable.
x→a g(x)

Theorem:
Let f , g be real-valued functions. If
f (x) 0 ∞
▶ lim has the indeterminate form or , and
x→a g(x) 0 ∞
▶ f and g are differentiable near x = a, and
▶ g′ (x) , 0 at all points x near a with x , a, and
f ′ (x)
▶ lim exists,
x→a g′ (x)
then
f (x) f ′ (x)
lim = lim ′ .
x→a g(x) x→a g (x)

45 / 382
L’Hôpital’s Rule

Note:

▶ L’Hôpital’s Rule can only be used to show that a limit exists.


It cannot be used to show that a limit does not exist.

▶ Remember to check that the limit is of the form 0/0 or ∞/∞


before using L’Hôpital’s Rule.

▶ L’Hôpital’s Rule also holds for limits as x → ∞, and for


one-sided limits x → a+ and x → a− for a ∈ R.

46 / 382
sin x
Example 1.16: Evaluate lim .
x→0 x

Solution:

47 / 382
3x2 − 2x + 3
Example 1.17: Evaluate lim .
x→∞ x2 + 4x + 4

Solution:

48 / 382
 1 
Example 1.18: Evaluate lim x− 3 log x . (0 · ∞)
x→∞

Solution:

49 / 382
Aside - What is a limit really?*
Recall our definition of limit:

lim f (x) = L if f (x) gets arbitrarily close to L whenever x is close


x→a
enough to a but x , a.

What do ‘arbitrarily close’ and ‘close enough’ mean?

More formally,

for any arbitrary positive real number ε, there is a positive real


number δ such that

|f (x) − L| < ϵ whenever 0 < |x − a| < δ.

This formal definition of limit is covered in MAST20026 Real


Analysis, but as a taster we do two examples.

* Slides 50-52 are not examinable in MAST10006.


50 / 382
Aside - What is a limit really?*
Example 1.19: Using the definition, prove that

lim 2x = 2
x→1

Solution:

For an arbitrary positive real number ε,


1
|f (x) − 2| = 2|x − 1| < ε if and only if |x − 1| < ε = δ.
2
This shows that |f (x) − 2| can be arbitrarily small whenever
|x − 1| is small enough but not equal to 0.
In other words, f (x) can be arbitrarily close to 2 whenever x is
close enough to 1 but x , 1.
Therefore,
lim f (x) = 2.
x→1

51 / 382
Aside - What is a limit really?*
Example 1.20: Sketch a proof of the limit law

lim [f (x) + g(x)] = lim f (x) + lim g(x)


x→a x→a x→a

Solution:
Suppose lim f (x) = L and lim g(x) = M.
x→a x→a
For an arbitrary positive real number ε, to make
|f (x) + g(x) − (L + M)| < ε
ε ε
we only need to make |f (x) − L| < and |g(x) − M| < .
2 2
These will be satisfied whenever x is close enough to a but
x , a since lim f (x) = L and lim g(x) = M.
x→a x→a
Hence f (x) + g(x) can be arbitrarily close to L + M whenever x is
close enough to a but x , a, which means that
lim [f (x) + g(x)] = L + M = lim f (x) + lim g(x).
x→a x→a x→a
52 / 382
Sequences
Definition of sequence
A sequence is an ordered list of real numbers

a1 , a2 , a3 , a4 , . . . , an . . .

The sequence is denoted by (an ), where an is the nth term.

Sometimes the notation {an } is also used.

A sequence can also be thought of as a function f : N → R,


where f (n) = an .

Examples
1 1 1 1 1
1, , , , , . . . an =
2 3 4 5 n

1, −1, 1, −1, 1, −1, . . . an = (−1)n−1


53 / 382
The graph of a sequence (an ) can be plotted on a set of axes
with n on the x-axis and an on the y-axis.

Example: an = 1
n
Example: an = (−1)n−1
an an
1 1

n n
1 2 3 4 5 1 2 3 4 5

−1 −1

54 / 382
Limits of Sequences

Definition of limit of sequence


A sequence (an ) has the limit L if an can be made arbitrarily
close to L by making n sufficiently large. We write

lim an = L
n→∞

or an → L as n → ∞.

If the limit exists we say that the sequence converges.


Otherwise, we say that the sequence diverges.

Note:
If it exists, L must be a unique finite real number.

55 / 382
Example 1.21: Find the limit
 of these sequences, or explain
1  
why they diverge: (a) (b) (−1)n−1 (c) (n)
n

Solution:

56 / 382
Theorem (Limit Laws):
Let (an ) and (bn ) be sequences of real numbers and c ∈ R a
constant.

If lim an and lim bn exist, then


n→∞ n→∞

1. lim [an + bn ] = lim an + lim bn .


n→∞ n→∞ n→∞

2. lim [can ] = c lim an .


n→∞ n→∞

3. lim [an bn ] = lim an · lim bn .


n→∞ n→∞ n→∞

lim an
an
 
n→∞
4. lim = provided lim bn , 0.
n→∞ bn lim bn n→∞
n→∞

5. lim c = c.
n→∞

57 / 382
The Factorial Function
The factorial function n! (n = 0, 1, 2, ...) is defined by

n! = n(n − 1)! , 0! = 1
or
n! = n × (n − 1) × (n − 2) × ... × 3 × 2 × 1

Therefore
1! = 1
2! = 2 × 1 = 2
3! = 3 × 2 × 1 = 6
4! = 4 × 3 × 2 × 1 = 24

Example
(2n + 2)! = (2n + 2) × (2n + 1) × (2n) × (2n − 1) × ... × 3 × 2 × 1
or
(2n + 2)! = (2n + 2) × (2n + 1) × (2n)!
58 / 382
Standard Limits
1
(1) lim =0 (p > 0) (2) lim rn = 0 (|r| < 1)
n→∞ np n→∞

1 1
(3) lim a n = 1 (a > 0) (4) lim n n = 1
n→∞ n→∞

an log n
(5) lim = 0 (a ∈ R) (6) lim =0 (p > 0)
n→∞ n! n→∞ np
a n np
 
(7) lim 1 + = ea (a ∈ R) (8) lim =0 (p ∈ R, a > 1)
n→∞ n n→∞ an
π
(9) lim arctan(cn) = (c > 0)
n→∞ 2

Note:
Standard limits (1), (3), (4), (6), (7), (8), (9) also hold for limits of
real-valued functions as x → ∞ by replacing n with x.
Standard limit (2) also holds for x → ∞ when 0 ≤ r < 1. 59 / 382
" n #
n−2 4n2
Example 1.22: Evaluate lim + n .
n→∞ n 3

Solution:

60 / 382
Example 1.23: Find the limit of the sequence
3n + 2
an = , n ≥ 1.
4n + 2n
Solution:

61 / 382
Note:
The order hierarchy can be used to help identify the fastest
growing term in an expression:

log n ≪ np ≪ an ≪ n!

62 / 382
Sandwich Theorem for sequences

Let (an ), (bn ) and (cn ) be sequences of real numbers.

If an ≤ cn ≤ bn for all n > N for some N, and

lim an = lim bn = L
n→∞ n→∞
then

lim cn = L.
n→∞

63 / 382
 
1 + sin2 nπ
3
Example 1.24: Evaluate lim √ .
n→∞ n

Solution:

64 / 382
Continuity theorem for sequences

Let f (x) be a real-valued function, (an ) a sequence of real


numbers and b ∈ R.

Theorem:
If lim an = b and f is continuous at x = b then
n→∞
 
lim f (an ) = f lim an = f (b).
n→∞ n→∞

65 / 382
h i
Example 1.25: Evaluate lim log(3n2 + 2) − log n2 .
n→∞

Solution:

66 / 382
The only difference between lim an = L and lim f (x) = L is
n→∞ x→∞
that n is a natural number whereas x is a real number.

Theorem:
Let f (x)) be a real-valued function and (an ) be a sequence of
real numbers such that an = f (n).

If lim f (x) = L then lim an = L.


x→∞ n→∞

This means that we can use the techniques for evaluating limits
of functions to evaluate limits of sequences.

Note:
lim an = L =⇒
̸ lim f (x) = L.
n→∞ x→∞
eg. an = sin(2πn), f (x) = sin(2πx).
67 / 382
68 / 382
Example 1.26: Prove Standard Limit 6:
log n
lim =0 (p > 0)
n→∞ np
Solution:

Note:
We must change from a limit of a sequence (in terms of n) to a
limit of a real-valued function (in terms of x) before applying
L’Hôpital’s rule.
69 / 382
Adding Infinitely Many Numbers

70 / 382
Series
A series is an infinite sum
a1 + a2 + a3 + a4 + . . .
or written in summation notation
X∞
an
n=1

Examples:
∞  n
1 1 1 X 1
+ + + ... =
2 4 8 2
n=1

9 9 9 X 9
0.99999 . . . = + + + ... =
10 100 1000 10n
n=1

X
1 − 1 + 1 − 1 + 1 − 1 + ... = (−1)n−1
n=1
71 / 382
Partial sums of a series

By adding the first n terms of the series we obtain a sequence


of partial sums:
s1 = a1 ,
s2 = a1 + a2 ,
s3 = a1 + a2 + a3 ,
.. .. .. ..
. . . .
sn = a1 + a2 + a3 + · · · + an

72 / 382
Example 1.27: Calculate the first 3 partial sums s1 , s2 , s3 of
∞  n
X 1
the series , and guess an expression for sn .
n=1
2

73 / 382
Definition

of convergence of a series
X
Let an be a series and s1 , s2 , s3 , . . . be its partial sums.
n=1

The sequence s1 , s2 , s3 , . . . of partial sums may or may not have


a limit as n → ∞.
If the sequence of partial sums does have a limit, that is, if
lim sn = S for some real number S, then the series converges,
n→∞
and the sum of the series is the limit of the partial sums:
X∞
an = lim sn .
n→∞
n=1
We also say the series converges to S, or write
X∞
an = S.
n=1

If the sequence of partial sums does not have a limit then the
series diverges.
74 / 382
Example 1.28: Determine if the series
∞  n
X 1
n=1
2
converges, and find its sum if so.

75 / 382
Note:

(an ) and a1 , a2 , a3 , . . . denote a sequence.

lim an denotes the limit of a sequence.


n→∞


X
an and a1 + a2 + a3 + . . . denote a series.
n=1

76 / 382
Example
Let an = 2.

The sequence with an = 2 is the constant sequence 2, 2, 2, 2, . . .



X ∞
X
The series an = 2 represents the sum 2 + 2 + 2 + · · ·
n=1 n=1

The sequence (an ) converges, since lim 2 = 2.


n→∞


X
The series an diverges, since sn = 2n and
n=1
lim sn = lim 2n diverges.
n→∞ n→∞

77 / 382
Geometric Series
A geometric series is a series of the form


X ∞
X
arn = arn−1 = a + ar + ar2 + ar3 + . . .
n=0 n=1

where a ∈ R\{0} and r ∈ R.

The series converges if |r| < 1 and diverges if |r| ≥ 1.

If |r| < 1, we have



X a
arn = .
1−r
n=0

Note:
n
X a(1 − rn+1 )
This follows from the fact that ark = for r , 1.
1−r
k=0
78 / 382
Example 1.29: What does the series
∞  n  2  3
X 1 1 1 1
=1+ + + + ...
n=0
2 2 2 2

converge to?

Solution:

79 / 382
Harmonic p Series

A harmonic p series is a series of the form


X 1
.
np
n=1

The series converges if p > 1 and diverges if p ≤ 1.

Example
∞ ∞
X 1 X 1
2
converges BUT diverges.
n n
n=1 n=1

80 / 382
Properties of Series


X ∞
X
Let an and bn be series, and c ∈ R\{0} a constant.
n=1 n=1

X ∞
X
If an and bn converge then
n=1 n=1

X ∞
X ∞
X
1. (an + bn ) = an + bn converges.
n=1 n=1 n=1


X ∞
X
2. (can ) = c an converges.
n=1 n=1

X ∞
X
If an diverges then (can ) diverges.
n=1 n=1

81 / 382
Divergence Test

X
If lim an , 0 then an diverges.
n→∞
n=1

Note:
lim an , 0 includes the case that the limit lim an does not exist.
n→∞ n→∞
If lim an = 0 then
n→∞
X∞
1. an may converge or diverge.
n=1
2. The Divergence Test is not applicable, so we need to use

X
another test to determine if an converges or diverges.
n=1

82 / 382

X n+1
Example 1.30: Does the series converge?
n=1
n

Solution:

83 / 382
Comparison Test

X
Let an be a series with non-negative terms (i.e. an ≥ 0).
n=1

X ∞
X
1. If bn is another series such that bn diverges and
n=1 n=1

X
0 ≤ bn ≤ an for all n, then an also diverges.
n=1

X ∞
X
2. If cn is another series such that cn converges and
n=1 n=1

X
cn ≥ an for all n, then an also converges.
n=1

To apply the comparison test we compare a given series to a


harmonic p series or geometric series.
84 / 382

X 3+ 5
n
Example 1.31: Does converge or diverge?
n=1
2n2 + n + 2

Solution:

85 / 382

X n2 + 4
Example 1.32: Does converge or diverge?
n=1
n3 + 5

Solution:

86 / 382
87 / 382
Ratio Test

X
Let an be a series with positive terms (i.e. an > 0 for all n).
n=1
Let an+1
L = lim .
n→∞ an

X
1. If L < 1, an converges.
n=1

X
2. If L > 1, an diverges.
n=1

3. If L = 1, the ratio test is inconclusive.

The ratio test is useful if an contains an exponential or factorial


function of n.
88 / 382

X 10n
Example 1.33: Does converge or diverge?
n=1
n!
Solution:

89 / 382

X (2n)!
Example 1.34: Does converge or diverge?
n=1
n! n!
Solution:

90 / 382
91 / 382
Section 2: Hyperbolic Functions

Even Functions y
y = x2
4
A function f is an even function if
3

f (−x) = f (x) 2

1
Example x
−2 −1 2
f (x) = cos x and f (x) = x2
1

y
y = x3
8

Odd Functions
4
A function f is an odd function if
x

f (−x) = −f (x) −2 −1 1 2

−4

Example −8

f (x) = sin x and f (x) = x3 92 / 382


y y = cosh(x)
4

We define the hyperbolic cosine 3

function:
2
1 x
cosh x = e + e−x , x ∈ R

1
2
x
−3 −2 −1 1 2 3

−1

Properties

93 / 382
y
y = sinh(x)
4

We define the hyperbolic sine 2

function:
1

1 x
sinh x = e −e −x 
, x∈R −3 −2 −1 1 2 3
x

2
−1

−2

−3
Properties
−4

94 / 382
y
We define the hyperbolic
2
tangent function:
y = tanh(x)
sinh x 1
tanh x =
cosh x
1 x −x
2 (e − e )
x
= −3 −2 −1 1 2 3

2 (e + e )
1 x −x
−1
x
e −e −x
= , x ∈ R.
ex + e−x −2

Properties

95 / 382
Why call them hyperbolic functions?

Let x = cosh t and y = sinh t then

96 / 382
So (x, y) = (cosh t, sinh t) denotes a point on the hyperbola
x2 − y2 = 1. Since x ≥ 1, the right hand branch of the hyperbola
can be parametrised by x = cosh t, y = sinh t, t ∈ R.

y
t>0
x2-y2=1 4

2 x=cosh t
t y=sinh t
x
-4 -2 2 4
-2
t=0
-4
t<0

97 / 382
Application: Catenary

A flexible, heavy cable of uniform mass per length ρ and


tension T at its lowest point has shape
 ρgx 
T
y= cosh
ρg T

where g is the acceleration due to gravity.


y

Support Support

98 / 382
Example 2.1: If cosh x = 13
12
and x < 0 find sinh x and tanh x.

Solution:

99 / 382
100 / 382
Addition Formulae

sinh(x + y) = sinh x cosh y + cosh x sinh y

cosh(x + y) = cosh x cosh y + sinh x sinh y

sinh(x − y) = sinh x cosh y − cosh x sinh y

cosh(x − y) = cosh x cosh y − sinh x sinh y

101 / 382
Example 2.2: Prove the sinh(x + y) addition formula.

Solution:

102 / 382
Double Angle Formulae

sinh(2x) = 2 sinh x cosh x

cosh(2x) = cosh2 x + sinh2 x

cosh(2x) = 2cosh2 x − 1

cosh(2x) = 2sinh2 x + 1

These can be proved using the addition formulae.

103 / 382
Reciprocal Hyperbolic Functions

We define the three reciprocal hyperbolic functions:

1 1
sech x = , x∈R cosech x = , x ∈ R \ {0}
cosh x sinh x

y y

1.0 2

0.5 1

y = sech(x) y = cosech(x)
x x
−3 −2 −1 1 2 3 −3 −2 −1 1 2 3

−0.5 −1

−2

104 / 382
Reciprocal Hyperbolic Functions

1 cosh x
coth x = = ,
tanh x sinh x
x ∈ R \ {0}

2
y = coth(x)
1

x
−3 −2 −1 1 2 3
−1

−2

−3

105 / 382
Basic Identities

cosh2 x − sinh2 x = 1

coth2 x − 1 = cosech2 x

1 − tanh2 x = sech2 x

106 / 382
Derivatives of Hyperbolic Functions

d
(cosh x) = sinh x, x∈R
dx
d
(sinh x) = cosh x, x∈R
dx
d
(tanh x) = sech2 x, x∈R
dx
d
(sech x) = − sech x tanh x, x∈R
dx
d
(cosech x) = − cosech x coth x, x ∈ R \ {0}
dx
d
(coth x) = − cosech2 x, x ∈ R \ {0}
dx
107 / 382
d (cosh x)
Example 2.3: Prove that = sinh x.
dx

Solution:

108 / 382
Inverses of Hyperbolic Functions
We define three inverse hyperbolic functions.

1. Inverse hyperbolic sine function: arcsinh x


Since sinh x is a 1-1 function

domain arcsinh x = range sinh x = R.


range arcsinh x = domain sinh x = R.
arcsinh(sinh x) = x, x ∈ R.
sinh(arcsinh x) = x, x ∈ R.

y y = sinh(x)

3
2 y = arcsinh(x)

1
x
−4 −3 −2 −1 1 2 3 4
−1
−2
−3

109 / 382
2. Inverse hyperbolic cosine function: arccosh x

Restrict domain of cosh x to be [0, ∞) to give a 1-1 function.


Then

domain arccosh x = range cosh x = [1, ∞).


range arccosh x = restricted domain cosh x = [0, ∞).
cosh(arccosh x) = x, x ≥ 1.
arccosh(cosh x) = x, x ≥ 0.
y

5 y = cosh(x)

3
y = arccosh(x)
2

x
1 2 3 4 5

110 / 382
3. Inverse hyperbolic tangent function: arctanh x

Since tanh x is a 1-1 function

domain arctanh x = range tanh x = (−1, 1).


range arctanh x = domain tanh x = R.
tanh(arctanh x) = x, −1 < x < 1.
arctanh(tanh x) = x, x ∈ R.

3
y = arctanh(x)
2
y = tanh(x)
1

x
−4 −3 −2 −1 1 2 3 4
−1

−2

−3

111 / 382
The inverse hyperbolic functions can be expressed in terms of
natural logarithms.

 √ 
arcsinh x = log x + x2 + 1 , x∈R
 √ 
arccosh x = log x + x2 − 1 , x≥1

1 1+x
 
arctanh x = log , −1 < x < 1
2 1−x

We can also define inverse reciprocal hyperbolic functions:


• arcsech x (0 < x ≤ 1)
• arccosech x (x , 0)
• arccoth x (x < −1 or x > 1)

112 / 382
Example 2.4: Proof of arcsinh x relation.

Solution:

113 / 382
114 / 382
Example 2.5: Simplify cosh(arcsinh x) for x ∈ R.

Solution:

115 / 382
Derivatives

d 1
(arcsinh x) = √ (x ∈ R)
dx x2 + 1

d 1
(arccosh x) = √ (x > 1)
dx x2 − 1

d 1
(arctanh x) = (−1 < x < 1)
dx 1 − x2

Each formula is derived using implicit differentiation or by


differentiating the logarithm definition of each function.

116 / 382
d 1
Example 2.6: Prove that (arcsinh x) = √ .
dx x2 + 1

Solution:

117 / 382
118 / 382
Section 3: Complex Numbers
The Cartesian form of a complex number z ∈ C is

z = x + iy where x, y ∈ R

and
• x = Re(z) is the real part of z,
• y = Im(z) is the imaginary part of z,
• i2 = −1.
ImHzL

z=x+iy
r
y
Θ
ReHzL
x

119 / 382
The complex number can be written as

z = r(cos θ + i sin θ)

where q
• r = |z| = x2 + y2
y
• tan θ =
x

Note:
The angle θ is not unique – only defined up to multiples of 2π.
We choose θ such that −π < θ ≤ π and call this angle the
principal argument of z.

120 / 382
The Complex Exponential

121 / 382
The Complex Exponential
We define the complex exponential using Euler’s formula

eiθ = cos θ + i sin θ

for θ ∈ R.

We can then write the polar form of a complex number as

z = reiθ

Example 3.1: Simplify eiπ + 1.

122 / 382

Example 3.2: Write z = 3 − i in polar form.

Solution:

123 / 382
Properties of the Complex Exponential
1. ei0 = 1

Proof:
ei0 = cos 0 + i sin 0 = 1.

2. eiθ eiϕ = ei(θ+ϕ)

Proof:
 
eiθ eiϕ = (cos θ + i sin θ) cos ϕ + i sin ϕ
= cos θ cos ϕ + i cos θ sin ϕ + i sin θ cos ϕ − sin θ sin ϕ
   
= cos θ cos ϕ − sin θ sin ϕ + i cos θ sin ϕ + sin θ cos ϕ
 
= cos θ + ϕ + i sin(θ + ϕ)
= ei(θ+ϕ) .

124 / 382
Products and Division in Polar Form

If z = r1 eiθ and w = r2 eiϕ then

zw = r1 r2 ei(θ+ϕ)

z r1 i(θ−ϕ)
= e
w r2

125 / 382
√  √ 
Example 3.3: Simplify 3−i 3 + 3i using the
complex exponential.

126 / 382
Solution:

127 / 382
De Moivre’s Theorem:

If z = reiθ and n is a positive integer then


 n
zn = reiθ = rn einθ

128 / 382
√ 30
Example 3.4: Evaluate 3 + 3i .

Solution:

129 / 382
Exponential Form of sin θ and cos θ

Now eiθ = cos θ + i sin θ (1)

⇒ e−iθ = cos(−θ) + i sin(−θ)

⇒ e−iθ = cos θ − i sin θ (2)

Equation (1) + (2) gives

eiθ + e−iθ = 2 cos θ

1  iθ 
⇒ cos θ = e + e−iθ
2

130 / 382
Equation (1) − (2) gives

eiθ − e−iθ = 2i sin θ

1  iθ 
⇒ sin θ = e − e−iθ
2i

Note:
These formulae give a connection between the hyperbolic and
trigonometric functions.
1  iθ 
cosh(iθ) = e + e−iθ = cos θ
2
1  iθ 
sinh(iθ) = e − e−iθ = i sin θ
2

131 / 382
Example 3.5: Express cos3 θ in terms of the functions
cos(nθ) for integers n.

Solution:

132 / 382
Differentiation via the Complex Exponential

If z = x + yi where x, y ∈ R then we define

ez = ex+iy = ex eiy = ex (cos y + i sin y).

Derivatives of functions from R to C are defined similarly as


those from R to R.

Differentiation to functions from R to C is also linear and follows


the product law.

d  kt 
Show that e = kekt when k = a + bi ∈ C.
dt
d h (a+bi)t i d h at ibt i
e = e e
dt dt

133 / 382
d h at i
= e (cos(bt) + i sin(bt))
dt

= aeat [cos(bt) + i sin(bt)] + eat [−b sin(bt) + bi cos(bt)]

h i
= aeat [cos(bt) + i sin(bt)] + eat bi2 sin(bt) + bi cos(bt)

= aeat [cos(bt) + i sin(bt)] + bieat [cos(bt) + i sin(bt)]

= (a + bi)eat [cos(bt) + i sin(bt)]

= (a + bi)eat eibt

= (a + bi)e(a+ib)t .

134 / 382
d40  −t 
Example 3.6: Find e cos t .
dt40
Solution:

135 / 382
136 / 382
Note:
d40  −t 
Example 3.6 also gives the answer to e sin t .
dt40

137 / 382
Integration via the Complex Exponential

d  kx 
Since e = k ekx if k = a + bi (a, b ∈ R) , then
dx
Z
k ekx dx = ekx + C
Z
1 kx
⇒ ekx dx = e +D
k

138 / 382
Z
Example 3.7: Evaluate e3x sin(2x) dx.

Solution:

139 / 382
140 / 382
Note:
Z
Example 3.7 also gives the answer to e3x cos(2x) dx.

141 / 382
Section 4: Integral Calculus
Review of integration

142 / 382
Derivative Substitutions

To evaluate Z
f [g(x)]g′ (x)dx

du
put u = g(x) ⇒ = g′ (x).
dx
Then Z Z
du
f [g(x)]g (x)dx =

f (u) dx
dx
Z
= f (u) du

143 / 382
Z
Example 4.1: Evaluate (6x2 + 10) sinh(x3 + 5x − 2)dx.

Solution:

144 / 382
sech2 (3x)
Z
Example 4.2: Evaluate dx.
10 + 2 tanh(3x)

Solution:

145 / 382
Integration by Parts
The product rule for differentiation is

d du dv
(uv) = v+u
dx dx dx
Integrate

Z Z !
d du dv
(uv) dx = v+u dx
dx dx dx
Z Z
du dv
⇒ uv = v dx + u dx
dx dx
Z Z
dv du
⇒ u dx = uv − v dx
dx dx

146 / 382
Z
Example 4.3: Evaluate xe5x dx.

Solution:

147 / 382
Z 2
Example 4.4: Evaluate x2 log x dx.
1

Solution:

148 / 382
149 / 382
Z
Example 4.5: Evaluate log x dx (x > 0).

Solution:

150 / 382
Note:
This technique can also be used to integrate inverse
trigonometric functions and inverse hyperbolic functions.

151 / 382
Z
Example 4.6: Evaluate e3x sin(2x) dx.

Solution:

152 / 382
153 / 382
154 / 382
Trigonometric and Hyperbolic Substitutions

We can use trigonometric and hyperbolic substitutions to


integrate expressions containing

√ √ √
a2 − x2 , a2 + x2 , x2 − a2 ,

where a is a positive real number.

Method:
Put x = g(θ). Then
Z Z
f (x) dx = f [g(θ)]g′ (θ) dθ

155 / 382
Integrand Substitution

√ 1   23 x = a sin θ
a2 − x2 , √ , 2
a −x 2
etc. or
a2 − x2 x = a cos θ

√ 1  − 23
a2 + x2 , √ , a2 + x2 etc. x = a sinh θ
a2 + x2

√ 1   25
x2 − a2 , √ , x2 − a2 etc. x = a cosh θ
x2 − a2

1 1
, etc. x = a tan θ
a2 + x2 (a2 + x2 )2

156 / 382
Z
1
Example 4.7: Evaluate √ dx using a substitution.
x2 − 25

Solution:

157 / 382
158 / 382
Note:
Note the identity √
x2 = |x| (x ∈ R)

159 / 382
Z 1 √
Example 4.8: Evaluate 9 − 4x2 dx.
0
Solution:

160 / 382
161 / 382
162 / 382
Powers of Hyperbolic Functions

Consider the integral:


Z
sinhm x coshn x dx

where m, n are integers (≥ 0).

• If m or n is odd, use a “derivative substitution” after rewriting


one of the odd power terms using identities if necessary.

• If m and n are even, use double angle formulae.

163 / 382
Z
Example 4.9: Evaluate cosh4 θ dθ.

Solution:

164 / 382
165 / 382
Z
Example 4.10: Evaluate sinh5 x cosh6 x dx.

Solution:

166 / 382
167 / 382
Z
Example 4.11: Evaluate I = sinh5 x cosh7 x dx.

Solution:

168 / 382
169 / 382
Partial Fractions
Let f (x) and g(x) be polynomials, then

f (x) −→ degree n
g(x) −→ degree d

can be written as the sum of partial fractions.

Case 1: n < d
1. Factorise g over the real numbers.
2. Write down partial fraction expansion.
3. Find unknown coefficients

A, A1 , A2 , . . . , Ar , B, B1 , B2 , . . . , Br .

170 / 382
Denominator Factor Partial Fraction Expansion

A
(x − a)
x−a

A1 A2 Ar
(x − a)r + + ··· +
x − a (x − a) 2 (x − a)r

Ax + B
(x2 + bx + c)
x2 + bx + c

A1 x+B1 A2 x+B2 Ar x+Br


(x2 + bx + c)r x2 +bx+c
+ (x2 +bx+c)2
+ ··· + (x2 +bx+c)r

171 / 382
Z
4
Example 4.12: Evaluate dx (x , 0, −2).
x2 (x + 2)

Solution:

172 / 382
173 / 382
174 / 382
Z
4x
Example 4.13: Evaluate dx (x , 2).
(x2 + 4)(x − 2)

Solution:

175 / 382
176 / 382
177 / 382
Case 2: n ≥ d
Use long division, then apply case 1.

Example 4.14: Find


5x4 + 13x3 + 6x2 + 4
Z
dx (x , 0, −2).
x3 + 2x2
Solution:

178 / 382
179 / 382
Section 5: First Order Differential Equations

Ordinary Differential Equations


An ordinary differential equation (ODE) is an equation of the
form

dy d2 y dn y
!
f x, y, , 2 , . . . , n = 0
dx dx dx

The order of an ODE is the order of the highest derivative


occurring in the ODE.

!2
d4 y dy
Example 5.1: What order is 3 4 = + 2x2 y?
dx dx

180 / 382
A solution of an ODE is a function y(x) that satisfies the ODE
for all x in some interval.

2
Example 5.2: Verify by substitution that y(x) = x2 + is a
x
dy y
solution of + = 3x for all x ∈ R \ {0}.
dx x
Solution:

181 / 382
First Order ODEs
dy
The general form of a first order ODE is = f (x, y).
dx

dy
Example 5.3: Solve = x3 .
dx
Solution:

A solution like this which contains an arbitrary constant c ∈ R is


called a general solution.
The general solution represents a family of solutions, where
each value of c corresponds to a different solution of the ODE.
182 / 382
dy
Sketch of the family of solutions of = x3
dx
y

6
c=4
4
c=2
2
c=0 x
-4 -2 2
-2
c=-2
-4

183 / 382
Initial value problem for a first order ODE

dy
Solve = f (x, y) subject to the condition y(x0 ) = y0 .
dx

dy
Example 5.4: Solve = x3 given y(0) = 2.
dx

Solution:

184 / 382
Separable ODEs
A separable first order ODE has the form:

dy
= M(x)N(y), (M(x) , 0, N(y) , 0)
dx

To solve, use separation of variables


dy
= M(x)N(y)
dx
1 dy
⇒ = M(x) (N(y) , 0)
N(y) dx
Z Z
1 dy
⇒ dx = M(x)dx
N(y) dx
Z Z
1
⇒ dy = M(x) dx
N(y)
185 / 382
dy y
Example 5.5: Solve = (x , −1).
dx 1 + x

Solution:

186 / 382
187 / 382
188 / 382
Family of solutions
y
c=2
6
c=1
4

2
H-1,0L

x
-6 -4 -2 2 4
-2

-4
c=-1
-6
c=-2

189 / 382
dy −x
Example 5.6: Solve = (y , 0)
dx y
if y(0) = 3.
Solution:

190 / 382
191 / 382
Family of solutions
y
5

4
d = 16
3
d=9

2
d=4

1 d=1

x
-4 -3 -2 -1 0 1 2 3 4 5

-1 d = 1

-2 d= 4

d=9
-3
d = 16
-4
192 / 382
Linear First Order ODEs
dy
Example 5.7: Solve x + y = ex .
dx
Solution:

193 / 382
A linear first order ODE has the form:
dy
+ P(x)y = Q(x)
dx

To solve:

Multiply ODE by I(x)


dy
I(x) + P(x)I(x)y = Q(x)I(x)
dx
If the left side can be written as the derivative of y(x)I(x), then
d 
y(x)I(x) = Q(x)I(x)

dx
which can be solved by integrating with respect to x.

194 / 382
Aim:

Find an integrating factor I so the left side will be the derivative


of yI. Then

d dy
yI ≡ I + PIy

dx dx
dy dI dy
⇒ I+y = I + PIy
dx dx dx
dI
⇒ y = PIy
dx
To solve for all y

dI
⇒ = PI (separable)
dx

195 / 382
1 dI
⇒ = P
I dx
Z Z
1
⇒ dI = Pdx
I
Z
⇒ log |I| = P dx + c
R
⇒ |I| = e Pdx+c

R
= e Pdx
· ec
R
⇒I = ±ec ·e Pdx
|{z}
constant

196 / 382
So one integrating factor is
R
I(x) = e Pdx

Note:
Since we only need one integrating factor I, we can neglect
the ‘+c’ and modulus signs when calculating I.

197 / 382
Example 5.8: Find the general solution of
dy y
+ = sin x (x , 0).
dx x

Solution:

198 / 382
199 / 382
200 / 382
1 dy
Example 5.9: Solve − xy = x if y(0) = −3.
2 dx

Solution:

201 / 382
202 / 382
Note:

203 / 382
Solving ODEs by substitution

Sometimes it is possible to make a substitution to reduce a


general first order ODE to a separable or linear ODE.

• A homogeneous type ODE has the form

dy y
=f
dx x
y
Substituting u = reduces the ODE to a separable ODE.
x

• Bernoulli’s equation has the form

dy
+ P(x)y = Q(x)yn
dx
Substituting u = y1−n reduces the ODE to a linear ODE.

204 / 382
Example 5.10: Solve the homogeneous type differential
equation
dy y y  
− π2 < x < π2
y
= + cos 2
dx x x
y
by substituting u = .
x

Solution:

205 / 382
206 / 382
207 / 382
Qualitative analysis

Qualitative analysis is a way of determining the shape and


long-term behaviour of solutions of a 1st order ODE without
needing to solve it analytically.

Qualitative analysis typically involves:


• finding the equilibrium solutions of an ODE
• drawing a phase plot
• determining the stability of the equilibrium solutions
• using the above information to draw the family of solutions

208 / 382
Equilibrium Solutions
Definition
An equilibrium solution is a constant solution of an ODE.

Note:
dx
For the ODE = f (x, t), this means
dt
▶ x(t) = C where C is a constant
dx
▶ =0
dt

Terminology
We often simply say equilibrium instead of equilibrium solution.
The plural form of equilibrium is equilibria.

209 / 382
Example 5.11: Find all equilibrium solutions of the ODE

dx
= 3x − 2.
dt
Solution:

210 / 382
Phase plots
dx
A phase plot is a plot of as a function of x.
dt
A phase plot will give
▶ the equilibria
▶ the behaviour of solutions close to the equilibria

Note:
Phase plots are only useful for ODEs of the form

dx
= f (x)
dt

i.e., when the right-hand side has no explicit dependence on t.


ODEs of this form are called autonomous.
211 / 382
Example 5.12: For the ODE
dx
= 3x − 2,
dt
(a) Draw a phase plot
(b) Sketch the family of solutions of the ODE, including
any equilibria.
(c) Describe the long-term behaviour of solutions with
initial conditions
1
i. x(0) =
2
ii. x(0) = 1

212 / 382
Solution:
(a). The phase plot is
dx
dt

dx >0
dt
23
x

dx <0
-2
dt

213 / 382
(b).

Family of solutions:
x

1-
equilibrium
x(t) = 2/3
2/3-

1/2-

214 / 382
(c) From the phase plot and family of solutions, we can see that

Note:
When drawing a family of solutions, we include at least one
example of a solution with each possible qualitative behaviour
(unless stated otherwise in the question).
Two solutions have the same qualitative behaviour if their
shape and long-term behaviour are the same. Otherwise they
are qualitatively different.

215 / 382
Stability of equilibria

An equilibrium is stable if solutions that start nearby move


closer to the equilibrium as t increases.
x

x0 Stable

On a phase plot:

216 / 382
Stability of equilibria
An equilibrium is unstable if solutions that start nearby move
further away as t increases.

x0 Unstable

On a phase plot:

217 / 382
Stability of equilibria
An equilibrium is semistable if on one side of the equilibrium,
solutions that start nearby move closer as t increases, whereas
on the other side, solutions move further away as t increases.
x
x

Semistable
x0
x0 Semistable

t t

On a phase plot:

218 / 382
Example 5.12 (continued):
(d) Determine the stability of the equilibrium.
Solution:

219 / 382
Population Models
Malthus (Doomsday) model

Rate of growth is proportional to the population p at time t.


dp
∝ p
dt
dp
⇒ = kp (separable/linear)
dt
where k is a constant of proportionality representing net births
per unit population per unit time.

If the initial population is p(0) = p0 , then the solution is

p(t) = p0 ekt

You should check that you can derive this on your own!
220 / 382
Note:
The Doomsday model predicts:

• k > 0 : unbounded exponential growth

• k < 0 : population dies out

• k = 0 : population stays constant

Unbounded exponential growth is unrealistic in the long term.

221 / 382
Doomsday model with harvesting.
Remove some of the population at a constant rate.
dp
= kp − h, h > 0.
dt

222 / 382
Example 5.13: A pharmaceutical company grows
engineered yeast to produce a drug. The yeast is
continuously harvested to collect the drug.
The population p (in millions of yeast cells) at time t days
is described by

dp
= 3p − 2 (p ≥ 0, t ≥ 0)
dt

For what initial population sizes p(0) will the yeast


population eventually die out?

223 / 382
Solution:
From Example 5.12 we know

• the equilibrium is

• the phase plot is


dp
dt

dp
>0
dt
23
p

dp
<0
-2 dt
dies out!

224 / 382
• the family of solutions is
p

2/3- Unstable

t
dies out!

The population will die out if

225 / 382
Logistic model.

Include “competition” term in Malthus’ model since


overcrowding, disease, lack of food and natural resources will
cause more deaths.

dp k
 p
= kp − p2 = kp 1 −
dt a a
↗ ↖
z }| { z }| {
net birth rate competition term

where a > 0 is the carrying capacity.

226 / 382
Example 5.14: Find the equilibrium solutions, determine
their stability, and sketch the family of solutions for the
ODE
dp  p
=p 1− (k = 1, a = 4)
dt 4
Solution:
Find the equilibrium solutions:

227 / 382
Phase plot:
dp
dt
dp
>0
dt
1

p
0 2 4
dp
<0
dt

228 / 382
Family of solutions:
p

pH0L=4

pH0L=0
t

229 / 382
Note:
The logistic model accurately describes
• population in a limited space (e.g. bacteria culture).
• population of USA from 1790-1950.

230 / 382
Logistic model with harvesting.
Remove some of the population at constant rate:
dp  p
= kp 1 − − h, h > 0, a > 0
dt a

231 / 382
Example 5.15: For a population described by the logistic
model with harvesting
dp  p 3 
3

= p 1− − a = 4, k = 1, h =
dt 4 4 4
(a) determine the long-term consequences for the
population predicted by the model
(b) Find the time taken until the population dies out if
1
p(0) = .
2

Solution:

232 / 382
233 / 382
Phase plot:
1dp
dt
dp
>0
1 dt
4
p
1 3

dp dp
3 <0 <0
-
4
dt dt

dies out!

234 / 382
Stability and family of solutions:

pH0L=3

pH0L=1
t

dies out!

235 / 382
Interpretation:

Note:
Case (2) is unrealistic in practice, as even a small deviation
from p(0) = 1 will result in the solution following case (1) or (3).

236 / 382
Example 5.15 (b): Find the time taken until the population
1
dies out if p(0) = .
2
Solve analytically for p(t) and set p(t) = 0.

dp 1 (separable - use
= − (p − 3)(p − 1)
dt 4 separation of variables)

237 / 382
238 / 382
Mixing Problems

Example 5.16: Effluent (pollutant concentration 2g/m3 )


flows into a pond (volume 1000m3 , initially 100g pollutant)
at a rate of 10m3 /min. The pollutant mixes quickly and
uniformly with pond water and flows out of pond at a rate
of 10m3 /min.
Find the concentration of pollutant in the pond at any time,
and interpret the long-term behaviour of the system.

239 / 382
Derive the ODE:
Let x be the amount (grams) of pollutant in pond at time t
x
minutes. Then C = is the concentration of pollutant in pond
V
(grams/m3 ), where V is the volume of the pond (m3 ) at time t.

dx
= rate pollutant flows in - rate pollutant flows out
dt

240 / 382
241 / 382
Solve analytically:
dx x
+ = 20 (Linear/Separable)
dt 100

General solution is
−t
x(t) = 2000 + ce 100
(working omitted).

Initial condition is x(0) = 100 ⇒ c = −1900


−t
⇒ x(t) = 2000 − 1900e 100

Find concentration:

242 / 382
Interpret:

conc. Hgm3L

0.1 tHminL

243 / 382
Definitions
1. Transient terms: terms decaying to 0 as t → ∞.

2. Steady state terms: terms NOT decaying to 0 as t → ∞.

The solution for the concentration can be classified as follows.

244 / 382
Example 5.17: Derive an ODE describing the amount x
(g) of pollutant in the lake at time t (minutes), if the input
flow rate is decreased to 5m3 /min.

245 / 382
Let V be the volume in pond (m3 ) at time t minutes.

246 / 382
Section 6: Second Order Differential Equations
A second order ODE has the form

dy d2 y
!
F x, y, , 2 = 0
dx dx

The general form of a linear second order ODE is

d2 y dy
2
+ P(x) + Q(x)y = R(x)
dx dx
• If R(x) = 0, the ODE is homogeneous (H).

• If R(x) , 0, the ODE is inhomogeneous (IH).

Note:
A homogeneous linear ODE is different to a homogeneous type
first order ODE.
247 / 382
The general solution of a second order ODE typically has two
arbitrary constants.

Initial value problem for a second order ODE

Solve
d2 y dy
2
+ P(x) + Q(x)y = R(x)
dx dx
subject to the conditions y(x0 ) = y0 and y′ (x0 ) = y1 .

Boundary value problem for a second order ODE

Solve
d2 y dy
+ P(x) + Q(x)y = R(x)
dx2 dx
subject to the conditions y(a) = y0 and y(b) = y1 .
248 / 382
Homogeneous 2nd Order Linear ODEs

Theorem:
The general solution of

y” + P(x)y′ + Q(x)y = 0
is the function y given by

y(x) = c1 y1 (x) + c2 y2 (x)


where
• y1 , y2 are two linearly independent solutions of the
homogeneous ODE,
• c1 , c2 ∈ R are arbitrary constants.

249 / 382
Definition:
Two functions y1 and y2 are linearly independent if

c1 y1 (x) + c2 y2 (x) = 0 ⇒ c1 = c2 = 0

or equivalently, if neither function is a non-zero constant


multiple of the other function.

Example 6.1:
(a) Are y1 (x) = x2 , y2 (x) = 2x2 linearly independent?

(b) Are y1 (x) = e2x , y2 (x) = xe2x linearly independent?

250 / 382
Aside - A connection with Linear Algebra*
Why are these ODEs called linear?
Because they can be written in terms of a linear transformation.
The ODE

d2 y dy
+ P(x) + Q(x)y = R(x)
dx2 dx

can be written as
T(y) = R(x)
where
d2 y dy
T(y) = 2
+ P(x) + Q(x)y
dx dx

is a linear transformation on a vector space of functions.

These concepts are covered in MAST10007 Linear Algebra.


* This slide is not examinable in MAST10006.
251 / 382
Homogeneous 2nd Order Linear ODEs with Constant Coefficients

General form: ay” + by′ + cy = 0


where a, b, c are constants.

To solve for y(x):


Try y(x) = eλx . Then y′ (x) = λeλx and y′′ (x) = λ2 eλx .
Substitute into the ODE:

ay′′ + by′ + cy = aλ2 eλx + bλeλx + ceλx = 0


aλ2 + bλ + c eλx = 0
 
|{z}
,0

⇒ aλ2 + bλ + c = 0 Characteristic Equation



−b ± b2 − 4ac
⇒λ=
2a
252 / 382
Case 1: b2 − 4ac > 0

• 2 distinct real values λ1 , λ2

• 2 linearly independent solutions

eλ1 x , eλ2 x

• General Solution:

y(x) = Aeλ1 x + Beλ2 x

253 / 382
Example 6.2: Solve y” + 7y′ + 12y = 0 for y(x).

Solution:

254 / 382
255 / 382
Case 2: b2 − 4ac = 0

−b
• 1 real value λ =
2a

• 1 solution is eλx

• 2nd linearly independent solution is xeλx (found using variation


of parameters — not in syllabus).

• General Solution:

y(x) = Aeλx + Bxeλx

256 / 382
We now verify that xeλx is a solution:

If y(x) = xeλx , then

y′ (x) = (λx + 1) eλx ,

λ2 x + 2λ eλx .
 
y”(x) =

So ay” + by′ + cy

= a λ2 x + 2λ eλx + b (λx + 1) eλx + cxeλx


 

= xeλx aλ2 + bλ + c + (2λa + b) eλx


 

| {z } | {z }
=0 =0

= 0

So y(x) = xeλx is a solution.


257 / 382
Example 6.3: Solve y” + 2y′ + y = 0 for y(x).

Solution:

258 / 382
259 / 382
Case 3: b2 − 4ac < 0

• 2 complex conjugate values

λ1 = α + iβ, λ2 = α − iβ

• 2 linearly independent complex solutions

e(α+iβ)x , e(α−iβ)x

• General solution over the complex numbers:

y(x) = C1 e(α+iβ)x + C2 e(α−iβ)x where C1 , C2 ∈ C

260 / 382
To find the general solution over the real numbers, consider
y = e(α+iβ)x = eαx cos(βx) + i sin(βx) .
 
c

Because yc is a solution of ay′′ + by′ + cy = 0 over the complex


numbers, we have
c + byc + cyc = 0 + 0i
ay′′ ′

Take the real part of this equation:


c + byc + cyc = 0
Re ay′′ ′ 

     
aRe y′′
c + bRe y′
c + cRe yc = 0
 ′′  ′  
a Re(yc ) + b Re(yc ) + c Re(yc ) = 0

So Re(yc ) = eαx cos(βx) is a real solution of the ODE.

261 / 382
Similarly, Im(yc ) = eαx sin(βx) is a real solution of the ODE.

y1 = eαx cos(βx) and y2 = eαx sin(βx) are two


linearly independent real solutions of the ODE.

Therefore the general solution over the real numbers is

y = Aeαx cos(βx) + Beαx sin(βx) where A, B ∈ R.

262 / 382
Example 6.4: Solve y” − 4y′ + 13y = 0 subject to y(0) = 1
and y′ (0) = 6.
Solution:

263 / 382
264 / 382
265 / 382
This solution has the form y(x) = e2x (a cos θ + b sin θ).

In general, for a, b > 0,



!
a b
a cos θ + b sin θ = a + b √
2 2 cos θ + √ sin θ
a2 + b2 a2 + b2

√  
= a2 + b2 cos ϕ cos θ + sin ϕ sin θ


= a2 + b2 cos(θ − ϕ).

266 / 382
Hence we can rewrite the solution from Example 6.4 as

This form is sometimes preferable for graphing or further


manipulation.

267 / 382
Inhomogeneous 2nd Order Linear ODEs

Theorem:
The general solution of

y” + P(x)y′ + Q(x)y = R(x)


is the function y given by

y(x) = yH (x) + yP (x)


where
• yH (x) = c1 y1 (x) + c2 y2 (x) is the general solution of the
homogeneous ODE (called the homogeneous solution, GS(H)),
• yP (x) is a solution of the inhomogeneous ODE (called a
particular solution, PS(IH)),

268 / 382
Inhomogeneous 2nd Order Linear ODEs with Constant
Coefficients
General form:
ay” + by′ + cy = R(x)

where a, b, c are constants.

Example 6.5: Solve y” + 2y′ − 8y = R(x) where

(a) R(x) = 1 − 8x2

(b) R(x) = e3x

(c) R(x) = 85 cos x

(d) R(x) = 3 − 24x2 + 7e3x .

269 / 382
Solution:

Step 1: Find the general solution of y” + 2y′ − 8y = 0.

270 / 382
Step 2: Find a particular solution of y” + 2y′ − 8y = R(x).

(a) R(x) = 1 − 8x2 : y” + 2y′ − 8y = 1 − 8x2

271 / 382
272 / 382
(b) R(x) = e3x : y” + 2y′ − 8y = e3x
 
e3x is NOT part of GS(H)

273 / 382
274 / 382
(c) R(x) = 85 cos x : y” + 2y′ − 8y = 85 cos x

275 / 382
276 / 382
Superposition of Particular Solutions

Theorem:
A particular solution of

ay” + by′ + cy = α R1 (x) + β R2 (x)

is
yP (x) = αy1 (x) + βy2 (x)
where

• y1 (x) is a particular solution of ay” + by′ + cy = R1 (x),

• y2 (x) is a particular solution of ay” + by′ + cy = R2 (x),

• a, b, c, α, β are constants.

277 / 382
Example 6.5 (d): R(x) = 3 − 24x2 + 7e3x .

Solution:

278 / 382
Example 6.6: Solve y” − y = ex .
Solution:

GS(H) : yH (x) = Aex + Be−x

279 / 382
Example 6.7: Solve y” + 2y′ + y = e−x .

Solution:
GS(H) : yH (x) = (A + Bx) e−x

280 / 382
281 / 382
Example 6.8: Solve y” + 49y = 28 sin(7t).

Solution:
GS(H) : yH (t) = A cos(7t) + B sin(7t)

282 / 382
283 / 382
Springs - Free Vibrations
Consider an object (of mass m kg) attached to a spring hanging
from a fixed support.
Suppose that the natural length of the spring when unloaded is
L m, and that when the object is attached, it causes the spring
to stretch by s m downwards at equilibrium.

284 / 382
The forces are:

• gravitational force, given by the gravitational law:

W = mg (g = 9.8m/s2 on Earth)

• restoring force in spring, given by Hooke’s Law:

T = −k · extension (k > 0)
0
spring constant

Note:
The negative sign in Hooke’s law is because the direction of the
force T is opposite to the direction of extension:
▶ if the spring is stretched downwards, then it pulls up
▶ if the spring is compressed upwards, then it pushes down.
285 / 382
At equilibrium, the net force is zero, so

286 / 382
Suppose the object is set in motion.
Let y(t) be the displacement of the object below the equilibrium
position (y = 0) at time t seconds.

Note:
Since displacement y is measured below the equilibrium
position, y is positive when the object is below the equilibrium
position, and y is negative when the object is above the
equilibrium position.
287 / 382
When the object is moving, there is an extra force acting:
• damping force is proportional to velocity

R = −βẏ (β ≥ 0)
0
damping constant

Note:
The negative sign is because the direction of the damping force
is opposite the direction of motion.

288 / 382
Derive the equation of motion

Newton’s 2nd Law states that

net force = mass · acceleration

Fnet = m · ÿ

Find the net force:

Fnet = W + T + R

= mg − k(s + y) − βẏ

289 / 382
Apply Newton’s Law:

Fnet = mÿ

mg − k(s + y) − βẏ = mÿ

mg − ks − ky − βẏ = mÿ

−ky − βẏ = mÿ (as mg = ks)

⇒ mÿ + βẏ + ky = 0

Equation of motion

290 / 382
To solve, try y(t) = eλt

⇒ mλ2 + βλ + k = 0

β2 − 4mk
p
−β ±
⇒ λ=
2m
• If β = 0 : λ = ±ib simple harmonic motion


• If 0 < β < 2 mk : λ = a ± ib underdamped, weak damping


• If β = 2 mk : λ = a, a critical damping


• If β > 2 mk : λ = a, b overdamped, strong damping

291 / 382
Example 6.9: A 40 49
kg mass stretches a spring hanging
from a fixed support by 0.2m. The mass is released from
the equilibrium position with a downward velocity of 3m/s.
Find the position of the mass y below equilibrium at any
time t, if the damping constant β is:
160 80 2000
(a) 0 (b) 49
(c) 7
(d) 49

Solution:

292 / 382
293 / 382
(a) β = 0 : ÿ + 49y = 0

294 / 382
y

3
7

Equil.
t
Π 2Π 3Π
7 7 7
3
-
7
Simple harmonic motion

295 / 382
(b) β = 160
49 : ÿ + 4ẏ + 49y = 0

296 / 382
y

1
5

Equil.
t
1 2

1 Weak damping
-
5

297 / 382
(c) β = 80
7 : ÿ + 14ẏ + 49y = 0

298 / 382
y

0.15

0.1 critical damping

0.05

Equil.
t
0.5 1

299 / 382
(d) β = 2000
49 : ÿ + 50ẏ + 49y = 0

300 / 382
y

0.06

0.03 strong damping

Equil.
t
2 4

301 / 382
Springs - Forced Vibrations
If an external downwards force f is applied to the spring-mass
system at time t, the forces acting on the mass are:

302 / 382
Example 6.10: Apply an external downwards force
f (t) = 160
7
sin(7t) in Example 6.9 (c) and (a).

Solution:

303 / 382
(a) β = 80
7 : ÿ + 14ẏ + 49y = 28 sin(7t)

GS(IH) : y(t) = (A + Bt) e−7t − 72 cos(7t)

304 / 382
y
GSHHL contributes
0.4

Equil.
t 4
1 2 3

-0.4 oscillatory motion due to PSHIHL

305 / 382
(b) β=0: ÿ + 49y = 28 sin(7t)

GS(IH) : y(t) = A cos(7t) + B sin(7t) − 2t cos(7t)

306 / 382
y

10

Equil.
t
2 4 6

-5
Resonance

-10

Definition
Resonance: Resonance occurs when the external force f has
the same form as one of the terms in the GS(H).
If β = 0, then the PS(IH) will grow without bound as t → ∞.

307 / 382
Section 7: Functions of Two Variables
Example
The temperature T at a point on the Earth’s surface at a given
time depends on the latitude x and the longitude y. We think of
T being a function of the variables x, y and write T = f (x, y).

In general
A function of two variables is a mapping f that assigns a unique
real number z = f (x, y) to each pair of real numbers (x, y) in
some subset D of the xy plane R2 . We also write

f :D→R
where D is called the domain of f .

Example
If f (x, y) = x2 + y3 then f (2, 1) = 4 + 1 = 5.
308 / 382
We can represent the function f by its graph in R3 . The graph
of f is: n o
(x, y, z) ∈ R3 : (x, y) ∈ D and z = f (x, y) .
This is a surface lying directly above the domain D. The x and y
axes lie in the horizontal plane and the z axis is vertical.

309 / 382
Equations of a Plane
The Cartesian equation of a plane has the form

ax + by + cz = d

where a, b, c, d are real constants.

n = ai + bj + ck is a normal vector to the plane.

In fact, the plane passing through a point (x0 , y0 , z0 ) with a


normal vector (a, b, c) consists of the points (x, y, z) such that
(a, b, c) is perpendicular to (x − x0 , y − y0 , z − z0 ) and thus has
equation

a(x − x0 ) + b(y − y0 ) + c(z − z0 ) = 0,


that is,

ax + by + cz = ax0 + by0 + cz0 .


310 / 382
311 / 382
Example 7.1: Sketch the plane 4x + 3y + z = 2.

Solution:

312 / 382
313 / 382
Level Curves

A curve on the surface z = f (x, y) for which z is a constant is a


contour.

The same curve drawn in the xy plane is a level curve.

So a level curve of f has the form

{(x, y) : f (x, y) = c}
where c ∈ R is a constant.

314 / 382
Sketching Functions of Two Variables

The key steps in drawing a graph of a function of two variables


z = f (x, y) are:

1. Draw some level curves.


2. Draw the x-z and y-z cross sections.
3. Draw the x, y, z axes.
For right handed axes: the positive x axis is towards you,
the positive y axis points to the right, and the positive z axis
points upward.
4. Draw the contours for the level curves you found earlier.
5. Add the cross sections you drew earlier.
6. Label any x, y, z axis intercepts and key points.

315 / 382
Example 7.2: Find the level curves, and cross sections in
the x-z and y-z planes of z = 1 − x − y2 . Hence sketch
p
2

the surface and identify it.

Solution:

316 / 382
y
Level curves
c=0

H0,1L

H-1,0L H1,0L
x

H0,-1L
c=1

317 / 382
Consider cross sections (slices) to help sketch graph.

z z

H0,1L H0,1L

H-1,0L H1,0L x H-1,0L H1,0L y

318 / 382
Surface is a hemisphere radius 1, centre at (0, 0, 0) for z ≥ 0.

319 / 382
Example 7.3: Sketch the graph of z = 4x2 + y2 .
p

Solution:

y
level curves are ellipses
H0,2L
c=2

Level curves

H-1,0L H1,0L
x

c=0

H0,-2L
320 / 382
Cross sections

z z

2 2

x y
-1 1 z=2ÈxÈ -1 1 z=ÈyÈ

321 / 382
The surface is an elliptic cone.

322 / 382
Limits

Let f (x, y) be a function of two variables.

The limit of f (x, y) as (x, y) approaches (x0 , y0 ) is L, written

lim f (x, y) = L
(x,y)→(x0 ,y0 )

if f (x, y) gets arbitrarily close to L whenever (x, y) is close


enough to (x0 , y0 ) but (x, y) , (x0 , y0 ).

Note:
1 If it exists, L must be a unique finite real number.

2 The limit can exist even if f is undefined at (x0 , y0 ).

3 The usual limit laws apply.

323 / 382
Continuity

Let f (x, y) be a function of two variables.

f is continuous at (x, y) = (x0 , y0 ) if

lim f (x, y) = f (x0 , y0 )


(x,y)→(x0 ,y0 )

Note:
The continuity theorems for functions of one variable can be
generalised to functions of two variables.

324 / 382
Example 7.4: Let f (x, y) = x2 + y2 . At which points (x, y) is
f continuous?

Solution:

325 / 382
Example 7.5: Evaluate lim log(1 + 2x2 + 3y2 ).
(x,y)→(2,1)

Solution:

326 / 382
First Order Partial Derivatives
Let f (x, y) be a function of two variables. The first order partial
derivatives of f with respect to the variables x and y are defined
by the limits:
∂f f (x + h, y) − f (x, y)
fx = = lim
∂x h→0 h
∂f f (x, y + h) − f (x, y)
fy = = lim
∂y h→0 h

Note:
∂f
• measures the rate of change of f with respect to x
∂x
when y is held constant.
∂f
• measures the rate of change of f with respect to y
∂y
when x is held constant.
327 / 382
∂f ∂f
Geometric Interpretation of and
∂x ∂y

328 / 382
Let C1 be the curve where the vertical plane y = y0 intersects
∂f
the surface. Then gives the slope of the tangent to C1
∂x (x0 ,y0 )

at (x0 , y0 , z0 ).

Let C2 be the curve where the vertical plane x = x0 intersects


∂f
the surface. The gives the slope of the tangent to C2 at
∂y (x0 ,y0 )

(x0 , y0 , z0 ).

• T1 and T2 are the tangent lines to C1 and C2 .

329 / 382
∂f
Example 7.6: Let f (x, y) = xy2 . Find from first
∂y
principles.

Solution:

330 / 382
Example 7.7: Let f (x, y) = 3x3 y2 + x2 + y log x.
∂f ∂f
Find and .
∂x ∂y

Solution:

331 / 382
Tangent Planes and Differentiability
Let f (x, y) be a function of two variables. We say that f is
differentiable at (x0 , y0 ) if the tangent lines to all curves on the
surface z = f (x, y) passing through (x0 , y0 , z0 ) form a plane,
called the tangent plane.
This holds if fx and fy exist and are continuous near (x0 , y0 ).

332 / 382
The tangent line T1 has equation (y = y0 fixed):
∂f
z − z0 = (x − x0 )
∂x (x0 ,y0 )

The tangent line T2 has equation (x = x0 fixed):


∂f
z − z0 = (y − y0 )
∂y (x0 ,y0 )

Since a plane passing through (x0 , y0 , z0 ) has the form

z − z0 = α(x − x0 ) + β(y − y0 )
the tangent plane has equation
∂f ∂f
z − z0 = (x − x 0 ) + (y − y0 )
∂x (x0 ,y0 ) ∂y (x0 ,y0 )

or equivalently,

∂f ∂f
z = z0 + (x − x0 ) + (y − y0 ).
∂x (x0 ,y0 ) ∂y (x0 ,y0 )

333 / 382
Linear Approximations

If f is differentiable at (x0 , y0 ), we can approximate z = f (x, y) by


its tangent plane at (x0 , y0 , z0 ), when (x, y) is close to (x0 , y0 ).
That is:
∂f ∂f
f (x, y) ≈ z0 + (x − x0 ) + (y − y0 )
∂x (x0 ,y0 ) ∂y (x0 ,y0 )
| {z }
equation of tangent plane

when (x, y) is close to (x0 , y0 ).

This is called the linear approximation to f near (x0 , y0 ).

334 / 382
Example 7.8: Let
f (x, y) = xexy .
(a) Find the equation of the tangent plane to the surface
z = f (x, y) at the point where (x, y) = (2, 0).
(b) Hence, approximate f (2.1, −0.1).

Solution:

335 / 382
Note:
The actual value is (2.1)e−0.21 ≈ 1.70223
336 / 382
Approximate Change

Rearranging the linear approximation equation, we get


∂f ∂f
f (x, y) − f (x0 , y0 ) ≃ (x − x0 ) + (y − y0 ).
∂x (x0 ,y0 ) ∂y (x0 ,y0 )

Let ∆x = x − x0 , ∆y = y − y0 , ∆f = z − z0 = f (x, y) − f (x0 , y0 ).


The approximate change in f near (x0 , y0 ), for small changes ∆x
and ∆y in x and y, is:

∂f ∂f

∆f ≈ ∂x ∆x + ∂y ∆y
(x0 ,y0 ) (x0 ,y0 )

337 / 382
Example 7.9: For a differentiable function f : R2 → R, it is
known that
fx (3, 8) = 3 and fy (3, 8) = −2.
Estimate the change in f as (x, y) changes from (3, 8) to
(3.2, 7.9).

338 / 382
Second Order Partial Derivatives

Let f (, y) be a function of two variables. The second order


partial derivatives of f with respect to x and y are defined by:

∂ ∂f ∂2 f
!
 
• fxx = fx = = 2
x ∂x ∂x ∂x

∂ ∂f ∂2 f
!
 
• fyy = fy = = 2
y ∂y ∂y ∂y

∂ ∂f ∂2 f
!
 
• fxy = fx = =
y ∂y ∂x ∂y∂x

∂ ∂f ∂2 f
!
 
• fyx = fy = =
x ∂x ∂y ∂x∂y

339 / 382
Theorem:
If the second order partial derivatives of f exist and are
continuous then fxy = fyx .

340 / 382
Example 7.10: Find the second order partial derivatives of
f : R2 → R given by f (x, y) = x sin(x + 2y).

Solution:

341 / 382
Note:
fxy = fyx as expected since trigonometric functions and
polynomials are continuous for all (x, y) ∈ R2 .

342 / 382
Chain Rule

1. If z = f (x, y) and x = g(t), y = h(t) are differentiable


functions, then z = f (g(t), h(t)) is a function of t, and

dz ∂z dx ∂z dy
= +
dt ∂x dt ∂y dt

343 / 382
dz
Example 7.11: If z = x2 − y2 , x = sin t, y = cos t. Find at
dt
π
t= .
6

Solution:

344 / 382
2. If z = f (x, y) and x = g(s, t), y = h(s, t) are differentiable
functions, then z is a function of s and t with

∂z ∂z ∂x ∂z ∂y
= +
∂s ∂x ∂s ∂y ∂s

∂z ∂z ∂x ∂z ∂y
= +
∂t ∂x ∂t ∂y ∂t

345 / 382
Example 7.12: If z = ex sinh y, x = st2 , y = s2 t.
∂z
Find .
∂s

Solution:

346 / 382
Directional Derivatives
Let û = (u1 , u2 ) be a unit vector in the xy-plane (so u21 + u22 = 1).
The rate of change of f at P0 = (x0 , y0 ) in the direction û is the
directional derivative Dû f P .

0

Geometrically this represents the slope of the surface z = f (x, y)


above the point P0 in the direction û.

347 / 382
The straight line starting at P0 = (x0 , y0 ) with velocity û = (u1 , u2 )
has parametric equations:

x = x0 + tu1 , y = y0 + tu2 .
Hence,

Dû f
P0
= rate of change of f along the straight line at t = 0
d
= value of f (x0 + tu1 , y0 + tu2 ) at t = 0
dt
= fx (x0 , y0 )x′ (0) + fy (x0 , y0 )y′ (0) by the chain rule

= fx (x0 , y0 ) u1 + fy (x0 , y0 ) u2 .

We can also write this as a dot product

∂f ∂f
!
Dû f P = , · (u1 , u2 ).
0 ∂x P0 ∂y P0

348 / 382
Gradient Vectors

If f : R2 → R is a differentiable function, we can define the


gradient of f to be the vector

∂f ∂f ∂f ∂f
!
grad f = ∇f = i+ j= ,
∂x ∂y ∂x ∂y

Then the directional derivative of f at the point P0 in the


direction û is the dot product

Dû f P = ∇f P · û
0 0

349 / 382
Example 7.13: Find the directional derivative of f (x, y) = xey
1
 
at (2, 0) in the direction from (2, 0) towards , 2 .
2

Solution:

• direction û

350 / 382
351 / 382
Example 7.14: Find ! the directional derivative of
x π
f (x, y) = arcsin at (1, 2) in the direction anticlockwise
y 4
from the positive x axis.

Solution:

• direction û

352 / 382
353 / 382
354 / 382
Properties of ∇f
The directional derivative of f is

Dû f = ∇f · û
= ||∇f || ||û|| cos θ
= ||∇f || cos θ

where θ is the angle between ∇f and û.

355 / 382
So for fixed ∇f :
• Dû f is maximum when cos θ = 1 so θ = 0.

⇒ ∇f points in the direction in which f increases the fastest

In this direction, Dû f = ||∇f ||


⇒ ||∇f || is the fastest rate of increase of f .

356 / 382
• Dû f is minimum when cos θ = −1 so θ = π

⇒ −∇f points in the direction in which f decreases the fastest

In this direction, Dû f = −||∇f ||

357 / 382
π
• Dû f = 0 when cos θ = 0 so θ = and ∇f ⊥ û.
2

But Dû f = 0, whenever û is tangent to a level curve of f (where


f = constant).

⇒ ∇f ⊥ level curves of f

358 / 382
This gives a geometrical interpretation of ∇f :
• the direction of ∇f is the direction of steepest ascent of f .
• the length of ∇f , ||∇f ||, is the slope of the surface in the
direction of steepest ascent.
• the direction of −∇f is the direction of steepest descent of f .
• ∇f is perpendicular to the level curves of f .

Note:
The direction of steepest ascent is sometimes also called:
▶ the direction of fastest increase
▶ the direction of steepest increase
and similarly for the direction of steepest descent.

359 / 382
Example 7.15: In what direction does f (x, y) = xey
(a) increase (b) decrease
most rapidly at (2, 0)? Express direction as a unit vector.

Solution:
From Example 7.13

∇f (2, 0) = i + 2j

360 / 382
361 / 382
Stationary Points

A stationary point of f is a point (x0 , y0 ) at which

∇f = 0

∂f ∂f
So = 0 and = 0 simultaneously at (x0 , y0 ).
∂x ∂y

Geometrically, this means that the tangent plane to the graph


z = f (x, y) at (x0 , y0 ) is horizontal, i.e. parallel to the xy-plane.

362 / 382
Three important types of stationary points are

363 / 382
A function f has a

1. local maximum at (x0 , y0 ) if f (x, y) ≤ f (x0 , y0 ) for all (x, y) in


some disk centred at (x0 , y0 ),

2. local minimum at (x0 , y0 ) if f (x, y) ≥ f (x0 , y0 ) for all (x, y) in


some disk centred at (x0 , y0 ),

3. saddle point at (x0 , y0 ) if (x0 , y0 ) is a stationary point, and


there are points near (x0 , y0 ) with f (x, y) > f (x0 , y0 ) and
other points near (x0 , y0 ) with f (x, y) < f (x0 , y0 ).

364 / 382
Any local maximum or minimum of f will occur at a critical point
(x0 , y0 ) such that
1. ∇f (x0 , y0 ) = 0 or

∂f ∂f
2. and/or do not exist at (x0 , y0 ).
∂x ∂y

q
z= x2 + y2 . Minimum at (0, 0) BUT ∇f does not exist at (0, 0).

365 / 382
Second Derivative Test

If ∇f (x0 , y0 ) = 0 and the second partial derivatives of f are


continuous on an open disk centred at (x0 , y0 ), consider the
Hessian function

H(x, y) = fxx fyy − (fxy )2


evaluated at (x0 , y0 ).

Then (x0 , y0 ) is a
1. local minimum if H(x0 , y0 ) > 0 and fxx (x0 , y0 ) > 0.

2. local maximum if H(x0 , y0 ) > 0 and fxx (x0 , y0 ) < 0.

3. saddle point if H(x0 , y0 ) < 0.

Note: Test is inconclusive if H(x0 , y0 ) = 0.

366 / 382
Example 7.16: Find and classify the stationary points of
f : R2 → R given by f (x, y) = x3 + y3 + 3x2 − 3y2 − 8.

Solution:

367 / 382
368 / 382
369 / 382
Example 7.17: Find and classify the stationary points of
f : R2 → R given by f (x, y) = y sin x.

Solution:

370 / 382
371 / 382
Partial Integration

Let f : R2 → R be a continuous function over a domain D in R2 .

The partial indefinite integrals of f with respect to the first and


second variables (say x and y) are denoted by:
Z Z
f (x, y) dx and f (x, y) dy.

Z
• f (x, y) dx is evaluated by holding y fixed and integrating
with respect to x.
Z
• f (x, y) dy is evaluated by holding x fixed and integrating
with respect to y.

372 / 382
Z
Example 7.18: Evaluate (3x2 y + 12y2 x3 ) dx.

Solution:

Note:

373 / 382
Z 1
Example 7.19: Evaluate (3x2 y + 12y2 x3 ) dy.
0

Solution:

374 / 382
Double Integrals

Let f : R2 → R be a continuous function over a domain D in R2 .

We can evaluate the double integral:


" "
f (x, y) dA = f (x, y) dx dy
D D
"
f (x, y) dA is the volume under the surface z = f (x, y) that
D
lies above the domain D in the xy plane, if f (x, y) ≥ 0 in D.

375 / 382
Δx

Δy

Volume of thin rod = (Area base) · (height)


| {z } | {z }
∥ ∥
∆x∆y f (x, y)

376 / 382
The double integral is defined as the limit of sums of the
volumes of the rods:
" "
f (x, y) dA = f (x, y) dx dy
D D
n
X
=
 
lim lim f (x, y)∆x∆y i
∆x→0 ∆y→0
i=1

Note:
If f (x, y) = 1 then
" "
dA = dx dy
D D
gives the area of the domain D.

377 / 382
Double Integrals Over Rectangular Domains
Definitions
1. R = [a, b] × [c, d] is a rectangular domain defined by
a ≤ x ≤ b, c ≤ y ≤ d.

R dR b R d R b 
2. c a
f (x, y) dx dy = c a
f (x, y) dx dy means integrate
with respect to x first and then integrate with respect to y.

378 / 382
Fubini’s Theorem

Let f : R2 → R be a continuous function over the domain


R = [a, b] × [c, d]. Then
" Z dZ b
f (x, y)dA = f (x, y) dx dy
R c a
Z bZ d
= f (x, y) dy dx
a c

So order of integration is not important.

379 / 382
Example 7.20: Using double integrals, find the volume of
the wedge shown below.

Solution:

380 / 382
381 / 382
This can also be calculated as
Z 1Z 2 
1 − x dy dx
0 0

This gives the same answer, as expected by Fubini’s Theorem.


(Working omitted.)

382 / 382

You might also like