MAST10006 Calculus 2 Lecture Slides 2023S1
MAST10006 Calculus 2 Lecture Slides 2023S1
MAST10006 Calculus 2 Lecture Slides 2023S1
MAST10006 Calculus 2
Lecture Notes
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.
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: ≡
6. approximate: ≈
2 / 382
Standard Notation for Sets of Numbers
3. rational numbers: Q = { mn | m, n ∈ Z, n , 0}
3 / 382
Standard Notation for Intervals
1. element of: ∈
so a ∈ X means “a is an element of the set X ”
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
3. implies: ⇒
so p ⇒ q means “p implies q”
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.
lim f (x) = L
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
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→∞
lim f (x) = M
x→−∞
y = e-x
H0,1L
x
Solution:
16 / 382
Some Standard Limits
1
(1) lim =0 (p > 0)
x→∞ xp
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.
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:
hHxL
f HxL
L
gHxL
a x
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.
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 .
Solution:
37 / 382
x+2
x≤1
Example 1.15: Let f (x) =
(x − 3)2 + c x>1
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?
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.
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:
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:
More formally,
lim 2x = 2
x→1
Solution:
51 / 382
Aside - What is a limit really?*
Example 1.20: Sketch a proof of the limit law
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 . . .
Examples
1 1 1 1 1
1, , , , , . . . an =
2 3 4 5 n
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
lim an = L
n→∞
or an → L as n → ∞.
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.
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
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
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).
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
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
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:
∞
X
an and a1 + a2 + a3 + . . . denote a series.
n=1
76 / 382
Example
Let an = 2.
∞
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
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
∞
X 1
.
np
n=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
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
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
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
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?
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
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
101 / 382
Example 2.2: Prove the sinh(x + y) addition formula.
Solution:
102 / 382
Double Angle Formulae
cosh(2x) = 2cosh2 x − 1
cosh(2x) = 2sinh2 x + 1
103 / 382
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.
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
5 y = cosh(x)
3
y = arccosh(x)
2
x
1 2 3 4 5
110 / 382
3. Inverse hyperbolic tangent function: arctanh x
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
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
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
for θ ∈ R.
z = reiθ
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.
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
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:
128 / 382
√ 30
Example 3.4: Evaluate 3 + 3i .
Solution:
129 / 382
Exponential Form of sin θ and cos θ
1 iθ
⇒ cos θ = e + e−iθ
2
130 / 382
Equation (1) − (2) gives
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
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
h i
= aeat [cos(bt) + i sin(bt)] + eat bi2 sin(bt) + bi cos(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
√ √ √
a2 − x2 , a2 + x2 , x2 − a2 ,
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
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
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
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.
178 / 382
179 / 382
Section 5: First Order Differential Equations
dy d2 y dn y
!
f x, y, , 2 , . . . , n = 0
dx dx dx
!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:
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
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:
194 / 382
Aim:
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
dy y
=f
dx x
y
Substituting u = reduces the ODE to a separable ODE.
x
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
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
212 / 382
Solution:
(a). The phase plot is
dx
dt
dx >0
dt
23
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
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
p(t) = p0 ekt
You should check that you can derive this on your own!
220 / 382
Note:
The Doomsday model predicts:
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
223 / 382
Solution:
From Example 5.12 we know
• the equilibrium is
dp
>0
dt
23
p
dp
<0
-2 dt
dies out!
224 / 382
• the family of solutions is
p
2/3- Unstable
t
dies out!
225 / 382
Logistic model.
dp k
p
= kp − p2 = kp 1 −
dt a a
↗ ↖
z }| { z }| {
net birth rate competition term
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
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).
Find concentration:
242 / 382
Interpret:
conc. Hgm3L
0.1 tHminL
243 / 382
Definitions
1. Transient terms: terms decaying to 0 as t → ∞.
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
d2 y dy
2
+ P(x) + Q(x)y = R(x)
dx dx
• If R(x) = 0, the ODE is homogeneous (H).
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.
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 .
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
249 / 382
Definition:
Two functions y1 and y2 are linearly independent if
c1 y1 (x) + c2 y2 (x) = 0 ⇒ c1 = c2 = 0
Example 6.1:
(a) Are y1 (x) = x2 , y2 (x) = 2x2 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
eλ1 x , eλ2 x
• General Solution:
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
• General Solution:
256 / 382
We now verify that xeλx is a solution:
λ2 x + 2λ eλx .
y”(x) =
So ay” + by′ + cy
| {z } | {z }
=0 =0
= 0
Solution:
258 / 382
259 / 382
Case 3: b2 − 4ac < 0
λ1 = α + iβ, λ2 = α − iβ
e(α+iβ)x , e(α−iβ)x
260 / 382
To find the general solution over the real numbers, consider
y = e(α+iβ)x = eαx cos(βx) + i sin(βx) .
c
aRe y′′
c + bRe y′
c + cRe yc = 0
′′ ′
a Re(yc ) + b Re(yc ) + c Re(yc ) = 0
261 / 382
Similarly, Im(yc ) = eαx sin(βx) is a real solution of the ODE.
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 θ).
√
= a2 + b2 cos ϕ cos θ + sin ϕ sin θ
√
= a2 + b2 cos(θ − ϕ).
266 / 382
Hence we can rewrite the solution from Example 6.4 as
267 / 382
Inhomogeneous 2nd Order Linear ODEs
Theorem:
The general solution of
268 / 382
Inhomogeneous 2nd Order Linear ODEs with Constant
Coefficients
General form:
ay” + by′ + cy = R(x)
269 / 382
Solution:
270 / 382
Step 2: Find a particular solution of y” + 2y′ − 8y = R(x).
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
is
yP (x) = αy1 (x) + βy2 (x)
where
• 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:
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:
W = mg (g = 9.8m/s2 on Earth)
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
Fnet = m · ÿ
Fnet = W + T + R
= mg − k(s + y) − βẏ
289 / 382
Apply Newton’s Law:
Fnet = mÿ
mg − ks − ky − βẏ = mÿ
⇒ 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.05
Equil.
t
0.5 1
299 / 382
(d) β = 2000
49 : ÿ + 50ẏ + 49y = 0
300 / 382
y
0.06
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)
304 / 382
y
GSHHL contributes
0.4
Equil.
t 4
1 2 3
305 / 382
(b) β=0: ÿ + 49y = 28 sin(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
Solution:
312 / 382
313 / 382
Level Curves
{(x, y) : f (x, y) = c}
where c ∈ R is a constant.
314 / 382
Sketching Functions of Two Variables
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
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
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
lim f (x, y) = L
(x,y)→(x0 ,y0 )
Note:
1 If it exists, L must be a unique finite real number.
323 / 382
Continuity
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 ).
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 )
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
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
∂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
∂ ∂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
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
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 .
∂f ∂f
!
Dû f P = , · (u1 , u2 ).
0 ∂x P0 ∂y P0
348 / 382
Gradient Vectors
∂f ∂f ∂f ∂f
!
grad f = ∇f = i+ j= ,
∂x ∂y ∂x ∂y
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 θ
355 / 382
So for fixed ∇f :
• Dû f is maximum when cos θ = 1 so θ = 0.
356 / 382
• Dû f is minimum when cos θ = −1 so θ = π
357 / 382
π
• Dû f = 0 when cos θ = 0 so θ = and ∇f ⊥ û.
2
⇒ ∇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
∇f = 0
∂f ∂f
So = 0 and = 0 simultaneously at (x0 , y0 ).
∂x ∂y
362 / 382
Three important types of stationary points are
363 / 382
A function f has a
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
Then (x0 , y0 ) is a
1. local minimum if H(x0 , y0 ) > 0 and fxx (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
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
375 / 382
Δ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
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
382 / 382