multivariable calculus and real analysis - macs.hw.ac.ukanatolyk/f18cd_2019.pdf · example1.3it was...

118
Multivariable Calculus and Real Analysis Heriot-Watt University (2019/20 version) These notes are not meant to cover exhaustively all of the material in the course. They are meant to be used in addition to the lectures, to help students to catch up if they missed some material and to read ahead of the lectures if they so wish. Dr. Anatoly Konechny

Upload: others

Post on 17-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Multivariable Calculusand Real Analysis

Heriot-Watt University (2019/20 version)

These notes are not meant to cover exhaustively all of the material in the

course. They are meant to be used in addition to the lectures, to help

students to catch up if they missed some material and to read ahead of

the lectures if they so wish.

Dr. Anatoly Konechny

Page 2: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

BOOK-WEBSITE.COM

Licensed under the Creative Commons Attribution-NonCommercial 3.0 Unsupported License(the “License”). You may not use this file except in compliance with the License. You mayobtain a copy of the License at http://creativecommons.org/licenses/by-nc/3.0. Un-less required by applicable law or agreed to in writing, software distributed under the Licenseis distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OFANY KIND, either express or implied. See the License for the specific language governingpermissions and limitations under the License.

First printing, January 2014

Page 3: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Contents

1 Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.1 Inequalities with modulus 71.1.1 Definition and general properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1.2 Inequalities with moduli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.1.3 Chains of inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.1.4 Moduli and square roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

1.2 Sequences 10

1.3 Limits of sequences 11

1.4 Limits of functions 16

1.5 Additional examples of (ε,δ )-proofs 19

2 Multivariable differential calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.1 Functions of several variables 23

2.2 Limits and Continuity 262.2.1 Limits of functions of two variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.2.2 Continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2.3 Differentiation 30

2.4 Graphs. Tangent Planes. 33

2.5 Higher order partial derivatives 38

2.6 The chain rule and partial derivatives. 41

2.7 Transforming equations. 43

3 Applications of partial derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

3.1 Implicit functions. 45

Page 4: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.2 Implicit differentiation. 463.2.1 More variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473.2.2 More equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

3.3 Differentiable functions of two variables 50

3.4 Taylor’s Expansion 53

3.5 Taylor’s formula in two dimensions 59

3.6 Functions f : Rn→ Rm 60

3.7 Total derivatives 61

3.8 Various theorems about total derivatives 63

3.9 More applications 64

4 Double integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

4.1 Double integrals: general definition and properties 65

4.2 How to calculate double integrals 68

4.3 Interchanging the integration order 72

4.4 Calculating areas using double integrals 74

4.5 Change of variables in double integrals 74

4.6 Polar coordinates – continued 77

4.7 Other substitutions 78

4.8 Calculating volumes using double integrals 79

5 Triple integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

5.1 Triple integrals 83

5.2 Change of variables in triple integrals 875.2.1 Cylindrical polar coordinates (r,θ ,z) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885.2.2 Spherical polar coordinates (r,θ ,φ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6 Integrals over unbounded regions and of unbounded functions 93

6.1 Double integrals over unbounded domains 93

6.2 Multiple integrals of unbounded functions 98

7 More applications of partial derivatives . . . . . . . . . . . . . . . . . . . . . 103

7.1 Maxima and minima 1037.1.1 Second derivative test for maxima and minima – one variable case . . . . . . 104

7.2 Second derivative test for two variables 105

7.3 Lagrange multipliers 108

7.4 More examples 111

Page 5: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Recommended books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

Books 115

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

Page 6: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain
Page 7: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Inequalities with modulusDefinition and general propertiesInequalities with moduliChains of inequalitiesModuli and square roots

SequencesLimits of sequencesLimits of functionsAdditional examples of (ε,δ )-proofs

1 — Limits

1.1 Inequalities with modulus

There is no sharp distinction between calculus and analysis. Calculus is more focused on methodsof calculation while Analysis is occupied with rigorous definitions and qualitative questions ofthe type: "Is this function continuous?", "Does this sequence have a limit?" Answering suchqualitative questions most commonly involves solving inequalities. Often these inequalitiescontain absolute values or moduli of various quantities. In this section we review the basicproperties of the modulus and discuss how inequalities involving moduli can be solved.

1.1.1 Definition and general propertiesNotation 1.1. |x| denotes the modulus (aka absolute value) of x ∈ R, that is

|x|= x for x≥ 0 , |x|=−x for x < 0 .

For example, |3|= 3, |−2|= 2.

For any two numbers x,y ∈R, the distance between x and y is |x−y| (the modulus bit makessure that this is positive).

Corollary 1.1.1 — Facts about the modulus.

M1 −|x| ≤ x≤ |x| , |x|= |− x|M2 if a≥ 0, then: |x| ≤ a ⇔ −a≤ x≤ aM3 |x+ y| ≤ |x|+ |y| (triangle inequality)M4 |xy|= |x||y|.

Here are some examples of how these properties can be used

� Example 1.1 Show that |x−3| ≤ 0.2 ⇔ 2.8≤ x≤ 3.2.

Solution By M2,

|x−3| ≤ 0.2 ⇔ −0.2≤ x−3≤ 0.2 ⇔ 2.8≤ x≤ 3.2 .

Page 8: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

8 Limits

� Example 1.2 Let a > 0. Show that if |x−a| ≤ a3 , then a

2 ≤ x≤ 3a2 .

Solution By M2,

−a2≤ x−a≤ a

2⇔ a

2≤ x≤ 3a

2.

� Example 1.3 Suppose that a,b,x,y,r ∈ R with r > 0, x 6= 0, b 6= 0. Show that if

|a− x| ≤ r2|b|

and |b− y| ≤ r2|x|

,

then

|ab− xy| ≤ r .

Solution

ab− xy = ab−bx+bx− xy = b(a− x)+ x(b− y)

⇒ |ab− xy|= |b(a− x)+ x(b− y)| ≤ |b(a− x)|+ |x(b− y)| (by M3)

= |b||a− x|+ |x||b− y| (by M4)

≤ r2+

r2= r .

1.1.2 Inequalities with moduliTo solve an inequality involving a variable means finding all possible values of that variablefor which the inequality is satisfied. Typically the allowed values correspond to collectionsof intervals. In the above examples 1.1 and 1.2 solutions to inequalities were worked out. Inexample 1.3 it was shown that two given inequalities imply a third one.

Sometimes inequalities contain more than one modulus. We will explain how to solve suchinequalities in the following example

� Example 1.4 Solve|2x−1|− |x+5|< 10 .

Inequalities involving one variable x and any number of absolute values can be solved in 3steps

1. Identify the values of x at which each absolute value vanishes. This breaks up the real lineinto a sequence of intervals.

2. Taking up one interval at a time we can get rid of the absolute values by replacing it eitherby the expression inside or the negative of that. We find solutions in each interval bysolving the "ordinary" inequalities.

3. We collect together all of the solutions we found in each interval.Let us apply this to the inequality above. The first modulus vanishes at x = 1/2 and the

second at x =−5. This gives us 3 intervals: (−∞,−5], [−5,1/2] and [1/2,∞). We take them upone after another.

1) On (−∞,−5] we have |2x−1|= 1−2x and |x+5|=−x−5. So that our inequality now reads

(1−2x)− (−x−5)< 10 .

Page 9: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

1.1 Inequalities with modulus 9

We bring this tox >−4

This condition is inconsistent with the interval we are working on where x <−5. So there are nosolutions in this interval.

2) On [−5,1/2] interval we have |2x−1|= 1−2x and |x+5|= x+5 so that our inequality takesup the form

(1−2x)− (x+5)< 10 .

By standard manipulations we bring this to

x >−14/3 .

This gives us an interval of solutions x ∈ (−14/3,1/2] inside the interval we are working in.

3) On [1/2,∞) interval we have |2x−1|= 2x−1 and |x+5|= x+5 so that our inequality canbe written as

(2x−1)− (x+5)< 10

that we bring to the formx < 16

so that we obtain another interval of solutions x ∈ [1/2,16).

As a final step we collect all solutions we found and join in the adjacent intervals. We obtainthat all solutions are within a single interval x ∈ (−14/3,16). �

1.1.3 Chains of inequalitiesIf we are not interested in finding all solutions to a given inequality but rather in deriving(demonstraiting) that a certain inequality holds we proceed by working out a chain of inequalitiesof the type

something≤ something bigger≤ smth. bigger again≤ smth. simple .

Here are two concrete examples of these kind of chains

� Example 1.5 Show that∣∣∣2n+3

n2+6

∣∣∣≤ 5n for all n≥ 1.

Solution For n≥ 1,∣∣∣∣2n+3n2 +6

∣∣∣∣= 2n+3n2 +6

≤ 2n+3nn2 +6

≤ 5nn2 =

5n.

� Example 1.6 Show that∣∣ 1

2n−5

∣∣≤ 1n for all n≥ 5.

Solution For n≥ 5,∣∣∣∣ 12n−5

∣∣∣∣= 12n−5

(since 2n−5 > 0 for n≥ 5)

=1

n+(n−5)≤ 1

n(since n−5 > 0) .

Page 10: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

10 Limits

Note that we can make a function bigger by throwing away something positive from thedenominator if the denominator is positive (thereby making the denominator smaller) as inExamples 1.5 and 1.6.

We cannot throw away something that is negative as this would make the denominator bigger.E.g. in Example 1.6, we cannot throw away the −5, i.e.

12n−5

1

2neven for 2n > 5 .

In fact,

12n−5

>12n

⇔ 2n > 2n−5 for 2n−5 > 0 .

1.1.4 Moduli and square rootsTaking a square root of a square of a number results in obtaining the modulus of that number

√a2 = |a| .

Often a wrong formula is used by students in which one puts just a on the right hand side. If a isnegative we may get a wrong answer. Here is an example of such a mistake.

� Example 1.7 Find all solutions to the equation

x2 = 4 .

Solution Since boths sides are non-negative we can take the square root of boths sides:√

x2 =√

4 = 2

If we set erroneously√

x2 = x then we obtain only one solution x = 2. While if we use thecorrect formula

|x|= 2

we obtain two solutions: x =−2, x = 2. �

1.2 SequencesDefinition 1.2.1 A sequence is an ordered list of real numbers.

� Example 1.8 Here are a few examples of sequences:1. 1, 1

2 ,13 ,

14 , . . .

2. 1,−1,1,−1, . . .3. 1

2 ,−14 ,

18 ,−

116 , . . .

4. 1,2,3,4, . . .5. 1,21/2,31/3, . . .6. 2,1,3,4,7,11,18, . . .

Note that the numbers in a sequence are arranged in a given order – if you change the order,you change the sequence. For any integer n ≥ 1, the number in position n in the sequence iscalled the n-th term of the sequence. If the n-th term in a sequence is denoted an, then thecomplete sequence is denoted by1 (an). Often, an is given by a formula involving n, but thereneed not exist a formula for general sequences.

1In some textbooks curly brackets are used: {an}.

Page 11: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

1.3 Limits of sequences 11

Notation 1.2. N denotes the set of all positive integer numbers, i.e. N = {1,2,3, . . .}. Suchnumbers are called natural2.

From now on, the letter n will denote a number in N.

� Example 1.9 — Example 1.8 continued. The sequences of Example 1.8 can be written:1.(1

n

)2.((−1)n+1

)3.((−1)n+1

2n

)4. (n)5.(n1/n

)6. ?

While the formula for the n-th term of the last sequence is not obvious the sequence isgenerated starting from the first two terms via the recurrence relation: an+1 = an +an−1. Thenumbers in the sequence are called Lucas numbers, they are a close relative of the Fibonaccinumbers.

Definition 1.2.2 A sequence (an) is called bounded if there exists K > 0 such that

|an| ≤ K for all n≥ 1 . (1.1)

Note that K must not depend on n. (an) is unbounded if it is not bounded.

� Example 1.10 — Example 1.8 continued.

1. bounded – K = 1 will do (or any number bigger than 1).2. bounded, K = 1.3. bounded, K = 1

2 .4. unbounded.5. unbounded – proof: for every K ≥ 0, there is an integer n > K, so |an|= n > K; hence the

definition is not satisfied, so the sequence is not bounded.6. bounded, but it is not easy to prove it.7. unbounded

1.3 Limits of sequences

Consider the question: does a sequence (an) approach a particular real number (the limit) as youmove further and further along it?

For example, take an = 1− 1n . Here, when n is “large”, an is “close” to 1. This is rather vague.

We need a precise definition which incorporates the following points:1. The sequence might never reach the limit (e.g. the above sequence (an) with an = 1− 1

napproaches 1 but never reaches it).

2. The sequence should “eventually” get as close as we choose to the limit.3. We do not care how far along the sequence we have to go in order to get “close” (as in 2.)

to the limit.Definition 1.3.1 A sequence (an) converges to a limit L ∈ R if, given any ε > 0 there existsa positive integer N = N(ε) such that |an−L|< ε for all n > N.

2In some books zero is included into natural numbers.

Page 12: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

12 Limits

R Notes:1. an “close” to L here is taken to mean |an−L|< ε (i.e. L− ε < an < L+ ε) for each

ε . Since ε can be chosen arbitrarily small an gets “arbitrarily close” to L.2. “eventually” means for n > N, i.e. for n big enough.3. N generally depends on ε which is denoted by writing N = N(ε). If ε gets smaller,

N gets larger.

If no number L that fits the definition exists it is said that the limit does not exist or equiva-lently that the sequence at hand diverges.

Notation 1.3. If (an) converges to L, we write

limn→∞

an = L or an→ L as n→ ∞

(the n→ ∞ part indicates that n is getting larger and larger; the an→ L part indicates that an isapproaching L).

Often in analysis the following mathematical quantifiers (special symbols) are used:

Notation 1.4.

the symbol ∀ stands for "for all" or equivalently "for any"

Notation 1.5.the symbol ∃ stands for "there exists"

Also an implication is often denoted by an arrow: ⇒. Using these symbols the abovedefinition of a limit can be rewritten as follows:

limn→∞

an = L

means that ∀ε > 0 ∃N ∈ N such that ∀n > N |an−L|< ε .Let us look at some examples of how this definition can be used to rigorously prove that a

given sequence has a limit.

� Example 1.11 Prove that limn→∞

(1− 1

n

)= 1.

Solution We must use the definition. Here, an = 1− 1n , and the claim is that L = 1. Let ε > 0.

Then

|an−L|< ε ⇔ 1n< ε ⇔ n >

1ε.

Let N be an integer with N > 1ε. Then

n > N ⇒ n >1ε⇒ |an−L|< ε .

Thus, the definition is satisfied, and so we have proved that limn→∞

(1− 1

n

)= 1. �

� Example 1.12 Prove that limn→∞

2n−3n2+3n+1 = 0.

Solution Let ε > 0.∣∣∣∣ 2n−3n2 +3n+1

−0∣∣∣∣= ∣∣∣∣ 2n−3

n2 +3n+1

∣∣∣∣≤ 2n+3n2 +3n+1

≤ 2n+3nn2 =

5n,

Page 13: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

1.3 Limits of sequences 13

hence |an−0|< ε if n > 5ε. Choose an integer N > 5

ε, then we have

n > N ⇒∣∣∣∣ 2n−3n2 +3n+1

∣∣∣∣< ε ,

which proves the claim. �

R • We do not have to find the “best” N (whatever that means), so different choices of Ncan be equally valid. In particular, in a tutorial or exam situation, a different value ofN as compared to mine might be just as correct!

• To prove limn→∞

an = L, we typically follow a template:– First line: Let ε > 0.

– |an−L| ≤ · · · ≤ · · · ≤ something simple, typically a single negative power of n

– specify an integer N

– Last line: n > N ⇒ |an−L|< ε .

Let us look at more examples

� Example 1.13 Prove that limn→∞

2n2+n+2n2+1 = 2.

Solution Let ε > 0.∣∣∣∣2n2 +n+2n2 +1

−2∣∣∣∣= ∣∣∣∣2n2 +n+2−2n2−2

n2 +1

∣∣∣∣= nn2 +1

<nn2 =

1n.

Let N ∈ N satisfy N > 1ε. Then if n > N,∣∣∣∣2n2 +n+2

n2 +1−2∣∣∣∣< 1

ε.

� Example 1.14 Prove that limn→∞

cosnn = 0.

Solution Let ε > 0. Since |cosn| ≤ 1, we have∣∣∣cosnn−0∣∣∣≤ 1

n< ε if n >

1ε.

Hence, choosing N ∈ N satisfying N > 1ε, we have

n > N ⇒∣∣∣cosn

n−0∣∣∣< ε .

Notation 1.6.

max{a1,a2, . . . ,ak} stands for the maximum of the numbers: a1,a2, . . . ,ak .

For example max{1,−2,11,7.2}= 11.

Page 14: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

14 Limits

Theorem 1.3.1 Any convergent sequence is bounded.

Proof Let (an) be a sequence with limn→∞

an = L. Let ε = 1 (actually, any other choice ofε > 0 would do, but let us choose ε = 1 for simplicity). Then by definition there exists anN ∈ N such that

n≥ N ⇒ |an−L|< 1 .

Thus, for n≥ N,

|an|= |an−L+L| ≤ |an−L|+ |L| (by triangle inequality)

≤ 1+ |L| .

Now, let

M = max{|a1|, |a2|, . . . , |aN−1|} , K = max{M,1+ |L|} .

Then,

1≤ n≤ N−1 ⇒ |an| ≤M ≤ K

n≥ N ⇒ |an| ≤ 1+ |L| ≤ K ,

that is |an| ≤ K for all n (i.e. the definition of “bounded” is satisfied).

R The converse of Theorem 1.3.1 is not true.

� Example 1.15 ((−1)n) is bounded, but not convergent. �

To calculate limits of sequence the following theorem is instrumental

Theorem 1.3.2 If (an), (bn) are convergent sequences with limits A and B, respectively, then:(i) (an +bn) is convergent with limit A+B;

(ii) (anbn) is convergent with limit AB;(iii) (αan) is convergent with limit αA, for any α ∈ R;(iv) if bn 6= 0 for all n and B 6= 0, then

(anbn

)is convergent with limit A

B .Proof (i) follows straightforwardly from the triangle inequality for moduli. Let ε > 0.Since an→ A there exists a positive integer N = N(ε/2) such that |an−A| < ε/2 ∀n > N.Since bn→ B there exists a positive integer M = M(ε/2) such that |bn−B|< ε/2 ∀n > M.Therefore by triangle inequality

|an +bn−A−B|= |(an−A)+(bn−B)| ≤ |an−A|+ |bn−B|< ε

2+

ε

2= ε

for all integers n such that n > N and n > M. We can summarise both conditions by sayingthat n > K = max(N,M). Hence by definition an +bn→ A+B.

To prove (ii), let ε > 0.

|anbn−AB|= |an(bn−B)+B(an−A)| ≤ |an||bn−B|+ |B||an−A| .

Page 15: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

1.3 Limits of sequences 15

Since the sequence (an) is convergent, it is bounded (by Theorem 1.3.1), so there exists K > 0such that |an|< K for all n. Thus,

|anbn−AB| ≤ K|bn−B|+ |B||an−A| .

We want to make the right hand side smaller than ε , so we would like to make both summandssmaller than ε

2 .By the definition of convergence:

there exists Na ∈ N such that n≥ Na ⇒ |an−A|< ε

2(|B|+1);

there exists Nb ∈ N such that n≥ Nb ⇒ |bn−B|< ε

2K.

Thus letting N = max{Na,Nb}, we have

n≥ N ⇒ |anbn−AB|< ε

2+

ε

2= ε .

The proofs of (iii) and (iv) are similar.

R In the previous examples, we were given L and had to prove convergence directly usingthe definition. By using Theorem 1.3.2, we can often find what L is and prove convergenceby looking at individual bits of a complicated expression and using known results, as inthe next example.

� Example 1.16

limn→∞

3n2−6n+25n2−2n+3

= limn→∞

3− 6n +

2n2

5− 2n +

3n2

=3−0+05−0+0

=35.

We finish this section with some additional examples. The following example demonstratesthat when we specify how large an integer N can be chosen to achieve the accuracy given by ε

we need to give more than one condition.

� Example 1.17 Prove limn→∞

2n+5n3−5n2+n = 0.

Solution Let ε > 0. Consider

|an−L|=∣∣∣∣ 2n+5n3−5n2 +n

∣∣∣∣= 2n+5|n2(n−5)+n|

.

Since for n > 5 we have n2(n−5)> 0,

2n+5|n2(n−5)+n|

≤ 2n+5n2 · |n−5|

=2n+5

n2 ·∣∣n

2 +(n

2 −5)∣∣ .

When n > 10 we have(n

2 −5)> 0 and we can drop this expression from the denominator. We

obtain

|an−L| ≤ 2n+5n3/2

≤ 2n+5nn3/2

=14n2 .

Page 16: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

16 Limits

The last expression satisfies 14n2 < ε when n >

√14ε

. Thus we showed that |an−L|< ε provided

that n > 10 and n >√

14ε

. To ensure that both inequalities are satisfied we pick an integer

N > max{

10,√

14ε

}; then, for any n > N, |an−L|< ε . �

� Example 1.18 Prove

limn→∞

2n2 + e−n +(−1)n

(n+2)2−n · sin(n)= 2 .

Solution Let ε > 0. Consider

|an−L|=∣∣∣∣ 2n2 + e−n +(−1)n

(n+2)2−n · sin(n)−2∣∣∣∣= ∣∣∣∣e−n +(−1)n−8−8n+2n · sin(n)

n2 +4+n(4− sin(n))︸ ︷︷ ︸>0

∣∣∣∣≤∣∣∣∣e−n +(−1)n−8−8n+2n · sin(n)

n2

∣∣∣∣≤ e−n +1+8+8n+2n|sin(n)|

n2 (by triangle inequality)

≤ 1+1+8+8n+2nn2 =

10+10nn2 ≤ 10n+10n

n2 =20n.

Hence choosing an integer N > 20ε

,

n > N ⇒ |an−L|< ε .

1.4 Limits of functionsLet f (x) be a function of one variable.

Definition 1.4.1 The limit of a function f at a point a is L, written

limx→a

f (x) = L

if for every ε > 0 there exists δ > 0 such that whenever 0< |x−a|< δ we have | f (x)−L|< ε .

Intuitively this definition means that we can take the value f (x) arbitrarily close to L by takingthe argument x sufficiently close (but not equal) to a.

R Notes:1. For functions that are not defined on the entire real line we should demand that x in

the above definition is from the domain of f . Note that a does not need to be fromthe domain. In some examples a lies on the boundary of the domain.

2. δ generally depends on ε which we can emphasize by writing δ = δ (ε). If ε getssmaller, δ gets smaller too.

3. When the limit L = limx→a

f (x) exists and the function f is defined at x = a, i.e. the

value f (a) is specified, L may or may not coincide with f (a).

Here we give an example of how this definition can be used to show the existence (or absence)of limits for given f (x) and a:

� Example 1.19 Use ε , δ definition to show that

limx→1

(2−3x) =−1

Page 17: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

1.4 Limits of functions 17

Let ε > 0 be given. We need to have

| f (x)−L|= |(2−3x)− (−1)|= |3−3x|< ε

or equivalently−ε < 3−3x < ε

We rearrange this as−3− ε <−3x <−3− ε

Dividing all terms by −3 and reversing the inequalities we obtain

1− ε

3< x < 1+

ε

3

that means−ε

3< x−1 <

ε

3or equivalently |x−1|< ε

3.

To summarise we showed that the inequality |3−3x|< ε is satisfied (in this case it is equivalentto) whenever |x− 1| < ε

3 . Hence choosing δ = ε

3 we ensure that | f (x)− L| < ε whenever|x−a|< δ = ε

3 .�

� Example 1.20 Show using the ε , δ definition that the limit

limx→0

x|x|

does not exist.Note that in this definition the function f (x) = x

|x| is defined only for x 6= 0 and the pointa = 0 we choose for examining the limit is not from the domain.

We start by observing that for any x > 0 f (x) = 1 and for any x < 0 f (x) =−1. Restrictingthe values of x to be within distance δ from a = 0 we thus have

f (x) = 1 if 0 < x < δ

f (x) =−1 if −δ < x < 0

The values 1 and −1 are two units apart, while for any possible limit L, the numbers L− ε

and L+ ε are 2ε apart and ε can be chosen arbitrarily. Therefore if ε < 1 (e.g. ε = 1/2) it isimpossible to have

L− ε < f (x)< L+ ε ∀x 6= 0 ,−δ < x < δ

for any choice of L and δ > 0. This contradicts the definition which requires that for any ε > 0(in particular including the values ε < 1) such δ > 0 should exist. Therefore the limit at handdoes not exist.

The notions of the limit of a sequence and the limit of a function at a point are related. Inparticular we can reformulate the notion of a limit of a function in terms of sequences. This isdone by the following theorem.

Theorem 1.4.1 Let f (x) be a function with domain D⊂ R (a subset of real numbers). Thefollowing two statements are equivalent

(i)limx→a

f (x) = L

Page 18: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

18 Limits

(ii) For every sequence (xn) such that ∀n , xn ∈ D, xn 6= a and limn→∞

xn = a we have

limn→∞

f (xn) = L

Proof We first prove that (i) implies (ii). Suppose (i) holds. Then, given ε > 0 ∃δ = δ (ε)such that ∀x ∈ D

0 < |x−a|< δ ⇒ | f (x)−L|< ε . (1.2)

Suppose further that (xn) is a sequence such that ∀n , xn ∈ D ,xn 6= a and limn→∞

xn = a. This

means that taking δ chosen as above there exists a positive integer N = N(δ ) such that|xn− a| < δ ∀n > N. Since (1.2) is true for all x as long as |x− a| < δ we can apply it tox = xn that gives

| f (xn)−L|< ε ∀n > N .

Since ε was arbitrary this means that

limn→∞

f (xn) = L .

As this is true for all sequences xn satisfying the above conditions this proves (ii).

The proof of (ii)⇒ (i) is an example of a proof by contradiction which follows thefollowing pattern:• Suppose that the opposite of what you want to prove is true;• show that this supposition leads to a logical contradiction;• this implies that the supposition is false, so the statement you want to prove is true.Following the method assume that (ii) holds but that (i) is wrong. The latter means that

there exists ε > 0 such that for any δ > 0 there exists some x = x′ 6= a (which depends on δ )such that we simultaneously have

|x′−a|< δ and | f (x′)−L| ≥ ε .

Choose a sequence of positive numbers δn such that δn→ 0. By above for every δ = δn thereexists x′n 6= a such that

|x′n−a|< δn and | f (x′n)−L| ≥ ε .

Since this is true for any positive integer n we have

limn→∞

f (x′n) 6= L . (1.3)

On the other hand since δn → 0 for any ε ′ > 0 ∃N ∈ N such that δn < ε and therefore|x′n−a|< δn < ε . This means that

limn→∞

x′n = a (1.4)

Therefore (1.3) and (1.4) imply that (ii) is wrong. But since (ii) is assumed to hold oursupposition that (i) does not hold must be false. Therefore (ii) implies (i).

The last theorem shows that there are two equivalent definitions of the limit of a function:the ε , δ one and the one based on sequences. Although they are equivalent, using one rather thanthe other may be advantageous in solving particular problems.

The following theorem is very useful in calculating limits of functions

Page 19: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

1.5 Additional examples of (ε,δ )-proofs 19

Theorem 1.4.2 Let f (x) and g(x) be two functions and let

limx→a

f (x) = L , limx→a

g(x) = M

then(i)

limx→a

( f (x)+g(x)) = L+M

(ii)limx→a

( f (x) ·g(x)) = LM

(iii)

limx→a

f (x)g(x)

=LM

if M 6= 0

Proof The proof of this theorem follows from a combination of results of Theorem 1.3.2and Theorem 1.4.1 that allows us to use sequences to define limits of functions.

1.5 Additional examples of (ε,δ )-proofsIn this section we present more worked examples of fully worked (ε,δ )-proofs.

� Example 1.21 Prove the limit

limx→3

(−x2 +5x+1) = 7 .

Solution Here f (x) =−x2 +5x+1, a = 3, L = 7.Let ε > 0. Consider

| f (x)−L|= |− x2 +5x+1−7|= |− x2 +5x−6|

where we assume that 0 < |x−3|< δ where δ is to be specified below. We first factorise thequadratic polynomial at hand

−x2 +5x−6 = (3− x)(x−2)

(It is easy to factorise knowing that one of the roots must be x = a = 3). Thus we have

| f (x)−L|= |(3− x)(x−2)|= |x−3| · |x−2|

We know that one of the factors |x−3|< δ . It remains to estimate the second factor: |x−2|. Todo that assume that δ ≤ 1. Then we have

0 < |x−3|< 1 or equivalently −1 < x−3 < 1 and x 6= 3 .

Here the last condition: x 6= 3 comes from the 0< |x−a| inequality. We wrote it for completenesseven though it does not play any role in the estimates involved in choosing δ in the examples weconsider in this note. (It would be important in cases when the function f (x) is not defined forx = a.)

Continuing with the proof, we add 1 to all sides of the last inequality and obtain

0 < x−2 < 2 and x 6= 3

Hence |x−2|< 2 and we have

| f (x)−L|= |x−3| · |x−2|< 2δ

Page 20: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

20 Limits

Hence if, in addition to δ ≤ 1 we choose δ ≤ ε/2 we will ensure that

| f (x)−L|< 2 · ε2= ε.

Thus choosing

δ = min(

1,ε

2

)we will ensure that

0 < |x−a|< δ ⇒ | f (x)−L|< ε .

(Here and elsewhere min(a,b) stands for the minimum of two numbers, e.g. min(2,7) = 2.) �

� Example 1.22 Prove the limit

limx→−1

(x3 +7x) =−8 .

Solution Here f (x) = x3 +7x, a =−1, L =−8.Let ε > 0. Consider

| f (x)−L|= |x3 +7x− (−8)|= |x3 +7x+8|

where we assume that 0 < |x+ 1| < δ where δ is to be specified below. Since we know thatx3 +7x+8 vanishes at x =−1 we can factor out x+1 as

x3 +7x+8 = (x+1)(x2− x+8)

The roots of the remaining quadratic factor are complex so we are no going to factorise it further.For the first factor we know that |x+ 1| < δ . It remains to estimate |x2− x+ 8| from above.Assume that δ < 1 then we have

0 < |x+1|< 1 or equivalently −1 < x+1 < 1 and x 6=−1

that, subtracting 1 from all terms, we rewrite as

−2 < x < 0 .

We next find the maximum of the quadratic function x2− x+ 8 on the interval −2 < x < 0.The minimum of this parabola is at x = 1/2 that is to the right of this interval. Thus thisquadratic function decreases on this interval and its maximum is achieved at x =−2 and equals(−2)2− (−2)+8 = 14. Therefore, provided that δ ≤ 1 we have

|x2− x+8|= x2− x+8 < 14 (1.5)

and we finally estimate

| f (x)−L|= |x+1| · |x2− x+8|< 14δ .

Hence choosing

δ = min(

1,ε

14

)we ensure that

0 < |x−a|< δ ⇒ | f (x)−L|< ε .

Page 21: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

1.5 Additional examples of (ε,δ )-proofs 21

� Example 1.23 Prove the limit

limx→1

x+2x−2

=−3 .

Solution Here f (x) = x+2x−2 , a = 1, L =−3.

Let ε > 0. Consider

| f (x)−L|=∣∣∣∣x+2x−2

− (−3)∣∣∣∣= ∣∣∣∣x+2

x−2+3∣∣∣∣= ∣∣∣∣4x−4

x−2

∣∣∣∣where we assume that 0 < |x−1|< δ and δ is to be specified below. We rewrite this as

| f (x)−L|= 4|x−1| · 1|x−2|

. (1.6)

The first factor here |x−1|< δ and we need to estimate 1|x−2| . Suppose as we did before that

δ ≤ 1. This means that

0 < |x−1|< 1 or equivalently −1 < x−1 < 1 and x 6= 1 .

We can rewrite these conditions as

0 < x < 2 , x 6= 1 . (1.7)

On this interval the function 1|x−2| is unbounded as x can be arbitrarily close to x = 2 at which

point the denominator vanishes. Hence we need to pick a smaller δ . Assume δ ≤ 12 . This gives

us0 < |x−1|< 1/2 or equivalently −1/2 < x−1 < 1/2 and x 6= 1 .

By adding 1 to all terms we obtain

12< x <

32, x 6= 1 .

On this interval the function 1|x−2| is bounded. Its maximum is achieved when |x− 2| is the

smallest that is when x = 3/2. Therefore we have

1|x−2|

< 2

provided that δ ≤ 1/2. Combining estimates of both factors we obtain

| f (x)−L|= 4|x−1| · 1|x−2|

< 8δ .

Hence choosing

δ = min(

12,ε

8

)we ensure that

0 < |x−a|< δ ⇒ | f (x)−L|< ε .

Page 22: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

22 Limits

� Example 1.24 Prove the limit

limx→1

x2 +1x+1

= 1 .

Solution Here f (x) = x2+1x+1 , a = 1, L = 1.

Let ε > 0. Consider

| f (x)−L|=∣∣∣∣x2 +1

x+1−1∣∣∣∣= ∣∣∣∣x2− x

x+1

∣∣∣∣= |x−1| |x||x+1|

where we assume that 0 < |x−1|< δ and δ is to be specified below. Again, the first factor isbounded by δ and we need to find an upper bound for |x|

|x+1| . Assume δ ≤ 1. This gives

−1 < x−1 < 1 and x 6= 1 or equivalently 0 < x < 2 , x 6= 1 .

Rather than estimating the whole fraction |x||x+1| at once we will estimate separately the numerator

and the denominator because that is easier (divide an conquer!). The largest |x| can be on theinterval 0≤ x≤ 2 is 2 while the smallest |x+1| can be on the same interval is 1. Hence, on thesmaller interval 0 < x < 2,

|x||x+1|

< 2 , when |x−1|< 1 .

Therefore for δ ≤ 1

| f (x)−L|= |x−1| |x||x+1|

< 2δ .

Choosingδ = min

(1,

ε

2

)we ensure that

0 < |x−a|< δ ⇒ | f (x)−L|< ε .

Page 23: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Functions of several variablesLimits and Continuity

Limits of functions of two variablesContinuity

DifferentiationGraphs. Tangent Planes.Higher order partial derivativesThe chain rule and partial derivatives.Transforming equations.

2 — Multivariable differential calculus

2.1 Functions of several variables

A function f (x) of one variable is a rule taking a single number x and producing a new numberf (x), e.g. f (x) = x2 or f (x) = sin(x). Similarly, a function of two variables f (x,y) is a ruletaking two numbers x,y and producing a new number f (x,y), e.g.

f (x,y) = x2 + sin(y)

f (x,y) = x2y3 .

We do not have to stop at two variables, e.g. f (x,y,z) = x2y3z5 is a function of three variables.More generally,

f (x1,x2, . . . ,xn) = x1 + x2 + . . .+ xn (2.1)

is a function of n variables. Usually, for two and three variables, we will use the notation x,y orx,y,z, respectively, while for more variables we will use subscripts such as in xi.

We will often write

f : Rn→ R (2.2)

to say that f is a function of n variables taking values in the real numbers.

R Reminder:• R – the set of all real numbers• Z – the set of all integers• N – the set of all natural numbers (1,2,3, . . .)• Q – the set of all rational numbers

Sometimes a function does not make sense for arbitrary values of the variables and can onlybe defined on a restricted set called its domain.

R Reminder: Domains of some elementary functions:• f (x) = xµ

Page 24: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

24 Multivariable differential calculus

1. For µ ≥ 0, and µ ∈ Z or µ = mn ∈Q (where m,n ∈ Z, and where Q denotes the

rational numbers) with n odd,

D f = R1 ,

e.g. f (x) = x2/3.2. for µ < 0, and µ ∈ Z or µ = m

n ∈Q with n odd,

D f = {x ∈ R1 | x 6= 0} ,

e.g. f (x) = x−3/5.3. for µ > 0, and when µ is irrational or for µ = m

n ∈Q with n even,

D f = {x | x ∈ R , x≥ 0} ,

e.g. f (x) = x1/2 or f (x) = x√

2.4. for µ < 0 when µ is irrational or µ = m

n ∈Q with n even,

D f = {x | x ∈ R , x > 0} ,

e.g. f (x) = x−π or f (x) = x−1/4.• f (x) = loga(x) is defined for x > 0.

We write

f : D f → R

or

f : D→ R

to say that f takes numbers from the domain D f ⊂ Rn and assigns to them numbers in R.For a composite function constructed using elementary functions we can define its “natural

domain” to consist of a maximal set of points at which all elementary functions involved arewell defined, i.e. get arguments from their domains.

� Example 2.1 f (x,y) =√

1− x2− y2 only makes sense when x2 + y2 ≤ 1. Then, the naturaldomain of this function is D f = {(x,y) ∈R2|x2 +y2 ≤ 1, that is all points on the plane inside theunit circle:

� Example 2.2 Find the natural domain for

f (x,y) = ln[(1− x)(1− y)] .

Solution We need

(1− x)(1− y)> 0 ,

Page 25: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.1 Functions of several variables 25

so either

(1− x)> 0 , (1− y)> 0

or

(1− x)< 0 , (1− y)< 0 .

Therefore,

D f = {(x,y) ∈ R2 | x < 1 , y < 1 or x > 1 , y > 1} .

In the illustration, dashed lines are used to indicate that we do not include the lines themselves.Thus, D f consists of two quarter planes not including the boundaries. �

Note that in the above two examples functions of one variable were used to construct afunction of two (or more) variables. Sometimes, in such constructions, we do not specify all ofthe involved functions explicitly.

� Example 2.3 For example, let f : R1→ R1 be a function whose domain is the set of all realnumbers. Then

g(x,y) =√

y+ f (√

x−1)

defines a function of two variables with domain

Dg = {(x,y) ∈ R2 | x≥ 0 , y≥ 0} ⊂ R2 .

Another frequent construction is when given a function of many variables one constructs outof it a function of fewer variables by restricting the original variables.

� Example 2.4 Let

f (x,y) =x4

y2 −2xy (2.3)

be a function of two variables defined on R2. We define a new function of one variableg : R1→ R1 by the rule

g(x) = f(

x,x2

).

To obtain the explicit formula we have to substitute y = x/2 into (2.3). We obtain

g(x) = 3x2 .

Page 26: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

26 Multivariable differential calculus

� Example 2.5 With the relation between f and g as in example 2.3, determine the explicitforms of f and g given that

g(x,1) = x .

Solution

g(x,1) = 1+ f (√

x−1) = x

⇒ f (√

x−1) = x−1

⇒ g(x,y) =√

y+ x−1 .

To determine f explicitly, let w =√

x−1. Then√

x = 1+w, and for x≥ 0

x = (1+w)2 .

Hence f (w) = (1+w)2−1 = w2 +2w. This is the explicit form of f . �

2.2 Limits and Continuity2.2.1 Limits of functions of two variables

The ε-δ definition 1.4.1 of a limit for a function of one variable extends to functions of twovariables in the following way.

Definition 2.2.1 Let f by a function of two variables with domain D f ⊂ R2. We say that fhas a limit at (a,b) ∈ R2 (not necessarily from the domain D f ) with the value L and write

lim(x,y)→(a,b)

f (x,y) = L

if for every ε > 0 there exists δ > 0 such that whenever (x,y) ∈ D f , (x,y) 6= (a,b) and

|x−a|< δ , |y−b|< δ

we have | f (x)−L|< ε .

Similarly to Theorem 1.4.1 there is an equivalent definition of a limit of function of twovariables in terms of sequences:

Theorem 2.2.1 Let f (x) be a function of two variables with domain D f . The following twostatements are equivalent

(i)lim

(x,y)→(a,b)f (x) = L

(ii) For every pair of sequences (xn,yn) such that ∀n , (xn,yn) ∈ D f , (xn,yn) 6= (a,b) and

limn→∞

xn = a , limn→∞

yn = b

we havelimn→∞

f (xn,yn) = L

The proof of this theorem is similar to the proof of Theorem 1.4.1 and we will omit it.

� Example 2.6 Consider a function

g(x,y) =x2− y2

x2 + y2

Page 27: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.2 Limits and Continuity 27

defined for (x,y) 6= (0,0). Show that the following limit does not exist

lim(x,y)→(0,0)

g(x,y) .

Solution To show that the limit does not exist it suffices to present two sequences of pointsfrom the domain which both tend to the origin but for which the limits of values (if exist) aredifferent. Choosing first (xn,yn) = (1/n,1/n)→ (0,0) we find

limn→∞

f (1n,1n) = lim

n→∞

1n2 − 1

n2

1n2 +

1n2

= limn→∞

0 = 0 .

Choosing next (xn,yn) = (1n ,0)→ (0,0) we obtain

limn→∞

f (1n,0) = lim

n→∞

1n2 −02

1n2 +02

= limn→∞

1 = 1 .

Since these are two different numbers the limit at hand does not exist. �

We end this subsection by remarking that definition 2.2.1 and theorem 2.2.1 generalise tothree and more variables in a straightforward manner.

2.2.2 ContinuityRecall the definition of continuity for functions of one variable:

Definition 2.2.2 — Continuity at a point. A function f (x) is said to be continuous at apoint x = a if

limx→a

f (x) = f (a) .

It is assumed in the above definition that a ∈D f . The limit limx→a

f (x) must exist and must be equal

to the value f (a).

Definition 2.2.3 — Continuity. A function continuous at any point in its domain is calledcontinuous.

Page 28: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

28 Multivariable differential calculus

Definition 2.2.4 — Continuity at a point for a function of two variables. Similarly to theabove, a function of two variables f (x,y) with domain D f ⊂ R2 is called continuous at apoint (a,b) ∈ D f if

lim(x,y)→(a,b)

f (x,y) = f (a,b) .

In view of Theorem 2.2.1 this is equivalent to saying that for any sequences xn→ a and yn→ bsuch that (xn,yn) ∈ D f for all n, the limit lim

n→∞f (xn,yn) exists and

limn→∞

f (xn,yn) = f (a,b) .

The above definitions generalise to 3 and more variables in a straightforward manner. Usingvector notation with x ∈ Rn it can be stated as follows. Given a function f of n-variables it issaid to be continuous at a point a ∈ Rn from its domain if

limx→a

f (x) = f (a) .

A function (of any number of variables) continuous at very point in its domain is called continu-ous.

� Example 2.7 Consider a function of two variables

f (x,y) :=

{xy

x2+y2 for (x,y) 6= (0,0)

0 for (x,y) = (0,0)

defined on the entire R2. Show that this function is not continuous at (x,y) = (0,0).Solution Let xn =

1n , yn = 0 and n≥ 1 such that (xn,yn) approaches the point (0,0) along the

x-axis as n→ ∞. Then

limn→∞

xnyn

x2n + y2

n= lim

n→∞0 = 0 .

Now let xn =1n as before and yn =

1n , again with n > 1. Then

limn→∞

xnyn

x2n + y2

n= lim

n→∞

1n ·

1n

1n2 +

1n2

=12.

Thus, depending on how we approach the point (0,0), we get different limits. In particularfor the last sequence the limit lim

n→∞f (xn,yn) =

12 6= f (0,0) = 0, and we conclude that f is not

continuous at the point (0,0). �

It is not hard to show that the above function is continuous at every point (x,y) ∈ R2 exceptfor (x,y) = (0,0), which is thus an isolated discontinuity. In general, discontinuities can beconcentrated on curves for functions of two variables, on surfaces for functions of three variablesand so on.

� Example 2.8 The function

h(x,y) :=

{x2+y2

x2−y2 for x2 6= y2

1 for x2 = y2

defined on the entire R2, has a discontinuity along a pair of lines ±x = y. (This means that foreach point on this pair of lines function h is not continuous at it.) The function of three variables

g(x,y,z) :=

{1

x2+y2+z2−1 for x2 + y2 + z2 6= 1

0 for x2 + y2 + z2 = 1

Page 29: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.2 Limits and Continuity 29

defined on R3, is discontinuous on the unit sphere centred at the origin:

x2 + y2 + z2 = 1 .

R Note that to prove that a function is not continuous at a given point it is convenient touse the sequential definition of a limit of a function while to show that the function iscontinuous one typically uses the ε-δ definition. In general there is no straightforward(mechanical) way to determine whether the given function is or is not continuous at a givenpoint and one needs to investigate the problem both ways (i.e. if you tried to show that thefunction is not continuous using sequences but failed perhaps it is not. Then you changestrategy and try to show that it is continuous using the ε and δ definition).

To prove continuity of composite functions constructed using other functions which we knoware continuous (e.g. elementary functions) we can use the following theorem

Theorem 2.2.2 Let f ,g : Rn → R be two functions of n-variables. If f and g are eachcontinuous at a = (a1,a2, . . .an) ∈ Rn then the functions

α f (x)+βg(x) , f (x) ·g(x)

are continuous at a. Here α,β ∈ R are arbitrary constants. Also, if g(a) 6= 0 then the functionf (x)g(x) is continuous at x = a. Moreover, given two functions

f : Rn→ R h : R→ R

we can consider a composite function h : Rn→ R given by

h(x) = h( f (x)) .

If f (x) is continuous at x = a and h(y) is continuous at y = f (a) then h(x) is continuous atx = a.

The proof of this theorem relies on the basic properties of limits (c.f. Theorem 1.4.2).

R As a consequence of the above theorem polynomials in any number of variables arecontinuous at any point. Also, rational functions are continuous at any point where theyare defined, i.e. excluding the points where the denominator vanishes but the numeratordoes not.

Sometimes we may have points which are not in the domain but at which the limit of thefunction exists. Such point can be added to the domain by assigning the value of the function tobe given by the value of the limit. This is called extension by continuity as we extend the domainby adding a new point in such a way that the function is continuous at that point.

� Example 2.9 Determine whether the function

f (x,y) = xy

defined for x > 0 and y > 0, can be made continuous at (0,0). (In other words determine whetherthe domain of f can be extended by continuity to include (0,0).)

Solution The value of the function at (0,0) is not defined. Can we modify the definition of fsuch that the function becomes continuous? Note that

f (0,y) = 0y = 0

Page 30: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

30 Multivariable differential calculus

for any y > 0, thus picking (xn,yn) = (0, 1n)→ (0,0) we get

limn→∞

f (xn,yn) = limn→∞

01n = lim

n→∞0 = 0 .

On the other hand, for (xn,yn) = (1n ,0)→ (0,0),

limn→∞

f (xn,yn) = limn→∞

(1n

)0

= limn→∞

1 = 1 .

We can choose to assign f (0,0) to be 0 or 1 (or any other number), but f cannot be madecontinuous. �

2.3 DifferentiationDefinition 2.3.1 — Partial derivatives. Consider f : R2→ R (a function of two variables)and let (x0,y0) ∈ R2. The partial derivatives of f at (x0,y0) denoted

∂ f∂x

(x0,y0) ,∂ f∂y

(x0,y0)

are defined as

∂ f∂x

(x0,y0) = lim∆x→0

f (x0 +∆x,y0)− f (x0,y0)

∆x,

∂ f∂y

(x0,y0) = lim∆y→0

f (x0,y0 +∆y)− f (x0,y0)

∆y.

(2.4)

This definition means that to define ∂ f∂x we consider f (x,y) as a function of x only, keeping y = y0

fixed, and differentiate with respect to x at the point x0 as a function of one variable. Similarly,to define ∂ f

∂y one fixes x and differentiates with respect to y at y0.

� Example 2.10 For

f (x,y) = x2 + y3 ,

fix y = y0, and consider

f (x,y0) = x2 + y30

as a function of x only. Then in differentiating it with respect to x, we treat y30 as a constant,

hence

∂ f∂x

(x0,y0) = 2x0 .

Similarly, fixing x = x0 we consider

f (x0,y) = x20 + y3

as a function of y only, and obtain

∂ f∂y

(x0,y0) = 3y20 .

Page 31: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.3 Differentiation 31

Often we do not care about a specific point (x0,y0) and we just work out ∂ f∂x (x,y),

∂ f∂y (x,y) at

any point (x,y). In this case we often just write

∂ f∂x

,∂ f∂y

.

Other alternative notations are

∂x f (x,y) , ∂y f (x,y)

or

fx(x,y) , fy(x,y)

where the arguments sometimes may be omitted for brevity.Here are some more explicit examples of functions and their partial derivatives.

� Example 2.11 For

f (x,y) = x3 +3xy+ y2 ,

we calculate

fx =∂ f∂x

=∂ f∂x

(x,y) = 3x2 +3y ,

fy =∂ f∂y

=∂ f∂y

(x,y) = 3x+2y ,

For

f (x,y) =xy,

we calculate

∂ f∂x

=1y,

∂ f∂y

=− xy2 .

Similarly, if f : Rn→ R we define ∂ f∂xi

for each label i = 1,2, . . . ,n. �

� Example 2.12 For

f (x1,x2,x3,x4) = x21 + x3

2 + x43 + x5

4

we have

∂ f∂x3

= 4x33 .

For

f (x,y,z) = xy ln(z)

we have

∂ f∂ z

=xyz.

Page 32: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

32 Multivariable differential calculus

� Example 2.13 For

f (x,y) = xy ,

find fx, fy.

Solution To find fx, we fix y. Then xy is just an ordinary power function of x so that

fx =∂xy

∂x= y · xy−1 .

To find fy, we first rewrite f as

f (x,y) = ey ln(x) .

Treating x as a constant and using chain rule we obtain

fy =∂ey ln(x)

∂y= ln(x) · ey ln(x) = ln(x) · xy .

Sometimes functions are not given by a single formula that uses elementary functions. Inthis case to calculate partial derivatives one needs to use the definition 2.3.1 in terms of limits.

� Example 2.14 A function of two variables f (x,y) is defined as follows

f (x,y) =

2x3 + xy+4y4

sin2(2x)+ sin2(3y)for (x,y) 6= (0,0)

0 for (x,y) = (0,0)(2.5)

Calculate the values∂ f∂x

(0,0) ,∂ f∂y

(0,0) .

Solution Because at the point (0,0) the formula defining the function at the top row of itsdefinition (2.5) is not valid we need to use the definition of partial derivatives in terms of limits2.3.1. We obtain

∂ f∂x

(0,0) = lim∆x→0

f (∆x,0)− f (0,0)∆x

= lim∆x→0

2(∆x)3

sin2(2∆x)∆x= lim

∆x→0

2(∆x)2

sin2(2∆x)= lim

∆x→0

12

(2∆x

sin(2∆x)

)2

=12·12 =

12

(2.6)

where in the last line we have used the limit

limx→0

sinkxkx

= 1 , k 6= 0 . (2.7)

Similarly, we calculate

∂ f∂y

(0,0) = lim∆y→0

f (0,∆y)− f (0,0)∆y

= lim∆y→0

4(∆y)4

sin2(3∆y)∆y

= lim∆y→0

4(∆y)3

sin2(3∆y)= lim

∆y→0

49

(3∆y

sin(3∆y)

)2

∆y =49·12 ·0 = 0 . (2.8)

Page 33: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.4 Graphs. Tangent Planes. 33

2.4 Graphs. Tangent Planes.The graph of f : R→ R is the set of points in R2: {(x, f (x)|x ∈ R}, for example:

Similarly the graph of f : R2→ R is the set of points in the three dimensional space

{(x,y, f (x,y))|(x,y) ∈ R2} ⊂ R3 ,

for example:

Here, the graph is a two-dimensional surface in R3 with height f (x,y) above the point (x,y).

� Example 2.15 For a function

f (x,y) = ax+by+ c

the graph is a plane in R3 given by the equation

z = ax+by+ c .

Note that the intersection of this plane with the y = 0 (i.e. the xz-) coordinate plane is a straightline, z = by+ c, with slope

b =∂ f∂y

,

Page 34: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

34 Multivariable differential calculus

while the intersection with the x = 0 (i.e. the yz-) coordinate plane is a straight line, z = ax+ c,with slope

a =∂ f∂x

.

Recall the geometric definition of a tangent line to a graph of a function of one variable. Letf (x) be a function of variable defined on an interval containing a point x = x0. Consider a secantline Lx′ that passes through two points on the graph of function f : (x0, f (x0)) and (x′, f (x′)). Wesay that at x = x0 there exists a tangent line L to the graph of f (x) if the angle θ between L andthe secant line Lx′ goes to zero as x′→ x0. If the function f has a derivative f ′(x0) defined atx = x0 then the value f ′(x0) gives the slope of the tangent line at x0, so that the equation of thetangent line is

y = (x− x0) ·d fdx

(x0)+ f (x0) . (2.9)

Similarly, for f : R2→ R, a plane T passing through a point on the graph P = (x0,y0, f (x0,y0))is called a tangent plane at (x,y) = (x0,y0) if for any point on the graph P′ = (x′,y′, f (x′,y′)) theangle between T and the vector

−→PP′ tends to zero as P′→ P.

If the graph of f has a tangent plane at (x0,y0, f (x0,y0)), and if partial derivatives of f aredefined at (x0,y0) then the tangent plane is defined by the equation

z = (x− x0) ·∂ f∂x

(x0,y0)+(y− y0) ·∂ f∂y

(x0,y0)+ f (x0,y0) . (2.10)

Note that in this equation the only variables are x,y,z, so that the equation is linear in thesevariables, while the rest of the quantities are numbers that depend on the chosen point (x0,y0).

Thus, partial derivatives allow us to find the explicit equation for a tangent plane.

Page 35: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.4 Graphs. Tangent Planes. 35

R The intersections of the tangent plane with x = x0 and y = y0 planes (parallel to thecoordinate planes) are straight lines with the slopes fy(a,y0), fx(x0,y0), respectively. Thisgeneralizes the geometric interpretation of the derivative of a function of one variable.

� Example 2.16 Find the tangent plane to the graph of f (x,y) = 2− x2− y2 at the point withx0 = 1/2, y0 = 1.

Solution The graph of f is a surface in R3 with coordinates x,y,z given by the equation

z = 2− x2− y2 .

We work out the value z0 = f (x0,y0) = 2−1/4−1 = 3/4.

The surface z = 2− x2− y2 is a paraboloid of revolution whose symmetry axis is the z-axis. Theintersection with the xy-plane (z = 0) is the circle x2 + y2 = 2. We further find

fx =−2x , fy =−2y ,

so that

fx

(12,1)=−1 , fy

(12,1)=−2 .

Hence the tangent plane equation is

z = (−1) ·(

x− 12

)+(−2) · (y−1)+

34=−x−2y+

134.

The intersection with the y = 1 plane is a parabola

z = 2− x2−1 = 1− x2 .

Page 36: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

36 Multivariable differential calculus

The slope of the tangent line at x = 12 is −1, which is the value of fx:

The intersection with the x = 12 plane is a parabola

z = 2− 14− y2 =

74− y2 .

The slope of the tangent line to this parabola at y = 1 is −2, which is the value of fy:

The tangent plane

z =−x−2y+134

contains both of the above tangent lines.

As a final example, note that if we take (x,y) = (0,0), then

fx(0,0) = fy(0,0) = 0 ,

Page 37: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.4 Graphs. Tangent Planes. 37

which means that at the top of the graph the tangent lines are flat and the tangent plane is parallelto the xy-plane:

Gradient and Directional derivatives1

From the above discussion it is clear that, thinking geometrically, partial derivatives can bethought of as derivatives in the directions along the coordinate axes. This observation leads to anatural generalization of partial derivatives to that of directional derivatives. To define that wefirst define what a gradient of a function is.

Let f : Rn→ R be a function of n-variables denoted x1,x2, . . . ,xn. A gradient of f denotedgrad f (x1, . . . ,xn) is defined to be an n-vector with components

grad f (x1, . . . ,xn) =

(∂ f∂x1

,∂ f∂x2

, . . . ,∂ f∂xn

)(2.11)

� Example 2.17 Find grad f for f (x,y,z) = xy2 + zxy+ e2z +7.Evaluating the partial derivatives we obtain

grad f = (y2 + zy,2xy+ zx,xy+2e2z) .

Consider now a vector~A = (A1,A2, . . . ,An) ∈ Rn

of unit length. The unit length condition means that√A2

1 +A22 + · · ·+A2

n = 1 .

Unit length vectors define directions. One defines a directional derivative for f along ~A as

∂~A f (x1, . . . ,xn) = lim∆t→0

f (x1 +∆tA1,x2,x2 +∆tA2, . . . ,xn +∆tAn)− f (x1,x2, . . . ,xn)

∆t1This material is optional, it won’t be in the assessment

Page 38: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

38 Multivariable differential calculus

We observe from this definition that when ~A is directed along one of the coordinate axes thisdefinition gives the partial derivative in the corresponding variable. More generally one can showthat

∂~A f (x1, . . . ,xn) = grad f ·~A = A1∂1 f +A2∂2 f + . . .An∂n f .

This means that directional derivatives can be evaluated as linear combinations of partial deriva-tives.

� Example 2.18 Let f (x,y) = 12 x4 + y3. Calculate the directional derivative along

~A =1√5(1,2) ∈ R2

at the point (−1,1) Since fx = 2x3, fy = 3y2 we have fx(−1,1) =−2, fy(−1,1) = 3 so that

∂~A f (−1,1) = A1 fx(−1,1)+A2 fy(−1,1) =1√5· (−2)+

2√5·3 =

4√5

We will not be using gradient and directional derivatives in the rest of this course. They willbe further discussed in the 3rd year Vector Analysis course (F19MV).

2.5 Higher order partial derivatives

If f : R2 → R, then ∂ f∂x is also a function of two variables. Thus we can consider its partial

derivatives

∂x

(∂ f∂x

)=

∂ 2 f∂x2 = fxx ,

∂y

(∂ f∂x

)=

∂ 2 f∂y∂x

= fxy , (2.12)

where we exhibited different notations used for these second order partial derivatives.Similarly we can consider

∂x

(∂ f∂y

)=

∂ 2 f∂x∂y

= fyx ,∂

∂y

(∂ f∂y

)=

∂ 2 f∂y2 = fyy . (2.13)

� Example 2.19 For f (x,y) = x3−4xy2 we calculate

∂ f∂x

= 3x2−4y2 ,∂ f∂y

=−8xy ,∂ 2 f∂x2 = 6x ,

∂ 2 f∂y∂x

=−8y ,∂ 2 f

∂x∂y=−8y ,

∂ 2 f∂y2 =−8x .

Theorem 2.5.1 — The mixed derivatives theorem. Consider f : D→ R for some D⊂ R2.If fx, fy, fxy, fyx exist at any (x,y) ∈ D and moreover the functions fxy, fyx are continuous,then

fxy(x,y) = fyx(x,y) for any (x,y) ∈ D .

When the conditions of this theorem are violated the mixed derivatives can be different. Thishappens in the following example.

Page 39: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.5 Higher order partial derivatives 39

� Example 2.20 Consider a function defined so that

f (x,y) = xyx2− y2

x2 + y2 for (x,y) 6= (0,0)

and f (0,0) = 0. We find

∂ f∂x

= y ·(

x2− y2

x2 + y2 +4x2y2

(x2 + y2)2

)for (x,y) 6= (0,0). To get the value fx(0,0), we use the general definition:

∂ f∂x

(0,0) = lim∆x→0

(∆x · y · ∆x2− y2

(∆x)2 + y2 −0)1

∆x

)∣∣∣y=0

= 0 .

Substituting in the first expression (x,y) = (0,y), we find

∂ f∂x

(0,y) =−y .

Furthermore, by definition,

∂ 2 f∂y∂x

(0,0) = lim∆y→0

(∂ f∂x

(0,∆y)− ∂ f∂x

(0,0)) 1

∆y=−1 .

Similarly,

∂ f∂y

= x(

x2− y2

x2 + y2 −4x2y2

(x2 + y2)2

)for (x,y) 6= (0,0). Also,

∂ f∂y

(x,0) = x and∂ 2 f

∂x∂y(0,0) = 1 .

Thus for this function,

∂ 2 f∂y∂x

(0,0) =−1 6= ∂ 2 f∂x∂y

(0,0) = 1 .

In this course we will predominantly deal with functions for which all derivatives are continuousin a given domain and thus the mixed derivatives will coincide.

R We can easily generalize the definition of higher derivatives to functions of any number ofvariables. The above theorem generalizes to higher order derivatives.

� Example 2.21 Let f : R→ R and let

u(x,y) = f(y

x

)+2xy

1. Show that

x ·ux + y ·uy = 4xy (2.14)

Page 40: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

40 Multivariable differential calculus

2. Deduce that

x2 ·uxx +2xy ·uxy + y2 ·uyy = 4xy (2.15)

Solution First we calculate using chain rule

ux =−yx2 · f ′

(yx

)+2y , uy =

1x· f ′(y

x

)+2x .

Hence

x ·ux + y ·uy =−yx· f ′(y

x

)+2xy+

yx· f ′(y

x

)+2xy = 4xy ,

and this is what we had to show in part 1 of the problem.

To do part 2, we first differentiate formula (2.14) with respect to x. This gives

ux + xuxx + yuxy = 4y .

Hence multiplying this by x we obtain

xux + x2uxx + xyuxy = 4xy . (2.16)

Differentiating (2.14) with respect to y gives

xuyx +uy + yuyy = 4x .

Multiplying the last expression by y we obtain

xyuyx + yuy + y2uyy = 4xy .

Adding together the last equation and equation (2.16) we get

x2uxx +2xyuxy + y2uyy + xux + yuy = 8xy .

Using (2.14) in the last expression we finally obtain (2.15). �

� Example 2.22 For the function

f (x,y,z) =xyz

(y2 + z2)2 ,

find fyxzx away from the points with y = z = 0.

Solution By the mixed derivatives theorem 2.5.1,

fyxzx = fxxyz

in the region at hand. We calculate

fx =yz

(y2 + z2)2 , fxx = 0 .

Therefore,

fyxzx = 0 .

Page 41: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.6 The chain rule and partial derivatives. 41

� Example 2.23 Let f : R1→ R1 be a function of one variable. Consider the function h : R2→R1, defined in terms of f as

h(x,y) = f 3(x− y2) =[

f (x− y2)]3

.

Determine hx(x,y), hy(x,y) and hxy(x,y) in terms of f , the variables x and y, and in terms of thederivatives f ′ and f ′′.

Solution

hx = 3 f 2(x− y2) · ∂ f (x− y2)

∂x= 3 f 2(x− y2) · f ′(x− y2)

hy = 3 f 2(x− y2) · ∂ f (x− y2)

∂y= 3 f 2(x− y2) · f ′(x− y2) · (−2y)

hxy =∂

∂y

[3 f 2(x− y2) · f ′(x− y2)

]= 3 ·2 f (x− y2) · f ′(x− y2) · (−2y) · f ′(x− y2)+3 f 2(x− y2) · f ′′(x− y2) · (−2y) .

2.6 The chain rule and partial derivatives.Suppose f is a function of x and x is a function of u so that we have a composite functionh(u) = f (x(u)). Then the chain rule says that

dh(u)du

(u) =d f (x(u))

dx(x(u)) · dx(u)

du(u) . (2.17)

It is customary to shorten the notations in this equation to

dhdu

=d fdx· dx

du,

or even to the form

d fdu

=d fdx· dx

du.

Consider now a function f : R2→ R1 of two variables x and y, where x and y are each functionsof u and v. Let

h(u,v) := f (x(u,v),y(u,v))

dentote the composite function.

Theorem 2.6.1 If the functions d fdx and d f

dy are continuous, then

∂h(u,v)∂u

=∂ f∂x

(x(u,v),y(u,v)) · ∂x∂u

(u,v)+∂ f∂y

(x(u,v),y(u,v)) · ∂y∂u

(u,v) , (2.18)

or, for brevity,

∂h∂u

=∂ f∂x· ∂x

∂u+

∂ f∂y· ∂y

∂u.

Page 42: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

42 Multivariable differential calculus

By some abuse of notations, we can also write

∂ f∂u

=∂ f∂x· ∂x

∂u+

∂ f∂y· ∂y

∂u∂ f∂v

=∂ f∂x· ∂x

∂v+

∂ f∂y· ∂y

∂v.

(2.19)

The theorem easily generalizes to functions of more variables, e.g. for f (x,y,z) with x = x(u,v),y = y(u,v) and z = z(u,v), we have

∂ f∂u

=∂ f∂x· ∂x

∂u+

∂ f∂y· ∂y

∂u+

∂ f∂ z· ∂ z

∂u.

Note that the number of variables can change when we form a composite function. For example,for f (x,y) with x = x(u) and y = y(u), the composite function h(u) = f (x(u),y(u)) is a functionof one variable, with

dhdu

=∂ f∂x· ∂x

∂u+

∂ f∂y· ∂y

∂u.

As another example, consider f (x) with x = x(u,v), so that h(u,v) := f (x(u,v)) is a function oftwo variables, with

∂h∂u

=d fdx· ∂x

∂u,

∂h∂v

=d fdx· ∂x

∂v.

� Example 2.24 Let f (x,y) = x2 + y, x = u2 + v and y = v−u. Find ∂ f∂u

(i) by substitution, and(ii) by using the chain rule.

Solution

(i) f = (u2 + v)2 + v−u = u4 +2u2v+ v2 + v−u

⇒ ∂ f∂u

= 4u3 +4uv−1 .

(ii)∂ f∂u

=∂ f∂x· ∂x

∂u+

∂ f∂y· ∂y

∂u= 2x ·2u+1 · (−1)

= 4u(u2 + v)−1 .

Here, in the second to last line, we have inserted the explicit formula for x in terms of u and v inorder to obtain an answer expressed just in terms of these two variables. �

Sometimes the “native” variables are not specified for all of the constituent functions. In thiscase we just introduce them.

� Example 2.25 Let f be a function of two variables with continuous first order partial deriva-tives. A function of three variables h is defined as

h(x,y,z) = x · ( f (x,ey)+ f (xyz,z2)) .

Express the partial derivatives hx, hy, hz in terms of the function f and its partial derivatives. Showall arguments. Solution To differentiate correctly we need to denote somehow the “native”

Page 43: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

2.7 Transforming equations. 43

variables of f . Any notation will do as long as they are distinct from x,y,z. Let f = f (u,v). Thenour task is to express hx, hy, hz in terms of the two types of partial derivatives of f : fu and fv.Applying the product rule and the chain rule we obtain

hx(x,y,z) = f (x,ey)+ f (xyz,z2)+ x · ( fu(x,ey)+ fu(xyz,z2) · yz) .

Similarly, applying the chain rule we obtain

hy(x,y,z) = x · ( fu(xyz,z2) · xz+ fv(x,ey) · ey) ,

hz(x,y,z) = x · ( fu(xyz,z2) · xy+ fv(x,ey) ·2z) .

Note that the final answer should be always expressed in terms of the variables appearing on theleft hand side: x,y,z. �

� Example 2.26 Let f be a function of x and y with x = u+ v and y = u · v. Find formulae for∂ f∂v and ∂ 2 f

∂u∂v in terms of the partial derivatives of f w.r.t. x and y.

Solution

∂x∂u

= 1 ,∂x∂v

= 1 ,∂y∂u

= v ,∂y∂v

= u

⇒ ∂ f∂v

=∂ f∂x· ∂x

∂v+

∂ f∂y· ∂y

∂v=

∂ f∂x

+u · ∂ f∂y

∂ 2 f∂u∂v

=∂

∂u

[∂ f∂x

+u · ∂ f∂y

]=

∂u

(∂ f∂x

)+

∂u

(u · ∂ f

∂y

)=

∂u

(∂ f∂x

)+u · ∂

∂u

(∂ f∂y

)+

∂ f∂y

.

Here ∂ f∂x and ∂ f

∂y are composite functions of u and v. So, we may use the same chain rule toevaluate the remaining partial derivatives w.r.t. u:

∂u

(∂ f∂x

)=

∂x

(∂ f∂x

)· ∂x

∂u+

∂y

(∂ f∂x

)· ∂y

∂u=

∂ 2 f∂x2 + v · ∂ 2 f

∂y∂x∂

∂u

(∂ f∂y

)=

∂x

(∂ f∂y

)· ∂x

∂u+

∂y

(∂ f∂y

)· ∂y

∂u=

∂ 2 f∂x∂y

+ v · ∂2 f

∂y2 .

Therefore, using the mixed derivatives theorem, we finally obtain

∂ 2 f∂u∂v

=∂ 2 f∂x2 +uv · ∂

2 f∂y2 +(u+ v) · ∂ 2 f

∂x∂y+

∂ f∂y

.

2.7 Transforming equations.Sometimes equations can be simplified by changing variables.

� Example 2.27 Consider an equation involving the partial derivatives of some functionw = w(x,y):

wx +wy = 0 .

Page 44: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

44 Multivariable differential calculus

Suppose that x = u+v and y = u−v. Transform the equation so that it is expressed in terms of uand v.

Solution

wx =∂w∂u· ∂u

∂x+

∂w∂v· ∂v

∂x, wy =

∂w∂u· ∂u

∂y+

∂w∂v· ∂v

∂y.

We have that u = (x+y)2 and v = (x−y)

2 , so

∂u∂x

=12,

∂u∂y

=12,

∂v∂x

=12,

∂v∂y

=−12.

Hence

wx =12

wu +12

wv , wy =12

wu−12

wv ,

so the equation becomes

wx +wy =12(wu +wv +wu−wv) = 0 ,

i.e. wu = 0 .

Page 45: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Implicit functions.Implicit differentiation.

More variablesMore equations

Differentiable functions of two variablesTaylor’s ExpansionTaylor’s formula in two dimensionsFunctions f : Rn→ Rm

Total derivativesVarious theorems about total derivativesMore applications

3 — Applications of partial derivatives

3.1 Implicit functions.Definition 3.1.1 — C1-class function. A function f : Rn→ R is called a C1-class functionif all of its partial derivatives exist and are continuous.

Definition 3.1.2 — Solution function. Consider an equation of the form

f (x,y) = 0 . (3.1)

A solution of this equation is simply any pair of numbers, say, (a,b), for which f (a,b) = 0.We will say that a function y(x) is a solution function if f (x,y(x)) = 0 for all x ∈ Dy, whereDy denotes the domain of y(x). Similarly, we could have a solution function x(y) such thatf (x(y),y) = 0 for all y ∈ Dx, where Dx denotes the domain of x(y).

� Example 3.1 Consider the equation

x2 + y2 = 1 .

We can solve this equation for y as a function of x, and we find two solution functions:

y =√

1− x2 , y =−√

1− x2 , −1≤ x≤ 1 .

We could also solve for x as a function of y, resulting in

x =√

1− y2 , x =−√

1− y2 , −1≤ y≤ 1 .

In principle, there is nothing special about which variable we solve for, but in practice itmight be much easier to solve for one variable rather than the other.

� Example 3.2 The equation

y− x− 12

siny = 0

can be easily solved for x(y) = y− 12 siny, but cannot be solved explicitly for y(x). �

Page 46: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

46 Applications of partial derivatives

Very often, we cannot solve explicitly for either variable.

� Example 3.3 The equation

ln√

x2 + y2 = tan−1(y

x

)cannot be solved explicitly for either variable. �

In general, any equation of the form f (x,y) = 0 is said to define its solution functionsimplicitly (if they exist).

3.2 Implicit differentiation.Suppose y(x) is a solution function for f (x,y) = 0. We can calculate the derivative dy

dx usingpartial derivatives and the chain rule. Differentiating f (x,y(x)) = 0 with respect to x, we obtain

∂ f∂x

+∂ f∂y· ∂y

∂x= 0 ,

hence

dydx

=− fx

fy. (3.2)

This formula is called the implicit differentiation formula.

� Example 3.4 Let us find dydx for y =

√1− x2 from Example 3.1 (with f (x,y) = x2 +y2−1) by

(i) explicit differentiation, and by(ii) using the implicit differentiation formula.

Solution

(i)ddx

√1− x2 =− x√

1− x2

(ii)dydx

=− fx

fy=−2x

2y=− x√

1− x2,

where in the last step we substituted y =√

1− x2. �

A general solution to f (x,y) = 0 may consist either of many solutions, exactly one, or nosolutions. The implicit function theorem to be formulated shortly is a useful theorem aboutthe existence of solutions to such equations. The basic idea of the theorem is that if you canfind a particular solution point (a,b), you can then try to find a solution function giving nearbysolutions. In Example 3.1, all solutions are given by points on a unit circle:

Page 47: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.2 Implicit differentiation. 47

The solution y =√

1− x2 with −1≤ x≤ 1 covers the upper semi-circle – in the graphics above,the solution point (0,1) is marked as an example. The other solution, y = −

√1− x2 with

−1≤ x≤ 1, covers the lower semi-circle. Note in particular that the lower semi-circle does notinclude the point (0,1).

For a general equation, we cannot expect to find solutions defined everywhere (globally).Finding a local solution function near a given solution point is the best we can do in general.

Theorem 3.2.1 — The implicit function theorem. Suppose f : R2→ R is a C1-class func-tion and that there exists a point (a,b) ∈ R2 such that

f (a,b) = 0 and fy(a,b) 6= 0 . (3.3)

Then there exists a C1-class solution function y(x) defined in a neighborhood of x = a suchthat

y(a) = b

f (x,y(x)) = 0 for all x ∈ Dy

dydx

(a) =− fx(a,b)fy(a,b)

.

(3.4)

Moreover, there exists no other C1-class solution y(x) with y(a) = b.

R In the above theorem, fy(a,b) 6= 0 is needed in order for dydx (a) to be well-defined.

In Example 3.2, (a,b) = (0,0) is a solution to y− x− 12 siny = 0. Since fy = 1− 1

2 cosy andfy(0) = 1− 1

2 6= 0, by virtue of the implicit function theorem there exists a C1-class solutionfunction y(x) in some neighborhood of x = 0.

In Example 3.3, (x,y) = (1,0) is a solution point. We have

fy =y

x2 + y2 −1

1+( y

x

)2 ·(

1x

),

so fy(1,0) =−1 6= 0. Hence, according to the implicit function theorem there exists a C1-classsolution function y(x) in some neighborhood of x = 1.

3.2.1 More variablesAll of the above generalizes to functions of more variables. For example, an equation like

f (x,y,z) = 0 (3.5)

defines either x, y or z implicitly as a function of the other two variables. Suppose we want to ex-press z as a function of (x,y), i.e. we want to find a solution function z(x,y). Differentiating (3.5)with respect to x gives (using the partial derivative chain rule)

fx + fz ·∂ z∂x

= 0 ⇒ ∂ z∂x

=− fx

fz,

where we used that ∂y∂x = 0, since x and y are independent variables here. Similarly,

fy + fz ·∂ z∂y

= 0 ⇒ ∂ z∂y

=−fy

fz.

Page 48: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

48 Applications of partial derivatives

� Example 3.5 Suppose z is defined implicitly by

z2 + y7 +5zy

x2 +1= x .

Find ∂ z∂x and ∂ z

∂y .

Solution

f (x,y,z) = z2 + y7 +5zy

x2 +1− x

⇒ ∂ z∂x

=−

(− 5zy

(x2+1)2 · (2x)−1)

(2z+ 5y

x2+1

) ,∂ z∂y

=−

(7y6 + 5z

x2+1

)(

2z+ 5yx2+1

) .

Theorem 3.2.2 — The implicit function theorem (3-variable case).Suppose that f : R3→ R has partial derivatives and that there exists a point (x,y,z) = (a,b,c)such that

f (a,b,c) = 0 and fz(a,b,c) 6= 0 . (3.6)

Then there exists a solution function z(x,y) defined near (x,y) = (a,b) such that:

z(a,b) = c

f (x,y,z(x,y)) = 0∂ z∂x

(a,b) =− fx(a,b,c)fz(a,b,c)

,∂ z∂y

=−fy(a,b,c)fz(a,b,c)

,

(3.7)

and there exists no other differentiable solution function z(x,y) with z(a,b) = c.

� Example 3.6 Consider the equation

z2 +2yx+ zx = 0 .

(i) Does the implicit function theorem apply, and can we solve for z = z(x,y) near the points(a) z = 1 , x = 1 y =−1(b) z = 1 , x = 2 , y =−1

4 ?(ii) At the second particular solution (b), can one obtain a solution function for y = y(x,z)?

Solution (i) We compute fz = 2z+ x and find that

fz(1,−1,1) = 2+1 = 3 6= 0 ,

so a solution function z(x,y) exists near this solution point. On the other hand,

fz(−2,−14,1) = 2−2 = 0 ,

so the implicit function theorem is not applicable in this case and there exists no solution functionz(x,y) near this solution point.

(ii) We compute that with fy = 2x,

fy(−2,−14,1) =−4 6= 0 ,

so there exists a solution function y = y(x,z) near that particular solution point. �

Page 49: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.2 Implicit differentiation. 49

3.2.2 More equationsLet us now look at a pair of equations:{

f (x,y,z) = 0g(x,y,z) = 0

. (3.8)

Since there are two equations, we expect that these equations implicitly define, say, (x,y) as afunction of z, i.e. we expect to find solution functions (x(z),y(z)) (there may be several or nosolution functions, depending on the particular equations). Differentiating (3.8) w.r.t. z gives

fx ·dxdz

+ fy ·dydz

+ fz = 0

gx ·dxdz

+gy ·dydz

+gz = 0. (3.9)

This is a pair of simultaneous linear equations for dxdz and dy

dz . Using a matrix notation, the solutionto this system may be written as(

dxdzdydz

)=−

(fx fy

gx gy

)−1( fz

gz

),

where (. . .)−1 denotes the matrix inverse as usual. This matrix equation suggests that thederivative condition for the solution function to exist should be that the matrix(

fx fy

gx gy

)is invertible. Equivalently,

det(

fx fy

gx gy

)= fx ·gy− fy ·gx

should be non-vanishing. The precise statement is given in the following theorem.

Theorem 3.2.3 Let f : R3→ R, g : R3→ R be two C1-class functions and let (a,b,c) ∈ R3

be a point such that f (a,b,c) = 0 and g(a,b,c) = 0. If

det(

fx fy

gx gy

)= fx ·gy− fy ·gx 6= 0 , (3.10)

then there exists a C1-class solution function (x(z),y(z)) in a neighborhood of z = c and suchthat (x(c),y(c)) = (a,b), and the equation(

dxdzdydz

)=−

(fx fy

gx gy

)−1( fz

gz

)(3.11)

is valid at (x,y,z) = (a,b,c).

� Example 3.7 Consider a pair of equations{f (x,y,z) = x · siny+ yz+ z3 +2z = 0g(x,y,z) = x+ ex·y− yz2 = 0

.

What does the implicit function theorem say about the existence of C1-class solution functionsx(z) and y(z) near (x,y,z) = (−1,0,0)?

Page 50: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

50 Applications of partial derivatives

Solution (fx fy

gx gy

)(−1,0,0) =

(siny (xcosy+ z)

(1+ yex·y) (xex·y− z2)

)∣∣∣∣(−1,0,0)

=

(0 −11 −1

)⇒ det

(fx fy

gx gy

)(−1,0,0) = det

(0 −11 −1

)= 1 6= 0 .

Thus, the matrix is invertible and by virtue of the implicit function theorem, there exists aC1-class solution function (x(z),y(z)) near z = 0. �

� Example 3.8 For the pair of equations from the previous example find the values of dxdz (0) and

dydz (0) at the solution point: (x,y,z) = (−1,0,0).Solution

Rather than using the solution expressed via the inverse matrix as in (3.11) we will solvethe system of equations at hand by substitutions. Using the matrix calculated in the previousexample, and calculating

fz(−1,0,0) = 2 , gz(−1,0,0) = 0 ,

we obtain for (3.9) the following system of equations

−dydz

= −2 ,

dxdz−2

dydz

= 0 (3.12)

From the first equation we finddydz

(0) = 2 .

Substituting this into the second equation we find

dxdz

(0) = 2dydz

(0) = 4 .

3.3 Differentiable functions of two variablesWe start with the following intuitive definition: a function f : Rn→ R is called differentiable ata ∈ Rn if it has a good linear approximation at a.

If a function of one variable f = f (x) has a derivative f ′ defined at x = a then we can take asa linear approximation at x = a the following linear function

La(x) = f (a)+ f ′(a)(x−a) .

The graph of this linear function is precisely the tangent line to the graph of f (x) at x = a.

Page 51: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.3 Differentiable functions of two variables 51

A good approximation means that the error

f (x)−La(x)

is small. The smallness of the error is controlled by how close x is to a that is by how small|x−a| is. For the error to be small it is reasonable to demand that f (x)−La(x) vanishes as x→ afaster than x−a. More precisely we demand that

limx→a

f (x)−La(x)x−a

= 0 .

For example if it happens that f (x)−La(x) =C · (x−a)2 for some constant C then

limx→a

f (x)−La(x)x−a

= limx→a

C(x−a)2

x−a= lim

x→aC(x−a) = 0 .

These considerations lead us to the following precise definition

Definition 3.3.1 A function of one variable f = f (x) is differentiable at x = a if f ′(a) existsand

limx→a

f (x)−La(x)x−a

= 0 . (3.13)

We will now show that for a function of one variable differentiability at a point x = a (in thesense of the above definition) follows from the existence of the derivative d f

dx (a). Substitutingthe explicit form of La(x) into (3.13) we obtain

limx→a

f (x)−La(x)x−a

= limx→a

f (x)− f ′(a)(x−a)− f (a)x−a

= limx→a

(f (x)− f (a)

x−a− f ′(a)

)= f ′(a)− f ′(a) = 0 . (3.14)

Hence, any function of one variable that has f ′(a) is differentiable at a.Consider next a function of two variables f = f (x,y) for which there exists partial derivatives

fx(a,b), fy(a,b) at (x,y) = (a,b). As a linear approximation we can take the linear functionwhose graph gives the tangent plane at (a,b):

La(x,y) = f (a,b)+(x−a) fx(a,b)+(y−b) fy(a,b) .

As a measure of how close a point (x,y) is to the point (a,b) we can take the Euclidean distancebetween these two points √

(x−a)2 +(y−b)2 .

This prompts the following definition

Definition 3.3.2 — Function of two variables differentiable at a point. A function f (x,y)is called differentiable at (x,y) = (a,b) if fx(a,b), fy(a,b) exist and

lim(x,y)→(a,b)

f (x,y)−La(x,y)√(x−a)2 +(y−b)2

= 0 .

This definition means that for a differentiable function the error of linear approximation vanishesfaster than the distance between (x,y) and (a,b) as (x,y)→ (a,b).

It can be shown that f (x,y) is differentiable at (a,b) if and only if the tangent plane at(x,y) = (a,b) exists (in the sense of the geometric definition we gave in section 2.4).

Page 52: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

52 Applications of partial derivatives

Definition 3.3.3 — Differentiable function of two variables. A function of two variablesf : D f → R is called differentiable if it is differentiable at every point in its domain D f .

It is not hard to construct examples of functions for which one or both partial derivatives donot exist at certain exceptional points.

� Example 3.9 Consider a function

f (x,y) =√

x2 + y2

Its graph z =√

x2 + y2 is an inverted cone with a tip at the origin which expands along thepositive z direction.

It is clear geometrically that at the tip of the cone we cannot define a unique tangent plane. Letus prove formally that partial derivatives of f do not exist at the tip of the cone. If we try blindlydifferentiating the formula for f we obtain

∂ f∂x

=x√

x2 + y2

that does not have a value at (x,y) = (0,0), we get a formal 00 expression if we try to substitute

x = 0, y = 0. Instead let us use the definition in terms of limits

∂ f∂x

(0,0) = lim∆x→0

f (∆x,0)− f (0,0)∆x

= lim∆x→0

√(∆x)2

∆x= lim

∆x→0

|∆x|∆x

Inside the limit we have a step function for which we rigorously showed in example 1.20 thatthe limit does not exist. Hence ∂ f

∂x (0,0) does not exist. Similarly we can show that ∂ f∂y (0,0) also

does not exist. �

� Example 3.10 Consider a function

g(x,y) =−|x|

Its graph looks like two half-planes: z = x,x > 0 and z =−x,x < 0, joined at the y-axis: z = x = 0.For all points with x > 0 the tangent plane is z = x, while for all points with x < 0 the tangentplane is z = −x. Right on the “ridge” where x = 0 a unique tangent plane cannot be defined.As in the previous example, using the definition, we can show that while the partial derivative∂g∂y = 0 for all points including x = 0, ∂g

∂x is not defined when x = 0. �

For a function of two variables to be differentiable at a point its partial derivatives must existat that point. But, unlike in the case of functions of one variable, this may not be enough. Thefollowing example gives an example of a function for which both partial derivatives exist at acertain point while the function is not differentiable at that point.

Page 53: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.4 Taylor’s Expansion 53

� Example 3.11 Considerh(x,y) = x1/3y1/3 .

This function is defined on the entire R2. In particular h(0,0) = 0. Moreover, we find that

∂h∂x

(0,0) = lim∆x→0

h(∆x,0)−h(0,0)∆x

= lim∆x→0

(∆x)1/3 ·0−0∆x

= lim∆x→0

0 = 0 ,

∂h∂y

(0,0) = lim∆y→0

h(0,∆y)−h(0,0)∆y

= lim∆x→0

0 · (∆y)1/3−0∆y

= lim∆y→0

0 = 0

so that both partial derivatives exist at (0,0). For this function to be differentiable we need toexamine the limit

lim(x,y)→(0,0)

h(x,y)−L(0,0)(x,y)√x2 + y2

= lim(x,y)→(0,0)

x1/3y1/3√x2 + y2

(3.15)

Using the sequential definition we can show that the above limit does not exist. Considering asequence (xn,yn) = (1

n ,1n)→ (0,0) we get

limn→∞

(xn)1/3(yn)

1/3√x2

n + y2n

= limn→∞

(1/n)1/3 · (1/n)1/3√(1/n)2 +(1/n)2

= limn→∞

n1/3√

2

that does not exist (it goes to infinity). This suffices to conclude that the limit (3.15) does notexist and hence the function is not differentiable at (0,0). �

There is a simple sufficient condition for a function to be differentiable.

Theorem 3.3.1 If a function of two variables f = f (x,y) with (a,b) ∈ D f has partial deriva-tives fx(x,y), fy(x,y) defined in some open disc centred at (a,b) and if the functions fx(x,y),fy(x,y) are continuous at (x,y) = (a,b) then f is differentiable at (a,b).

This theorem implies in particular that polynomials in two variables and rational functionsof two variables are differentiable functions.

3.4 Taylor’s ExpansionIn the previous sections, when we discussed differentiability we came up with a rigorousdefinition of differentiability 3.3.2 that ensures that a function of two variables has a good linearapproximation. We would like to discuss next how a linear approximation can be improved byadding to it quadratic, cubic etc. terms and how one can estimate the error of such approximations.These approximations are known as Taylor’s expansion or Taylor’s formula. We start with athorough discussion of Taylor’s formula for functions of one variable.

Consider f : R1→ R1 such that at a given point x = x0 there exist

f (x0) , f ′(x0) , f ′′(x0) , . . . , f (n)(x0) .

We can construct an n-th degree polynomial pn(x) such that

pn(x0) = f (x0) , p′n(x0) = f ′(x0) , . . . , p(n)n (x0) = f (n)(x0) . (3.16)

It is convenient to write

pn(x) = c0 + c1(x− x0)+ c2(x− x0)2 + . . .+ cn(x− x0)

n . (3.17)

Page 54: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

54 Applications of partial derivatives

Then, if we set c0 = f (x0), pn(x0) = f (x0) is satisfied. We further calculate

p′n(x0) = c1 = f ′(x0)

p′′n(x0) = 2c2 = f ′′(x0) ⇒ c2 =f ′′(x0)

2!

p′′′n (x0) = 3 ·2 · c3 = 3!c3 = f ′′′(x0) ⇒ c3 =f ′′′(x0)

3!...

p(n)n (x0) = n · (n−1) · . . . ·2 ·1 · cn = n!cn = f (n)(x0) ⇒ cn =f (n)(x0)

n!.

(3.18)

Thus

pn(x) = f (x0)+(x− x0) f ′(x0)+(x− x0)

2

2!f ′′(x0)+ . . .+

(x− x0)n

n!f (n)(x− x0) . (3.19)

It turns out that such poynomials can serve as approximations of a given function f (x) in theneighborhood (i.e. near) a given point x0 where all the derivatives involved exist.

In general, we write

f (x) = pn(x)+ rn+1(x) , (3.20)

where

pn(x) =

tangent line equation︷ ︸︸ ︷f (x0)+(x− x0) f ′(x0)+ . . .+

(x− x0)n

n!f (n)(x0) (3.21)

is the nth degree Taylor polynomial centered at x0, and rn+1 is the difference between f (x) andpn(x), the so called remainder term.

� Example 3.12 For f (x) = cos(x), find the Taylor polynomial of degree 3 centered at x0 =π

2 .

Solution

f (π/2) = cosπ

2= 0

f ′(x) =−sin(x) , f ′(π/2) =−sinπ

2=−1

f ′′(x) =−cos(x) , f ′′(π/2) =−cosπ

2= 0

f ′′′(x) = sin(x) , f ′′′(π/2) = sinπ

2= 1 .

Thus the degree 3 Taylor polynomial at x0 =π

2 reads

p3(π/2) = 0+(

x− π

2

)· (−1)+

(x− π

2

)2

2!·0+

(x− π

2

)3

3!·1 =−

(x− π

2

)+

(x− π

2

)3

6.

If pn(x) is a good approximation, we expect that rn+1(x) is small when x is sufficiently closeto x0, i.e. when | x− x0 | is small enough. A quantitative expression of this heuristic idea is givenby the following theorem:

Page 55: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.4 Taylor’s Expansion 55

Theorem 3.4.1 — nth mean value theorem. For f : R1→ R1 such that f , f ′, . . . , f (n) arecontinuos at x = x0, the following formula holds:

f (x) = pn−1(x)+ rn(x) , (3.22)

where pn−1(x) denotes the Taylor polynomial of degree n−1 centered at x0, where

rn(x) =1n!(x− x0)

n f (n)(x∗) , (3.23)

and where x∗ is some point between x and x0,

x∗ = x0 +θ(x− x0) , 0≤ θ ≤ 1 .

If we know that the values of the nth order derivative on the interval between x0 and x arebounded by a certain constant, i.e. | f (n)(y)| ≤M, then

|rn(x)| ≤|x− x0|n

n!·M . (3.24)

Page 56: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

56 Applications of partial derivatives

� Example 3.13 Estimate the error of approximating f (x) = sin(x) by Taylor polynomials.

Solution Let x0 = 0.

f (0) = sin(0) = 0

f ′(0) = cos(0) = 1

f ′′(0) =−sin(0) = 0

f (3)(0) =−cos(0) =−1

f (4)(0) = sin(0) = 0

f (5)(0) = cos(0) = 1

f (6)(0) =−sin(0) = 0

f (7)(0) =−cos(0) =−1

f (8)(0) = sin(0) = 0

Approximating by a cubic:

sin(x) = x− x3

3!+ r4(x) = x− x3

6+ r4(x) .

Approximating by a quintic (i.e. by a fifth order polynomial):

sin(x) = x− x3

3!+

x5

5!+ r6(x) = x− x3

6+

x5

120+ r6(x) .

Approximating by 7th order polynomial:

sin(x) = x− x3

3!+

x5

5!− x7

7!+ r8(x) = x− x3

6+

x5

120+ r6(x)−

x7

5040+ r8(x) .

How can we estimate the errors?

rn(x) =xn

n!sin(n)(θx) , 0≤ θ ≤ 1 .

Since

sin(n)(x) =

{(−1)m sin(x) for n = 2m(−1)m cos(x) for n = 2m+1

,

and |sin(y)| ≤ 1 and |cos(y)| ≤ 1 for any y ∈ R, we have

|rn(x)| ≤|x|n

n!.

Thus on the interval −π ≤ x≤ π , where |x| ≤ π ,

| r4(x) |≤π4

4!=

π4

24≈ 4.05

is rather large. However, if we aim to approximate sin(x) by x− x3

6 on the smaller interval−π

2 ≤ x≤ π

2 ,

|r4(x)| ≤(

π

2

)4· 1

24≈ 0.25 ,

Page 57: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.4 Taylor’s Expansion 57

so this already works much better. Approximating sin(x) by a quintic polynomial, on the interval−π ≤ x≤ π the remainder term is bounded by

|r6(x)| ≤π6

6!=

π6

720≈ 1.33 ,

while on the interval −π

2 ≤ x≤ π

2 the remainder term is bounded by

|r6(x)| ≤(

π

2

)6 16!≈ 0.020 .

Finally, for the seventh degree polynomial

x− x3

6+

x5

120− x7

5040,

the error on the interval −π ≤ x≤ π can be estimated as

|r8(x)| ≤| x |8

8!≤ π8

40320≈ 0.23 ,

which is already quite a good approximation (≈ 20%). If we consider the approximation on theinterval −π

2 ≤ x≤ π

2 ,

|r8(x)| ≤(

π

2

)8· 1

8!≈ 0.0009 ,

which corresponds to an error of approximately 0.09%.

Page 58: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

58 Applications of partial derivatives

Under certain conditions, the more terms we keep in the Taylor polynomial p(x), thebetter our approximation of f (x) will be. The terms generated by taking the order of thepolynomial to be very large are called Taylor expansion of the function f . When we terminatethe expansion at the order (x− x0)

n, we talk about the Taylor expansion of f up to the order n.The corresponding polynomials give us a linear (for n = 1), quadratic (for n = 2), cubic (forn = 3), etc. approximation of f .

Page 59: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.5 Taylor’s formula in two dimensions 59

3.5 Taylor’s formula in two dimensionsConsider now a function f : R2→ R such that f , fx, fy, fxx, fxy, fyy, . . . up to the order n are allcontinuous at a given point (x0,y0) ∈ R2. We may then construct an n-th degree polynomial

P(x,y) =C0 +B1x+B2y+D1x2 +D2xy+D3y2 + . . . (3.25)

such that

P(x0,y0) = f (x0,y0)

∂P∂x

(x0,y0) =∂ f∂x

(x0,y0)

∂P∂y

(x0,y0) =∂ f∂y

(x0,y0)

∂ 2P∂x2 (x0,y0) =

∂ 2 f∂x2 (x0,y0)

∂ 2P∂x∂y

(x0,y0) =∂ 2 f

∂x∂y(x0,y0)

∂ 2P∂y2 (x0,y0) =

∂ 2 f∂y2 (x0,y0)

...

(3.26)

up to the derivatives of order n. Such polynomials of two variables give us approximations off (x,y) for (x,y) near (x0,y0). The mean value theorem then generalizes to:

Theorem 3.5.1 Under the above assumptions on f ,

f (x,y) = f (x0,y0)+∆x fx(x0,y0)+∆y fy(x0,y0)+12!

(∆x

∂x+∆y

∂y

)2

f (x0,y0)

+ . . .+1

(n−1)!

(∆x

∂x+∆y

∂y

)n−1

f (x0,y0)+Rn(x0,y0) .

(3.27)

Here, ∆x = x− x0, ∆y = y− y0, while the remainder term reads explicitly

Rn(x,y) =1n!

(∆x

∂x+∆y

∂y

)n

f (x+θ∆x,y+θ∆y) (3.28)

for some constant value 0≤ θ ≤ 1.

More explicitly, we have in the above formula for example that

12!

(∆x

∂x+∆y

∂y

)2

f (x0,y0) =12

(∆x2 ∂ 2

∂x2 +2∆x∆y∂ 2

∂x∂y+∆y2 ∂ 2

∂y2

)f (x0,y0)

=12(∆x2 fxx(x0,y0)+2∆x∆y fxy(x0,y0)+∆y2 fyy(x0,y0)

)=

(x− x0)2

2fxx(x0,y0)+(x− x0)(y− y0) fxy(x0,y0)

+(y− y0)

2fyy(x0,y0) .

Page 60: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

60 Applications of partial derivatives

� Example 3.14 Consider the function f (x,y) = ln(x+ y2

)in the vicinity of the point (x0,y0) =

(1,1):

f (1,1) = ln2

fx(x,y) =1

x+ y2 , fx(1,1) =12

fy(x,y) =2y

x+ y2 , fy(1,1) = 1 .

Thus, the linear approximation reads

f (x,y)≈ ln2+12(x−1)+1 · (y−1) =

x2+ y+

(ln2− 3

2

)fxx(x,y) =−

1(x+ y2)2 , fx(1,1) =−

14

fyy(x,y) = 2 · x− y2

(x+ y2)2 , fy(1,1) = 0

fxy(x,y) =−2y

(x+ y2)2 , fxy(1,1) =−12.

The quadratic approximation reads

f (x,y)≈ ln2+(x−1)

2+(y−1)+

12

[−(x−1)2

4+2 · (x−1)(y−1) ·

(−1

2

)]= ln2+

(x−1)2

+(y−1)− (x−1)2

8− 1

2(x−1)(y−1) .

Taylor expansions tend to give reasonable approximations of a given function f (x,y) nearthe expansion point (x0,y0), but they get worse as x, y move away from (x0,y0). The remainderterm Rn(x,y) can be used to estimate how good the approximation is.

3.6 Functions f : Rn→ Rm

Up to now we have talked about functions f : Rn→ R, i.e. we put in n numbers (x1, . . . ,xn) andget back a singe number f (x1, . . . ,xn). To save space we will often write

x = (x1, . . . ,xn) ∈ Rn (3.29)

and write f (x) ∈ R. To use this notation, we need to keep track of whether x is a point in Rn or anumber in R. We will often write x ∈ Rn for general theorems and (x,y) ∈ R2 or (x,y,z) ∈ R3 inparticular examples. We will also use the notation

‖v‖ :=√

v21 + v2

2 + . . .+ v2n (3.30)

for any vector v = (v1, . . . ,vn) ∈ Rn, which is the length of v. Generalizing f : Rn→ R, we canconsider a function which gives us back m numbers, which we can write as

f (x) = f (x1, . . . ,xn) = ( f1(x), . . . , fm(x)) ∈ Rm . (3.31)

This means that we have a function f : Rn→ Rm, i.e. a function from Rn to Rm. Note that eachof the functions f1, . . . , fm is a function with values in R, that is fi : Rn→ R. Hence, a function

Page 61: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.7 Total derivatives 61

f : Rn→ Rm is simply a collection of m real-valued functions bracketed together.

Sometimes it is convenient to write f : Rn→ Rm as

f (x) =

f1(x)...

fm(x)

, (3.32)

since this works better when we have matrix operations at hand.

3.7 Total derivativesSuppose that

f =

f1...fm

: Rn→ Rm .

For the point

a =

a1...

am

,

define a m×n matrix

D f (a) :=

∂ f1∂x1

(a) ∂ f1∂x2

(a) · · · ∂ f1∂xn

(a)∂ f2∂x1

(a) ∂ f2∂x2

(a) · · · ∂ f2∂xn

(a)...

.... . .

...∂ fm∂x1

(a) ∂ fm∂x2

(a) · · · ∂ fm∂xn

(a)

. (3.33)

Here, we suppose that all of the partial derivatives exist.

Definition 3.7.1 — Differentiability and total derivative. A function f :Rn→Rm is calleddifferentiable at a point x = a if

lim‖h‖→0

‖ f (a+h)− f (a)−D f (a) ·h‖‖h‖

= 0 , (3.34)

in which case the matrix D f (a) is the total derivative of f at x = a. In the above,

h =

h1...

hn

∈ Rn ,

and accordingly D f (a) ·h is a matrix multiplication.

Definition 3.7.2 A function f : Rn→ Rm is differentiable if it is differentiable at each pointof its domain.

Page 62: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

62 Applications of partial derivatives

Theorem 3.7.1 If a function f : Rn→ Rm has derivatives

∂ fi

∂x ji = 1, . . . ,m , j = 1, . . . ,n

and if all ∂ fi∂x j

are continuous functions at x = a, then f is differentiable at x = a.

Definition 3.7.3 If f and all derivatives ∂ fi∂x j

are continuous on the whole domain, then f is in

C1. Here, the superscript 1 stands for the first derivative of f .

� Example 3.15

f (x,y) =x2y

x2 + y2 for (x,y) 6= (0,0)

f (0,0) = 0 .

One can compute that ∂ f∂x (0,0) =

∂ f∂y (0,0) = 0 both exist, but the function is not differentiable at

(x,y) = (0,0). �

� Example 3.16 Consider the function f : R2→ R2 defined by

f1(x,y) = x2 +5y+ xy

f2(x,y) = 3xy+ y3 .

Calculate the total derivative.

Solution We have∂ f1

∂x= 2x+ y ,

∂ f1

∂y= 5+ x ,

∂ f2

∂x= 3y ,

∂ f2

∂y= 3x+3y2 .

All these functions are polynomials and are therefore continuous, which implies that f isdifferentiable, with first derivative

D f (x,y) =((2x+ y) (5+ x)

3y (3x+3yz)

).

� Example 3.17 For f : R2→ R defined by

f (x,y) =xy

(y 6= 0) ,

show that f is differentiable at (x,y) = (1,2) and find D f (1,2).

Solution∂ f∂x

=1y,

∂ f∂y

=− xy2 .

These are continuous at (x,y) = (1,2), hence f is differentiable at this point, with

D f (1,2) =(1

2 −14

).

Page 63: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

3.8 Various theorems about total derivatives 63

� Example 3.18 Calculate the total derivative D f (1,1) for

f =

x2 +5yex · y

y · lnx

: R2→ R3 .

Solution We have

D f (1,1) =

2x 5ex · y ex

yx lnx

(1,1) =

2 5e e1 0

.

3.8 Various theorems about total derivativesTheorem 3.8.1 — Chain rule. If g : Rn → Rm is differentiable at a point a ∈ Rn, and iff :Rm→R` is differentiable at the point g(x) ∈Rm, then h = f ◦g :Rn→R` is differentiableat the point a, with

Dh(a) = D( f ◦g)(a) = D f (g(a)) ·Dg(a) , (3.35)

where the symbol · denotes the matrix multiplication.

� Example 3.19 Suppose that we are given two functions g : R2→ R2 and f : R2→ R, and let(a,b) ∈R2 be a point. Let f depend on (x,y), and let g depend on (u,v). Consider the compositefunction h(u,v) = f (g(u,v)),

h : R2 g−→ R2 f−→ R .

Then we have

Dh(a,b) =(

∂h∂u

∂h∂v

)∣∣∣∣(u,v)=(a,b)

= D f ·Dg(a,b)

=(

∂ f∂x

∂ f∂y

)∣∣∣∣(x,y)=g(a,b)

·

(∂g1∂u

∂g1∂v

∂g2∂u

∂g2∂v

)∣∣∣∣(u,v)=(a,b)

.

Writing explicitly x = g1(u,v) and y = g2(u,v), and consequently(∂g1∂u

∂g1∂v

∂g2∂u

∂g2∂v

)=

(∂x∂u

∂x∂v

∂y∂u

∂y∂v

),

we obtain

∂h∂u

=∂ f∂x· ∂x

∂u+

∂ f∂y· ∂y

∂u,

∂h∂v

=∂ f∂x· ∂x

∂v+

∂ f∂y· ∂y

∂v.

Thus the chain rule we looked at before (Theorem 2.6.1) is a special case of the above generalchain rule. �

Consider next a set of implicit equations:f1(x1, . . . ,xm,y1, . . . ,yn) = 0

...fn(x1, . . . ,xm,y1, . . . ,yn) = 0

. (3.36)

Page 64: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

64 Applications of partial derivatives

Here, we have n equations in m+n variables. So we expect to be able to solve them for n ofthe unknowns, say (without loss of generality) y1, . . . ,yn (that is why we are using two differentletters to label the m+n variables in the above equation system). We will write for brevity

x = (x1, . . . ,xm) ∈ Rm , y = (y1, . . . ,yn) ∈ Rn , (3.37)

so (x,y) ∈ Rm+n and

f (x,y) =

f1(x,y)...

fn(x,y)

. (3.38)

We also write

Dy f (x,y) =

∂ f1∂y1

· · · ∂ f1∂yn

......

∂ fn∂y1

· · · ∂ fn∂yn

. (3.39)

Theorem 3.8.2 — The implicit function theorem (general version). Suppose that f is C1

and that f (a,b) = 0 for some point (a,b) ∈Rm+n (with a ∈Rm, b ∈Rn). Suppose further thatthe matrix Dy f (a,b) is invertible. Then there exists a C1 solution function y(x) : Rm→ Rn

defined for x ∈ Rm close to a and such that

y(a) = b , f (x,y(x)) = 0 .

R The invertibility of Dy f (a,b) is equivalent to

detDy f (a,b) 6= 0 .

� Example 3.20 Consider the case of two equations for three variables:

u2 +uv−w− vw = 0

u+u2v+ v2w−3 = 0 .

Consider the solution point (u,v,w) = (1,1,1). Use the implicit function theorem to determinewhether there exists a C1-class solution function (u(w),v(w)) in the neighborhood of the solutionpoint (1,1,1).

Solution We compute

Du,v f (1,1,1) =

(∂ f1∂u

∂ f1∂v

∂ f2∂u

∂ f2∂v

)∣∣∣∣(1,1,1)

=

((2u+ v) (u−w)(2uv+1) (u2 +2vw)

)∣∣∣∣(1,1,1)

=

(3 03 3

).

Hence detDu,v f (1,1,1) = 9 6= 0 and there exists a solution function (u(w),v(w)) of C1-class ina neighborhood of w = 1. �

3.9 More applicationsMore applications of partial derivatives (finding maxima and minima) will be discussed in thelast chapter of the notes. This is done so that the order of the material presented in the typednotes is the same as the order in which they appear in the lectures.

Page 65: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Double integrals: general definition andpropertiesHow to calculate double integralsInterchanging the integration orderCalculating areas using double integralsChange of variables in double integralsPolar coordinates – continuedOther substitutionsCalculating volumes using double inte-grals

4 — Double integrals

4.1 Double integrals: general definition and propertiesWe start by reminding the general definition of a one-dimensional integral. To define the onevariable integration of a function f = f (x) over an interval [a,b] we start by dividing up [a,b]into m subintervals. We do this by adding points xi, i = 1, . . . ,m− 1 inside the interval. Wearrange this points so that a < x1 < x2 < · · ·< xm−1 < b. It is convenient to denote x0 = a andxm = b.

a = x0 x1x2 x3 x4 xm = b

A collection of marking points xi we call a partition of the interval [a,b] and denote it as

P = {x0,x1, . . .xm} .

For any partition P we define λ = λ (P) to be the maximum size of its constituent subintervals:

λ (P) = max{|x1− x0| , |x2− x1| , |x3− x2| , . . . , |xm− xm−1|} .

We further pick a point ξi inside each subinterval [xi,xi+1] so that

xi ≤ ξi ≤ xi+1 , i = 0,1, . . . ,m−1 .

Given a partition P and a collection of points ξi, i = 0, . . . ,m−1 we form a Riemann sum

S(P,{ξi}, f ) =m−1

∑i=0

f (ξi)|xi+1− xi| .

Definition 4.1.1 — Integrable function of one variable. A function f defined on a domaincontaining an interval [a,b] is called integrable on [a,b] if there exists a limit

limλ (P)→0

S(P,{ξi}, f ) = I . (4.1)

Page 66: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

66 Double integrals

The value of the limit I is called the integral of f over [a,b] and is denoted

b∫a

f (x)dx = limλ (P)→0

S(P,{ξi}, f ) .

The above limit in terms of the (ε,δ ) definition means that for any ε > 0 there exists δ > 0such that for any partition P such that λ (P) < δ and any choice of points ξi we have |I−S(P,{ξi}, f )| < ε . In simple words this means that Riemann sums get arbitrarily close tothe value of the integral for a sufficiently small partitioning of the given interval [a,b] intosubintervals.

Consider next a region on the plane D⊂ R2. We assume that D is bounded in the sense ofthe following definition.

Definition 4.1.2 A set D⊂ R2 is called bounded if

∃R > 0 such that D⊂ DR = {(x,y)|x2 + y2 < R2} .

In simple words, D is bounded if it fits inside a sufficiently large disc.Suppose that a function of two variables f = f (x,y) is defined on D. We would like to

defined a two-dimensional (or double) integral of f over D. Generalising the one-dimensionalintegral construction we would like to subdivide D into smaller regions. It would be nice to havethe subdividing blocks to be of standard shapes, say rectangles. However if the boundary ofD does not consist of straight lines a subdivision into rectangles only is impossible. Thus weassume that we can subdivide D into finitely many blocks of unspecified shapes that we denoteas Bk,k = 1, . . . ,N. We assume that each block is closed, in the sense that it contains its ownboundary and that any two blocks either have no points in common or share finitely many curves.Suppose further that each block has an area δAk and that in each block Bk we choose a pointwith coordinates (xk,yk).

We set up a Riemann sum approximating a double integral as

S(Bk,(xk,yk), f ) =N

∑k=1

f (xk,yk)δAk .

As a measure of how small each block is we take the block’s diameter that is given by themaximum distance between any two points inside the block:

diam(B) = max(x,y)∈B,(x′,y′)∈B

√(x− x′)2 +(y− y′)2 .

For example for a rectangle with side lengths a and b its diameter equals the length of thediagonal:

√a2 +b2, for a disc of radius r it is the same as its usual diameter: 2r. Now set

λ (B1, . . . ,BN) = max{diam(B1),diam(B2), . . .diam(BN)} .

Page 67: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.1 Double integrals: general definition and properties 67

This is a quantity measuring how small the blocks are, or how fine our subdivision is. Ifλ (B1, . . . ,BN)< δ then the distance between any two points inside any block is less than δ .

We can now formulate the following definition.

Definition 4.1.3 — Double integral. Consider a bounded region on the plane: D⊂ R2. Wesay that a function f = f (x,y) defined on D is integrable on D if the following limit exists

limλ (B1,...BN)→0

S(Bk,(xk,yk), f ) = I .

We call this value I the double integral of f over D and denote∫∫D

f (x,y)dxdy .

The above limit means that for any ε > 0 there exists δ > 0 such that for any subdivision{B1, . . . ,BN} such that λ (B1, . . .BN)< δ and any choice of points (xk,yk) inside the blocks wehave |I− S(P,(xk,yk), f )| < ε . In simple words this means that Riemann sums get arbitrarilyclose to the value of the integral for a sufficiently fine subdivision of D into smaller blocks.

Within reason, the shape of the blocks does not matter, but they could all be rectangularexcept at the edges, so we could also use the notation∫∫

Df (x,y)dxdy or

∫∫D

f (x,y)dydx , (4.2)

i.e. the order dxdy or dydx does not matter.

The definition may sound like it places a lot of constraints on the function f to be inte-grable, but in fact there is a rather large class of integrable functions described in the followingtheorem.

Theorem 4.1.1 Given a bounded region D on the plane, functions which are continuous on Dexcept for possibly finitely many curves, are integrable on D.

From the above definition and the basic properties of limits the following general rules fordouble integrals can be derived

Theorem 4.1.2 For any f = f (x,y) integrable on a bounded region D ⊂ R2 and for anyconstant C ∈ R we have∫∫

D

C f (x,y)dxdy =C∫∫D

f (x,y)dxdy . (4.3)

Moreover, if f = f (x,y) and g = g(x,y) are both integrable on D then∫∫D

( f (x,y)+g(x,y))dxdy =∫∫D

f (x,y)dxdy+∫∫D

g(x,y)dxdy . (4.4)

If in addition f (x,y)≤ g(x,y) ∀(x,y) ∈ D then∫∫D

f (x,y)dxdy≤∫∫D

g(x,y)dxdy . (4.5)

Page 68: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

68 Double integrals

Theorem 4.1.3 Consider two bounded regions D1 ⊂ R2, D2 ⊂ R2 such that D1 and D2 eitherhave no points in common or share a collection of curves. Then for any function f = f (x,y)integrable on D1 and on D2, f is integrable on D1∪D2 and we have∫∫

D1∪D2

f (x,y)dxdy =∫∫D1

f (x,y)dxdy+∫∫D2

f (x,y)dxdy (4.6)

4.2 How to calculate double integrals

Double integrals can be calculated by reducing them to repeated integrals. We illustrate this firston a rectangular region.

Theorem 4.2.1 LetR = {(x,y)|a≤ x≤ b ,c≤ y≤ d}

be a rectangle, and let f = f (x,y) be a function integrable on R. Assume that the one-dimensional integral

b∫a

f (x,y)dx (4.7)

exits for all values of y ∈ [c,d]. Then the repeated integral

d∫c

b∫a

f (x,y)dx

dy

also exists and

∫∫R

f dxdy =d∫

c

b∫a

f (x,y)dx

dy . (4.8)

The right hand side in (4.8) is called a repeated or iterated integral – it is a succession of twoordinary integrals performed one after the other. The integral inside the brackets (. . .) is theresult of integrating in the x-direction along the line of fixed height y. The outcome is a function

Page 69: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.2 How to calculate double integrals 69

of y, which is then integrated in the y direction.

The roles of x and y in the above theorem can be interchanged. Given that a one-dimensionalintegral

d∫c

f (x,y)dy

exits for any value of x ∈ [a,b] we can represent the double integral of f over R as∫∫R

f dxdy =b∫

a

d∫c

f (x,y)dy

dx . (4.9)

which is an iterated integral where we integrate in the y-direction first, and then in the x-direction.

Thus we see that in theory we may perform the x- and y-integrations in either order and for anintegrable function the result should be the same. However, we shall see below that in practice itis sometimes much easier to perform the double integral in one way rather than the other.

� Example 4.1 Let f (x,y) = 3xy2 +2x3, and let

R = {(x,y) | 1≤ x≤ 2 , 0≤ y≤ 1} ⊂ R2 .∫∫R

f (x,y)dxdy =∫ 2

1

(∫ 1

0(3xy2 +2x3)dy

)dx

=∫ 2

1

([xy3 +2x3y

]y=1y=0

)dx

=∫ 2

1

(x+2x3)dx =

[12

x2 +12

x4]x=2

x=1

=12·22 +

12·24− 1

2·12− 1

2·14 = 9 .

Page 70: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

70 Double integrals

Alternatively,∫∫R

f (x,y)dxdy =∫ 1

0

(∫ 2

1

(3xy2 +2x3)dx

)dy

=∫ 1

0

([32

x2y2 +12

x4]x=2

x=1

)dy

=∫ 1

0

(6y2 +8− 3

2y2− 1

2

)=∫ 1

0

(92

y2 +152

)dy

=

[32

y3 +152

y]y=1

y=0= 9 .

Next we would like to calculate double integrals over more complicated regions on the planeby reducing them to iterated (repeated) integrals. Defining iterated integrals over general regionsD is a bit more complicated. Suppose that the boundary of D consists of the curves y = α(x) andy = β (x), with a≤ x≤ b:

Then we can set up a repeated integral as∫ b

a

(∫β (x)

α(x)f (x,y)dy

)dx . (4.10)

The inner integral w.r.t. y is taken along the line at constant x, between the bottom and the topregion given by α(x) and β (x). The following theorem holds

Theorem 4.2.2 Let D be a region bounded by continuous curves y = α(x) and y = β (x), witha≤ x≤ b, and let f = f (x,y) be a function integrable on D. Assuming that a one-dimensionalintegral

β (x)∫α(x)

f (x,y)dy (4.11)

exists ∀x ∈ [a,b] then the iterated integral∫ b

a

(∫β (x)

α(x)f (x,y)dy

)dx

Page 71: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.2 How to calculate double integrals 71

also exists and∫∫D

f (x,y)dxdy =∫ b

a

(∫β (x)

α(x)f (x,y)dy

)dx . (4.12)

Similarly, we can specify the region D via the curves x = γ(y) and x = δ (y), with c≤ y≤ d:

Then, under assumptions similar to those in theorem 4.2.2∫∫D

f (x,y)dxdy =∫ d

c

(∫δ (y)

γ(y)f (x,y)dx

)dy , (4.13)

where we integrate w.r.t. x first and then w.r.t. y.

� Example 4.2 Determine∫∫

D xy dxdy, where D is(a) the area in the first quadrant between the curves y = x and y = x2:

(b) the triangle with vertives (0,0), (1,0) and (0,1):

Solution(a) The x-range for D is 0≤ x≤ 1. For x fixed, the y-range is x2 ≤ y≤ x. Thus α(x) = x2 and

β (x) = x.∫∫D

xy dxdy =∫ 1

0

(∫ x

x2xy dy

)dx =

∫ 1

0

([12

xy2]y=x

y=x2

)dx

=∫ 1

0

(12

x3− 12

x5)

dx =[

18

x4− 112

x6]1

0=

124

.

(b) The x-range for D is 0≤ x≤ 1. For x fixed the y-range is 0≤ y≤ 1− x:∫∫D

xy dxdy =∫ 1

0

(∫ 1−x

0xy dy

)dx

=∫ 1

0

([12 xy2]y=1−x

y=0

)dx =

∫ 1

0

12 x(1− x)2dx

= 12

∫ 1

0

(x−2x2 + x3)dx = 1

2

[12 x2− 2

3 x3 + 14 x4]1

0 =1

24.

(Note: it is a pure coincidence that the answer is the same as in part (a)!)

Page 72: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

72 Double integrals

For regions that cannot be described in terms of two bounding curves we can break them upinto such subregions as illustrated on the picture

and then use theorem 4.1.3 to write∫∫D

f dxdy =∫∫

D1

f dxdy+∫∫

D2

f dxdy+∫∫

D3

f dxdy .

4.3 Interchanging the integration orderAlthough∫ (∫

f (x,y)dy)

dx =∫ (∫

f (x,y)dx)

dy , (4.14)

it is sometimes much easier to do the integrals in one rather than the other order. This maydepend on the shape of the region. For example the following rule of thumb holds

Or it may depend on the function we are integrating, as the following examples illustrate

� Example 4.3 Deterine∫∫

T e−y2dxdy, where T is the triangular region with vertices (0,0),

(1,1) and (0,1):

Page 73: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.3 Interchanging the integration order 73

Solution The x-range is 0≤ x≤ 1. For x fixed, the y-range is x≤ y≤ 1. Hence

∫∫T

e−y2dxdy =

∫ 1

0

∫ 1

xe−y2

dy︸ ︷︷ ︸impossible to write out!

dx .

However, if we do the integrations in the other order, which means for the y-range 0≤ y≤ 1 andfor the x-range with y fixed 0≤ x≤ y, we obtain:

∫∫T

e−y2dxdz =

∫ 1

0

(∫ y

0e−y2

dx)

dy

=∫ 1

0

([xe−y2

]x=y

x=0

)dy =

∫ 1

0ye−y2

dy

=[−1

2 e−y2]1

0= 1

2

(1− e−1) .

� Example 4.4 Evaluate

∫π/4

0

∫π/2

2x

cos(y)y

dydx .

(Note: the limits on each integral sign indicate that this is an iterated integral; even thoughthe brackets are omitted, the order of the integration, i.e. dydx, is such that the y-integration isperformed first!)

Solution We cannot integrate∫ cos(y)

y , so we will try to change the order of integration first.

The integration region is the triangle T depicted above. The y-range is 0≤ y≤ π/2. For y fixed,the y-range is 0≤ x≤ y

2 . We thus obtain for the integral:

∫π/2

0

(∫ y/2

0

cosyy

dx)

dy =∫

π/2

0

([x

cosyy

]x=y/2

x=0

)dy

=∫

π/2

0

12 cosydy =

12.

Page 74: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

74 Double integrals

4.4 Calculating areas using double integralsConsider a region D. Cover it with small blocks of area δAk. Then the area of the region D isapproximately given by D≈ ∑k δAk. The precise area is obtained by

Area of D =∫∫

D1dA =

∫∫D

1dxdy . (4.15)

� Example 4.5 FInd the area of the region inside the unit circle

x2 + y2 = 1 .

Solution The x-range for D is −1≤ x≤ 1. For fixed x, the y-range is

−√

1− x2 ≤ y≤√

1− x2 .

We thus obtain:

Area of D =∫∫

D1dxdy =

∫ 1

−1

(∫ √1−x2

−√

1−x2dy

)dx

= 2∫ 1

−1

√1− x2dx use substituation x = sinθ , dx = cosθdθ

= 2∫

π/2

−π/2cos2

θdθ

= 2∫

π/2

−π/2

(1+ cos(2θ))

2dθ =

[θ + 1

2 sin(2θ)]π/2−π/2 = π .

4.5 Change of variables in double integralsRecall that for one-variable integrals such as

∫ ba f (x)dx, integrals may be transformed by changing

the variable: x = x(u), dx = dxdu du,∫ b

af (x)dx =

∫ d

cf (x(u))

dxdu

du , where a = x(c) , b = x(d) . (4.16)

We would like to perform similar transformations on double integrals. Consider thus a doubleintegral∫∫

Df (x,y)dxdy .

Page 75: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.5 Change of variables in double integrals 75

Suppose that x = x(u,v) and y = y(u,v) for some variables u, v, and suppose that the regionD′ in the uv-plane is mapped to the original region of integration D in the xy-plane via thetransformation

(u,v) 7→ (x(u,v),y(u,v)) . (4.17)

Then ∫∫D

f (x,y)dxdy =∫∫

D′f (x(u,v),y(u,v))

∣∣∣∣∂ (x,y)∂ (u,v)

∣∣∣∣dudv , (4.18)

where∣∣∣∣∂ (x,y)∂ (u,v)

∣∣∣∣ :=

∣∣∣∣∣det

(∂x∂u

∂x∂v

∂y∂u

∂y∂v

)∣∣∣∣∣ , (4.19)

with | . . . | denoting the absolute value. The determinant det ∂ (x,y)∂ (u,v) is called the Jacobian of x and

y with respect to u and v.

� Example 4.6 — Polar coordinates. When the integration region for a double integral is ofcircular shape, or if the integrand involves the combination x2 + y2, it is often useful to employpolar coordinates:

x = r cosθ , y = r sinθ , (4.20)

e.g.

that is a quarter circle in the xy-plane corresponds to a rectangle in the rθ -plane. The Jacobianof x and y with respect to r and θ reads

∂ (x,y)∂ (r,θ)

= det

(∂x∂ r

∂x∂θ

∂y∂ r

∂y∂θ

)= det

(cosθ −r sinθ

sinθ r cosθ

)= r . (4.21)

Page 76: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

76 Double integrals

Hence∫∫D

f (x,y)dxdy =∫∫

D′f (x(r,θ),y(r,θ))rdrdθ . (4.22)

R Note: Consider a small rectangle in the rθ -plane:

It corresponds in the xy-plane to the following region:

The length of the curved edge is ≈ rδθ , so that the area of the region is rδ rδθ . Thus,when we compute a duoble integral in polar coordinates, we, in effect, cover the integrationregion with a mesh of little subregions of area rδ rδθ like this:

� Example 4.7 Compute∫∫D

e−(x2+y2)dxdy

with integration region

D ={(x,y) ∈ R2 | x2 + y2 ≤ a2}

Page 77: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.6 Polar coordinates – continued 77

Solution In polar coordinates, the range for θ is 0 ≤ θ ≤ 2π , while for fixed θ we have

0≤ r ≤ a. Hence:∫∫D

e−(x2+y2)dxdy =

∫ 2π

0

(∫ a

0e−r2

rdr)

dθ =

(∫ a

0e−r2

rdr)·(∫ 2π

0dθ

)=[−1

2 e−r2]r=a

r=0·2π

= π(1− e−a2) .

4.6 Polar coordinates – continued

Polar coordinates are also useful in representing circles other than those centered at the origin(0,0). Consider the equation

r = acosθ ⇔ r =axr

⇔ r2 = ax , (4.23)

hence

x2 + y2 = ax . (4.24)

Completing the square, we obtain(x− a

2

)2+ y2 = a

4 . (4.25)

This means that r = acosθ represents a circle with center (a2 ,0) and radius a

2 . If D′ denotes thedisc bounded by the circle, we have the explicit parametrization

D′ ={(r,θ) | 0≤ r ≤ acosθ , −π

2 ≤ θ ≤ π

2

}. (4.26)

Similarly, r = asinθ represents the circle centered at (0, a2) with radius a

2 . The disc bounded bythis circle is described via the explicit parametrization 0≤ θ ≤ π and 0≤ r ≤ asinθ .

� Example 4.8 Sketch the region of integration for

I =∫ 1

0

∫ √2x−x2

x

√4− x2− y2 dydx

and then evaluate the integral by using polar coordinates.

Solution We first compute

y =√

2x− x2 ⇒ y2 = 2x− x2 ⇔ (x−1)2 + y2 = 1 .

Page 78: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

78 Double integrals

Thus, the region of integration is the region between the line y= x and the circle (x−1)2+y2 = 1:

In polar coordinates, this region is described as

π

4 ≤ θ ≤ π

2 , 0≤ r ≤ 2cosθ .

Therefore,

I =∫ π

4

∫ 2cosθ

0

√4− r2 rdrdθ

=∫ π

4

[−1

3(4− r2)32

]r=2cosθ

r=0dθ

=∫ π

4

13(8−8sin3

θ)dθ

= 83

[∫ π

4

dθ −∫ π

4

(1− cos2θ)sinθdθ

]u = cosθ , du =−sinθdθ

= 83

4 +∫ 0

1√2

(1−u2)du

]

= 83

4 −1√2+ 1

3

(1√2

)2].

4.7 Other substitutionsSometimes the form of the integrand suggests a suitable substitution.

� Example 4.9 Find∫∫D

(x− yx+ y

)2

dA ,

where D is the region bounded by the line x+ y = 1 and the coordinate axes.

Solution Let u = x+ y and v = x− y, such that

x = 12(u+ v) , y = 1

2(u− v) .

The Jacobian for the change of coordinates reads

∂ (x,y)∂ (u,v)

= det

(∂x∂u

∂x∂v

∂y∂u

∂y∂v

)= det

(12

12

12 −1

2

)=−1

2.

Page 79: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.8 Calculating volumes using double integrals 79

Next, we need to know the region D′ in the (u,v) variables that corresponds to the region D inthe (x,y) variables, which is described via x+ y≤ 1, x≥ 0 and y≥ 0:

This may be achieved by simply expressing the above equations in terms of the (u,v) variables,that is

u≤ 1 , u+ v≥ 0 , u− v≥ 0 .

To compute the double integral, it is most convenient to perform the integral over v first. It iseasy to check that

∂ (x,y)∂ (v,u)

=−∂ (x,y)∂ (u,v)

= 12 ,

hence we obtain:

I =∫ 1

0

∫ u

−u

( vu

)2 ∂ (x,y)∂ (v,u)

dvdu

= 12

∫ 1

0

[13

v3

u2

]v=u

v=−udu = 1

6

∫ 1

02udu

=16.

4.8 Calculating volumes using double integrals

Consider a function f : R1→ R1 with f ≥ 0. We may compute

∑i

f (xi)δxi = sum of areas of rectangles of width δxi and height f (xi) . (4.27)

So ∫ b

af (x)dx = area under the graph of f . (4.28)

Page 80: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

80 Double integrals

Consider next a function f : R2→ R1 with f ≥ 0.

∑i

∑j

f (xi,y j)δxiδy j = sum of volumes of boxes with base area δxiδy j and height f (xi,y j) .

(4.29)

Therefore,∫∫D

f (x,y)dxdy = volume of the region between D and the graph of f . (4.30)

� Example 4.10 Find the volume bounded by the plane 2x+y+ z = 4 and the coordinate planes.

Solution The volume V we wish to compute is the volume between the triangle T and thesurface z = 4−2x− y, hence

V =∫∫

T(4−2x− y)dxdy .

The x-range for T is 0≤ x≤ 2. For x fixed, the y-range is 0≤ y≤ 4−2x.

Page 81: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

4.8 Calculating volumes using double integrals 81

V =∫ 2

0

(∫ 4−2x

0(4−2x− y)dy

)dx

=∫ 2

0

[(4−2x)y− 1

2 y2]y=4−2xy=0 dx

= 12

∫ 2

0(4−2x)2dx = 1

2

[(4−2x)3

3 · (−2)

]2

0

=163.

� Example 4.11 Find the volume of the region inside the intersection of two cylnders, whichare described by

x2 + y2 = a2 , x2 + z2 = a2 .

Solution Call the two cylinders C1 and C2. C1 is parallel to the z-axis. Its intersection with thexy-plane is a circle

C : x2 + y2 = a2 .

The cylinder C2 is parallel to the y-axis.

Let D be the region in the xyplane inside the circle C. If (x,y) ∈ D, then the height of C2above (x,y) is z =

√a2− x2. The region below the circle C must have the same volume as the

region above it because C2 is symmetric under z→−z. Hence

V = 2 ·∫∫

D

√a2− x2dxdy .

Page 82: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

82 Double integrals

The x-range is −a≤ x≤ a. For x fixed, the y-range is

−√

a2− x2 ≤ y≤√

a2− x2 ,

hence we obtain:

V = 2∫∫ ∫ a

−a

(∫ √a2−x2

−√

a2−x2

√a2− x2dy

)dx

= 2∫ a

−a

[y√

a2− x2]y=√

a2−x2

y=−√

a2−x2dx

= 4∫ a

−a(a2− x2)dx = 4

[a2x− 1

3 x3]a−a

= 163 a3 .

Page 83: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Triple integralsChange of variables in triple integrals

Cylindrical polar coordinates (r,θ ,z)Spherical polar coordinates (r,θ ,φ)

5 — Triple integrals

5.1 Triple integralsDefinition 5.1.1 A 3-dimensional region D⊂ R3 is called bounded if

∃R > 0 such that D⊂ BR = {(x,y,z)|x2 + y2 + z2 < R2}

This means that D fits inside an open ball BR of sufficiently large radius R.Let f = f (x,y,z) be a function defined on D. We can define a triple integral of f over D

in much the same way we defined a double integral in definition 4.1.3. Namely, consider asubdivision of D into small three-dimensional blocks B1, . . . ,BN . Let each block be a close set(containing its own boundary) and let δVk denote the volume of block Bk. Furthermore, in eachblock choose a point with coordinates (xk,yk,zk) ∈ Bk. We set up a Riemann sum as

S(Bk,(xk,yk,zk), f ) =N

∑k=1

f (xk,yk,zk)δVk .

As a measure of how small each block is we take the block’s diameter that is given by themaximum distance between any two points inside the block:

diam(B) = max(x,y,z)∈B,(x′,y′,z′)∈B

√(x− x′)2 +(y− y′)2 +(z− z′)2 .

For example for a rectangular box with side lengths a, b, c its diameter equals the length of thelong diagonal:

√a2 +b2 + c2, for a three-dimensional ball of radius r the diameter equals 2r.

Now setλ (B1, . . . ,BN) = max{diam(B1),diam(B2), . . .diam(BN)} .

This is a quantity measuring how small the blocks are, or how fine our subdivision is. Ifλ (B1, . . . ,BN)< δ then the distance between any two points inside any block is less than δ .

Definition 5.1.2 — Triple integral. Consider a bounded region on in three-dimensional space:D⊂R3. We say that a function f = f (x,y,z) defined on D is integrable on D if the followinglimit exists

limλ (B1,...BN)→0

S(Bk,(xk,yk,zk), f ) = I .

Page 84: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

84 Triple integrals

We call this value I the triple integral of f over D and denote∫∫∫D

f (x,y)dxdydy .

As in the case of double integral notation the order of the differentials dxdydz does not matterand can be replaced by any of the other 6 possible orderings.

Another notation frequently used is∫∫∫D

f (x,y,z)dV . (5.1)

Triple integrals can also be expressed as iterated integrals. Suppose D is a rectangular box, i.e.

a≤ x≤ b , c≤ y≤ d , h≤ z≤ k .

Then, the triple integral can be calculated as

∫∫∫D

f (x,y,z)dV =∫ b

a

∫ d

c

function of x and y︷ ︸︸ ︷(∫ k

hf (x,y,z)dz

)dy

︸ ︷︷ ︸

function of x only

dx . (5.2)

Here, we do the z-integration first, then the y-integration and finally the x-integration. As wasthe case for double integrals, we can change the order of integration. We can also considerintegration regons with more complicated boundaries, such that the limits in the inner integralsdepend on the variables in the outer integrals. Suppose that the top and bottom surfaces formingthe boundary of D are specified by the functions a(x,y) and b(x,y) for (x,y) ∈ Dp, where Dp isthe projection of D onto the xy-plane:

Page 85: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

5.1 Triple integrals 85

Then,

∫∫∫D

f dV =∫∫

Dp

(∫ a(x,y)

b(x,y)f (x,y,z)dz

)dxdy . (5.3)

To evaluate the double integral over Dp, we can turn it into an iterated integral so that in total wehave to perform three iterated integrals.

Note that we can also project D onto the xy- or yz-planes, which occasionally simplifies thecomputations:

� Example 5.1 Let D be the region in the first octant bounded by the coordinate planes and theplane x+ y+ z = 1. Find

∫∫∫D x dV .

Solution

Page 86: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

86 Triple integrals∫∫∫D

x dV =∫∫

Dp

(∫ 1−x−y

0x dz

)dxdy

=∫∫

Dp

[xz]z=1−x−yz=0 =

∫∫Dp

x(1− x− y)dxdy

=∫ 1

0

∫ 1−x

0(x− x2− xy)dydx

=∫ 1

0

[x(1− x)y− xy2

2

]y=1−x

y=0dx

=∫ 1

0

x−2x2−4x3

2dx =

[x2

4− x3

3+

x4

8

]1

0=

124

.

� Example 5.2 Express∫∫∫

D f (x,y,z)dV as an iterated integral in the form∫ [∫ (∫f (x,y,z)dz

)dy]

dx

if D is the region bounded by the surfaces z = 0, z = x and y2 = 4− 2x (where the first twoequations describe planes, while the third one describes a half-cylinder) and with x≥ 0.

Solution The projection Dp onto the xy-plane reads

Dp ={(x,y) ∈ R2 | x≥ 0 and y2 ≤ 4−2x

}⊂ R2 .

Also, 0≤ z≤ x, so that∫∫∫D

f (x,y,z)dV =∫∫

Dp

(∫ x

0f (x,y,z)dz

)dxdy

=∫ 2

0

[∫ √4−2x

−√

4−2x

(∫ x

0f (x,y,z)dz

)dy

]dx .

Alternatively, we could choose to project onto the xz-plane (y = 0):

Page 87: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

5.2 Change of variables in triple integrals 87

∫∫∫D

f (x,y,z)dV =∫∫

D′p

(∫ √4−2x

−√

4−2xf (x,y,z)dy

)dxdz

=∫ 2

0

[∫ 2

z

(∫ √4−2x

−√

4−2xf (x,y,z)dy

)dx

]dz .

Note that for any triple integral of f = 1,∫∫∫D

1dV ≈∑i

δVi ,

or more precisely∫∫∫D

1dV =Vol(D) – the volume of the 3-dimensional region D. (5.4)

� Example 5.3 Set f = 1 in the previous example. In the first representation we obtain:

V =∫ 2

0

[∫ √4−2x

−√

4−2x

(∫ x

0dz)

dy

]dx =

∫ 2

0

∫ √4−2x

−√

4−2xxdydx

= 2∫ 2

0

f︷︸︸︷x ·

g︷ ︸︸ ︷√4−2xdx .

Integrating by parts we obtain:

V = 2 ·(

f∫

g−∫ [∫

g f ′])

= 2

[x · (4−2x)3/2

(−2) ·3/2

]2

0

+∫ 2

0

2 · (4−2x)3/

3dx

=

[23(4−2x)5/2

(−2) ·5/2

]2

0

=6415

.

Using the second representation of the integral we have:

V =∫ 2

0

[∫ 2

z

(∫ √4−2x

−√

4−2xdy

)dx

]dz

∫ 2

0

∫ 2

z2√

4−2xdxdz = 2∫ 2

0

[(4−2x)3/2

(−2) ·3/2

]x=2

x=z

dz =6415

as above. �

5.2 Change of variables in triple integralsConsider a function f : R3→ R, i.e. f = f (x,y,z), and suppose that

x = x(u,v,w) , y = y(u,v,w) , z = z(u,v,w) . (5.5)

Then ∫∫∫V

f (x,y,z)dxdydz =∫∫∫

V ′f (x(u,v,w),y(u,v,w),z(u,v,w))|J|dudvdw , (5.6)

Page 88: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

88 Triple integrals

where |J| is the absolute value of the Jacobian,

J =∂ (x,y,z)∂ (u,v,w)

= det

∂x∂u

∂x∂v

∂x∂w

∂y∂u

∂y∂v

∂y∂w

∂ z∂u

∂ z∂v

∂ z∂w

. (5.7)

5.2.1 Cylindrical polar coordinates (r,θ ,z)

x = r cosθ

y = r sinθ

z = z ,

(5.8)

hence z is unchanged, but we use 2d polar coordinates for the (x,y) variables. The Jacobian forthis change of coordinates reads

∂ (x,y,z)∂ (r,θ ,z)

= det

∂x∂ r

∂x∂θ

∂x∂ z

∂y∂ r

∂y∂θ

∂y∂ z

∂ z∂ r

∂ z∂θ

∂ z∂ z

= det

cosθ −r sinθ 0sinθ r cosθ 0

0 0 1

= r cos2

θ + r sin2θ = r .

(5.9)

In summary, denoting by V ′ the region in (r,θ ,z) variables that corresponds to the region V in(x,y,z) variables, we obtain the useful formula

∫∫∫V

f dxdydz =∫∫∫

V ′f rdrdθdz . (5.10)

� Example 5.4 Fnd the volume of the cone of radius a and height h.

Solution A general point on the surface of the cone has

rz=

ah⇔ r =

(ah

)· z .

Page 89: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

5.2 Change of variables in triple integrals 89

Hence for the points in the interior and on the surface of the cone, we have

0≤ θ ≤ 2π , 0≤ z≤ h , 0≤ r ≤(a

h

)z .

Hence the volume of the cone is

V =∫ 2π

0

[∫ h

0

(∫ (ah)z

0rdr

)dz

]dθ = 1

3 πa2h .

� Example 5.5 Find the volume of the region in the intersection of the solid cylinder x2+y2 ≤ 1(i.e. the solid cylinder of radius 1 around the z-axis) and the solid sphere described by

x2 + y2 + z2 ≤ 4

(i.e. the solid sphere of radius 4 around the origin):

Page 90: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

90 Triple integrals

Solution

x2 + y2 ≤ 1 ⇒ r ≤ 1

x2 + y2 + z2 ≤ 4 ⇒ z2 ≤ 4− r2 .

Thus we have for the θ range 0≤ θ ≤ 2π , for the r range 0≤ r ≤ 1, and for the z range for fixed(r,θ)

−√

4− r2 ≤ z≤√

4− r2 .

Hence the volume of the intersection of the solid cylinder and of the solid sphere may becomputed as

V =∫ 2π

0

[∫ 1

0

(∫ √4−r2

−√

4−r2dz

)rdr

]dθ

=∫ 2π

0

[∫ 1

02r√

4− r2dr]

= 4π

3 (8−3√

3) .

5.2.2 Spherical polar coordinates (r,θ ,φ)The spherical polar coordinates (r,θ ,φ) of a point r are defined as shown in the figure:

The relationship between Cartesian (x,y,z) and sphericl polar coorrdinates (r,θ ,φ) of r isgiven by

x = r sinθ cosφ

y = r sinθ sinφ

z = r cosθ ,

(5.11)

with the angular ranges

0≤ θ ≤ π , 0≤ φ ≤ 2π . (5.12)

These formulae can be obtained as follows. Let T be the vertical triangle in the figure, with basein the xy-plane and top corner at the point r. Firstly, the height of T is z = r cosθ . Next, the xand y coordinates of r are the same as the x and y coordinates of the point in the base of T atthe right angle (i.e. at the foot of the vertival line in T ), and we can obtain these coordinates byapplying trigonometry (in the xy-plane) to this point. The length of the base of T is rb = r sinθ ,and the point lies at an angle φ from the x-axis, so we have

x = rb cosφ = r sinθ cosφ

y = rb sinφ = r sinθ sinφ .(5.13)

The angular ranges are obvious from the figure.

Page 91: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

5.2 Change of variables in triple integrals 91

R Note: The angle between the point and the x-axis was denoted θ when working incylindrical polar coordinates, but has now become φ in the spherical polar coordinatesystem. This might be rather irritating, but is the standard notation, so we have to stickwith it.

JacobianThe Jacobian for the change from Cartesian (x,y,z) to spherical polar coordinates (r,θ ,φ) is

∂ (x,y,z)∂ (r,θ ,φ)

= r2 sinθ (5.14)

see Tutorial 6. Hence, in spherical polar coordinates, triple integrals have the form∫∫∫V

f dxdydz =∫∫∫

V ′f r2 sinθdrdθdφ . (5.15)

� Example 5.6 Evaluate∫∫∫

V xdV , where V is the part of the solid ball

x2 + y2 + z2 ≤ a2

lying in the first octant.

Solution In spherical polar coordinates, V is described by the θ range 0≤ θ ≤ π

2 and the φ

range 0≤ φ ≤ π

2 , while the r range is 0≤ r ≤ a. We thus obtain (where J indicates the Jacobianof the coordinate change):

∫∫∫V

xdV =∫ π

2

0

∫ π

2

0

∫ a

0r sinθ cosφ︸ ︷︷ ︸

x

·r2 sinθ︸ ︷︷ ︸J

drdθdφ

=

(∫ π

2

0cosφdφ

(∫ π

2

0sin2

θdθ

)·(∫ a

0r2dr

)

= [sinφ ]π

20 ·

(12

∫ π

2

0(1− cos2θ)dθ

)· a

4

4

=πa4

16.

Lattitude and longitudeLocations on the surface of the earth are often specified using lattitude and longitude. These are,more or less, the angles in spherical polar coordinates, with some minor differences.

The origin is chosen to lie on the center of the earth, and the z-axis is chosen to lie alongthe axis of rotation, with the positive direction going through the north pole. The x-axis is thenchosen so that the xz-plane cuts through a particular point in Greenwich in London (these axes

Page 92: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

92 Triple integrals

were chosen when Britain still had an empire and “ruled the waves”, so needed to be able tonavigate; there is actually a brass line marking the spot where the xz-plane emerges from theground in a park in Greenwich).

Lattitude corresponds to the angle θ , except that it is measured as angles north and southof the equator, with lattitudes north of the equator takn as positve, and south taken as negative.Values of lattitudes are always within the range −π/2 to π/2, with −π/2 corresponding to thesouth pole and π/2 corresponding to the north pole (in spherical polar coordinates, these pointswould correspond to θ = π and θ = 0, respectively).

Longitude corresponds to the angle φ , except that it is measured as angles east and west ofthe xz-plane, with a positive sign to the east and a negative sign to the west. Values of longitudeare always within the range −π to π .

Page 93: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Double integrals over unbounded domainsMultiple integrals of unbounded functions

6 — Integrals over unbounded regions and of unbounded functions

6.1 Double integrals over unbounded domainsWe start by reminding the definitions of one-dimensional integrals over unbounded intervals.They are defined via limits:

∞∫a

f (x)dx = limt→∞

t∫a

f (x)dx ,

b∫−∞

f (x)dx = limt→−∞

b∫t

f (x)dx ,

where it is assumed that f (x) is integrable on any bounded subinterval [a, t] or [t,b] respectively,and that the limit exists. If the limit does not exist we say that the integral diverges. Here thelimits at infinity are defined as

Definition 6.1.1 — Limits at ifinity.

limx→∞

f (x) = L (6.1)

means that∀ε > 0 ∃c such that | f (x)−L|< ε ∀x > c .

Also

limx→−∞

f (x) = L (6.2)

means that∀ε > 0 ∃c such that | f (x)−L|< ε ∀x < c .

Also we define∞∫−∞

f (x)dx =a∫

−∞

f (x)dx+∞∫

a

f (x)dx

where on the right hand side a is some arbitrary point on the real line and both integrals mustexist.

Page 94: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

94 Integrals over unbounded regions and of unbounded functions

We say that∞∫a

f (x)dx converges absolutely if∞∫a| f (x)|dx converges. A theorem shows that

absolute convergence implies convergence. However the inverse is not true: there exist functionsfor which the integral converges but not absolutely converges. For example

∞∫1

sin(x)x

dx

converges but not absolutely converges.Often want to decide whether an integral over an unbounded interval converges or not, but

we cannot work it out explicitly. The comparison test can help with this.

Theorem 6.1.1 — Comparison Test for one-dimensional integrals. Suppose that f ,g :[a,∞)→ R are integrable on [a,x] for all x≥ a, and suppose that there is a number c≥ a suchthat 0≤ g(x)≤ f (x) for all x≥ c. Then:(a)

∫∞

a f converges⇒∫

a g converges(b)

∫∞

a g diverges⇒∫

a f diverges.A similar result holds for integrals over (−∞,a].

The forthcoming discussion can be straightforwardly generalised to multiple integrals of anydimension, but we will stick to double integrals as that illustrates all the main features.

In two dimensions, regions of integration can be more complicated than in one dimension.Let D⊂ R2 be some unbounded domain on the plane. This means that there is no radius R ∈ Rsuch that D⊂ BR, where

BR ={(x,y) ∈ R2 |

√x2 + y2 ≤ R

}(6.3)

is a disc of radius R. Let DR be a family of expanding bounded regions that cover the wholeplane in the limit. Formally this means that DR is bounded ∀R,

DR ⊂ DR′ ∀R < R′ , (6.4)

and that

∀(x,y) ∈ R2 ∃R such that (x,y) ∈ DR . (6.5)

Moreover, to avoid various strange situations, we assume that the smallest distance from theorigin to the boundary of DR goes to infinity as R→ ∞.

For example we can set DR = BR that is take the family of discs of radius R centred at theorigin, or we can take DR to be discs of radius R centred at some other fixed point, or DR can besquares with side length R centred at some fixed point, etc.

Definition 6.1.2 — Double integral over unbounded domain. Consider an unboundedregion D⊂ R2 and a function f = f (x,y) defined on D. We say that∫∫

D

f (x,y)dxdy = I

exists if for any expanding sequence of bounded regions DR the function f is integrable onD∩DR and there exists a limit

I = limR→∞

∫∫DR∩D

f (x,y)dxdy (6.6)

Page 95: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

6.1 Double integrals over unbounded domains 95

with the value of the limit I being independent of the choice of DR.

For non-negative function f it suffices to have convergence in for any one particular familyof expanding regions DR.

Theorem 6.1.2 Let D be an unbounded region on the plane and let f (x,y)≥ 0 be defined onD. Given a family of expanding bounded regions DR, if the limit

limR→∞

∫∫D∩DR

f (x,y)dxdy = I (6.7)

exits then ∫∫D

f (x,y)dxdy

exits and is equal to I.Proof Suppose that a particular family DR is given for which (6.7) is satisfied. Supposethat DS is some other family of expanding bounded regions, labelled by a real parameter Sto distinguish from R. Since DR cover the entire plain for any value of S there exists RS ∈ Rsuch that DS∩D⊂ DR∩D, ∀R > RS and by non-negativity of f and the basic properties ofintegrals given in theorems 4.1.2, 4.1.3 we have∫∫

DS∩D

f (x,y)dxdy≤∫∫

DR∩D

f (x,y)dxdy ∀R > RS (6.8)

By (6.7) we conclude that∫∫DS∩D

f (x,y)dxdy≤ I ∀S . (6.9)

Moreover the existence of the limit (6.7) means that for any ε > 0 there exists a real number csuch that∫∫

DR∩D

f (x,y)dxdy > I− ε ∀R≥ c . (6.10)

Page 96: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

96 Integrals over unbounded regions and of unbounded functions

Since the family DS covers the entire plane as well we have Dc∩D⊂ DS∩D ∀S > Sc whereSc is some real number. Then similarly to (6.8) we have∫∫

Dc∩D

f (x,y)dxdy≤∫∫

DS∩D

f (x,y)dxdy ∀S > Sc

and therefore by (6.10)∫∫DS∩D

f (x,y)dxdy > I− ε ∀S > Sc . (6.11)

Combining (6.9) and (6.11) we obtain that ∀ε > 0 there exists a real number Sc such that∣∣∣∣∣∣∣∫∫

DS∩D

f (x,y)dxdy− I

∣∣∣∣∣∣∣< ε ∀S > Sc (6.12)

that means that

limS→∞

∫∫D∩DS

f (x,y)dxdy = I . (6.13)

As in one dimension we say that a double integral of f = f (x,y) over an unbounded regionD converges absolutely if there exists ∫∫

D

| f (x,y)|dxdy .

It is not hard to show that if a double integral converges absolutely it converges. Remarkably,unlike in one dimension, the inverse is also true.

Theorem 6.1.3 — Absolute convergence of double integrals over unbounded do-mains. Given an unbounded region D and a function f = f (x,y) defined on D then∫∫

D

f (x,y)dxdy

converges if and only if ∫∫D

| f (x,y)|dxdy

converges.

The above theorems result in the following strategy when investigating convergence andcalculating double integrals over unbounded domains. Given a function f = f (x,y) and anunbounded region D, to establish the convergence of

∫∫D f dxdy we investigate the convergence

of∫∫

D | f |dxdy. As | f | is a non-negative function, by theorem 6.1.2, to establish its convergenceit suffices to establish the desired limit for any one particular sequence of expanding regions DR.The latter can be chosen to simplify calculations, e.g. by matching part of the boundary of D orby matching a symmetry (say rotational) of f . The same idea of making a convenient choice ofDR works in calculating the value of the limit I. We illustrate this in the following two examples.

Page 97: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

6.1 Double integrals over unbounded domains 97

� Example 6.1 Let

D ={(x,y) ∈ R2 | x≥ 1 , y≥ 1

}and calculate

∫∫D

1x2y2 dxdy.

Solution f (x,y) = 1x2y2 is bounded and continuous on D, and also f (x,y)≥ 0 on D, so we can

use any shape that fills out D.We will use

DR ={(x,y) ∈ R2 | 1≤ x≤ R , 1≤ y≤ R

},

i.e. squares:

Then, ∫∫DR

1x2y2 dxdy =

∫ R

1

∫ R

1

1x2y2 dxdy

=∫ R

1

(1y2

[−1

x

]R

1

)dy =

(1− 1

R

)2 R→∞−−−→ 1 .

Therefore, f is integrable on D and the value of the integral is 1. �

� Example 6.2 Let D = {(x,y) ∈ R2 | y≥ 0}, i.e. the upper half plane. Calculate∫∫D

e−(x2+y2)dxdy .

Solution Again we can use any shape, but from the form of the integrand we can guess that

the standard “ball” BR, or rather, its intersection with the upper half plane, will be a good choice:

Page 98: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

98 Integrals over unbounded regions and of unbounded functions

Employing polar coordinates, we may compute:∫∫D∩BR

e−(x2+y2)dxdy =

∫π

0

∫ R

0e−r2

rdrdθ

= π

[−1

2 e−r2]R

0= π

2

(1− e−R2

)R→∞−−−→ π

2 .

Sometimes calculating I analytically is hard and we want just to establish whether a givendouble integral converges or diverges. As in one dimension a comparison test can be used.

Theorem 6.1.4 — Comparison Theorem. Let D be an unbounded region on the plane andlet f = f (x,y) and g = g(x,y) be two functions defined on D such that each function isintegrable on any BR∩D. Suppose further that for some c > 0

0≤ |g(x,y)| ≤ | f (x,y)| ∀(x,y) ∈ D and√

x2 + y2 ≥ c (6.14)

then the following two implications hold(a) f integrable on D⇒ g integrable on D(b) g not integrable on D⇒ f not integrable on D

� Example 6.3 Prove the convergence of∫∫D

sin(x2y)x2y2 + cos2(xy)

dxdy (6.15)

where D is as described in example 6.1.Solution We estimate the absolute value of the given function as∣∣∣∣ sin(x2y)

x2y2 + cos2(xy)

∣∣∣∣= |sin(x2y)|x2y2 + cos2(xy)

≤ 1x2y2 + cos2(xy)

≤ 1x2y2 (6.16)

for all values of (x,y). Since, as shown in example 6.1 by direct calculation,∫∫D

1x2y2 dxdy

converges, by comparison test we conclude that | f | converges and therefore by the absoluteconvergence theorem the given integral converges. �

6.2 Multiple integrals of unbounded functionsA function of two variables f (x,y) is called bounded on a bounded region D⊂ R2 if there existsa number K such that

| f (x,y)| ≤ K ∀(x,y) ∈ D .

If such a number does not exist then we say that f is unbounded on D.

� Example 6.4

f (x,y) =

{1

x2+y2 for (x,y) 6= (0,0)

1 for (x,y) = (0,0)

considered on the unit disc B1 is well defined but is unbounded. The origin is called a singularpoint of this function because f is unbounded on any neighbourhood (small disc) containing theorigin and is bounded outside of such neighbourhood. �

Page 99: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

6.2 Multiple integrals of unbounded functions 99

� Example 6.5 f = 1xy is defined on an open square

D = {(x,y)|0 < x < 1,0 < y < 1}

but is unbounded on it. Here we have two singular lines that lie on the boundary of D: x = 0 ,0 <y < 1 and y = 0 ,0 < x < 1. This lines are not part of D but D has points arbitrarily close to themand the function “blows up” as we approach these lines. �

We can integrate unbounded functions by choosing expanding sequences of regions on whichf is bounded and which ultimately fill the desired integration region. To construct such expandingregions it may be more convenient to think in terms of removing, or cutting away, neighbourhoodsof singular points and lines. We can choose a family NR of shrinking neighbourhoods of singularpoints in such a way that each NR contains all singular points in D and NR′ ⊂NR whenever R′ < Rand define∫∫

D

f (x,y)dxdy = limR→0

∫∫D\NR

f (x,y)dxdy (6.17)

with the limit existing and being the same for each choice of neighbourhoods NR. It should benoted that in this definition, in the case when singular points themselves belong to D, we do noteven need for f to be defined at these points as in the definition they are cut away.

As in the case of unbounded domains if f (x,y) ≥ 0 everywhere on D then to check theconvergence it suffices to check that the limit (6.17) exists for one particular choice of NR. Also,∫∫

D f dxdy converges if and only if∫∫

D | f |dxdy converges.In the next two examples we calculate double integrals of unbounded functions using a

convenient choice of the neighbourhoods NR.

� Example 6.6 Compute∫∫B1

1√x2 + y2

dxdy ,

where B1 is the unit “ball” centered at the origin.

Solution Here there is one singular point: the origin. We choose to cut out its neighbourhoodNR = BR, R < 1. Denote

DR = D\NR = B1 \BR ={(x,y) ∈ R2 | R≤ x2 + y2 ≤ 1 , 0 < R < 1

},

that is we cut out a small hole of radius R around the origin, then perform the integration overthe resulting annular domain, and finally take the limit R→ 0.

We thus obtain, using polar coordinates:∫∫DR

1√x2 + y2

dxdy =∫ 2π

0

∫ 1

R

1r

rdrdθ = 2π(1−R) R→0−−−→ 2π .

Page 100: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

100 Integrals over unbounded regions and of unbounded functions

� Example 6.7 For

D ={(x,y) ∈ R2 | 0≤ x≤ 1 , 0≤ y≤ 1

},

compute∫∫

D1√xy dxdy.

Solution Here we have two singular intervals on the boundary of the region: x = 0,0≤ y≤ 1and y = 0,0≤ x≤ 1. To cut them out we choose their neighbourhoods

NR = {(x,y)|0≤ x < R,0≤ y≤ 1}∪{(x,y)|0≤ y < R,0≤ x≤ 1} .

Cutting them out of D results in

D\NR = DR ={(x,y) ∈ R2 | R≤ x≤ 1 , R≤ y≤ 1

},

as depicted below:

We thus compute:∫∫DR

1√

xydxdy =

[2x1/2

]1

R·[2y1/2

]1

R= 4

(1−√

R)2 R→0−−−→ 4 .

The following version of comparison theorem holds for double integrals of unboundedfunctions

Theorem 6.2.1 Let D be bounded region on the plane and let f = f (x,y) and g = g(x,y) betwo functions defined on D apart from possibly a finite collection of singular points and lines.Choose a family of shrinking neighboursoods NR containing all singular points. Suppose thatboth f and g are integrable on every set D\NR and that for some c > 0

0≤ |g(x,y)| ≤ | f (x,y)| ∀(x,y) ∈ Nc where f and g are defined (6.18)

then the following two implications hold(a) f integrable on D⇒ g integrable on D(b) g not integrable on D⇒ f not integrable on D

� Example 6.8 Determine whether the following integral converges

∫∫D

ex2y

xydxdy

Page 101: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

6.2 Multiple integrals of unbounded functions 101

whereD = {(x,y)|−1≤ x≤ 1,0≤ y≤ 1}

is a rectangle lying in the upper half plane.Solution Here we have two singular intervals which are joined at the origin: y = 0,−1≤ x≤ 1and x = 0,0≤ y≤ 1. We can cut out two strips

NR = {(x,y)|0≤ y < R}∪{(x,y)|−R≤ x < R}

to remove the singular points. Since x2y≥ 0 ∀(x,y) ∈ D we estimate∣∣∣∣∣ex2y

xy

∣∣∣∣∣≥ 1|x|y

.

Furthermore to show that 1|x|y diverges on D we calculate

∫∫D\NR

1|x|y

dxdy =1∫

R

(

−R∫−1

+

1∫R

)1|x|y

dxdy =

1∫R

1y

dy

21∫

R

1x

dx

= 2(lnR)2

that diverges as R→ 0. Hence ∫∫D

1|x|y

dxdy

diverges and by comparison test the given integral diverges as well. �

Page 102: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain
Page 103: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Maxima and minimaSecond derivative test for maxima andminima – one variable case

Second derivative test for two variablesLagrange multipliersMore examples

7 — More applications of partial derivatives

7.1 Maxima and minima

Let f : R3→ R. It is said that f has a global

minimummaximum

at (x0,y0) iff (x0,y0)≤ f (x,y)f(x0,y0)≥ f (x,y)

for all (x,y) ∈ R2. It is said that f has a local

minimummaximum

at (x0,y0) iff (x0,y0)≤ f (x,y)f(x0,y0)≥ f (x,y)

for all (x,y) in a neighborhood of (x0,y0).

� Example 7.1 Let f be the height function defined on the Scottish highlands. Then the top ofevery mountain is a local maximum (i.e. all nearby points are lower). The top of Ben Nevis isthe global maximum. �

Recall that for f : R1→ R1, f ′ = 0 at any local maximum or minimum.

The converse need not be true. For example, the function f (x) = x3 has an inflection point at the

Page 104: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

104 More applications of partial derivatives

origin, where fx(0) = 0, but this is neither a local maximum nor a local minimum.

The same happens for f : R2→ R at a saddle point:

Definition 7.1.1 If fx(x0,y0) = fy(x0,y0) = 0, then (x0,y0) is called a stationary point.

� Example 7.2

1. For the function f (x,y) = x2 + y2, (x,y) = (0,0) is a stationary point which happens to bea local minimum.

2. For the function f (x,y) =−x2− y2, the point (x,y) = (0,0) is a stationary point and is alocal maximum.

3. For f (x,y) = x2− y2, the point (x,y) = (0,0) is a stationary point and a saddle point.�

7.1.1 Second derivative test for maxima and minima – one variable caseSuppose f : R1→ R1 and f ′(a) = 0, i.e. a is a stationary point of f . Suppose further that(a) f has derivatives up to third order near a,(b) f ′′(a) 6= 0,(c) | f ′′′(x)| ≤C for all x near a and some constant c > 0.Then by virtue of the third mean value theorem (where we approximate f with a quadraticpolynomial near x = a):

f (a+∆x) = f (a)+(∆x)2

2!f ′′(a)+ r3(x)

= f (a)+(∆x)2

2f ′′(a) ·

{1+

2r3(x)(∆x)2 f ′′(a)

} (7.1)

Page 105: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

7.2 Second derivative test for two variables 105

We may estimate the remainder term (cf. Thoerem 3.4.1)

r3(x) =(∆x)3 f ′′′(x∗)

3!,

as

|r3(x)| ≤|∆x|3 · c

6,

hence:∣∣∣∣ 2r3(x)(∆x)2 f ′′(a)

∣∣∣∣≤ 2|∆x|3 · c6(∆x)2| f ′′(a)|

=c

3| f ′′(a)|· |∆x|< 1 if |∆x|< 3| f ′′(a)|

c.

Thus, for sufficiently small ∆x the term {. . .} in (7.1) above is positive, hence if

f ′′(a)< 0 ⇒ x = a is a local maximum

f ′′(a)> 0 ⇒ x = a is a local minimum .

7.2 Second derivative test for two variablesLet f : R2→ R1 and fx(a,b) = fy(a,b) = 0, i.e. (a,b) is a stationary point. Taylor’s formulareveals that

f (a+∆x,b+∆y) = f (a,b)+12

Q(∆x,∆y)+R3(x,y) , (7.2)

where

Q(∆x,∆y) = A · (∆x)2 +2B∆x∆y+C · (∆y)2

A = fxx(a,b) , B = fxy(a,b) , C = fyy(a,b) .

We will ignore the remainder term R3(x,y) below. It can be shown similarly to the one variablecase that under certain assumptions one can indeed neglect R3(x,y). We distinguish three specialcases:• If Q(∆x,∆y)< 0 for all sufficiently small ∆x, ∆y, then (a,b) is a local maximum.• If Q(∆x,∆y)> 0 for all sufficiently small ∆x, ∆y, then (a,b) is a local minimum.• If Q(∆x,∆y) can take both positive and negative values for all sufficiently small ∆x, ∆y,

then (a,b) is a saddle point.In the special case Q(∆x,∆y) = 0 for all sufficiently small ∆x, ∆y, the remainder term R3(x,y)has to be analyzed.

Assume that A 6= 0. Then, we can rewrite Q as

Q(∆x,∆y) = A((∆x)2 +

2BA

∆x∆y+CA(∆y)2

)= A

((∆x+

BA

∆y)2

+

(CA− B2

A2

)(∆y)2

)

= A((

∆x+BA

∆y)2

︸ ︷︷ ︸≥0

+(AC−B2)(∆y)2

A2︸ ︷︷ ︸≥0

).

(7.3)

Page 106: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

106 More applications of partial derivatives

Thus:(a) If AC−B2 > 0, then Q has the same sign as A for all (sufficiently small) ∆x and ∆y. We may

discern the following cases:• AC−B2 > 0 and A < 0⇒ (a,b) is a local maximum• AC−B2 > 0 and A > 0⇒ (a,b) is a local minimum.

(b) If AC−B2 < 0, consider

Q(∆x,0) = A(∆x)2 .

It has the same sign as A. On the other hand,

Q(−B

A∆y,∆y

)= A · (AC−B2)︸ ︷︷ ︸

≤0

·(

∆yA

)2

︸ ︷︷ ︸≥0

has the sign opposite to the sign of A. Hence we conclude that if AC−B2 < 0, we have asaddle point.

R Notes:(a) If AC−B2 > 0, then AC > B2 ≥ 0, hence if A and C are not equal to 0 then A and C

have the same sign in this case. Hence we can look at the sign of C in the above test.(b) If A = 0 and C 6= 0, we can obtain a similar test by by dividing over C and completing

the square. If B 6= 0, in this case we have that

AC−B2 =−B2 < 0 ,

thus we have found a saddle point. A similar argument holds for the case A 6= 0,C = 0 and B 6= 0. In the case A = B = 0 but C 6= 0, we have for C > 0 a localminimum and for C < 0 a local maximum.

(c) If A =C = 0 and b 6= 0,

Q(∆x,∆y) = 2B∆x∆y

clearly changes sign, so we have a saddle point.(d) In the special case A = B =C = 0, the test does not work!

� Example 7.3 Find the stationary points of the following functions and determine their nature:(i) f (x,y) = 2x2− xy+ y2 +7x(ii) g(x,y) = xy− x3y− xy3.

Solution (i) fx = 4x− y+7, fy =−x+2y. A point (x,y) is a stationary point if

4x− y+7 = 0−x+2y = 0

}⇔ y = x

27x+14 = 0

}⇔ x =−2 and y =−1 .

Hence, (x,y) = (−2,−1) is the only stationary point.

Next, we calculate:

fxx = 4 , fxy =−1 fyy = 2 ,

from which we conclude that

AC−B2 = fxx · fyy− ( fxy)2 = 4 ·21 = 7 > 0 .

Page 107: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

7.2 Second derivative test for two variables 107

Also, A = fxx = 4 > 0, hence we conclude that (−2,−1) is a local minimum.

(ii) From

fx = y−3x2y− y3 = y(1−3x2− y2)

fy = x− x3−3xy2 = x(1− x2−3y2) ,

and from the condition that (x,y) is stationary if fx(x,y) = fy(x,y) = 0, we conclude that thereare three stationary points:

(a) y = 0 and x(1− x2) = 0, i.e. y = 0 and x =−1,0,1(b) x = 0 and y(1− y2) = 0, i.e. x = 0 and y =−1,0,1(c) x 6= 0 and y 6= 0, then

1−3x2− y2 = 01− x2−3y2 = 0

},

and this pair of quadratic equations is solved by

x2 =14, y2 =

14⇒ x =±1

2, y =±1

2.

Hence, f has 9 stationary points:

(0,±1) , (0,0) , (±1,0) , (±12 ,±

12) .

Next, calculating the double derivatives

fxx =−6xy , fxy = 1−3x2−3y2 , fyy =−6xy ,

we may determine the nature of the various stationary points:

staionarypoint

A B C AC−B2 type

(0,0) 0 1 0 < 0 saddle(1,0) 0 −2 0 < 0 saddle(1

2 ,12) −3

2 −12 −3

2 > 0 local max.(−1,0) 0 1 0 < 0 sddale

...

In higher dimensions, for functions f : Rn→ R, stationary points can be found by puttingall the first order derivatives to zero. However, determining the nature of the stationary pointsis much more complicated. Sometimes, the nature of the stationary points is obvious from theproblem.

� Example 7.4 Consider f (x,y) = (x−2)2− (y−1)2+2(x+3y−5)4. It can easily be checkedthat (2,1) is a stationary point of f . Also, A = B =C = 0, so the second derivative test does notwork. Letting x = 2+ ε and y = 1,

f (2+ ε,1) = ε3 +3ε

4 > 0 for ε > 0 ,

while for x = 2 and y = 1+ ε

f (2,1+ ε) =−ε2 +2 · (3ε)4 = ε

3(1−2 ·34 · ε)< 0

for 0 < ε < 1/(2 ·34). Therefore, near (2,1), f can be both positive and negative, so (2,1) is asaddle point (note that f (2,1) = 0). �

Page 108: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

108 More applications of partial derivatives

A similar trick can often be used to prove that a given stationary point is a saddle point – weonly need to show that some points (x,y) near (x0,y0) give values smaller than f (x0,y0) whilesome other points near the stationary points give values larger than f (x0,y0). It is in generalharder to show that a given stationary point is a local maximum or a local minimum, since weneed to make a statment about all points in a neighborhood of the stationary point.

7.3 Lagrange multipliers

In certain problems we may need to minimize or maximize a given function subject to additionalconstraints, e.g. find the minimal distance from the origin to the plane 2x+3y− z = 5. So wehave to find a minimum of f (x,y,z) = x2 + y2 + z2 subject to the constraint 2x+3y− z = 5. Inthis case, we can solve the constraint equation for one of the variables, say, z = 2x+3y−5, andthen minimize

x2 + y2 +(2x+3y−5)2 ,

which is a function of just two variables. But in general, it may be hard to solve the constraintequation.

� Example 7.5 Maximize f (x,y)> 0 subject to g(x,y) = 0. We can think of the graph of f as aheight function for some mountainous landscape:

The usual maximization looks for the top of the mountain, wwhile the constrained maximizationlooks for the highest point along a path given by g(x,y) = 0. Note that fx and fy are in generalnot zero at the constrained maximum. �

Theorem 7.3.1 If (x0,y0) is a local maximum of f (x,y) subject to the constraint g(x,y) = 0and if

(gx(x0,y0),gy(x0,y0)) 6= (0,0) , (7.4)

then

fx(x0,y0)+λgx(x0,y0) = 0fy(x0,y0)+λgy(x0,y0) = 0

g(x0,y0) = 0

(7.5)

for some λ ∈R. The above gives a system of three equations for three variables (i.e. for x0, y0and λ ). λ s called the Lagrange multiplier.

Page 109: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

7.3 Lagrange multipliers 109

R Remarks:

(1) If f ,g : Rn→ R, a similar system of n+1 equations can be written:

∂ f∂xi

(x0)+λ∂g∂xi

(x0) = 0 , i = 1, . . . ,n

y = y(x)

∂x( f (x,y)+λg(x,y)) = 0

∂y( f (x,y)+λg(x,y)) = 0

We can prove the above statement via applying the chain rule for differentiation:

ddx

( f (x,y(x))+λg(x,y(x))) = 0

⇔ fx(x,y(x))+λgx(x,y(x))+dydx

( fy(x,y(x))+λgy(x,y(x))) = 0

Thus, choosing λ ∈ R such that fy +λgy = 0, we obtain indeed that fx +λgx = 0.(2) If x0, y0 and λ do satisfy the above equations, there is no easy way (test) for determin-

ing the nature of the point, i.e. whether it is a local maximum, a local minimum or asaddle point.

(3) The first two equations are equivalent to looking for a stationary point of

h = f +λg .

� Example 7.6 Minimize f = x2 + y2 + z2 subject to the constraint 2x+3y− z = 5 and usingthe method of the Lagrange multiplier.

Solution Put

h(x,y,z) = x2 + y2 + z2 +λ (2x+3Y − z−5) .

Then we obtain the equation system

hx = 2x+2λ = 0hy = 2y+3λ = 0hz = 2z−λ = 0

2x+3y− z−5 = 0

.

Hence

x =−λ , y =−32

λ , z =−λ

2.

Substituting this into the last equation we ebtain:

2(−λ )+3(−32 λ )− (1

2 λ )−5 = 0

⇒ −7λ = 5

⇒ λ =−57,

and therefore the minimum occours at

(x,y,z) =(

57,1514

,− 514

),

Page 110: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

110 More applications of partial derivatives

and the minimal distance is√(57

)2

+

(1514

)2

+

(− 5

14

)2

=5√14

.

� Example 7.7 Find the rectangular box of maximal volume with sides parallel to the coordinateplanes which can be contained inside the ellipsoid described via the equaton

4x2 + y2 +9z2 = 1 .

Solution Suppose the box has the vertex (x,y,z) in the first octant, i.e. x > 0, y > 0 and z > 0.

Since the box has maximum volume, its vertices lie on the ellipsoid. The function we want tomaximize is

V = 8x · y · z .

Set

h(x,y,z) = 8xyz+λ (4x2 + y2 +9z2−1) .

Page 111: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

7.4 More examples 111

We get the equatons:

8yz+λ8x = 0

8xz+2λy = 0

8xy+18λ z = 0 .

Multiplying the first equation by x, the second by y and the third by z, we obtain

8xyz =−λ8z2 =−2λy2 =−18λ z2 .

If λ = 0, then the volume is zero. Therefore λ 6= 0 and we can divide by it to obtain

y2 = 4x2 , z2 =49

x2 .

Substituting this into the constraint equation results in

4x2 +4x2 +4x2 = 1 ⇔ x =1√12

=1

2√

3,

hence

y = 2x =1√3, z =

23

x =2

3√

3,

and the maximal volume is

8xyz = 8 · 12√

3· 1√

3· 2

3√

3=

89√

3.

7.4 More examples� Example 7.8 Find the maximal and minimal value of

f (x,y) = x2−2xy+ y2−3x

in the region x2 + y2 ≤ 9.

Solution(1) If the maximum/minimum occurs at some point (x0,y0) inside the circle C described by the

equation x2 + y2 = 9, then (x0,y0) must be an ordinary local maximum/minimum.(2) If the maximum/minimum occurs at (x0,y0) on the circle C , then (x0,y0) must be a maxi-

mum/minimum of f subject to the constraint x2 + y2 = 9.

Page 112: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

112 More applications of partial derivatives

Case (1) From the partical derivatives

fx = 2x− y−3 , fy =−x+2y ,

we may compute{2x− y−3 = 0−x+2y = 0

⇒ x = 2 , y = 1 .

The nature of this stationary point may be determined as follows:

fxx = 2 , fxy =−1 , fyy = 2f (2,1) =−3

⇒ fxx · fyy− ( fxy)2 = 3 > 0

fxx > 0.

Thus, (2,1) is a local minimum.Case (2) With

h(x,y) = x2− xy+ y2−3x+λ (x2 + y2−9)

hx = 2x− y−3+2λx = 0

hy =−x+2y+2λy = 0 ,

multiplying the first equation by y and the second equation by x and then taking thedifference, we can get rid of λ :

2xy− y2−3y− (−x2 +2xy) = 0 ⇔ x2 = y2 +3y .

Combining this with the constraint equation

x2 + y2 = 9 ,

we obtain

2y2 = 3y = 9 ⇔ (2y−3)(y+3) = 0 ⇔ y =32

or y =−3 .

Solving for x,

y =32⇒ x2 = 9− 9

4=

274

⇒ x =±3√

32

y =−3 ⇒ x = 0 ,

we conclude that the possible maxima/minima on the circle C are (±3√

32 , 3

2) and (0,−3).Together with the local minimum (2,1) computed previously, we have

f (2,1) =−3

f (0,−3) = 9

f (3√

32 , 3

2) = 9− 27√

32≈−2.69

f (−3√

32 , 3

2) = 9+27√

32≈ 20.69

Hence the maximum of f is ≈ 20.69 and is achieved at (−3√

32 , 3

2), while the minimum is−3 at (2,1).

Page 113: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

7.4 More examples 113

Geometric meaning of Lagrange multiplier1

Consider a problem of finding extrema (maxima and minima) of a function f = f (x,y,z)subject to a constraint g(x,y,z) = 0. The Lagrange equations can be obtained from the followinggeometric picture. We note that for any surface given by g(x,y,z) = 0 the gradient vector gradg(defined at the end of section 1.4) evaluated at any point on the surface is orthogonal to thesurface itself. To show that let (x(t),y(t),z(t)) be a curve on the constraint surface. This meansthat for all t

g(x(t),y(t),z(t)) = 0 . (7.6)

Differentiating this equation with respect to t we obtain

∂g∂x

x+∂g∂y

y+∂g∂ z

z = 0

that means that grad(g) is orthogonal to the tangent vector to the curve: (x, y, y). Since this istrue for any curve belonging to the constraint surface the gradient is said to be orthogonal to thesurface. Another way to put this is by saying that the gradient at a given point is orthogonal tothe tangent plane to the surface g = 0 at that point.

For example for g(x,y,z) = x2 + y2 + z2−4 the surface g = 0 is a sphere of radius 2. Thegradient gradg = (2x,2y,2z) = 2(x,y,z) is a vector pointing in the radial direction from the origin.It is orthogonal to the surface of the sphere.

Let (x0,y0,z0) be an extremal point for the function f (x,y,z) on the constraint surface g = 0.Then grad f (x0,y0,z0) is also orthogonal to the surface g = 0. Consider a curve (x(t),y(t),z(t))on the constraint surface, so that (7.6) holds. Assume that this curve passes through the extremum:(x(t0),y(t0),z(t0)) = (x0,y0,z0). Then the function

h(t) = f (x(t),y(t),z(t))

has an extremum at t = t0 and therefore h(t0) = 0. Using chaing rule we obtain

h(t0) = grad f · (x, y, z)|t=t0 = 0 .

Since both grad f and gradg evaluated at the extremal point are orthogonal to the constraintsurface and assuming that gradg is not a zero vector the two vectors must be collinear. Thismeans that there must exist a number λ so that

grad f = λgradg .

1This material is optional

Page 114: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

114 More applications of partial derivatives

These are the first 3 Lagrange equations to which we must add the constraint equation g = 0.

Page 115: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Recommended books

There are many excellent calculus and analysis books. We recommend the book by John. B.Fraleigh "Calculus with analytic geometry" (any edition) that covers calculus and some analysisfor functions of one variable and also some topics (but not all that are covered in this notes) ofmultivariable calculus.

Another very useful book which has a large overlap with the material in the present notes isthe book by S. Lang "Calculus of several variables" (any edition). This book also coveres manyelements of vector analysis and may be useful in the 3rd year Vector analysis course.

If you want to go deeper into calculus and analysis of one and many variables an all timeclassic is "A course of pure mathematics" by G. H. Hardy.

Page 116: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain
Page 117: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

Index

Analysis, 7Applications of double integrals, 65

Change of variables in double integrals, 66Change of variables in triple integrals, 77Continuity, 22Convergence of integrals, 87

convergence tests for integrals over un-bounded intervals, 89

integrals over unbounded intervals, 87Convergence tests for integrals of unbounded

functions, 93Coordinate systems

cylindrical polar coordinates, 77spherical polar coordinates, 80

DefinitionsC1-class function, 41(un)bounded intervals, 87(un-)bounded sequences, 11Continuity, 23convergence of sequences, 11differentiability

C1, 48differentiability and total derivative, 47Domain of a function, 20Graph of a function, 27integrability of functions, 95Partial derivatives, 25sequences, 10solution function, 41stationary point, 100Tangent plane, 29

Differentiation, 25

Functions f : Rm→ Rn, 46Functions of several variables, 19

Graphs, 27

Higher order partial derivatives, 33

Implicit differentiation, 42implicit differentiation formula, 42Implicit functions, 41Integrals of unbounded functions, 92Integrals over infinite regions, 87Interchanging the integrtion order, 63iterated integral, 60

Jacobian, 66

Lagrange multipliers, 104Limits of functions, 16Limits of sequences, 11

Maxima and minima, 99Multiple integrals, 59Multiple integrals of unbounded functions, 97Multiple integrals over unbounded domains,

94

Other substitutions, 70

RemindersDomains of some elementary functions,

19

Page 118: Multivariable Calculus and Real Analysis - macs.hw.ac.ukanatolyk/F18CD_2019.pdf · example1.3it was shown that two given inequalities imply a third one. Sometimes inequalities contain

118 INDEX

Second derivative test for maxima and min-ima, 100

Second derivative test for two variables, 101Sequences, 10

Tangent planes, 27Taylor’s expansion, 51Taylor’s formula in two dimensions, 56The chain rule and partial derivatives, 36Theorem

Comparison Theorem, 95Theorems

nth mean value theorem, 52Absolute Convergence Test, 89, 93Absolute Convergence Theorem, 95any convergent sequence is bounded, 13chain rule

general case, 49two variable case, 36

Comparison Test, 89, 93Criterion for differentiability of f : Rn→ Rm,

48implicit function theorem, 43

general case, 50three variable case, 44

Lagrange multiplier, 104Taylor’s formula in two dimensions, 56The implicit function theorem

two defining equations, 45The mixed derivatives theorem, 33

Total derivatives, 46Transforming equations, 38Triple integrals, 73

Various theorems about total derivatives, 49Volumes of revolution, 85