M311 Functions of Several Variables. CHAPTER 1. Continuity CHAPTER 2. The Bolzano Weierstrass Theorem and Compact Sets CHAPTER 3.

Similar documents
NOTES ON MULTIVARIABLE CALCULUS: DIFFERENTIAL CALCULUS

Math 361: Homework 1 Solutions

Introduction to Topology

Metric Spaces and Topology

Course 212: Academic Year Section 1: Metric Spaces

Analysis-3 lecture schemes

Analysis Finite and Infinite Sets The Real Numbers The Cantor Set

2 Sequences, Continuity, and Limits

Notions such as convergent sequence and Cauchy sequence make sense for any metric space. Convergent Sequences are Cauchy

MATH 51H Section 4. October 16, Recall what it means for a function between metric spaces to be continuous:

Maxima and Minima. (a, b) of R if

Lecture Notes on Metric Spaces

THE INVERSE FUNCTION THEOREM

Some Background Material

Real Analysis Math 131AH Rudin, Chapter #1. Dominique Abdi

Mathematical Analysis Outline. William G. Faris

Analysis II - few selective results

g 2 (x) (1/3)M 1 = (1/3)(2/3)M.

2. Metric Spaces. 2.1 Definitions etc.

Iowa State University. Instructor: Alex Roitershtein Summer Homework #5. Solutions

Continuity. Chapter 4

1 Topology Definition of a topology Basis (Base) of a topology The subspace topology & the product topology on X Y 3

Continuity. Chapter 4

MAS331: Metric Spaces Problems on Chapter 1

Math 421, Homework #9 Solutions

Notes on uniform convergence

4 Partial Differentiation

MA102: Multivariable Calculus

SMSTC (2017/18) Geometry and Topology 2.

Maths 212: Homework Solutions

Review of Multi-Calculus (Study Guide for Spivak s CHAPTER ONE TO THREE)

REVIEW OF ESSENTIAL MATH 346 TOPICS

Set, functions and Euclidean space. Seungjin Han

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

REVIEW OF DIFFERENTIAL CALCULUS

Chapter 2. Metric Spaces. 2.1 Metric Spaces

1 Directional Derivatives and Differentiability

5 Integration with Differential Forms The Poincare Lemma Proper Maps and Degree Topological Invariance of Degree...

4. We accept without proofs that the following functions are differentiable: (e x ) = e x, sin x = cos x, cos x = sin x, log (x) = 1 sin x

ANALYSIS 2: HOMEWORK SOLUTIONS, SPRING 2013

Suppose that f is continuous on [a, b] and differentiable on (a, b). Then

Chapter 2: Unconstrained Extrema

Math Advanced Calculus II

n [ F (b j ) F (a j ) ], n j=1(a j, b j ] E (4.1)

Exam 2 extra practice problems

Definition 6.1. A metric space (X, d) is complete if every Cauchy sequence tends to a limit in X.

Week 4: Differentiation for Functions of Several Variables

INTRODUCTION TO REAL ANALYSIS II MATH 4332 BLECHER NOTES

(x x 0 ) 2 + (y y 0 ) 2 = ε 2, (2.11)

Math 117: Continuity of Functions

Chapter 3 Continuous Functions

Most Continuous Functions are Nowhere Differentiable

Lecture Notes in Advanced Calculus 1 (80315) Raz Kupferman Institute of Mathematics The Hebrew University

Existence and Uniqueness

14 Increasing and decreasing functions

MAS3706 Topology. Revision Lectures, May I do not answer enquiries as to what material will be in the exam.

M17 MAT25-21 HOMEWORK 6

Math 320-3: Lecture Notes Northwestern University, Spring 2015

Math 4603: Advanced Calculus I, Summer 2016 University of Minnesota Homework Schedule

Math 117: Topology of the Real Numbers

Metric Spaces Math 413 Honors Project

1 Functions of Several Variables 2019 v2

Definitions & Theorems

Sequences. Chapter 3. n + 1 3n + 2 sin n n. 3. lim (ln(n + 1) ln n) 1. lim. 2. lim. 4. lim (1 + n)1/n. Answers: 1. 1/3; 2. 0; 3. 0; 4. 1.

Functional Analysis Exercise Class

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

Figure 1: Functions Viewed Optically. Math 425 Lecture 4. The Chain Rule

Chapter 8: Taylor s theorem and L Hospital s rule

Final Exam Solutions June 10, 2004

Real Analysis Notes. Thomas Goller

Web Solutions for How to Read and Do Proofs

Chapter 1: Banach Spaces

Implicit Functions, Curves and Surfaces

March 25, 2010 CHAPTER 2: LIMITS AND CONTINUITY OF FUNCTIONS IN EUCLIDEAN SPACE

Definition 3 (Continuity). A function f is continuous at c if lim x c f(x) = f(c).

MATH 1902: Mathematics for the Physical Sciences I

2 (Bonus). Let A X consist of points (x, y) such that either x or y is a rational number. Is A measurable? What is its Lebesgue measure?

Ordinary differential equations. Recall that we can solve a first-order linear inhomogeneous ordinary differential equation (ODE) dy dt

*Room 3.13 in Herschel Building

Functional Analysis. Franck Sueur Metric spaces Definitions Completeness Compactness Separability...

1 + lim. n n+1. f(x) = x + 1, x 1. and we check that f is increasing, instead. Using the quotient rule, we easily find that. 1 (x + 1) 1 x (x + 1) 2 =

Analysis Qualifying Exam

Section 3.7. Rolle s Theorem and the Mean Value Theorem

5. Some theorems on continuous functions

i c Robert C. Gunning

Prague, II.2. Integrability (existence of the Riemann integral) sufficient conditions... 37

Course 224: Geometry - Continuity and Differentiability

1/12/05: sec 3.1 and my article: How good is the Lebesgue measure?, Math. Intelligencer 11(2) (1989),

Math General Topology Fall 2012 Homework 1 Solutions

After taking the square and expanding, we get x + y 2 = (x + y) (x + y) = x 2 + 2x y + y 2, inequality in analysis, we obtain.

converges as well if x < 1. 1 x n x n 1 1 = 2 a nx n

01. Review of metric spaces and point-set topology. 1. Euclidean spaces

1. Bounded linear maps. A linear map T : E F of real Banach

NORMS ON SPACE OF MATRICES

Notes on Complex Analysis

Math 61CM - Quick answer key to section problems Fall 2018

Math 104: Homework 7 solutions

LECTURE 6. CONTINUOUS FUNCTIONS AND BASIC TOPOLOGICAL NOTIONS

The Heine-Borel and Arzela-Ascoli Theorems

Chapter 3. Differentiable Mappings. 1. Differentiable Mappings

Transcription:

M311 Functions of Several Variables 2006 CHAPTER 1. Continuity CHAPTER 2. The Bolzano Weierstrass Theorem and Compact Sets CHAPTER 3. Differentiability 1

2 CHAPTER 1. Continuity If (a, b) R 2 then we write (a, b) for the usual Euclidean norm of (a, b). This is also the distance of this point from the origin (0, 0). A function F : R 2 R 2 is determined by its two coordinate functions, f 1 : R 2 R, f 2 : R 2 R; F (x, y) = (f 1 (x.y), f 2 (x, y)) Our first definition, for the continuity of F, is an exact generalisation of the definition for a one variable real valued function. Definition 1.1 A function F : R 2 R 2 is continuous at the point (a, b) if for each ɛ > 0 there is a δ > 0 such that Note that (x, y) (a, b) δ = F (x, y) F (a, b) ɛ. (x, y) (a, b) δ = x a δ, y b δ Thus to show continuity at (a, b) it is enough to find δ 1, δ 2 such that x a δ 1, y b δ 2 = F (x, y) F (a, b) ɛ. Example. Show that the function f : R 2 R 2 given by f(x, y) = (y, x + 2) is continuous at the point (x, y) = (0, 1). Solution. We have F (x, y) F (0, 1) 2 = (y, x + 2) (1, 2) 2 = (y 1, x) 2 = (y 1) 2 + x 2. We see that these two terms are small if y is close to 1 and x is close to zero. This gives the idea for a formal proof: Let ɛ > 0. Since the one variable function x 2 is continuous at x = 0 there exists δ 1 such that if x 0 δ 1 then x 2 ɛ 2 /2. Likewise, there exists δ 2 s.t. if y 1 δ 2 then (y 1) 2 ɛ 2 /2. Let δ = min{δ 1, δ 2 }. Then, (x, y) (0, 1) δ = (x, y 1) δ = x, y 1 δ, and so in particular x δ 1 and y 1 δ 2. So, for such (x, y) we have F (x, y) F (0, 1) 2 ɛ 2 /2 + ɛ 2 /2 = ɛ 2. Thus we have found the needed δ for the given ɛ. Therefore we have shown that F is continous at (0, 0). NB There was no need to multiply out the expression (y 1) 2 above.

Example Show that F (x, y) = (sin x+cos y, 1) is continuous at (0, 0). The formal proof is given at the end of this chapter. Proposition Let f : R 2 R with f(0, 0) = 0 and suppose that there exist positive constants A, B such that f(x, y) A x + B y for all points (x, y) with (x, y r for some radius r > 0. The f is continuous at the origin. The proof is a homework exercise. 3 The formal definition of continuity for a function F : R n R m is the same as before: Definition A function F : R n R m is continuous at the point a = (a 1,..., a n ) if ɛ 0, δ 0 such that x a δ = F (x) F (a) ɛ. The function may be written as F (x) = (F 1 (x), F 2 (x),..., F m (x)) where each F i (x) is a real-valued function of the variable x 1,..., x n ( with x = (x 1,..., x n ) as shorthand). Continuity is in fact equivalent to the continuity of all the coordinate funcitons F i. As usual we say that a function is continuous if it happens to be continuous at each point of its domain of definition. Definition The function F : R n R m is said to be M-Lipschitz, where M > 0, if F (x) F (y) M x y for all x, y in R n. Also a function is said to be a Lipschitz function if it happens to be M-Lipschitz for some M > 0. Proposition 1.2 A Lipschitz function is a continuous function. Proposition 1.4 (Space curves) Let f, g, h be continuous functions from R to R. Define F : R R 3 by Then F is a continuous function. F (t) = (f(t), g(t), h(t)) Proposition 1.5 (The Cauchy Schwarz inequality) Let x, y R n. Then n i=1 x iy i x y.

4 Proposition 1.6 (The triangle inequality) For all x, y in R n we have x+y x + y. Proposition 1.7 Let f, g : R n R m be continuous functions, λ a scalar. Then f + g and λf are continuous functions. Proposition 1.8 Let f : R n R m, g : R m R p, be continuous functions. Then the composition g f : R n R p is a continuous function. In particular, if F : R n R, and f : R R are continuous functions then so too is f F. This covers examples such as exp(f (x, y)), sin(f (x, y)), F (x, y, z) 4. Functions from R n R Proposition 1.9 If f, g : R n R: are continuous at the point a in R n then so too is the product function f g. Consequences of 1.7, 1.8, 1.9: The following functions are continuous. 1. F (x, y) = xy. 2. F (x, y, z) = x 2 + y 2 + z 2 3. A polynomial function R n R 4. e xy, cos(x + y + z), etc. 5. F (x, y) = 1. Viewed as a function from R 2 to (0, 0) R, this function is x 2 +y 2 continuous where it is defined. 6. rational functions are continuous where defined. Example Show that the function f(x, y), which is defined to be zero at the origin and otherwise equal to x sin y x + y is continuous at (0, 0). This function does not have a simple formula in any small disc around (0, 0) and so it is not amenable to the theorems above. Continuity must be established from first principles and the method is to use inequalities to simplify. Some trial and error may be needed to get the correct argument.

First try. x sin y x + y = x sin y x + y x x + y x x??? or x y?? No good! In the above argument we put sin x 1 and threw away too much. But with the better inequality sin y y we get x sin y x + y = x y x + y x y = y x which is certainly less than ɛ if (x, y ɛ. (So δ = ɛ will do here.) 5 Many of the examples in the lectures and in the exercises are of a similar nature to the example above and one has to carry out a rigourous analysis of the behaviour of the function near the point in question, usually the origin. As an assistance to determining whether a function is continuous (or differentiable) at the origin it can be fun to use maple as a microscope to examine the surface of the function near the origin. See the maple exploration pages in these notes on how to do this. Sequential continuity Definition A sequence (x (n) ) in R p converges to point x in R p if for each ɛ > 0 there is an n 0 such that x (n) x ɛ, for n n 0. It can be shown that this is equivalent to coordinatewise convergence, that is, to the requirement that x (n) i x i, as n tend to infinity, for each i. Sequential continuity of a function f : R p R q at the point a means: whenever (x (n) ) converges to a in R p it follows that (f(x (n) )) converges to f(a) in R q. Proposition 1.10 Sequential continuity is equivalent to continuity: Examples 1. Show that f(x, y) = x sin(x + y) is sequentially continuous at the origin.

6 2. Show that the function f(x, y) = xy x 2 +y 2 for (x, y) (0, 0) = 0 for (x, y) = (0, 0) is not sequentially continuous at the origin 3. Show that the functions from R 2 \(0, 0) to R determined by the formulae (2x y) 2 x 2 + y, (sin x) 2 2 x 2 + y 2 cannot be extended to define continuous functions on R 2 by any choices of values for f(0, 0). Repeated Limits For a real valued function f(x, y), which is defined everywhere except perhaps on the x- axis and the yaxis, it is possible to contemplate the repeated limit lim x 0 (lim y 0 f(x, y)). The order is important here as we shall see. Also, the continuity at (0, 0) of f(x, y) does not ensure either the existance or the equality of the two repeated limits at the origin as we shall see in examples. However we do have the following proposition. Proposition 1.11 If the repeated limit of a function f at the point (x 0, y 0 ) exists, and if f is continuous at that point, then the repeated limit must coincide with the value of the function at that point. Examples Find the repeated limits at the origin of the following functions, viewed as functions on R 2 \the x and y axis. Proof in lectures. (a) (2x y)2 (sin x)2, (b) x 2 + y2 x 2 + y, 2 (c) y sin 1 x (d) f(x, y) = 1 for y x = y/x for 0 < y < x

Another first principles example. Show that F (x, y) = (sin x + cos y, 1) is continuous at (0, 0). Solution. F (x, y) F (0, 0) 2 = (sin x + cos y, 1) (1, 1) 2 = (sin x + (cos y 1)), 0) 2 = (sin x + (cos y 1)) 2 = sin 2 x + 2 sin x(cos y 1) + (cos y 1) 2. This is small if x is close to 0 and y is close to 0. Formally, let ɛ > 0. We obtain δ s to make each term ɛ 2 /3. δ 1 s.t. x δ 1 = sin 2 x ɛ 2 /3. (by the continuity of sin.) δ 2 s.t. x δ 2 = 2 sin x(cos y 1) 4 sin x ɛ/3 (by the continuity of sin). δ 3 s.t. y δ 3 = (cos y 1) 2 ɛ 2 /3 (by the continuity of cos). Let δ = min{δ 1, δ 2, δ 3 }. Then (x, y) δ = ( x δ 1, x δ 2, y δ 3 ) = F (x, y) F (0, 0) 2 ɛ 2 /3 + ɛ 2 /3 + ɛ 2 /3. So we have the required δ for the given ɛ. 7

8 CHAPTER 2 The Bolzano Weierstrass Theorem and Compact Sets In this chapter we examine an important concept for real analysis in higher dimensions, namely that of a compact set. Full proofs of Theorems 2.1, 2.2, 2.4 will be given in the lectures. Consider the function f(x, y) = x which is defined on the open rectangle y R = (0, 1) (0, 1). Then f is a continuous function on R. Also f is not a bounded function on R. This pathology of continuous but unbounded on a set may also occur for the set U which is a closed rectangle minus a single interior point. In contrast we shall show in Theorem 2.2 that closed rectangles are nice sets in that they do not admit this kind of pathology for any continuous function defined on them. We then go on to determine the most general such nice sets. These turn out to be the so-called compact sets in R n. Theorem 2.1. The Bolzano Weierstrass Theorem. Let (x (n) ) be a sequence of points in R p such that, for some M, x (n) M for all n. Then the sequence has a subsequence which converges to a point in R p Remarks. 1. The theorem says that a bounded sequence has a convergent subsequence. 2. In dimension one a proof may be given based on successive divisions of [ M, M]. The proof in the general case is an elaboration of this. Theorem 2.2. Let f(x 1,..., x p ) be a continuous real valued function on the closed rectangle B = [a 1, b 1 ] [a p, b p ]. Then f is a bounded function on B. Definition 2.3. A set K in R p is said to be compact if for every sequence (z k ) k=1 in the set there is a convergent subsequence (z ki ) i=1 and a point z in K such that z ki z as i. Example. A closed rectangle is a compact set. Nonexample. A closed rectangle with a single point removed is not a compact set. Example. The closed ball E = {x : x M} is a compact set. Nonexample. The set S = {(x, y) : M x M} is not a compact set. Theorem 2.4. Attainment theorem. Let f be a continuous real-valued function defined on a compact set K in R p. Then there is a point x in K such that f(x ) = sup x K f(x). Example Use the BW theorem to show that if E is a closed bounded set then d(x, E), the distance from x to E, is achieved by a point e in E.

9 The Heine Borel Theorem The Heine Borel theorem gives an alternative description of compact sets in terms of general closed sets in R p. So far we have considered closed rectangles (as those containing their boundary lines) which are the analogues of closed intervals on the real line. Likewise we have referred to open intervals and open rectangles as those without their boundaries. However in real analysis the terms open and closed have a precise and wider meaning. It turns out that an open set is one whose complement set is closed (and vice versa) and so there are various ways of introducing general open and closed sets. We shall be content with the following definition of a closed set based on the idea of a limit point of a set. An open set we then define as one whose complement is closed. Definition 2.5. A point x is a limit point (or point of closure) of a subset A of R p if there is a sequence of points x (n) in A such that x = lim n x (n). A set A in R p is closed if it contains all its limit points. Example. The union [0, 1] [5, 8] [10, ) is a closed set in R. Nonexample. [0, 1] (0, 1) in R 2. Example. A compact set is a closed set. Example. The set S = {(x, y) : M x M} is a closed set. Example. The set S = {(x, y) : x 2 sin y} is a closed set. Theorem 2.6. Heine Borel theorem closed and bounded. A set is a compact set if and only if it is Proof. Let K be a compact set in R p. Suppose that K is unbounded. Then there exists a sequence (z n ) in K with z n n, for each n 1. Consider this sequence. It cannot have a convergent subsequence. So K is not a compact set, a contradiction. Thus a compact set is necessarily a bounded set. A compact set must be a closed set. Indeed, if z is a limit point of a sequence (z n ) of points in K then compactness ensures that some subsequence (z ni ) i=1 converges to some point w in K. But then w = lim i z ni = lim n z n = z So z is in K. Thus K does contain all its points of closure as required. The converse direction follows from the Bolzano-Weierstrass theorem. Indeed, let (z n ) be any sequence in a closed bounded set A. Since A is a bounded set the B W theorem applies and there is a convergent subsequence z ni converging to a point z. This z is a point of closure of A and so, since A is closed z belongs to A. So we have shown that any sequence in A has a subsequence converging to a point in A. Thus A is a compact set.

10 CHAPTER 3. Differentiability We now turn to the analysis of differentiable and nondifferentiable real-valued functions of several variables. As in Chapter 1, we will be concerned with rigour in the definitions, theorem statements and proofs. We shall focus especially on rigourous determinations of differentiability for specific functions. Partial Derivatives Let f : R n R and let a = (a 1,..., a n ) R n. Define g i (x) = f(a 1,..., a i 1, x, a i+1,..., a n ). Definition 3.1 If the single variable function g i (x) has a derivative at a i its value is called the i th partial derivative of f at a and is denoted (D i f)(a). Examples and Remarks Notice that D i f(a) is calculated by differentiating with respect to x i with the other variables treated as constants. The notation f (1, 2) is also used, in this case to denote D x 1f(1, 2) for a real valued function f(x, y). However, we shall generally use the D notation. When n = 2 we can think of the function z = f(x, y) as defining a surface over the x, y plane. Then D 1 f((1, 2)), which is the partial derivative in the x-direction evaluated at the point (x, y) = (1, 2), represents the slope of the surface (at the point (1, 2, f(1, 2)) as one travels in the x-direction. If, at the point (a 1, a 2 ) both the partial derivatives of f(x, y) are zero, then this point is said to be a critical point of f and such points, for certain smooth functions, are related to the local maxima and minima and saddle points of f(x, y). Shortly we define what it means for a function to be differentiable at a point. Warning : this is a stronger notion than the partial derivatives existing at that point. Indeed there are easy examples of functions whose partial derivatives at (0, 0) exist but which are not even continuous at (0, 0). (Can you construct one?) As a simple exercise calculate the partial derivative D i f(1, 1, 0), i = 1, 2, 3, for the functions f(x, y, z) = xye z, f(x 1, x 2, x 3 ) = x 1 x 2 sin(2x 3 ). Differentiability. Suppose that f : R R is differentiable at the point a and that f (a) = A. This means the graph of f at a is nearly linear. More precisely this means that for all small enough real values of h we have F (a + h) = f(a) + Ah + e(h)

where the error e(h) is small even relative to h. But most precisely of all, what we have is ( ) f(a + h) f(a) lim A = 0 h 0 h or, equivalently, ( ) 1 lim f(a + h) f(a) Ah = 0. h 0 h 11 The last formulation of differentiability can be generalised to give a definition suitable for functions of severable variables. Indeed, in the case of R 3 the small increment h is replaced by a vector increment h = (h 1, h 2, h 3 ). Now the expression 1/h has no meaning, in contrast to 1/ h. In the next definition we view the element h in R n as a column vector. Definition 3.2. The function f : R n R m is differentiable at a in R n if there exists a linear transformation A : R n R m such that 1 lim f(a + h) f(a) Ah = 0. h 0 h Alternatively, rephrasing this, the requirement is that there exists a linear transformation A such that, for each ɛ > 0, there exists δ > 0 such that h δ implies f(a + h) f(a) Ah ɛ h. The matrix A is called the derivative of f at a and is denoted Df(a). Important notational point: Here h = (h 1,..., h n ) is an incremental vector in R n. It is usual to view f(a) and f(a + h) as row vectors in which case Ah is really shorthand for for the row vector (Ah t ) t obtained by matrix multiplication. Examples and formal proofs Example 1. f(x, y) = xy 2. Prove that Df(3, 1) = [1 6]. Example 2. f(x, y) = (xy 2, 4y). Prove that Df(3, 1) = [ 1 6 0 4 ]. Example 3. Prove, from first principles, that the function f : R 2 R given by f(x, y) = x 2 + 2y is differentiable at (1, 2) with derivative Df(1, 2) = [2 2].

12 Let ɛ > 0. We must consider the following expression (in which we have changed notation, with (h, k) playing the role of the little vector increment h above), f(1 + h, 2 + k) f(1, 2) (2 2)(h k) T and we must show that this is ɛ (h, k) if (h, k) is less than some δ (depending on ɛ). The quantity above is equal to (1 + h) 2 + 2(2 + h) 5 (2h + 2k) = 1 + 2h + h 2 + 4 + 2h 5 4h = h 2 = h h (h, k) 2. Also (h, k) 2 ɛ (h, k) if (h, k) δ with δ = ɛ. So the proof is complete. The next theorem shows that we can find the derivative matrix from the partial derivatives if we know that the function is differentiable. On the other hand the existence of all the partial derivatives does not necessarily imply that the function is differentiable. Contemplate f(x, y) = (xy) 1 3 Theorem 3.3 Let f : R n R be differentiable at the point a with derivative Df(a) = [A 1,... A n ]. Then A j is the j th partial derivative of f at a. Proof. From the definition of a partial derivative we have f(a 1,.., a j + h j,..., a n ) f(a 1,..., a n ) D j f(a) = lim hj 0. h j If f is differentiable at a then by restricting attention to the increments of the form h = (0, 0,..., h j, 0,..., 0) we deduce that 1 h j f(a 1,..., a j + h j, a j+1,..., a n ) f(a) A[0 h j 0] T 0 as h j 0. where A = [A 1,..., A n ] is the derivative of f at 0. We can rewrite this as as h j. Thus D j f(a) = A j. f(a 1,..., a j + h j,..., a n ) f(a) h j A j 0 Theorem 3.3b Let f : R n R m with coordinate functions f i : R n R so that f(x) = (f 1 (x),..., f m (x)). If f is differentiable at x = a R n then (Df)(a) is the matrix A = [D j f i (a)] m i=1j=1 n Theorem 3.4 (A sufficient condition for differentiability.) Let f : R n R, a R and suppose that the partial derivatives D j f exist in a neighbourhood of a (for each j = 1,..., n) and that each function D j f(x) is continuous in this neighbourhood. Then f is differentiable at a.

13 Applications of Theorem 3.4 1. Polynomials p(x 1,..., x n ) are differentiable everywhere. 2. f(x, y) = (x 2 + y 2 ) 1/2 is differentiable at (x, y) (0, 0). 3. f(x, y) = (xy) 1/3 is differentiable at (a, b) if a, b 0. 4. sin( x y ) is continuous at (a, b) if a b. A two variable Mean Value Theorem: Suppose f : R 2 R has continuous partial derivatives and a = (a 1, a 2 ), h = (h 1, h 2 ). Then This is equal to f(a + h) f(a) = f(a 1 + h 1, a 2 + h 2 ) f(a 1, a 2 ) = (f(a 1 + h 1, a 2 + h 2 ) f(a 1 + h 1, a 2 )) + (f(a 1 + h 1, a 2 ) f(a 1, a 2 )). h 2 [D 2 f(a 1 + h 1, ζ 2 )] + h 1 [D 1 f(ζ 1, a 2 )], for some ζ 2 between a 2 and a 2 +h 2 and some ζ 1 between a 1 and a 1 +h 1 by two applications of the MVT for one variable functions. The resulting equation f(a + h) f(a) = h 1 [D 1 f(ζ 1, a 2 )] + h 2 [D 2 f(a 1 + h 1, ζ 2 )], is a two variable MVT. This formula, which can be extended to multivariable functions, provides a key step in the proof of Theorem 3.4. Proof of Theorem 2.4 (for n = 2). It is given that the two variable functions D 1 f(x, y), D 2 f(x, y) exist (R 2 R) and are continuous when restricted to the unit ball B(a, δ 1 ) for some δ 1 > 0. By the two variable MVT we see that the quantity is equal to which is no greater than f(a + h) f(a) A 1 h 1 A 2 h 2 h 1 D 1 f(ζ 1, a 2 ) + h 2 D 2 f(a 1 + h 1, ζ 2 ) A 1 h 1 A 2 h 2 h 1 D 1 f(ζ 1, a 2 ) A 1 + h 2 D 2 f(a 1 + h 1, ζ 2 ) A 2. By the continuity of (D i f)(x, y) in B(a, δ 1 ) we can find δ < δ 1 such that (D 1 f)(x) A 1 ɛ/2, (D 2 f)(x) A 2 ɛ/2 when x a δ. (A i = D i f(a).) So the quantity above is no greater than as required. Directional Derivatives h 1 ɛ/2 + h 2 ɛ/2 ɛ (h 1, h 2 ) Definition 3.5 Let (u 1, u 2 ) be a unit vector. The directional derivative of the two variable function f(x, y) at the origin, denoted, D u f(0), is the derivative with respect to t of the function f(tx, ty) evaluated at t = 0.

14 Proposition 3.6 If f is differentiable at the origin then D u f(0) = u 1 D 1 f(0) + u 2 D 2 f(0). Proof. Df(0) = [D 1 f(0) D 2 f(0)] = [A 1 A 2 ] where for all ɛ > 0 there exists δ > 0 such that f(h 1, h 2 ) f(0, 0) A 1 h 1 A 2 h 2 ɛ h for all h = (h 1, h 2 ) with h δ. Consider h = (tu 1, tu 2 ) with t δ. Then f(tu 1, tu 2 ) f(0, 0) A 1 tu 1 A 2 tu 2 ɛ t or f(tu 1, tu 2 ) f(0, 0) A 1 u 1 A 2 u 2 ɛ. t Thus (D u f)(0) exists and is equal to A 1 u 1 + A 2 u 2. Corollary 3.7 All directional derivatives are zero if the two partial derivatives are zero AND the function is differentiable. The last corollary provides a useful test for nondifferentiability in cases where we can discover a directional derivative which is nonzero while the partial derivatives are both zero. Example. Let f(x, y) = x sin(xy) x 2 + y 2 for (x, y) (0, 0) with value 0 at the origin. Show that D u f(0) = 1 if u = (2 1/2, 2 1/2 ). Deduce that f is not differentiable at the origin. (Show also that f is continuous at the origin.) Further properties of differentiable functions: Prop 3.8 :products, Prop 3.8 sums) are given in the lectures. ) The Chain Rule Recall first the chain rule for the derivative of a composition g f of real-valued functions g, f : R R: (g f) (x) = g (f(x))f (x). More precisely, if f is differentiable at a and g is differentiable at b = f(a) then This has the following generalisation. g f) (a) = g (f(a))f (a) = g (b)f (a).

Theorem 3.10 Let f : R n R m be differentiable at a R n, g : R m R p differentiable at b = f(a). Then g f is differentiable at a and (D(g f))(a) = BA, where B = Dg(b), A = Df(a). 15 Proof. From the definition of differentiability we have, for small h R n and small k R m f(a + h) f(a) + Ah = b + Ah g(b + k) g(b) + Bk. Moreover, the errors are small even in comparison with h, k. So, substituting, g(f(a + h) g(b + Ah) g(b) + B(Ah), and so g f(a + h) g f(a) (BA)h and moreover the error can be made smaller that ɛ h for small enough h. It follows from the definition that BA is the derivative of g f. Corollary 3.11 Let g, f be as in Theorem 3.10 and let h = g f. Then (D k h i )(a) = Σ m j=1(d j g i )(b)(d k f j )(a) where f(x) = (f 1 (x 1 ),..., f m (x)), x R n, g(y) = (g 1 (y),..., g p (y)), y R m and h(x) = (h 1 (x),..., h p (x)). Proof. By Proposition 3.3 Since C = Dh(a) = BA, we have A jk = (D k f j )(a), B ij = (D j g i )(b), C ik = (D k h i )(a). and this gives the desired formula. C ik = Σ m j=1b ij A jk Example 3.12 g(x, y) = x 2 y, g : R 2, f(t) = (sin t, t), f : R R 2. Verify the chain rule formula for g f. The example above is a special case of Proposition 3.13 For h(t) = g(x(t), y(t)) we have dh dt = g dx x dt + g dy y dt. where g(x, y), x(t), y(t) are differentiable functions.

16 XMAPLE Explorations of continuity Type xmaple at a unix prompt to invoke a maple session window. Example 1. f(x,y):=x*cos(y^(-1)); plot3d(f(x,y),x=-1..1,y=-1..1); The maple instructions above will spawn a 3d plot of part of the surface for f. Click on the plot and you will be able to drag to a new perspective. From the picture(s) decide if f appears to be either continuous at (0,0) OR discontinuous at (0,0). Explain how the picture indicates points (x,y) where there appear to be discontinuities. Give a written proof that f is not continuous at these points (x,y). Example f(x,y):= (sin(x)^2)*((x^2+2*y^2)^(-1)); plot3d(f(x,y),x=-1..1,y=-1..1); Is f continuous at (0,0)? Explain why there appear to be repeated limits and what these repeated limits seem to be. Give a short mathematical argument justifying these observations. Further Examples Examine continuity and repeated limits as before f(x,y):=x*y*((x^2+y^2)^(-1)); f(x,y):= (x^2-y^2)/(x^2+y^2); f(x,y):= x*y*((x^2+y)^(-1)); plot3d(f(x,y),x=0..1,y=0..1); f(x,y):= (2*x-y)^2*(x^2+y^2)^(-1); plot3d(f(x,y),x=0..1,y=0..1); This has a smooth wild surface. f(x,y):= abs(x)*sin(x+y);

17 XMAPLE exploration of differentiability Some of the functions below appear on the Exercise Sheet. If the graph appears to have a well-defined tangent plane at the origin then try to provide a mathematical justification for differentiabilty at the origin. Likewise justify nondifferentiability if that appears to be the case..) ---------------------------- f(x,y):= exp(x)*cos(y); plot3d(f(x,y),x=0..1,y=0..1); A very smooth function. Why is it differentiable? --------------------------- f(x,y):= x*cos(y^(-1)); Differentiable at the origin? Justify. --------------------------- f(x,y):=(x*cos(y^(-1)))^2; Differentiable at the origin? Justify. --------------------------- Are the following differentiable at (0,0)? Try : plot3d(f(x,y),x=-2..2,y=-2..2); f(x,y):=x*((x^2+y^2)^(1/2)); f(x,y):= x*((y^2)^(1/2)); f(x,y):=(x*y)^(1/3); f(x,y):=(x*y)^(1/3)*sin(x); -------------------------- Consider directional derivatives for the function f(x,y):=(x*y^(2))/(x^2+y^2); Is f differentiable? Plot the graph for the range -2..2-2..2 --------------------------