0% found this document useful (0 votes)
27 views73 pages

Iac Lnotes Sem B

The document contains lecture notes for MTH4300, Introduction to Analysis with Calculus, covering topics such as infinite sequences and series, partial derivatives, and multiple integrals. It includes detailed sections on convergence, divergence, limits, and various methods for calculating limits of sequences. The notes are structured with examples and theorems to aid understanding of calculus concepts.

Uploaded by

hollywoodpizza00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views73 pages

Iac Lnotes Sem B

The document contains lecture notes for MTH4300, Introduction to Analysis with Calculus, covering topics such as infinite sequences and series, partial derivatives, and multiple integrals. It includes detailed sections on convergence, divergence, limits, and various methods for calculating limits of sequences. The notes are structured with examples and theorems to aid understanding of calculus concepts.

Uploaded by

hollywoodpizza00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Introduction to Analysis with Calculus

MTH4300, Semester B
Lecture Notes
Spring 2024

Dr. Rainer Klages


School of Mathematical Sciences
Queen Mary University of London
Contents

1 Infinite sequences and series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4


1.1 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.1 Infinite series and some examples . . . . . . . . . . . . . . . . . . . . 10
1.2.2 The Integral Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2.3 Absolute convergence and the Ratio Test . . . . . . . . . . . . . . . . 16
1.3 Power series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3.1 Power series and convergence . . . . . . . . . . . . . . . . . . . . . . 19
1.3.2 Taylor and Maclaurin series . . . . . . . . . . . . . . . . . . . . . . . 22
1.3.3 Convergence of Taylor Series and error estimates . . . . . . . . . . . . 25

2 Partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.1 Functions of two variables, their limits and derivatives . . . . . . . . . . . . . 27
2.1.1 Functions of several variables . . . . . . . . . . . . . . . . . . . . . . 27
2.1.2 Limits and continuity in higher dimensions . . . . . . . . . . . . . . . 31
2.1.3 Partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.1.4 The chain rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.2 Directional derivatives and extreme values . . . . . . . . . . . . . . . . . . . 42
2.2.1 Directional derivatives and gradient vectors . . . . . . . . . . . . . . 42
2.2.2 Linearisation and total differential . . . . . . . . . . . . . . . . . . . . 45
2.2.3 Extreme values and saddle points . . . . . . . . . . . . . . . . . . . . 46

3 Multiple integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.1 Double integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.2 Double integrals over general regions and area . . . . . . . . . . . . . . . . . 54
3.2.1 Double integrals over general regions . . . . . . . . . . . . . . . . . . 54
3.2.2 Area by double integration . . . . . . . . . . . . . . . . . . . . . . . . 59
3.3 Substitution and triple integrals . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.3.1 Substitution in double Integrals . . . . . . . . . . . . . . . . . . . . . 60
3.3.2 Triple Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.3.3 Substitution in triple integrals . . . . . . . . . . . . . . . . . . . . . . 72
1 Infinite sequences and series
1.1 Sequences [Thomas’ Calculus, Section 9.1]

A sequence is a list of numbers in a given order:

a1 , a2 , a3 , . . . , a n , . . . .

Each of the a1 , a2 , etc. represents a number; these are the terms of the sequence. For
example
2, 4, 6, 8, . . . , 2n, . . .
has first term a1 = 2, second term a2 = 4 and nth term an = 2n. The integer n is called
the index of an and denotes where an occurs in the list.
We can consider the sequence a1 , a2 , a3 , . . . , an , . . . as a function that sends 1 to a1 , 2 to a2 ,
etc. and in general sends the positive integer n to the nth term an .

Sequences can be described by rules or by listing terms. For example,


√ n√ √ √ √ o √

an = n {an } = 1, 2, 3, . . . , n, . . . = n n=1
 
1 1 1 1
bn = (−1)n+1 (1/n) {bn } = 1, − , , − , . . . , (−1)n+1 , . . .
2 3 4 n
 
1 2 3 n−1
cn = (n − 1)/n {cn } = 0, , , , . . . , ,...
2 3 4 n
(−1)n+1 {dn } = 1, −1, 1, −1, . . . , (−1)n+1 , . . .

dn =

Sequences can be illustrated graphically either as points on a real axis or as the graph of a
function defining the sequence:
1.1 Sequences 5

Consider the following sequences:


 
1 1 1 1
1, , , , . . . , , . . . terms approach 0 as n gets large
2 3 4 n
 
1 2 3 1
0, , , , . . . , 1 − , . . . terms approach 1 as n gets large
2 3 4 n
n√ √ √ √ √ o
1, 2, 3, 4, . . . , n, . . . terms get larger than any number as n increases
1, −1, 1, −1, . . . , (−1)n+1 , . . .

terms oscillate between 1 and −1,
never converging to a single value

This leads to the definition of convergence, divergence and a limit:

The concept of a limit is illustrated in the following figure:

Here an → L if y = L is a horizontal asymptote of the sequence of points {(n, an )}.

We will now consider two examples of the application of the definitions.


6 1 Infinite sequences and series

Example:
We want to prove that
1
= 0.
lim
n→∞ n

Let ǫ > 0 be given. We need to find an integer N such that for all n,
1
n>N ⇒ − 0 < ǫ.
n
This condition will be satisfied provided 1/n < ǫ, which means n > 1/ǫ. Therefore if N is
any integer greater than (or equal to) 1/ǫ, the implication will hold for all n > N . Hence
limn→∞ (1/n) = 0. For example, suppose we take ǫ = 0.01 then the condition is just n > 100.

Example:
We want to prove that the sequence

1, −1, 1, −1, . . . , (−1)n+1 , . . .



diverges.

proof by contradiction: Assume that the sequence converges to some number L. Choose
ǫ = 21 in the definition of the limit and so all terms an of the sequence with n larger than
some N must lie within ǫ = 21 of L:
1
n>N ⇒ |an − L| < .
2
Since 1 is in every other term of the sequence, 1 must lie within ǫ of L. Hence
1 1 3
|1 − L| = |L − 1| < or <L< .
2 2 2
Then −1 is also in every other term and so we must have
1 3 1
|L − (−1)| < or − <L<− .
2 2 2
However, this is a contradiction: Both conditions cannot be satisfied simultaneously. There-
fore no such limit exists and so the sequence diverges.
There is a second type of divergence:

Example: √
lim n = ∞ (proof?)
n→∞
1.1 Sequences 7

note: The sequence {1, −2, 3, −4, 5, . . .} also diverges, but not to ∞ or −∞.

Sequences are functions with domain restricted to n ∈ N, hence:

We can use these rules to help us calculate limits of sequences.

Example:
n−1
Find lim .
n→∞ n
 
n−1 1 1
lim = lim 1 − = lim 1 − lim = 1 − 0 = 1 .
n→∞ n n→∞ n n→∞ n→∞ n

Example:
5
Find lim .
n→∞ n2
5 1 1
= 5 · lim · lim = 5 · 0 · 0 = 0 .
lim
2
n→∞ n n→∞ n n→∞ n

The Sandwich Theorem for Sequences provides another method for finding the limits
of sequences:

Note that if |bn | ≤ cn and cn → 0 as n → ∞, then bn → 0 also, because −cn ≤ bn ≤ cn .

Example:
sin n
Find lim .
n→∞ n
By the properties of the sine function we have −1 ≤ sin n ≤ 1 for all n. Therefore
1 sin n 1 sin n
− ≤ ≤ ⇒ lim =0
n n n n→∞ n

because of limn→∞ (−1/n) = limn→∞ (1/n) = 0 and the use of the Sandwich Theorem.
8 1 Infinite sequences and series

Example:
1
Find lim .
n→∞ 2n
1
1/2n must always lie between 0 and 1/n (e.g. 2
< 1, 41 < 12 , 81 < 13 , 16
1
< 14 , . . . ). Therefore

1 1 1
0≤ n
≤ ⇒ lim = 0.
2 n n→∞ 2n

The limits of sequences can also be determined by using the following theorem:

Example:
Determine the limit of the sequence 21/n as n → ∞.


We already know that the sequence n1 converges to 0 as n → ∞. Let an = 1/n, f (x) = 2x


and L = 0 in the continuous function theorem for sequences. This gives

21/n = f (1/n) → f (L) = 20 = 1 as n → ∞ .

Hence the sequence 21/n converges to 1.




We can also make use of l’Hôpital’s Rule to find the limits of sequences. To do so we need
to make use of the following theorem:

Example:
ln n
Show that lim √ = 0.
n→∞ n

ln n 1/n
lim √ = lim
n→∞ n n→∞ (1/2)n−1/2

(using l’Hôpital’s Rule by treating n as a continuous real variable)


n1/2 1
= lim 2 · = 2 lim 1/2 = 0 .
n→∞ n n→∞ n

Example:
Does the sequence whose nth term is an = ((n+1)/(n−1))n converge? If so, find limn→∞ an .
1.1 Sequences 9

If we just take the straightforward limit we get the indeterminate form 1∞ . Typically with
questions of this type we take the logarithm. This gives:
 n  
n+1 n+1
ln an = ln = n ln .
n−1 n−1

Hence

ln n+1
  
n+1 n−1
lim ln an = lim n ln = lim
n→∞ n→∞ n−1 n→∞ 1/n
ln(n + 1) − ln(n − 1)
= lim
n→∞ 1/n
2
−2/(n − 1)
= lim (using l’Hôpital’s Rule)
n→∞ −1/n2
2n2
= lim 2 = 2.
n→∞ n − 1

Let bn = ln an Then limn→∞ bn = 2 and since f (x) = ex is continuous we have by the


continuous function theorem for sequences

an = eln an = ebn → e2 as n → ∞ .

Therefore the sequence {an } converges to e2 .

The following Theorem summarizes some common results for the limits of sequences:

The first result can be proved using l’Hôpital’s rule. The second and third results can be
proved using logarithms and applying the previous theorems. Proofs of the remaining re-
sults are given in Appendix 5 of Thomas’ Calculus.
10 1 Infinite sequences and series

Example:

Show that limn→∞ n2 = 1.
n

√ 2
n2 = lim n2/n = lim n1/n = (1)2 = 1 .
n
lim
n→∞ n→∞ n→∞

For bounded, monotonic sequences there is the following theorem:

For example, look at a bounded, monotonically increasing function:

Example:
 
1
lim 1− = 1.
n→∞ n

1.2 Series

1.2.1 Infinite series and some examples [Thomas’ Calculus, Section 9.2]

An infinite series is the sum of an infinite sequence of numbers

a1 + a2 + a3 + · · · + an + · · · .

Example:

 n−1
1 1 1
1 + + + ··· + + ··· .
2 4 2
1.2 Series 11

Example:
A geometric series has the form

X ∞
X
2 n−1 n−1
a + ar + ar + · · · + ar + ··· = ar = arn
n=1 n=0
where a and r are fixed real numbers and a 6= 0. The quantity r is called the ratio of the
geometric series and can be positive or negative.
In the special case where r = 1 the nth partial sum is
sn = a + a · 1 + a · 12 + · · · + a · 1n−1 = na
and the series diverges because limn→∞ sn = ±∞ depending on the sign of a. If r = −1 the
series diverges because either sn = a or sn = 0 depending on the value of n.
Now consider the case of a geometric series with |r| 6= 1. We have
sn = a + ar + ar2 + · · · + arn−1
rsn = ar + ar2 + · · · + arn−1 + arn
sn − rsn = a − arn or sn (1 − r) = a(1 − rn )
a(1 − rn )
⇒ sn = (r 6= 1) .
1−r
Therefore, if |r| < 1 then rn → 0 as n → ∞ and hence sn → a/(1 − r). If |r| > 1 then
|rn | → ∞ and the series diverges. So we have

X a
arn−1 = for |r| < 1
n=1
1 − r
12 1 Infinite sequences and series

and the geometric series converges.


For example,
∞  n−1
1 1 1 X 1 1 (1/9) 1
+ + ··· = = = (a = 1/9, r = 1/3)
9 27 81 n=1
9 3 1 − (1/3) 6

and

X (−1)n 5
5 5 5 5
5− + − + ··· = n
= =4 (a = 5, r = −1/4) .
4 16 64 n=0
4 1 + (1/4)

Example:
Find the sum of the series ∞
X 1
.
n=1
n(n + 1)
Note that we can use partial fractions to write
1 1 1
= − .
n(n + 1) n n+1
Hence the sum of the first k terms is
k k  
X 1 X 1 1
= −
n=1
n(n + 1) n=1 n n+1

and so the kth partial sum is


       
1 1 1 1 1 1 1 1
sk = − + − + − + ··· + −
1 2 2 3 3 4 k k+1
     
1 1 1 1 1 1 1 1
= + − + + − + + ··· + − + −
1 2 2 3 3 k k k+1
Hence sk → 1 as k → ∞ and so the series converges giving

X 1
= 1.
n=1
n(n + 1)
P∞
Suppose the series n=1 an converges to a sum S and the nth partial sum of the series is
sn = a1 + a2 + · · · + an . When n is large, both sn and sn−1 are close to S and therefore their
difference an is close to zero. Using the Difference Rule for sequences we have

an = sn − sn−1 → S − S = 0 as n → ∞ .

Hence:
1.2 Series 13

This, in turn, leads to

Examples:

X
n2 diverges because n2 → ∞
n=1

X n+1 n+1
diverges because →1
n=1
n n

X
(−1)n+1 diverges because lim (−1)n+1 does not exist
n→∞
n=1

X −n −n 1
diverges because lim = − 6= 0 .
n=1
2n + 5 n→∞ 2n + 5 2

the converse of the above theorem is false: If an → 0 this does not imply that
Note that P
the series ∞n=1 an converges.

Example:
Consider the unusual case of a series where an → 0 but the series itself diverges:
1 1 1 1 1 1 1 1 1
1+ + + + + + + ··· + n + n + ··· + n + ···
2 2 4 4 4 4 2 2 2
where there are two terms of 1/2, four terms of 1/4, ..., 2n terms of 1/2n , etc. In this case
each grouping of terms adds up to 1 so the partial sums must increase without bound and
so the series diverges, even though the terms of the series form a sequence that converges to 0.

If we have two convergent series, we can add them term by term, subtract them term by
term, or multiply them by constants to make new convergent series:
14 1 Infinite sequences and series

Example:
Find ∞ n−1
− 1)/6n−1 .
P
n=1 (3
∞ ∞  ∞ ∞
3n−1 − 1
 X
X X 1 1 1 X 1
= − = −
n=1
6n−1 n=1
2n−1 6n−1 n=1
2n−1 n=1 6n−1
1 1
= − (two geometric series)
1 − (1/2) 1 − (1/6)
6 4
= 2− = .
5 5
We can add a finite number of terms or delete a finite number of terms without altering the
convergence or divergence of a series but if the series is convergent this will usually alter the
sum. Consider the series

X ∞
X
an = a1 + a2 + · · · + ak−1 + an .
n=1 n=k
P∞ P∞ P∞
If n=1 an converges, then P n=k an converges for any k > 1. Conversely, if n=k an
converges for any k > 1, then ∞ a
n=1 n converges.
Note that re-indexing a series (e.g. changing the starting value of the index) does not alter
its convergence, provided the order of the terms is preserved.
For example, raise the starting value of the index h units:

X ∞
X
n=k−h: an = ak−h = a1 + a2 + a3 + · · · .
n=1 k=1+h

Lower the starting value of the index h units:



X ∞
X
n=k+h: an = ak+h = a1 + a2 + a3 + · · · .
n=1 k=1−h

1.2.2 The Integral Test [Thomas’ Calculus, Section 9.3]


P
For a given series an we want to know: (1) Does it converge? (2) If it converges, what is
its sum?
A corollary of the Monotonic Sequence Theorem is that the series ∞
P
n=1 an of non-negative
terms converges if and only if (why?) its partial sums are bounded from above.

Example:
Consider the harmonic series:

X 1 1 1 1
= 1 + + + ··· + + ··· .
n=1
n 2 3 n

This series is actually divergent even though the nth term 1/n → 0 as n → ∞, cf. the n-th
term test seen before. However, the series has no upper bound for its partial sums. We can
see this by writing the series as
     
1 1 1 1 1 1 1 1 1 1
1+ + + + + + + + + + ··· + + ··· .
2 3 4 5 6 7 8 9 10 16
1.2 Series 15

Now 31 + 14 > 42 = 12 , 1
5
+ 61 + 17 + 81 > 48 = 21 , 1
9
1
+ 10 1
+ · · · + 16 8
> 16 = 12 and so
on. Therefore the sum of the 2n terms ending with 1/2n+1 is > 2n /2n+1 = 1/2. Therefore
the sequence of partial sums is not bounded from above, and so the harmonic series diverges.

Now consider the series,



X 1 1 1 1 1
2
=1+ + + + ··· + 2 + ···
n=1
n 4 9 16 n

Does it converge or diverge? To answer this question we will consider a newPapproach


involving the use Rof integration. What we need to do is to compare the series ∞
n=1 1/n
2

with the integral 1 1/x2 dx.

1 1 1 1
sn = 2
+ 2 + 2 + ··· + 2
1 2 3 n
= f (1) · 1 + f (2) · 1 + f (3) · 1 · · · + f (n) · 1
Z n
1
< f (1) + 2
dx lower sum
1 x
Z ∞
1
< 1+ dx
1 x2

Therefore ∞  ∞
1 1
Z
sn < 1 + dx = 1 + − = 2.
1 x2 x 1
Thus sn < 2 for all n, the partial sums are bounded from above (by 2) and therefore (why?)
the series converges. Note that the series and the integral need not have the same value in
the convergent case.
The approach we have just taken leads us to
16 1 Infinite sequences and series

P∞
The Integral Test can be used to show that the p-series n=1 1/np converges if p > 1 and
diverges if p ≤ 1.1

Example:
Show that the series ∞ 2
P
n=1 1/(n + 1) converges by the integral test.
The function f (x) = 1/(x2 + 1) is positive, continuous and decreasing for x ≥ 1. Also
Z ∞
1
2
dx = lim [arctan x]b1 = lim [arctan b − arctan 1]
1 x +1 b→∞ b→∞
π π π
= − =
2 4 4
and so the series converges (but we do not know its sum).

1.2.3 Absolute convergence and the Ratio Test [Thomas’ Calculus, Sections
9.5 and 9.6]

For a series with both positive and negative terms it is sometimes useful to consider the
absolute values of its terms:

Example:
The series
∞  n
5 5 5 X −1
5− + − + ... = 5
4 16 64 n=0
4
is a geometric series that converges absolutely, because
∞  n ∞  n
X −1 X 1 5 5 5
5 = 5 =5+ + + + ...
n=0
4 n=0
4 4 16 64

converges with |r| = r = 1/4 < 1 (to 20/3). Note that the original series also converges, as
|r| = 1/4 < 1 (but to 4).
This exemplifies the following theorem:2
1
See the Thomas’ Calculus Section 9.3, p.555 for a proof.
2
See Section 9.5, p.565 for a short, clever proof.
1.2 Series 17

This theorem enables us to apply tests that rely on series of positive terms, such as the
integral test, more generally.

Example:
For

X 1 1 1 1
(−1)n+1 2
=1− + − + ...
n=1
n 4 9 16

the corresponding series of absolute values reads


X 1 1 1 1
2
= 1 + + + + ... .
n=1
n 4 9 16

By using the Integral Test we have shown before that the latter series converges. The former
thus converges absolutely, and according to the above theorem it therefore converges.

Example:
As we show below, the alternating harmonic series


X 1 1 1 1
(−1)n+1 = 1 − + − + ···
n=1
n 2 3 4

converges. However, it does not converge absolutely, because we have seen that the harmonic
series

X 1 1 1 1
= 1 + + + + ...
n=1
n 2 3 4

does not converge.


We can prove that the alternating harmonic series converges by applying the following
theorem (also called Leibniz Test):
18 1 Infinite sequences and series

Example:
The above alternating harmonic series satisfies all of the above three requirements with
N = 1 and hence converges.
P P n
Getting back to the geometric series an = ar , we know that it converges for the ratio
|r| = |an+1 /an | < 1. This result is generalised by the following theorem:

A proof of the above results is given in the textbook.


The two series we looked at in the last section are good examples of cases where ρ = 1 and
the test is inconclusive:
X1 an+1 1/(n + 1) n
: = = → 1 (n → ∞)
n an 1/n n+1
2
1/(n + 1)2
X 1 
an+1 n
: = = → 12 = 1 (n → ∞) .
n2 an 1/n 2 n+1
P
In each case
P ρ 2= 1 (i.e. the test is inconclusive) and yet we know that 1/n diverges
whereas 1/n converges.

Example:
Use the Ratio Test to investigate the convergence of the following series:
∞ ∞ ∞
X 2n + 5 X (2n)! X n!
(a) , (b) , (c) .
n=1
3n n=1
(n!)2 n=1
n n
1.3 Power series 19

(a)
2n + 5 2n+1 + 5
an = ; a n+1 = ;
3n 3n+1
(2n+1 + 5)/3n+1 1 2n+1 + 5 1 2 + 5 · 2−n
 
an+1
= = · n =
an (2n + 5)/3n 3 2 +5 3 1 + 5 · 2−n
1 2 2
→ · = < 1 as n → ∞ and the series converges.
3 1 3
(b)
(2n)! (2(n + 1))!
an = ; an+1 = ;
(n!)2 ((n + 1)!)2
an+1 (2n + 2)! n! n! (2n + 2)(2n + 1)
= · =
an (n + 1)!(n + 1)! (2n)! (n + 1)(n + 1)
4n + 2 4 + 2/n
= = → 4 > 1 and the series diverges.
n+1 1 + 1/n
(c)
n! (n + 1)!
an = ; an+1 = ;
nn (n + 1)n+1
an+1 (n + 1)! nn (n + 1)nn
= =
an (n + 1)n+1 n! (n + 1)n (n + 1)
n n
nn
  
n 1 1
= n
= = → <1
(n + 1) n+1 1 + 1/n e
and the series converges.
As we can see, the Ratio Test is often useful when the terms of a series contain factorials
involving n or expressions raised to the power involving n.

1.3 Power series


1.3.1 Power series and convergence [Thomas’ Calculus, Section 9.7]

A power series is like an “infinite polynomial”, i.e., it is an infinite series in powers of


some variable, usually x:
20 1 Infinite sequences and series

If they converge, such series can be added, subtracted, multiplied, differentiated and inte-
grated to give new power series.

Example:
Consider the power series
 n
1 1 2 1
1 − (x − 2) + (x − 2) − · · · + − (x − 2)n + · · · .
2 4 2

This matches the form of (2) in the former definition with a = 2, cn = (−1/2)n . It is a
geometric series with the first term 1 and ratio r = −(x − 2)/2. The series converges for
|(x − 2)/2| < 1 or 0 < x < 4. The sum is
1 1 2
= = .
1−r 1 + (x − 2)/2 x
Hence
 2
2 (x − 2) (x − 2)2 1
=1− + − ··· + − (x − 2)n + · · · , 0 < x < 4.
x 2 4 2

We can consider the series as a sequence of partial sums which are polynomials Pn (x) that
approximate 2/x:
2
f (x) = ; P0 (x) = 1 = y0
x
1 x
P1 (x) = 1 − (x − 2) = 2 − = y1
2 2
1 1 3x x2
P2 (x) = 1 − (x − 2) + (x − 2)2 = 3 − + = y2
2 4 2 4
..
.
etc.
1.3 Power series 21

The convergence and divergence of a power series is clarified by the following theorem:

Here R is called the radius of convergence and the interval of radius R centred at x = a
is called the interval of convergence.

Example:
Find the values of x for which the series

X
(2x)n
n=0

converges absolutely, specifying both the radius and interval of convergence.

This is a geometric series with first term a = 1 and ratio r = 2x. It converges absolutely
for |r| < 1, that is, |2x| < 1 or −1/2 < x < 1/2, and diverges elsewhere. Hence, the radius
of convergence is R = 1/2 and the interval of convergences −1/2 < x < 1/2.

To summarise, we can test a power series for convergence using several methods:

1. Use a test such as the ratio test to find the interval |x − a| < R where the series
converges absolutely.

2. If the interval of absolute convergence is finite, test for convergence or divergence at


each endpoint using a test such as the integral test or the alternating series test.

3. If R is finite, the series diverges for |x − a| > R.


22 1 Infinite sequences and series

Example:
Use the ratio test to determine the convergence of

X x2n−1 x3 x5
(−1)n−1 =x− + − ··· .
n=1
2n − 1 3 5

We have
un+1 x2n+1 2n − 1 2n − 1 2
= 2n−1
= x → x2 .
un 2n + 1 x 2n + 1
Therefore the series converges absolutely for x2 < 1 and diverges for x2 > 1. At x = 1 the
series is 1 − 31 + 51 − 17 + · · · which converges by the alternating series test. The series also
converges at x = −1, as can be shown by the alternating series test.

1.3.2 Taylor and Maclaurin series [Thomas’ Calculus, Section 9.8]

Assume that the function f (x) can be represented as a power series,



X
f (x) = an (x − a)n = a0 + a1 (x − a) + · · · + an (x − a)n + · · · ,
n=0

which converges for a − R < x < a + R with R > 0. Can we calculate the coefficients an in
terms of f (x)?
It can be shown3 that f (x) has derivatives of all orders inside this interval by differentiating
the power series term by term:

f ′ (x) = a1 + 2a2 (x − a) + · · · + nan (x − a)n−1 + · · ·


f ′′ (x) = 1 · 2a2 + 2 · 3a3 (x − a) + · · · + n(n − 1)an (x − a)n−2 + · · ·
..
.
(n)
f (x) = n! an + a sum of terms with (x − a) as a factor.

Therefore

f ′ (a) = a1 , f ′′ (a) = 1 · 2a2 , f ′′′ (a) = 1 · 2 · 3a3 , . . . , f (n) (a) = n! an .

This gives us a formula for the coefficients in the power series:

f (n) (a)
an = .
n!
It also suggests that if f has a power series representation then it must be

f ′′ (a) f (n) (a)


f (x) = f (a) + f ′ (a)(x − a) + (x − a)2 + · · · + (x − a)n + · · · .
2! n!
leading us to the following definition:

3
This is a theorem, which can be proved. Likewise, it can be proved that f (x) can be integrated term by
term; see Thomas’ Calculus, end of Section 9.7. for details.
1.3 Power series 23

Example:
Find the Taylor series generated by f (x) = 1/x at a = 2. Where, if anywhere, does the
series converge to 1/x?

1
f (x) = x−1 ; f (2) = 2−1 =
2
1
f ′ (x) = −x−2 ; f ′ (2) = −
22
f ′′ (2) 1
f ′′ (x) = 2! x−3 ; = 2−3 = 3
2! 2
..
.
f (n) (2) (−1)n
f (n) (x) = (−1)n n! x−(n+1) ; = n+1 .
n! 2

The Taylor series is

f ′′ (2) f (n) (2)


f (2) + f ′ (2)(x − 2) + (x − 2)2 + · · · + (x − 2)n + · · · .
2! n!

This is a geometric series with first term 1/2 and ratio r = −(x − 2)/2. It converges
absolutely for |x − 2| < 2, or 0 < x < 4 with sum

1/2 1 1
S= = = .
1 + (x − 2)/2 2 + (x − 2) x

Related to the Taylor series is the Taylor polynomial of order n:


24 1 Infinite sequences and series

There is a similar definition for Maclaurin polynomials.

Example:
Find the Taylor polynomials of order 0, 2 and 4 for the function f (x) = cos x at a = 0.
We have

f (x) = cos x , f ′ (x) = − sin x , f ′′ (x) = − cos x , f ′′′ (x) = sin x , f (4) (x) = cos x

and
f (0) = 1, f ′ (0) = 0, f ′′ (0) = −1, f ′′′ (0) = 0, f (4) (0) = 1 .
By using the previous definition, the first three Taylor polynomials of f (x) = cos x about
a = 0 are

P0 (x) = 1
x2
P2 (x) = 1 −
2!
x2 x4
P4 (x) = 1 − + .
2! 4!
The following figure shows how successive Taylor polynomials provide better and better
approximations to the function as n → ∞:
1.3 Power series 25

Below we give the Taylor series expansions for a variety of functions about a = 0 and a = 1.
These can all be derived using the methods in this section.
Taylor series about a = 0:

x2 x3 x4
ex = 1 + x + + + + ···
2! 3! 4!
x3 x5 x7
sin x = x− + − + ···
3! 5! 7!
x2 x4 x6
cos x = 1− + − + ···
2! 4! 6!
x2 x4 x6
cosh x = 1+ + + + ···
2! 4! 6!
x3 x5 x7
sinh x = x+ + + + ··· .
3! 5! 7!
Taylor series about a = 1:

1 1 1
ln x = (x − 1) − (x − 1)2 + (x − 1)3 − (x − 1)4 + · · ·
2 3 4
√ 1 1 1
x = 1 + (x − 1) − (x − 1)2 + (x − 1)3 − · · · .
2 8 16

1.3.3 Convergence of Taylor Series and error estimates [Thomas’


Calculus, Section 9.9]

There are still two unanswered questions about Taylor series:

1. When does a Taylor series converge to the function that generated it?

2. How accurately do a function’s Taylor polynomials approximate the function on


a given interval?

To answer these questions we need to make use of Taylor’s Formula:


26 1 Infinite sequences and series

The quantity Rn (x) in this formula is called the remainder of order n or the error term
for the approximation of f by Pn (x) over I. If Rn (x) → 0 as n → ∞ for all x ∈ I, we say
that the Taylor series converges to f on I and we write

X f (k) (a)
f (x) = (x − a)k .
k=0
k!

Taylor’s formula is a special case of Taylor’s Theorem, which in addition requires differen-
tiability at the end points I. This theorem can in turn be understood as a generalization of
the Mean Value Theorem (set n = 0 in the above formula).
Finally we can use the Remainder Estimation Theorem to provide an estimate of the
error:

The usefulness of this theorem is demonstrated by the following example:

Example:
Show that the Taylor series for sin x at a = 0 converges to sin x for all x.
The Taylor series for sin x at a = 0 was
x3 x5 x7 (−1)k x2k+1
sin x = x − + − + ... + + ... ,
3! 5! 7! (2k + 1)!
see the list of Taylor series on p.25. According to Taylor’s Formula we have
x3 x5 (−1)k x2k+1
sin x = x − + − ··· + + R2k+1 (x) .
3! 5! (2k + 1)!
Applying the Remainder Estimation Theorem with M = 1 gives
|x|2k+2
|R2k+1 (x)| ≤ 1 · → 0 as k → ∞ for all x.
(2k + 2)!
(cf. the list of sequences and their limits discussed in Week 1) Therefore R2k+1 (x) → 0 and
the Maclaurin series for sin x converges to sin x for every x.

note:
1. Analogous results of convergence for all x about x = 0 hold for ex and cos x, see the
textbook.
2. Since every Taylor series is a power series, they can be added, subtracted and multiplied
on the intersection of their intervals of convergence.
2 Partial derivatives
2.1 Functions of two variables, their limits and derivatives
2.1.1 Functions of several variables [Thomas’ Calculus, Section 13.1]

Reminder: What is a function?


In Calculus 1 and in Numbers, Sets and Functions you have learned the following:

Definition:
A function from a set D (domain) to a set Y (range) is a rule that assigns a unique (single)
value y ∈ Y to each x ∈ D.

So far you have dealt with functions of a single variable, such as

f :R→R , x 7→ y = f (x)

with, for example, f (x) = x2 .


Functions of several variables are defined in complete analogy to functions of one variable
in terms of uniqueness, domain, codomain, range, etc. (without involving complex numbers):

In the following we will focus on functions of two variables.

Examples:

V= V (r, h) = πr2 h (volume of cylinder, radius r, height h)


4
M = M (r, ρ) = πr3 ρ (mass of sphere, radius r, density ρ)
3

In the case of V the quantities r and h are the input (independent) variables and V is the
unique output (dependent) variable.
If f is a function of two independent variables, x and y, the domain of f is a region in the
x-y plane.

Example:
(Natural) domains and ranges for function of two variables
28 2 Partial derivatives

Interior points, boundary points, open and closed sets are defined in higher dimensions in
analogy to dealing with intervals on the real line.1

Example: p
Describe the domain of the function f (x, y) = y − x2 .
Since f is defined only where y − x2 ≥ 0, the domain is the closed (the set contains all
boundary points), unbounded (why?) region shown below (shaded). The parabola y = x2 is
the boundary of the domain. The points above the parabola make up the domain’s interior.

There are two ways to visualise a function f (x, y):

Definition:
The set of all points (x, y, z) is called the graph, or surface, of z = f (x, y).

1. Sketch z = f (x, y) in space.

Example:
Consider the function
f (x, y) = x2 + y 2 .
To visualise the surface, plot f for a fixed value of y, say y = a. In this case z = x2 + a2 and
z = z(x). The equation z = x2 + a2 defines a parabola in the plane y = a, perpendicular to
the y-axis. Each different value of a gives a different parabola. For example, for y = a = 0 we
have z = x2 . Therefore the required surface is made up of parabolas and forms a paraboloid
as shown below.
1
If you are not satisfied with this statement, please check out Thomas’ Calculus p.760ff for details.
2.1 Functions of two variables, their limits and derivatives 29

Examples of other surfaces are shown in the following figure. It displays the three dimen-
sional surfaces defined by the functions (a) f (x, y) = x2 + y 2 , (b) f (x, y) = −x2 − y 2 , (c)
f (x, y) = x2 + y 2 + 5 and (d) f (x, y) = y 2 − x2 .

(a) (b) z

z x y

y
x

(c) (d)
z
z

y
x

y
x
30 2 Partial derivatives

Definition:
The set of points in the domain where a function f (x, y) has a constant value, f (x, y) = c,
is called a level curve of f (cf. what is plotted in geographic maps, often called contour
curves therein).
2. Draw and label level curves.

Example:
Graph the function f (x, y) = 100−x2 −y 2 and plot the level curves f (x, y) = 0, f (x, y) = 51
and f (x, y) = 75 in the domain of f in the plane.
The domain is the entire x-y plane and the range is the set of real numbers ≤ 100. The
graph is the paraboloid given by z = 100 − x2 − y 2 :
When f (x, y) = 0, we have 100 − x2 − y 2 = 0 or x2 + y 2 = 100. This corresponds to a circle
of radius 10.
When f (x, y) = 51, we have 100 − x2 − y 2 = 51 or x2 + y 2 = 49. This corresponds to a
circle of radius 7.
When f (x, y) = 75, we have 100 − x2 − y 2 = 75 or x2 + y 2 = 25. This corresponds to a
circle of radius 5.

The curve in space in which the plane z = c cuts a surface z = f (x, y) is called the contour
curve f (x, y) = c. The following figure shows the contour curve produced where the plane
z = 75 intersects the surface z = f (x, y) = 100 − x2 − y 2 .
2.1 Functions of two variables, their limits and derivatives 31

2.1.2 Limits and continuity in higher dimensions [Thomas’ Calculus,


Section 13.2]

Reminder: Limits
For functions of one variable we say that f (x) approaches the limit L whenever f (x) is
arbitrarily close to L for all x sufficiently close to a, written as
lim f (x) = L .
x→a

Example:
lim (2x − 1) = 7.
x→4
32 2 Partial derivatives

Analogously, if the values of f (x, y) lie arbitrarily close to a fixed real number L for all
points (x, y) sufficiently close to a point (x0 , y0 ), we say that f approaches the limit L as
(x, y) approaches (x0 , y0 ). More rigorously:

Example:
By using the above definition, show that f (x, y) = x has the limit lim(x,y)→(2,0) x = 2.
We need to show:
p p
If 0 < (x − 2)2 + y 2 < δ then |f (x, y) − 2| = |x − 2| = (x − 2)2 < ǫ .

We have p p
(x − 2)2 ≤ (x − 2)2 + y 2 < δ .
Matching this inequality for δ with the one above for ǫ suggests to choose δ = ǫ, which
completes the proof.2

It can be shown that the above definition leads to the following properties (you have seen
an analogous theorem for functions of one variable in Calculus 1):

Theorem: Properties of limits of functions of two variables


If L, M, k ∈ R, lim f (x, y) = L and lim g(x, y) = M then
(x,y)→(x0 ,y0 ) (x,y)→(x0 ,y0 )

1. lim (f (x, y) ± g(x, y)) = L ± M


(x,y)→(x0 ,y0 )

2. lim (f (x, y) · g(x, y)) = L · M


(x,y)→(x0 ,y0 )

3. lim (kf (x, y)) = kL


(x,y)→(x0 ,y0 )

f (x, y) L
4. lim = , M 6= 0
(x,y)→(x0 ,y0 ) g(x, y) M
5. If r and s are integers and s 6= 0 then
lim (f (x, y))r/s = Lr/s provided Lr/s is a real number.
(x,y)→(x0 ,y0 )

2
A generalisation of this example can be found in Thomas’ Calculus Sec. 13.2, p.768. A more difficult
example is discussed on p.770.
2.1 Functions of two variables, their limits and derivatives 33

For polynomials and rational functions the limit as (x, y) → (x0 , y0 ) can be calculated by
evaluating the function at (x0 , y0 ) (provided the rational function is defined at (x0 , y0 )).

Examples:
(1)
x − xy + 3 0 − (0)(1) + 3
lim = = −3 .
(x,y)→(0,1) x2 y+ 5xy − y 3 (0) (1) + 5(0)(1) − (1)3
2

(2) Find
x2 − xy
lim + √ √ .
(x,y)→(0,0) ,x6=y x− y
We need to avoid the whole path to the limit where x = y, hence the√condition x 6= y.

Accordingly, there is a problem with just setting x = y = 0 because x − y → 0 as
(x, y) → (0, 0). However, we can write
√ √
x2 − xy x2 − xy x+ y
lim √ √ = lim √ √ ·√ √
(x,y)→(0,0)+ ,x6=y x− y (x,y)→(0,0)+ ,x6=y x− y x+ y
√ √
x(x − y)( x + y)
= lim
(x,y)→(0,0)+ ,x6=y (x − y)
√ √
= lim + x( x + y) = 0 .
(x,y)→(0,0) ,x6=y

Now we use limits to define continuity for a function of two variables.

Reminder: Continuity
For functions of one variable f (x) is continuous at x = a whenever f (a) is defined,
limx→a f (x) exists and the limit L equals f (a), that is, limx→a f (x) = f (a). Analogously:

It follows from the previous Theorem that polynomials and rational functions of two vari-
ables are continuous on their domains.
Recall that for functions of one variable both the left- and the right-sided limits had to have
the same value for a limit to exist at a point. For functions of two (or more) variables, this
translates into the Two-Path Test for Nonexistence of a Limit: It states that if a
function f (x, y) has different limits along two different paths as (x, y) → (x0 , y0 ), then
lim f (x, y)
(x,y)→(x0 ,y0 )

does not exist.


The following figure gives examples of different paths approaching a point in radial and
tangential directions:
34 2 Partial derivatives

(a) (b)

To have a limit at a point we have to have the same limit as the point is approached from
all directions, including (a) radial directions and (b) tangential directions.

Example:
Show that the function
2x2 y
f (x, y) =
x4 + y 2

has no limit as (x, y) → (0, 0).


We cannot use substitution as it leads to 0/0. However, we can consider what happens as
we approach (0, 0) along a family of different curves. Remember, the choice of curves is
up to us as the Two-Path Test does not specify what the path should be. You may wish
to check, as an exercise, what happens for the family of paths y = mx as (x, y) → (0, 0).
Here we consider the next more complicated case, which is the family of parabolas given by
y = kx2 (x 6= 0). Along these curves the function is

2x2 y 2x2 (kx2 ) 2kx4 2k


f (x, y)|y=kx2 = = = = .
x4 + y 2 y=kx2
4 2
x + (kx ) 2 4
x +k x2 4 1 + k2

Therefore, as we approach (0, 0) along any curve y = kx2 , we have

h i 2k
lim f (x, y)|y=kx2 = .
(x,y)→(0,0) 1 + k2

Consequently, the actual limit depends on which path of approach we take (i.e. which
parabola we are on which is determined by the value of k). By the Two-Path Test there
is hence no limit as (x, y) → (0, 0). This is illustrated by looking at the surface of this
function:
2.1 Functions of two variables, their limits and derivatives 35

Sometimes it is useful to use polar coordinates.

Reminder: Polar coordinates


As an alternative to Cartesian coordinates (x, y), we can describe a point P in the plane
by using polar coordinates:

These coordinates are particularly useful if a function, or a problem, has some circular
symmetry. Typically, we restrict ourselves to 0 ≤ r and 0 ≤ θ < 2π (why?). Polar and
Cartesian coordinates can be converted into each other:
36 2 Partial derivatives

For the direction polar to Cartesian coordinates we easily derive

x = r cos θ , y = r sin θ

That is, given (r, θ), we can compute (x, y). The direction Cartesian to polar coordinates is
left to you as an exercise.3

Example:
Determine the continuity of the function defined by
 2xy
x2 +y 2
if (x, y) 6= (0, 0)
f (x, y) =
0 if (x, y) = (0, 0)

In polar coordinates, i.e., by using x = r cos θ, y = r sin θ, the function can be written as

2r2 cos θ sin θ


f (r, θ) = = sin 2θ
r2 (cos2 θ + sin2 θ)

provided we are not at the origin (i.e. provided r 6= 0). Therefore, as r → 0, the outcome
depends on the angle θ. For example, along θ = π/4, f = sin 2θ = sin π/2 = 1 everywhere
along the line. Therefore the function is not continuous.

2.1.3 Partial derivatives [Thomas’ Calculus, Section 13.3]

Reminder: Derivative
For functions of one variable, y = f (x), the derivative at a point is the slope of the tangent
to the curve at that point.

But for functions of two variables, z = f (x, y), an infinite number of tangents exist at a
point. However, if we fix y = y0 in f (x, y) and let x vary, then f (x, y0 ) depends only on x:
3
If you have not encountered polar coordinates before in sufficient detail, I highly recommend that you
familiarize yourself with Thomas’ Calculus, Section 10.3.
2.1 Functions of two variables, their limits and derivatives 37

That is, we can reduce the problem of the many-variable derivative effectively to the one-
variable case by holding all but one of the independent variables constant.

Definition:
The partial derivative of f (x, y) with respect to x at the point (x0 , y0 ) is

∂f f (x0 + h, y0 ) − f (x0 , y0 ) ∂f
= lim = fx (x0 , y0 ) = (x0 , y0 )
∂x (x0 ,y0 )
h→0 h ∂x

provided the limit exists.

In complete analogy, the partial derivative of f (x, y) with respect to y at the point (x0 , y0 )
is
∂f f (x0 , y0 + h) − f (x0 , y0 ) ∂f
= lim = fy (x0 , y0 ) = (x0 , y0 )
∂y (x0 ,y0 ) h→0 h ∂y
provided the limit exists.

For example, if f (x, y) = x2 + y 2 then fx = 2x, fy = 2y.

Note how we treat the other variables as constants when we do partial differentiation!

We can extend this to three (or more) dimensions. For example, if f (x, y, z) = xy 2 z 3 then
fx = y 2 z 3 , fy = 2xyz 3 , fz = 3xy 2 z 2 .

Example:
Find ∂f /∂x and ∂f /∂y at the point (4, −5) for the function f (x, y) = x2 + 3xy + y − 1.
38 2 Partial derivatives

∂f ∂ 2
= (x + 3xy + y − 1) = 2x + 3y
∂x ∂x
∂f ∂ 2
= (x + 3xy + y − 1) = 3x + 1 .
∂y ∂y

At the point (4, −5) we have

∂f ∂f
= −7 , = 13 .
∂x (4,−5) ∂y (4,−5)

Example:
Find ∂z/∂x if the equation yz − ln z = x + y (implicitly) defines z = z(x, y).

∂ ∂
(yz − ln z) = (x + y) .
∂x ∂x
Hence
∂z 1 ∂z
y − = 1 + 0.
∂x z ∂x
This gives  
1 ∂z ∂z z
y− = 1; ⇒ = .
z ∂x ∂x yz − 1
We can also obtain higher order derivatives.

Example:
If f (x, y) = x cos y + y ex , find

∂ 2f ∂ 2f ∂ 2f ∂ 2f
fxx = , fyx = , fyy = and fxy = .
∂x2 ∂x∂y ∂y 2 ∂y∂x

The first step is to find the first partial derivatives:

∂f
= cos y + y ex
∂x
∂f
= −x sin y + ex .
∂y

Now we take the partial derivatives of the first partial derivatives. This gives:

∂ 2f
= y ex
∂x2
∂ 2f
= − sin y + ex
∂y∂x
∂ 2f
= − sin y + ex
∂x∂y
∂ 2f
= −x cos y .
∂y 2
2.1 Functions of two variables, their limits and derivatives 39

This illustrates the following Theorem:

Theorem: Mixed Derivative Theorem


If f (x, y) and its partial derivatives fx , fy , fxy and fyx are defined throughout an open region
containing a point (a, b) and are all continuous at (a, b) then

fxy (a, b) = fyx (a, b) .

(An example where fxy (a, b) 6= fyx (a, b) is provided by the function discussed on p.34 of the
lecture notes.)
The theorem can be extended to higher orders, provided the derivatives are continuous.
Reminder:
For functions of a single variable it holds that if y = f (x) is differentiable at x = x0 , then
the change in the value of f that results from changing x from x0 to x0 + ∆x is given by
the differential approximation
∆y = f ′ (x0 )∆x + ǫ∆x
in which ǫ → 0 as ∆x → 0 (see Thomas’ Calculus Section 3.9). For functions of two
variables, the analogous property yields the definition of differentiability:

Note in particular that for z = f (x, y), differentiability is more than the existence of the
partial derivatives, as becomes also clear from the following statement:
If fx and fy are continuous throughout an open region R, then f is differentiable at every
point of R.
It also holds, in analogy to functions of a single variable:
If a function f (x, y) is differentiable at a point (x0 , y0 ) then f is continuous at (x0 , y0 ).
If you are interested in the details underlying the above statements, like the Increment
Theorem, please check out Thomas’ Calculus p.785.

2.1.4 The chain rule [Thomas’ Calculus, Section 13.4]

Reminder: Chain Rule for Functions of One Variable


If w = f (x) is a differentiable function of x and x = g(t) is a differentiable function of t,
then
dw dw dx
= .
dt dx dt
Similarly:

Theorem: Chain Rule for Functions of Two Variables


40 2 Partial derivatives

If w = f (x, y) is differentiable and if x = x(t), y = y(t) are differentiable functions of t, then


w = f (x(t), y(t)) is a differentiable function of t and
dw ∂w dx ∂w dy
= + .
dt ∂x dt ∂y dt
This straightforwardly follows from the above definition of differentiability.
We can easily extend this theorem to functions w = f (x, y, z) of three variables:
dw ∂w dx ∂w dy ∂w dz
= + + .
dt ∂x dt ∂y dt ∂z dt
We can use dependency diagrams (also called tree diagrams) to illustrate the application
of the Chain Rule:

(a) (b)

(a) To find dw/dt, start at w and read down each route to t, multiplying derivatives along
the way; then add the products. (b) For functions of three variables there are three routes
from w to t instead of two, but finding dw/dt is still the same: read down each route,
multiplying derivatives along the way; then add.

Example:
Use the Chain Rule to find the derivative of w = xy with respect to t along the path
x = cos t, y = sin t.
dw ∂w dx ∂w dy
= + = y(− sin t) + x(cos t) = − sin2 t + cos2 t = cos 2t .
dt ∂x dt ∂y dt
Note that we could have done this more directly by noting that
1 dw 1
w = xy = cos t sin t = sin 2t ; = · 2 cos 2t = cos 2t .
2 dt 2
If w = f (x, y) where x = g(r, s) and y = h(r, s) then
∂w ∂w ∂x ∂w ∂y ∂w ∂w ∂x ∂w ∂y
= + and = +
∂r ∂x ∂r ∂y ∂r ∂s ∂x ∂s ∂y ∂s
2.1 Functions of two variables, their limits and derivatives 41

and in analogy for functions w = f (x, y, z). Also, if w = f (x) and x = g(r, s) then

∂w dw ∂x ∂w dw ∂x
= and = .
∂r dx ∂r ∂s dx ∂s

Example:
For u = w(x, y, z), express ∂w/∂r and ∂w/∂s in terms of r and s if

r
w = x + 2y + z 2 , x= , y = r2 + ln s , z = 2r .
s

We have

∂w ∂w ∂x ∂w ∂y ∂w ∂z
= + +
∂r ∂x ∂r ∂y ∂r ∂z ∂r
 
1 1
= (1) + (2)(2r) + (2z)(2) = + 12r
s s

and

∂w ∂w ∂x ∂w ∂y ∂w ∂z
= + +
∂s ∂x ∂s ∂y ∂s ∂z ∂s
   
−r 1 2 r
= (1) 2
+ (2) + (2z)(0) = − 2 .
s s s s

Suppose that w = F (x, y) is differentiable and that F (x, y) = 0 defines y (implicitly) as a


differentiable function of x. Then

dw dx dy dy
0= = Fx + Fy = Fx + Fy .
dx dx dx dx

Hence, at any point where Fy 6= 0,


dy Fx
=− .
dx Fy
This is the Formula for Implicit Differentiation.

Example:
Find dy/dx if y 2 − x2 − sin xy = 0.

F (x, y) = y 2 − x2 − sin xy
dy Fx (−2x − y cos xy) 2x + y cos xy
= − =− = .
dx Fy (2y − x cos xy) 2y − x cos xy

You may wish to compare this method with the one that you have learned in Calculus 1,
i.e., differentiating the whole equation with respect to x and then solving for dy/dx.
42 2 Partial derivatives

2.2 Directional derivatives and extreme values


2.2.1 Directional derivatives and gradient vectors [Thomas’ Calculus,
Section 13.5]

We now investigate the derivative of a function f (x, y) at a point in a particular direction:

It is also denoted by (Du f )P0 or Du f |P0 as the derivative of f at the point P0 in the direction
of the unit vector u. The meaning is illustrated in the following figure:

We can develop a more efficient formula for the directional derivative by considering the line

x = x0 + su1 , y = y0 + su2

through the point P0 (x0 , y0 ), parametrised with the arc length parameter s increasing in the
2.2 Directional derivatives and extreme values 43

direction of the unit vector u = u1 i + u2 j. Then, as f = f (x(s), y(s)),


     
df ∂f dx ∂f dy
= + (via the Chain Rule)
ds u,P0 ∂x P0 ds ∂y P0 ds
   
∂f ∂f
= u1 + u2 (use unit vector u)
∂x P0 ∂y P0
"    #
∂f ∂f
= i+ j · [u1 i + u2 j]
∂x P0 ∂y P0

Note that for a function f (x, y, z) we have

∂f ∂f ∂f
∇f = i+ j+ k .
∂x ∂y ∂z
The expression ∇f = grad f is called “grad f ”, “gradient of f ”, “del f ” or “nabla f ”.
We can now write the directional derivative using the gradient:

Example:
Find the derivative of f (x, y) = x ey +cos(xy) at the point (2, 0) in the direction of v = 3i−4j.
The unit vector is
v v 3 4
u= =√ = i − j.
|v| 32 + 42 5 5
Now

fx (2, 0) = (ey − y sin(xy))|(2,0) = e0 − 0 = 1


fy (2, 0) = (xey − x sin(xy))|(2,0) = 2e0 − 2 · 0 = 2 .
44 2 Partial derivatives

Hence
∇f |(2,0) = fx (2, 0)i + fy (2, 0)j = i + 2j
and so  
3 4 3 8
Du f |(2,0) = ∇f |(2,0) · u = (i + 2j) · i− j = − = −1 .
5 5 5 5
Note that
Du f = ∇f · u = |∇f | |u| cos θ = |∇f | cos θ
where θ is the angle between the vectors ∇f and u. This implies the following:
1. f increases most rapidly when cos θ = 1 (i.e. u is parallel to ∇f )
2. f decreases most rapidly when cos θ = −1 (i.e. u is in opposite direction to ∇f )
3. f has zero change when cos θ = 0 (i.e. u is orthogonal to ∇f ).
Point 1 implies (why?): ∇f points in the direction of maximal increase of f .
Point 3 implies (why?): At every point (x0 , y0 ) in the domain of a differentiable function
f (x, y) the gradient of f is normal to the level curve through (x0 , y0 ).
Point 2 is illustrated by the following geographical map.

Tangent lines to level curves are always normal to the gradient. If (x, y) is a point on the
tangent line through the point P (x0 , y0 ) then
T = (x − x0 )i + (y − y0 )j ,
is a vector parallel to it. The equation of the tangent is then
∇f · T = fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) = 0 .
An example illustrating the use of this equation will be discussed in the tutorials.

We remark that the gradient has the following algebraic properties:


∇(kf ) = k ∇f for any number k
∇(f ± g) = ∇f ± ∇g
∇(f g) = f ∇g + g ∇f
 
f g ∇f − f ∇g
∇ =
g g2
(the proof is straightforward and left as an exercise)
2.2 Directional derivatives and extreme values 45

2.2.2 Linearisation and total differential [Thomas’ Calculus, Section 13.6]

Before we linearise a function of two variables, recall that a function z = f (x, y) is differen-
tiable at (x0 , y0 ) if

∆z = f (x, y) − f (x0 , y0 ) = fx (x0 , y0 )∆x + fy (x0 , y0 )∆y + ǫ1 ∆x + ǫ2 ∆y

with ǫ1 , ǫ2 → 0 (∆x, ∆y → 0). Solve for f (x, y) and approximate:

Example:
Find the linearisation of
1
f (x, y) = x2 − xy + y 2 + 3
2
at the point (3, 2).
We first evaluate f , fx and fy at the point (x0 , y0 ) = (3, 2):
 
2 1 2
f (3, 2) = x − xy + y + 3 =8
2 (3,2)
 
∂ 2 1 2
fx (3, 2) = x − xy + y + 3 = (2x − y)|(3,2) = 4
∂x 2 (3,2)
 
∂ 2 1 2
fy (3, 2) = x − xy + y + 3 = (−x + y)|(3,2) = −1
∂y 2 (3,2)

giving

L(x, y) = f (x0 , y0 ) + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 )


= 8 + (4)(x − 3) + (−1)(y − 2) = 4x − y − 2 .

Hence the linearisation of f at (3, 2) is L(x, y) = 4x − y − 2.


46 2 Partial derivatives

Recall that for y = f (x) we have defined the differential dy = f ′ (x)dx.

Example:
A cylindrical can is designed to have a radius of 1 unit and a height of 5 units, but the
radius is off by an amount of dr = +0.03 units and the height by dh = −0.1 units. Estimate
the resulting absolute change in the volume of the can.

Using the above total differential we obtain

∆V ≈ dV = Vr (r0 , h0 )dr + Vh (r0 , h0 )dh .

From V = πr2 h we obtain Vr = 2πrh and Vh = πr2 . Hence,

dV = 2πrhdr + πr2 dh = 0.3π − 0.1π = 0.2π ≈ 0.63 .

2.2.3 Extreme values and saddle points [Thomas’ Calculus, Section 13.7]

When we investigated extreme values for functions of one variable we looked for points
where the graph had a horizontal tangent line. For functions of two variables we look for
points where the surface defined by z = f (x, y) has a horizontal tangent plane. This leads
to the following definition:
2.2 Directional derivatives and extreme values 47

Local maxima correspond to “mountain peaks” on the surface z = f (x, y) and local minima
correspond to “valley bottoms”:

Not too hard to show (with knowledge of Calculus I):

Define an important object (in complete analogy to Calculus I):

Therefore local maxima and minima are critical points (why?) but critical points can also
include saddle points:
48 2 Partial derivatives

An example of a saddle point is the origin in the following surface:

Therefore, finding critical points of a function is not sufficient to identify the type of critical
point (local maximum, local minimum or saddle point). To do this we need to make use of
second partial derivatives.

2
The quantity fxx fyy − fxy is called the discriminant or Hessian of the function f . Note
that
2 fxx fxy
fxx fyy − fxy = ,
fxy fyy
2.2 Directional derivatives and extreme values 49

i.e., the Hessian is the determinant (cf. Vectors and Matrices) of the matrix of the second
partial derivatives.4

Example:
Find the local extreme values of f (x, y) = xy − x2 − y 2 − 2x − 2y + 4 and determine the
nature of each.
f (x, y) is defined and differentiable for all points in its domain. Hence, at extreme values
fx and fy are simultaneously zero. This gives the two equations

fx = y − 2x − 2 = 0 ; fy = x − 2y − 2 = 0 .

The solution of these equations is x = y = −2. Hence (−2, −2) is the only point where f
may take an extreme value. Now take the second derivatives:

fxx = −2 < 0 , fyy = −2 , fxy = 1(= fyx ) .

At the point (−2, −2),


2
fxx fyy − fxy = (−2)(−2) − 12 = 3 > 0 .
2
So fxx < 0 and fxx fyy − fxy > 0. Therefore f has a local maximum at (−2, −2). The value
of f at this point is f (−2, −2) = 8.

The previous theorems hold only for interior points. Note that functions defined on closed
and bounded domains may also have local extreme values at boundary points (as in case of
functions of one variable, see Calculus I). But we do not discuss this case in more detail.

4
If you want to know why: check out Thomas’ Calculus Section 13.9.
3 Multiple integrals
3.1 Double integrals [Thomas’ Calculus, Section 14.1]

Consider a function f (x, y) defined on a rectangular region R : a ≤ x ≤ b, c ≤ y ≤ d


partitioned into small rectangles Ak :

The area of a small rectangle with sides ∆xk and ∆yk is


∆Ak = ∆xk ∆yk .
Choose a point (xk , yk ) in the (suitably numbered) kth rectangle with function value f (xk , yk ).
We can consider z = f (x, y) as defining the height z at the point (x, y). The product
f (xk , yk ) ∆Ak is then the volume of a solid with base area ∆Ak and height f (xk , yk ) (for
which we assume that f (xk , yk ) > 0):

The Riemann sum Sn of these solids over R is


n
X
Sn = f (xk , yk ) ∆Ak .
k=1

Now consider what happens as ∆Ak → 0 (as n → ∞), i.e., we refine the partitioning. When
the limit of these sums exists the function f is said to be integrable and the limit is called
the double integral of f over R, written as
Z Z Z Z
f (x, y) dA or f (x, y) dx dy
R R
3.1 Double integrals 51

The volume of the portion of the solid directly above the base ∆Ak is f (xk , yk ) ∆Ak . Hence
the total volume above the region R is
Z Z
Volume = lim Sn = f (x, y) dA
n→∞ R

where ∆Ak → 0 as n → ∞. The following figure shows how the Riemann sum approxima-
tions of the volume become more accurate as the number n of boxes increases:

Consider the calculation of the volume under the plane z = 4 − x − y over the rectangular
region R : 0 ≤ x ≤ 2 and 0 ≤ y ≤ 1 in the x-y plane.
First consider a slice perpendicular to the x-axis:
52 3 Multiple integrals

The volume under the plane is

Z x=2
A(x) dx
x=0

where A(x) is the cross-sectional area at x. For each value of x we may calculate A(x) as
the integral

Z y=1
A(x) = (4 − x − y) dy
y=0

which is the area under the curve z = 4 − x − y in the plane of the cross-section at x.

In calculating A(x), x is held fixed and the integration takes place with respect to y.

Combining the above two equations we have

Z x=2
Volume = A(x) dx
Zx=0
x=2 Z y=1 
= (4 − x − y) dy dx
x=0 y=0
x=2 y=1 Z x=2 
y2
 
7
Z
= 4y − xy − dx = − x dx
x=0 2 y=0 x=0 2
2 
x2 22
 
7 7
= x− = ·2− − (0 − 0) = 5 .
2 2 0 2 2

We can write

Z 2Z 1
Volume = (4 − x − y) dy dx .
0 0

This is an iterated or repeated integral. The expression states that we can get the
volume under the plane by (i) integrating 4 − x − y with respect to y from y = 0 to y = 1,
holding x fixed, and then (ii) integrating the resulting expression in x from x = 0 to x = 2.
In other words, first do the dy integral and then do the dx integral.

Now consider the plane perpendicular to the y-axis:


3.1 Double integrals 53

We have x=2
x=2
x2
Z 
A(y) = (4 − x − y) dx = 4x − − xy = 6 − 2y .
x=0 2 x=0
The volume is then
Z y=1 Z y=1 1
(6 − 2y) dy = 6y − y 2 0 = 5

Volume = A(y) dy =
y=0 y=0

as before.
This illustrates

Example:
Calculate the volume V under z = f (x, y) = x2 y over the rectangle R defined by 1 ≤ x ≤ 2,
−3 ≤ y ≤ 4.
Z Z Z x=2 Z y=4 
2 2
V = x y dA = x y dy dx
R x=1 y=−3
x=2 2 2
y=4 x=2  3 x=2
7x2

xy 7x 49
Z Z
= dx = dx = = .
x=1 2 y=−3 x=1 2 6 x=1 6
54 3 Multiple integrals

Changing the order gives the same result:


Z Z Z y=4 Z x=2 
2 2
V = x y dA = x y dx dy
R y=−3 x=1
y=4 x=2 y=4  2 y=4
x3 y

7y 7y 49
Z Z
= dy = dy = = .
y=−3 3 x=1 y=−3 3 6 y=−3 6

In this example we could have separated the integrand into its x and y parts:
x=2 Z y=4  Z x=2  Z y=4 
7 7 49
Z
2 2
V = x y dy dx = x dx y dy = · = .
x=1 y=−3 x=1 y=−3 3 2 6

More generally, if f (x, y) = g(x) h(y), (i.e. the function is separable) and the region is
rectangular then
Z Z Z x=b Z y=d 
g(x) h(y) dA = g(x) h(y) dy dx
R x=a y=c
Z x=b  Z y=d 
= g(x) dx h(y) dy .
x=a y=c

3.2 Double integrals over general regions and area


3.2.1 Double integrals over general regions [Thomas’ Calculus, Section 14.2]

Now consider the case where the region R is not rectangular:1

Example:
RR
Find the volume of the prism R (3 − x − y) dA where R is the region bounded by the x-axis
and the lines x = 1 and y = x.
1
See Thomas’ Calculus, beginning of Section 15.2 for details underlying this theorem. Here we sweep
under the rug that integrating over non-rectangular regions involves some further considerations.
3.2 Double integrals over general regions and area 55

The region of integration in the x-y plane and the volume defined by z = 3 − x − y are
shown in the figure. In order to do the double integral we will first consider the approach
where we fix the value of x and do the y integral. We have
Z x=1 Z y=x Z 1 y=x
y2
Z Z
(3 − x − y) dA = (3 − x − y) dy dx = 3y − xy − dx
R x=0 y=0 0 2 y=0
Z 1 1
3x2
 2
x3

3x
= 3x − dx = − = 1.
0 2 2 2 0
We can also change the order of the integration where we fix the value of y and do the x
integral. We have
Z y=1 Z x=1 Z 1 x=1
x2
Z Z
(3 − x − y) dA = (3 − x − y) dx dy = 3x − − xy dy
R y=0 x=y 0 2 x=y
Z 1 
y2
  
1 2
= 3 − − y − 3y − −y dy
0 2 2
Z 1 y=1
y3
 
5 3 2 5 2
= − 4y + y dy = y − 2y + = 1.
0 2 2 2 2 y=0
In some cases the order of integration can be crucial to solving the problem.

Example:RR
Calculate R (sin x)/x dA where R is the triangle in the x-y plane bounded by the x-axis,
the line y = x and the line x = 1.
56 3 Multiple integrals

Taking vertical strips (i.e. keeping x fixed and allowing y to vary) gives

1 Z x  1  y=x 1
sin x sin x
Z Z Z
dy dx = y dx = sin x dx
0 0 x 0 x y=0 0

= [− cos x]10 = − cos 1 + cos 0 = 1 − cos 1 .

However, if we reverse the order of integration we get


Z 1Z 1
sin x
dx dy
0 y x
R
and (sin x)/x dx cannot be expressed in terms of elementary functions making the integral
difficult to do.
There are always two ways to do a double integral; choose the simpler because the other
may be impossible!

Summary: A key part of the process of double (and multiple) integration over a region
is to find the limits of the integration. We illustrate the procedure by considering the
double integral of a function over the region R given by the intersection of the line x + y = 1
with the circle x2 + y 2 = 1 (see the picture next page).

(a) Sketch the region of integration and label its boundary curves.
(b) If we decide to use vertical cross-sections first: Find the y-limits of integration.
Imagine a vertical line through the region, R, and mark the points where it enters
√ and
leaves R. In this case such a line would enter at y = 1 − x and leave at y = 1 − x2 .
(c) Find the x-limits of integration: Choose the x-limits that include all vertical lines
through R. In this case the lower limit is x = 0 and the upper limit is x = 1.
(d) This step may not be necessary: Reversing
p the order of integration. Then the
x-limits would be from x = 1 − y to x = 1 − y 2 and the y-limits from y = 0 to
y = 1.
3.2 Double integrals over general regions and area 57

Example:
Sketch the region of integration for the integral
Z 2 Z 2x
(4x + 2) dy dx
0 x2

and write an equivalent integral with the order of integration reversed. Evaluate the integral.

As written, the order of integration would imply that we do the y-integral first, from y = x2
to y = 2x, followed by the x-integral from x = 0 to x = 2. However, we are told to reverse
58 3 Multiple integrals


the order of integration. This means we do the x-integration first, from x = y/2 to x = y,
followed by the y-integral from y = 0 to y = 4. In other words,
Z 2 Z 2x Z 4 Z √y
(4x + 2) dy dx = (4x + 2) dx dy
0 x2 0 y/2

We can evaluate the integral using either ordering. Let us revert to the original:
Z 2 Z 2x Z 2 Z 2
2x
8x2 + 4x − 4x3 − 2x2 dx

(4x + 2) dy dx = [4xy + 2y]x2 dx =
0 x2
Z0 2 0
2
−4x3 + 6x2 + 4x dx = −x4 + 2x3 + 2x2 0
 
=
0
= −16 + 16 + 8 = 8 .

Note that this example is not separable because it is a non-rectangular region (i.e. the limits
on the x and y integrals now depend on the region of integration).

Double integrals can also be calculated over unbounded regions.

Example: R∞R∞
Evaluate the integral 0 0 x e−(x+2y) dx dy.
We have
Z ∞Z ∞ Z ∞Z ∞
−(x+2y)
xe dx dy = e−2y x e−x dx dy
0 0 0 0
(integrate by parts with u = x, dv = e−x dx)
Z ∞  Z ∞ 
−2y −x ∞ −x
  
= e −x e 0 − −e dx dy
Z0 ∞ 0
∞ 
e−2y (0 − 0) + −e−x 0 dy

=
0 ∞  
1 −2y 1 1
= − e =0− − = .
2 0 2 2

Double integrals have the following properties:


Let f (x, y), g(x, y) be continuous on the bounded region R. Then
Z Z Z Z
c f (x, y) dA = c f (x, y) dA for any number c
Z Z R Z Z R Z Z
(f (x, y) ± g(x, y)) dA = f (x, y) dA ± g(x, y) dA
R R R
Z Z
f (x, y) dA ≥ 0 if f (x, y) ≥ 0 on R
R
Z Z Z Z
f (x, y) dA ≥ g(x, y) dA if f (x, y) ≥ g(x, y) on R
ZR Z ZR Z Z Z
f (x, y) dA = f (x, y) dA + f (x, y) dA
R R1 R2
if R = R1 ∪ R2 , R1 ∩ R2 = ∅
3.2 Double integrals over general regions and area 59

3.2.2 Area by double integration [Thomas’ Calculus, Section 14.3]

The area A of a closed, bounded plane region R is given by


n
X Z Z
A = lim ∆Ak = dA ,
n→∞ R
k=1

RR
which is equivalent to calculating R
f (x, y) dA with f (x, y) = 1.

Example:
Find the area of the region R enclosed by the parabola y = x2 and the line y = x + 2.
Determining the points of intersection is essential to determining the limits on the integra-
tions. We can find the points by setting x2 = x+2 which gives x2 −x−2 = (x+1)(x−2) = 0,
giving x = −1 and x = 2. The corresponding values of y are y = 1 and y = 4. So the points
of intersection are (−1, 1) and (2, 4).
60 3 Multiple integrals

If we use vertical strips (i.e. fix x and vary y) for the first integral we will not have to split
up the region of integration. From the diagram we see that the lower and upper limits for
the first integration are therefore y = x2 and y = x + 2. This gives
Z 2 Z x+2 Z 2
A = dy dx = [y]x+2
x2 dx
−1 x2 −1
2 2
x2 x3

9
Z
2

= x+2−x dx = + 2x − = .
−1 2 3 −1 2

Double integrals can also be used to find the average value of the function f (x, y) over
the region R, which is defined to be
1
Z Z
hf i = f (x, y) dA .
area of R R

Example:
Find the average value of f (x, y) = x cos xy over the rectangle R : 0 ≤ x ≤ π, 0 ≤ y ≤ 1.
The area of the regionRRR is just π, the product of the length of the two sides of the rectangle.
We just need to find R f (x, y) dA and then divide by π.
Z πZ 1 Z π
y=1
x cos xy dy dx = [sin xy]y=0 dx
0 0 0
Z π
= (sin x − 0) dx = [− cos x]π0 = 1 + 1 = 2 .
0

Hence hf i = 2/π.

3.3 Substitution and triple integrals


3.3.1 Substitution in double Integrals [Thomas’ Calculus, Sections 14.8 and
14.4]

For functions of one variable it is often useful to integrate by a change of variable, e.g. x =
x(u). Let us review integration by substitution in a slightly different way than you have
learned in Calculus 1, namely backwards: Replace x by x(u) and dx by (dx/du)du.2 Then
alter the x-limits to the u-limits with a < b and u1 < u2 . First, assume that x(u) increases
with u giving a = x(u1 ) and b = x(u2 ). Then
Z x=b Z u=u2
dx
I= f (x) dx = f (x(u)) du .
x=a u=u1 du

If x(u) decreases with u we have a = x(u2 ) and b = x(u1 ), and the u-limits are reversed.
With u1 < u2 we therefore have a change of sign:
Z x=b Z u=u2
dx
I= f (x) dx = − f (x(u)) du .
x=a u=u1 du
2
Note that here we interchange u and x compared to Calculus 1.
3.3 Substitution and triple integrals 61

But dx/du < 0 in this case, so we can combine both cases in one formula:
Z x=b Z u=u2
dx
f (x) dx = f (x(u)) du .
x=a u=u1 du
Note that on the right-hand side of this equation the function f (x) is expressed as f (x(u)).
Also, the right-hand side of the equation includes a scaling factor |dx/du|, multiplying the
du; this comes from transforming from dx to du.
For functions of two variables one would similarly expect that the change in variables
x = x(u, v), y = y(u, v)
(for example, for polar coordinates u = r and v = θ) would result in a change in the area
dA by a scaling factor S such that
dA = dx dy = S du dv .
As an example consider a linear change of coordinates:
x = x(u, v) = au + bv, y = y(u, v) = cu + dv
or     
x a b u
=
y c d v
where a, b, c and d are constants.
Let us write M for the transformation matrix composed of a, b, c and d and recall that a
unit square in (u, v) variables is spanned by the unit vectors
       
u 1 u 0
= = e1 , = = e2
v 0 v 1
To see what happens to this unit square under the transformation M, just apply M. This
gives
    
′ a b 1 a
M e1 = e1 = =
c d 0 c
    
a b 0 b
M e2 = e′2 = =
c d 1 d
where (a, c) and (b, d) represent the coordinates of the new corners in the (x, y) plane:

v (a) y (b)
(u=0,v=1) (u=1,v=1) (a+b, c+d)
e2 (b, d)

e2 P
(a, c)
(u=1,v=0) e1
e1 u x
(note that the arrows are supposed to reach the respective points)
62 3 Multiple integrals

Therefore, under the transformation M we find that the unit square in (u, v) based on e1 ,
e2 is transformed into the parallelogram in (x, y) based on e′1 , e′2 .
Note from the matrix and the diagram that the point (1, 1) in (u, v) transforms to the point
(a + b, c + d) in (x, y).
Let us calculate the area of the parallelogram P :

y
b a
c R c T2

b
d
T1 P T1
d
b
T2 c R c
a b
x
We have

Area P = [Total area of rectangle]


− [Area of 2 pairs of equal triangles T1 and T2 ]
− [Area of 2 rectangles R] .

Therefore,
1 1
Area P = (a + b)(c + d) − 2 · ac − 2 · bd − 2bc
 2 2
a b
= ad − bc = det = det M
c d

In view of the equation dA = dx dy = S du dv one may understand this result such that
the unit square of area du dv gets multiplied by a factor of S = det M. The same argument
shows that a small rectangle of sides du and dv with area du dv also gets multiplied by
S = det M. Therefore, for a linear change of variables a small rectangular area du dv in
the (u, v) plane is transformed into the parallelogram area dx dy = det M du dv in the (x, y)
plane.
Now let us consider a nonlinear change of coordinates. We take the transformation to have
the form
x = x(u, v), y = y(u, v) ,
where according to the total differential the increments in x and y are given by

∂x ∂x
dx = du + dv
∂u ∂v
∂y ∂y
dy = du + dv
∂u ∂v
3.3 Substitution and triple integrals 63

or, in matrix form,     


dx ∂x/∂u ∂x/∂v du
= .
dy ∂y/∂u ∂y/∂v dv
The Jacobian matrix is defined to be
 
∂x/∂u ∂x/∂v
M(u, v) =
∂y/∂u ∂y/∂v
and the Jacobian determinant, or Jacobian,
∂(x, y)
= det M(u, v) .
∂(u, v)
This suggests that for a nonlinear change of variables we also have that a rectangular area
du dv in the (u, v) plane) is transformed into the (deformed) ‘parallelogram’ area det Mdu dv
in the (x, y) plane.

(a) v (b) y v+!v


v+!v v
R'
R
v u+!u

u
u x
u u+!u
(with du = δu dv = δv)

Therefore, the required transformation formula for double integrals under a change
of variables is3
∂(x, y)
Z Z Z Z
f (x, y) dx dy = f (x(u, v), y(u, v)) du dv
R′ R ∂(u, v)
where
∂(x, y)
= |det M|
∂(u, v)
can be thought of as the scaling factor S.
Note that | · | denotes the absolute value of the determinant of the matrix, i.e., the modulus
as in the one variable case. This may not be confused with the case of a matrix, where
vertical lines on either side denote the determinant. For example, if we let
 
a b
A=
c d
then
a b
det A = = ad − bc
c d
3
For a precise mathematical formulation of this result as a theorem see Thomas’ Calculus p.907.
64 3 Multiple integrals

and
|det A| = |ad − bc| .

Example:
Evaluate the integral Z Z
I= (x2 + y 2 ) dx dy
R
2 2 2
where R is a disk x + y ≤ a , by changing to polar coordinates.
In polar coordinates we have

x = r cos θ, y = r sin θ .

Therefore, taking u = r and v = θ, we can write the Jacobian matrix as


   
∂x/∂r ∂x/∂θ cos θ −r sin θ
M= =
∂y/∂r ∂y/∂θ sin θ r cos θ

and the Jacobian determinant is


∂(x, y) cos θ −r sin θ
= r cos2 θ + sin2 θ = r

det M = =
∂(r, θ) sin θ r cos θ

where here and in the following we assume r ≥ 0, so we do not need to take the absolute
value. The original area R and the transformed area R′ are shown below:
(a) y (b)
!
2"

a R R'
x

0 ar

Note that the circle in the (x, y) plane transforms into a rectangle in the (r, θ) plane. Here
R is the region given by x2 + y 2 ≤ a2 and R′ is the region given by 0 ≤ r ≤ a, 0 ≤ θ ≤ 2π.
Therefore ZZ ZZ
2 2
r2 (r) dr dθ

I= (x + y ) dx dy =
R R′

where the r2 on the right-hand integral comes from the transformed x2 + y 2 and the r dr dθ
is from the transformed dx dy with r coming from the Jacobian determinant det M. Hence
Z r=a Z θ=2π Z r=a  Z θ=2π 
3 3 πa4
I= r dr dθ = r dr dθ = ,
r=0 θ=0 r=0 θ=0 2

where we note that the integral is separable.


3.3 Substitution and triple integrals 65

Example:
Evaluate the double integral
Z 4Z x=y/2+1
2x − y
dx dy
0 x=y/2 2

by applying the transformation u = (2x − y)/2, v = y/2 and integrating over an appropriate
region of the u-v plane.
The region R in the x-y-plane looks as follows:

The corresponding region G in the u-v plane can be obtained by first writing x and y in
terms of u and v as x = u + v and y = 2v.
The boundaries of G are then found by substituting these equations for the boundaries of
R:

The Jacobian of the transformation is


∂(x, y) ∂x/∂u ∂x/∂v
det M(u, v) = =
∂(u, v) ∂y/∂u ∂y/∂v
∂(u + v)/∂u ∂(u + v)/∂v 1 1
= = = 2.
∂(2v)/∂u ∂(2v)/∂v 0 2
and we get
Z 4Z x=(y/2)+1 v=2Z u=1 v=2Z u=1
2x − y
Z Z
dx dy = u |det M(u, v)| du dv = u · 2 du dv = 2
0 x=y/2 2 v=0 u=0 v=0 u=0

Note that for invertible transformations


 −1
∂(x, y) ∂(u, v)
= , (3.1)
∂(u, v) ∂(x, y)
66 3 Multiple integrals

as you have seen in Calculus 1 for a function of one variable. This can be useful in solving
some problems.

Example:
Evaluate the integral Z Z
I= 1 · dx dy
R
(i.e. the area of the region R) where R is enclosed by y 2 = x, y 2 = 2x, xy = 1 and xy = 2.
(a) v (b)
y
2 y2=2x v=2

y2=x R'
R
1 xy=2 v=1

xy=1

0 x 0 u
0 1 2 0 u=1 u=2

To solve the integral consider the change of variables defined by


u = y 2 /x, v = xy .
Then we can write the four bounding curves as
y 2 = x ⇔ u = 1, y 2 = 2x ⇔ u = 2, xy = 1 ⇔ v = 1, xy = 2 ⇔ v = 2 .
So the region becomes a square (the region R′ in part (b) of the above figure).
Now, for the Jacobian determinant it is easier to use Eq. (1) above. So, to calculate
∂(x, y)/∂(u, v) we first calculate ∂(u, v)/
, p(x, y) and then take the inverse. Using u = y 2 /x and v = xy we have
∂(u, v) ∂u/∂x ∂u/∂y −y 2 /x2 2y/x y2
= = = −3 = −3u .
∂(x, y) ∂v/∂x ∂v/∂y y x x
Therefore, using Eq. (1),
 −1
∂(x, y) ∂(u, v) 1
= =− .
∂(u, v) ∂(x, y) 3u
Hence
∂(x, y)
ZZ ZZ
I = 1·
1 · dx dy = du dv
R R′ ∂(u, v)
1 1 u=2 v=2 1
ZZ Z Z
= − du dv = dv du
R′ 3u 3 u=1 v=1 u
1 u=2 h v iv=2
Z
= du
3 u=1 u v=1
1 u=2 1 1 ln 2
Z
= du = [ln u]u=2
u=1 =
3 u=1 u 3 3
3.3 Substitution and triple integrals 67

Example:
Evaluate the integral Z ∞
2 /2
e−x dx .
−∞
If we call this integral I, we can write
Z ∞  Z ∞  Z ∞Z ∞
2 −x2 /2 −y 2 /2 2 +y 2 )/2
I = e dx e dy = e−(x dx dy .
−∞ −∞ −∞ −∞

Now transform to polar coordinates with the limits 0 ≤ r < ∞ and 0 ≤ θ ≤ 2π. This gives
Z 2π Z ∞ Z 2π Z ∞
2 −r 2 /2 ∂(x, y) 2
I = e dr dθ = r e−r /2 dr dθ
0 0 ∂(r, θ) 0 0
Z 2π h i ∞
Z 2π Z 2π
−r 2 /2
= −e dθ = ((0) − (−1)) dθ = dθ = 2π .
0 0 0 0

Hence I = 2π.
Note that the probability density function for a normal (or Gaussian) distribution is
1 2 2
ϕ(x) = √ e−(x−µ) /(2σ )
σ 2π
for mean µ and standard deviation σ. If we write t = (x−µ)/σ (i.e. express the displacement
from the mean in terms of the standard deviation) then the total probability is
Z ∞ Z ∞
1 −(x−µ)2 /(2σ 2 ) 1 2
P = √ e dx = √ e−t /2 σ dt
σ 2π −∞ σ 2π −∞
Z ∞
1 2
= √ e−t /2 dt = 1 . (by our previous result)
2π −∞

3.3.2 Triple integrals [Thomas’ Calculus, Section 14.5]

Triple integrals are integrations where the region of integration is a volume. The basic
concepts are similar to those we introduced for two-dimensional (double) integrals, but now
we have for the Riemann sum
n
X
Sn = f (xk , yk , zk ) ∆Vk ,
k=1

where ∆Vk = ∆xk ∆yk ∆zk are now small volumes at the point xk , yk , zk , see (a) in the
figure below (where it is ∆Vk = δV ).
The limit as the size of the volume element ∆Vk → 0 (as n → ∞) is written as (if it exists)
Z Z Z Z Z Z
lim Sn = f (x, y, z) dV = f (x, y, z) dx dy dz ,
n→∞ V V

where V is the three-dimensional region being integrated over.


The integrals are, as in the two-dimensional case, evaluated by repeated integration where
we integrate over one variable at a time. For example, we could start by integrating over z
first, see (b) in the figure below. The procedure is as follows:
68 3 Multiple integrals

(a) Sketch the region of integration (if possible), see (a).

(b) Choose a direction of integration and integrate: For example, fix a point (x, y)
and integrate over the allowed values of z in the region V . The z-integral limits are the
small, filled circles at the bottom and the top of the dashed line with, say, z = z1 (x, y)
at the bottom and z = z2 (x, y) at the top as shown in (b). Therefore we are summing
vertically over the boxes shown in (b).

(c) This result depends on the choice of (x, y) and is defined in the region R of the (x, y)
plane which is the projection of V onto this plane as shown in (c). This now identifies
the region in the (x, y) plane over which we must do the x and y integrations.

(d) Now we can take the double integral of the result of the z-integration over the
region R in the (x, y) plane, see (d), where here we first integrate along the y axis.

Therefore
Z Z Z Z x=b Z y=y2 (x) Z z=z2 (x,y)
f (x, y, z) dV = f (x, y, z) dz dy dx .
V x=a y=y1 (x) z=z1 (x,y)
3.3 Substitution and triple integrals 69

Example:
Evaluate Z Z Z
f (x, y, z) dV
T

over the tetrahedron T bounded by the planes x = 0, y = 0, z = 0 and x + y + z = 1.


Note that the plane x + y + z = 1 passes through x = 1 (putting y = z = 0) and similarly
through y = 1 and z = 1 as shown below:
z z

(a) (b)
1 1

1 1
y y

1 1

x x
Now evidently for fixed (x, y) the z-limits are the heavy dots corresponding to z = 0 at the
bottom and z = 1 − x − y at the top. This gives our z-limits.
The projection R of T onto the (x, y) plane is the triangle on which the tetrahedron rests,
i.e. the triangle given by x = 0, y = 0 and x + y = 1 (obtained by setting z = 0). So
Z x=1 Z y=1−x Z z=1−x−y
I= f (x, y, z) dz dy dx .
x=0 y=0 z=0

For example, if f (x, y, z) = 1 then


ZZZ ZZZ
I= 1 · dV = dV = volume of T .
T T

Therefore, in this case


Z x=1 Z y=1−x Z z=1−x−y Z x=1 Z y=1−x
I = 1 dz dy dx = [z]z=1−x−y
z=0 dy dx
x=0 y=0 z=0 x=0 y=0
x=1 y=1−x x=1 y=1−x
y2
Z Z Z 
= (1 − x − y) dy dx = y − xy − dx
x=0 y=0 x=0 2 y=0
Z x=1
(1 − x)2 1
= dx =
x=0 2 6

and this is the volume of the tetrahedron.

Triple integrals can be used to find the average value of a function f (x, y, z) over a
volume D defined as
1
ZZZ
hf (x, y, z)i = f (x, y, z) dV
volume of D D
70 3 Multiple integrals

Example:
Find the average value of f (x, y, z) = xyz over the cube bounded by the planes x = 2, y = 2
and z = 2 in the first octant.

The volume of the cube is 23 = 8. The integral is

Z 2Z 2Z 2 2 2 2 Z 2 3  2
 2 !3
x
Z Z Z
xyz dx dy dz = x dx y dy z dz = x dx = = 8,
0 0 0 0 0 0 0 2 0

because the function is separable and the region is cubic. Therefore the average value of
f (x, y, z) = xyz over the cube is

1 1
ZZZ
hf (x, y, z)i = xyz dV = · 8 = 1.
volume of cube cube 8

Example:
Find the volume V of the region D enclosed by the surfaces z = x2 +3y 2 and z = 8−x2 −y 2 .

The two surfaces intersect at x2 + 3y 2 = 8 − x2 − y 2 . The equation x2 + 2y 2 = 4 thus


defines the boundary of the projection of D onto the x-y plane, which is the ellipse R:
3.3 Substitution and triple integrals 71

We now have all the information necessary to do the integral:


ZZZ Z 2 Z √(4−x2 )/2 Z 8−x2 −y2
V = dz dy dx = √ dz dy dx
D −2 − (4−x2 )/2 x2 +3y 2
Z 2 Z √(4−x2 )/2
8 − 2x2 − 4y 2 dy dx

= √
−2 − (4−x2 )/2

2  √(4−x2 )/2
4
Z
= (8 − 2x2 )y − y 3 √ dx
−2 3 − (4−x2 )/2
Z 2 r
2)
  !
2 3/2
(4 − x 8 4 − x
= 2(8 − 2x2 ) − dx
−2 2 3 2
Z 2 3/2 3/2 !
4 − x2 8 4 − x2
 
= 8 − dx
−2 2 3 2
√ Z
4 2 2 3/2 √
= 4 − x2 dx [since (8 − 8/3)/(23/2 ) = 4 2/3]
3
√ Z−2π/2
4 2 3/2
= 43/2 cos2 θ · 2 cos θ dθ [using subst. x = 2 sin θ]
3 −π/2
72 3 Multiple integrals

√ Z π/2 √ Z π/2
4 2 4 4 2 1
= · 16 cos θ dθ = · 16 (3 + 4 cos 2θ + cos 4θ) dθ
3 −π/2 3 −π/2 8
√  π/2
4 2 1
= · 2 3θ + 2 sin 2θ + sin 4θ
3 4 −π/2

4 2  π π  √
= ·2·3 + = 8 2π.
3 2 2

3.3.3 Substitution in triple Integrals [Thomas’ Calculus, Section 14.8]

Changing variables in triple integrals is similar to the procedure used for double integrals.
Suppose
x = x(u, v, w), y = y(u, v, w), z = z(u, v, w) .
We define the Jacobian matrix for change of variables from (x, y, z) to (u, v, w) to be
 
∂x/∂u ∂x/∂v ∂x/∂w
M(u, v, w) = ∂y/∂u ∂y/∂v
 ∂y/∂w 
∂z/∂u ∂z/∂v ∂z/∂w
and the corresponding Jacobian determinant as
∂(x, y, z)
= det M
∂(u, v, w)
such that the transformation for volume is
∂(x, y, z)
dx dy dz = du dv dw .
∂(u, v, w)
As before, for invertible transformations we have
 −1
∂(x, y, z) ∂(u, v, w)
= .
∂(u, v, w) ∂(x, y, z)
The integral under change of variables becomes
ZZZ
f (x, y, z) dx dy dz =
V
∂(x, y, z)
ZZZ
f (x(u, v, w), y(u, v, w), z(u, v, w)) du dv dw ,
V′ ∂(u, v, w)
where V ′ is the transformed volume in (u, v, w) coordinates.

Example:
A volume V in the first octant is bounded by the six surfaces xy = 1, xy = 2, yz = 1,
yz = 2, xz = 1 and xz = 2. Using the change of variables
r = xy, s = yz, t = xz
and by assuming that this tranformation is invertible on V , evaluate the integral
ZZZ
xyz dx dy dz .
V
3.3 Substitution and triple integrals 73

The new limits are r = 1 to r = 2, s = 1 to s = 2 and t = 1 to t = 2. The Jacobian


determinant is
∂r/∂x ∂r/∂y ∂r/∂z y x 0
∂(r, s, t)
= ∂s/∂x ∂s/∂y ∂s/∂z = 0 z y
∂(x, y, z)
∂t/∂x ∂t/∂y ∂t/∂z z 0 x
z y 0 y
= y −x
0 x z x
= y(xz) + x(yz) = 2xyz .

But  −1
∂(x, y, z) ∂(r, s, t) 1
= =
∂(r, s, t) ∂(x, y, z) 2xyz
and so
Z t=2 Z s=2 Z r=2
1 1
ZZZ ZZZ
xyz dx dy dz = xyz dr ds dt = dr ds dt
V V′ 2xyz t=1 s=1 r=1 2
1 2 2 2 1 1
= [r]1 [s]1 [t]1 = · 1 · 1 · 1 = .
2 2 2

THE END

You might also like