Iac Lnotes Sem B
Iac Lnotes Sem B
MTH4300, Semester B
Lecture Notes
Spring 2024
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]
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 illustrated graphically either as points on a real axis or as the graph of a
function defining the sequence:
1.1 Sequences 5
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
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 −∞.
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:
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 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
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
an = eln an = ebn → e2 as n → ∞ .
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→∞
Example:
1
lim 1− = 1.
n→∞ n
1.2 Series
1.2.1 Infinite series and some examples [Thomas’ Calculus, Section 9.2]
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
∞
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
an = sn − sn−1 → S − S = 0 as n → ∞ .
Hence:
1.2 Series 13
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
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.
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
∞
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
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:
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.
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
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.
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.
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:
Therefore
f (n) (a)
an = .
n!
It also suggests that if f has a power series representation then it must be
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
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
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. When does a Taylor series converge to the function that generated it?
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:
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]
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.
f :R→R , x 7→ y = f (x)
Examples:
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.
Definition:
The set of all points (x, y, z) is called the graph, or surface, of z = f (x, y).
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
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):
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
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 )
(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
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
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
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
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.
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
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.
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
∂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
∂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
(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.
(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
dw dx dy dy
0= = Fx + Fy = Fx + Fy .
dx dx dx dx
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
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
∂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
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.
Before we linearise a function of two variables, recall that a function z = f (x, y) is differen-
tiable at (x0 , y0 ) if
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
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.
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”:
Therefore local maxima and minima are critical points (why?) but critical points can also
include saddle points:
48 2 Partial derivatives
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:
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]
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
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.
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.
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
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
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
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).
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
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/π.
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
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
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 θ .
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
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:
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
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π −∞
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
(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
(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
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.
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 .
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
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
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