MA1101 Calculus Classnotes PDF
Document Details
Uploaded by UnabashedBohrium368
Indian Institute of Technology Madras
Arindama Singh
Tags
Summary
These class notes cover calculus, specifically focusing on differential and multiple integrals, series expansions, and a summary of single variable calculus. Topics include limits, continuity, partial derivatives, Taylor formulas, extreme values, volumes, and integrals in different coordinate systems. This is a part of a course called "MA1101."
Full Transcript
Arindama Singh MA1101 Classnotes Calculus © A.Singh Contents Syllabus v 1 Differential Calculus...
Arindama Singh MA1101 Classnotes Calculus © A.Singh Contents Syllabus v 1 Differential Calculus 1 1.1 Regions in the plane and surfaces................. 1 1.2 Limit................................ 4 1.3 Continuity............................. 10 1.4 Partial derivatives......................... 12 1.5 The increment theorem...................... 16 1.6 Chain rules............................ 19 1.7 Directional derivative....................... 22 1.8 Tangent planes and normal lines................. 26 1.9 Taylor’s formulas......................... 30 1.10 Extreme values.......................... 38 1.11 Lagrange multipliers....................... 43 1.12 Review problems......................... 47 1.13 Exercises for Chapter 1...................... 52 2 Multiple Integrals 55 2.1 Volumes by slicing........................ 55 2.2 Volume of a solid of revolution.................. 57 2.3 The cylindrical shell method................... 61 2.4 Arc length............................. 63 2.5 Area of surface of revolution................... 66 2.6 Double Integrals.......................... 69 2.7 Double Integral in polar coordinates............... 76 2.8 Triple integral........................... 80 2.9 Triple integral in cylindrical coordinates............. 86 2.10 Triple integral in spherical coordinates.............. 88 2.11 Change of variables........................ 92 2.12 Review problems......................... 99 2.13 Exercises for Chapter 2...................... 107 3 Series Expansion of Functions 110 3.1 Series............................... 110 3.2 Taylor series............................ 114 3.3 Fourier series........................... 118 3.4 Odd and even functions...................... 123 iii iv 3.5 Half range Fourier series..................... 125 3.6 Functions defined on (−ℓ, ℓ).................... 128 3.7 Functions defined on (0, ℓ).................... 129 3.8 Functions defined on (𝑎, 𝑏).................... 131 3.9 A Fun Problem.......................... 133 3.10 Exercises for Chapter 3...................... 135 A One Variable Summary 137 A.1 Graphs of Functions........................ 137 A.2 Concepts and Facts........................ 143 A.3 Formulas.............................. 150 Index 157 Syllabus Functions of two and three variables: Regions in plane, level curves and level surfaces, limit, continuity, partial derivatives, the increment theorem, directional derivatives and gradient, tangent planes and normal lines, Taylor’s formula, extreme values, Lagrange multipliers, Volumes by slicing, Volumes of solids of revolution, cylindrical shell method, arc length, area of surface of revolution, double integral and iterated integral, double integral in polar coordinates, triple integral, triple integral in cylindrical coordinates, triple integral in spherical coordinates, change of variables. [T]: Ch 14, §6.1-6.4, Ch. 15 (Exclude Sect. 15.6). Series Expansion of Functions: Series, Taylor series, Fourier series, odd and even functions, half range Fourier series, Functions of arbitrary period. [P]: §4.1-4.2, §4.16-4.17, §4.19-4.20, §5.1-5.6 Text: [T] J.R. Hass, C.E. Heil, M.D. Weir and P. Bogacki, Thomas’ Calculus: Early Transcendentals, 15th Edition, Pearson, 2022. [P] N. Piskunov, Differential and Integral Calculus Vol. II, Mir Publishers, Eng. Trans. 1974. References: 1. E. Kreyszig, Advanced Engineering Mathematics, 10th Ed., John Willey & Sons, 2010. 2. S.T. Tan, Calculus, Cengage Learning, 2010. 3. R.A. Adams and C. Essex, Calculus: A Complete Course, 10th Edition, Pearson Education, 2021. 4. N. Piskunov, Differential and Integral Calculus Vol. 1 & II, Mir Publishers, Eng. Trans.1974. v 1 Differential Calculus 1.1 Regions in the plane and surfaces Most of the results we discuss will not hold for arbitrary subsets of R2 , the plane. We thus distinguish special types of subsets of the plane by requiring that certain properties are satisfied. The distance between any two points (𝑎, 𝑏) and (𝑐, 𝑑) in R2 is √︁ |(𝑎, 𝑏) − (𝑐, 𝑑)| := (𝑎 − 𝑐) 2 + (𝑏 − 𝑑) 2. Let 𝐷 be a subset of R2. Let 𝜖 > 0. An 𝜖-disk around (𝑎, 𝑏) is the set of all points (𝑥, 𝑦) ∈ R2 whose distance from (𝑎, 𝑏) is less than 𝜖. Such a disk is also called a disk with center at (𝑎, 𝑏) and radius 𝜖. A disk around (𝑎, 𝑏) is the 𝜖-disk around (𝑎, 𝑏) for some 𝜖 > 0. { (𝑥, 𝑦) : 𝑥 2 + 𝑦 2 < 1} { (𝑥, 𝑦) : 𝑥 2 + 𝑦 2 < 1} { (𝑥, 𝑦) : 𝑥 2 + 𝑦 2 < 1} 𝐷 is a bounded subset of R2 iff 𝐷 is contained in a disk around some point of R2. A point (𝑎, 𝑏) is a boundary point of 𝐷 iff every disk around (𝑎, 𝑏) contains at least one point from 𝐷 and at least one point from R \ 𝐷. The set of all boundary points of 𝐷, written as 𝜕𝐷, is called the boundary of 𝐷. The set 𝐷 = 𝐷 ∪ 𝜕𝐷 is called the closure of 𝐷. 𝐷 is called an open set iff 𝐷 does not contain any of its boundary points. 𝐷 is called a closed set iff 𝐷 contains all its boundary points. A point (𝑎, 𝑏) is an interior point of 𝐷 iff some disk around (𝑎, 𝑏) is contained in 𝐷. So an interior point of 𝐷 is a point in 𝐷, but all points of 𝐷 need not be interior points of 𝐷. 1 2 MA1101 Classnotes A point (𝑎, 𝑏) is called an isolated point of 𝐷 iff (𝑎, 𝑏) is the only point of 𝐷 that is contained in some disk around (𝑎, 𝑏). 𝐷 is called path connected iff any two points in 𝐷 can be joined by a polygonal line entirely lying in 𝐷. 𝐷 is called a region in the plane iff 𝐷 is path-connected, it contains a disk around some point of 𝐷, and no point of 𝐷 is an isolated point. Thus, regions are fat sets so to say; curves in the plane are not regions. 𝐷 is called an open region iff 𝐷 is a region and 𝐷 is an open set. 𝐷 is called a closed region iff 𝐷 is a region and 𝐷 is a closed set. Remark 1.1 The following facts can be proved easily: 1. Every disk around a point is an open set. 2. The boundary of an 𝜖-disk around any point (𝑎, 𝑏) is the circle with center at (𝑎, 𝑏) and radius 𝜖. In addition, the following are true for any subset 𝐷 of R2 : 3. 𝐷 is open iff R2 \ 𝐷 is closed iff 𝐷 = the set of all interior points of 𝐷. 4. 𝐷 is closed iff 𝐷 = 𝐷 iff R2 \ 𝐷 is open. 5. A point of 𝐷 is an interior point of 𝐷 iff it is not a boundary point of 𝐷. 6. If 𝐷 is a region, then each disk around each point of 𝐷 contains infinitely many points of 𝐷. Let 𝐷 be a region in the plane. Let 𝑓 : 𝐷 → R be a function. The domain of 𝑓 is 𝐷 and the co-domain of 𝑓 is R. The range of 𝑓 is {𝑧 ∈ R : 𝑧 = 𝑓 (𝑥, 𝑦) for some (𝑥, 𝑦) ∈ 𝐷 }. Sometimes, we do not fix the domain √︁ and range of a function, but ask you to find it. For instance, The function 𝑓 (𝑥, 𝑦) = 𝑦 − 𝑥 2 has domain 𝐷 = {(𝑥, 𝑦) : 𝑥 2 ≤ 𝑦}. Its range is the set of all non-negative real numbers. The graph of 𝑓 is {(𝑥, 𝑦, 𝑧) ∈ R3 : 𝑧 = 𝑓 (𝑥, 𝑦), (𝑥, 𝑦) ∈ 𝐷 }. Such a graph is also called the surface 𝑧 = 𝑓 (𝑥, 𝑦). Some examples of surfaces are here: Differential Calculus 3 Let 𝑓 (𝑥, 𝑦) be a (real valued) function of two variables. That is, 𝑓 : 𝐷 → R, where 𝐷 is a region in R2. A contour curve of 𝑓 is the curve of intersection of the surface 𝑧 = 𝑓 (𝑥, 𝑦) and the plane 𝑧 = 𝑐 for some constant 𝑐 in the range of 𝑓. It is the curve 𝑓 (𝑥, 𝑦) = 𝑐 for some constant 𝑐 in the range of 𝑓. Thus, the union of all contour curves is the surface 𝑧 = 𝑓 (𝑥, 𝑦); it is the graph of 𝑓. A level curve of 𝑓 is the set of points (𝑥, 𝑦) in the domain of 𝑓 for which 𝑓 (𝑥, 𝑦) = 𝑐 for some constant 𝑐 in the range of 𝑓. Thus, a level curve is the projection of a contour curve on the 𝑥𝑦-plane. Thus, the union of all level curves of the surface 𝑧 = 𝑓 (𝑥, 𝑦) is the the domain of 𝑓. For example, consider the function 𝑓 (𝑥, 𝑦) = 100 − 𝑥 2 − 𝑦 2 depicted below. Its domain is R2. Its range is the interval (−∞, 100]. The level curve 𝑓 (𝑥, 𝑦) = 0 is {(𝑥, 𝑦) : 𝑥 2 + 𝑦 2 = 100}. The level curve 𝑓 (𝑥, 𝑦) = 51 is {(𝑥, 𝑦) : 𝑥 2 + 𝑦 2 = 49}. 4 MA1101 Classnotes Similarly, for a function 𝑓 (𝑥, 𝑦, 𝑧) of three variables, the level surfaces are the sets of points (𝑥, 𝑦, 𝑧) such that 𝑓 (𝑥, 𝑦, 𝑧) = 𝑐 for numbers 𝑐 in the range of 𝑓. 1.2 Limit Let 𝑓 : 𝐷 → R be a function, where 𝐷 is a region in the plane, (𝑎, 𝑏) ∈ 𝐷 and let 𝐿 be a real number. The limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) approaches (𝑎, 𝑏) is 𝐿 iff corresponding √︁ to each 𝜖 > 0, there exists 𝛿 > 0 such that for all (𝑥, 𝑦) ∈ 𝐷 with 0 < (𝑥 − 𝑎) 2 + (𝑦 − 𝑏) 2 < 𝛿, we have |𝑓 (𝑥, 𝑦) − 𝐿| < 𝜖. In this case, we write lim 𝑓 (𝑥, 𝑦) = 𝐿 and say that 𝐿 is the limit of 𝑓 at (𝑎, 𝑏). (𝑥,𝑦)→(𝑎,𝑏) If for some real number 𝐿, the above happens, we say that limit of 𝑓 at (𝑎, 𝑏) exists. If for no real number 𝐿, the above happens, then limit of 𝑓 at (𝑎, 𝑏) does not exist. The intuitive understanding of the notion of limit is as follows: The distance between 𝑓 (𝑥, 𝑦) and 𝐿 can be made arbitrarily small by making the distance between (𝑥, 𝑦) and (𝑎, 𝑏) sufficiently small but not necessarily zero. When limit exists, we write it in the following alternative ways: The limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) approaches (𝑎, 𝑏) is 𝐿. 𝑓 (𝑥, 𝑦) → 𝐿 as (𝑥, 𝑦) → (𝑎, 𝑏). lim 𝑓 (𝑥, 𝑦) = 𝐿. (𝑥,𝑦)→(𝑎,𝑏) lim 𝑓 (𝑥, 𝑦) = 𝐿. 𝑥→𝑎 𝑦→𝑏 It is often difficult to show that limit of a function does not exist at a point. We will come back to this question soon. Differential Calculus 5 (1.2) Example 4𝑥𝑦 2 Determine if lim exists. (𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2 Observe that the domain 𝐷 of 𝑓 is R2 \ {(0, 0)}. And 𝑓 (0, 𝑦) = 0 for 𝑦 ≠ 0; 𝑓 (𝑥, 0) = 0 for 𝑥 ≠ 0. We guess that the limit would be 0. To see that it is the case, we start with any 𝜖 > 0. We want to choose a 𝛿 > 0 such that the following sentence becomes true: √︁ 4𝑥𝑦 2 If 0 < 𝑥 2 + 𝑦 2 < 𝛿, then 2 < 𝜖. 𝑥 + 𝑦2 Since |𝑦 2 | = 𝑦 2 ≤ 𝑥 2 + 𝑦 2 and |𝑥 2 | = 𝑥 2 ≤ 𝑥 2 + 𝑦 2, we have 4𝑥𝑦 2 √︃ ≤ 4|𝑥 | ≤ 4 𝑥 2 + 𝑦 2. 𝑥 2 + 𝑦2 So, we choose 𝛿 = 𝜖/4. √︁ Let us verify whether our choice is all right. Assume that 0 < 𝑥 2 + 𝑦 2 < 𝛿. Then 4𝑥𝑦 2 √︃ − 0 ≤ 4 𝑥 2 + 𝑦 2 < 4𝛿 = 𝜖. 𝑥 2 + 𝑦2 4𝑥𝑦 2 Hence lim = 0. (𝑥,𝑦)→(0,0) 𝑥 2 + 𝑦 2 (1.3) Observation Suppose we have obtained a 𝛿 corresponding to some 𝜖. If we take 𝜖1 which is larger than the earlier 𝜖, then the same 𝛿 will satisfy the requirement in the definition of the limit. Thus while showing that the limit of a function is such and such at a point, we are free to choose a pre-assigned upper bound for our 𝜖. Similarly, suppose for some 𝜖, we have already obtained a 𝛿 such that the limit requirement is satisfied. If we choose another 𝛿, say 𝛿 1 , which is smaller than 𝛿, then the limit requirement is also satisfied. Thus, we are free to choose a pre-assigned upper bound for our 𝛿 provided it is convenient to us and it works. (1.4) Example √︁ Consider 𝑓 (𝑥, 𝑦) = 1 − 𝑥 2 − 𝑦 2 where 𝐷 = {(𝑥, 𝑦) : 𝑥 2 + 𝑦 2 ≤ 1}. We guess that limit of 𝑓 (𝑥, 𝑦) is 1 as (𝑥, 𝑦) → (0, 0). To show that the guess √︁ that 0 ≤ 𝑓 (𝑥, 𝑦) ≤ 1 on 𝐷. Using (1.3), assume that is right, let 𝜖 > 0. Notice 0 < 𝜖 < 1. Choose 𝛿 = 1 − (1 − 𝜖) 2. Let |(𝑥, 𝑦) − (0, 0)| < 𝛿. Then 0 < 𝑥 2 + 𝑦 2 < 1 − (1 − 𝜖) 2 ⇒ 1 − 𝑥 2 − 𝑦 2 > (1 − 𝜖) 2 ⇒ 𝑓 (𝑥, 𝑦) > 1 − 𝜖. That is, |𝑓 (𝑥, 𝑦) − 1| = 1 − 𝑓 (𝑥, 𝑦) < 𝜖. So, 𝑓 (𝑥, 𝑦) → 1 as (𝑥, 𝑦) → (0, 0). 6 MA1101 Classnotes (1.5) Theorem (Uniqueness of limit) Let 𝐷 be a region in the plane, (𝑎, 𝑏) ∈ 𝐷 and let 𝑓 : 𝐷 → R be a function. If limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) approaches (𝑎, 𝑏) exists, then it is unique. Proof. Suppose 𝑓 (𝑥, 𝑦) → ℓ and also 𝑓 (𝑥, 𝑦) → 𝑚 as (𝑥, 𝑦) → (𝑎, 𝑏). Let 𝜖 > 0. For 𝜖/2, we have 𝛿 1 > 0, 𝛿 2 > 0 such that for all (𝑥, 𝑦) ∈ 𝐷, 0 < (𝑥 − 𝑎) 2 + (𝑦 − 𝑏) 2 < 𝛿 12 ⇒ |𝑓 (𝑥, 𝑦) − ℓ | < 𝜖/2, 0 < (𝑥 − 𝑎) 2 + (𝑦 − 𝑏) 2 < 𝛿 22 ⇒ |𝑓 (𝑥, 𝑦) − 𝑚| < 𝜖/2. Take 𝛿 = min{𝛿 1, 𝛿 2 }. Since 𝐷 is a region, it contains no isolated points. So, there exists a point (𝛼, 𝛽) in the 𝛿-disk around (𝑎, 𝑏) and (𝛼, 𝛽) ≠ (𝑎, 𝑏). This means 0 < (𝛼 − 𝑎) 2 + (𝛽 − 𝑏) 2 < 𝛿 2, 𝛿 2 ≤ 𝛿 12, 𝛿 2 ≤ 𝛿 22. The above implications now guarantee that |𝑓 (𝛼, 𝛽) − ℓ | < 𝜖/2 and also |𝑓 (𝛼, 𝛽) − 𝑚| < 𝜖/2. Then, |ℓ − 𝑚| ≤ |ℓ − 𝑓 (𝛼, 𝛽)| + |𝑓 (𝛼, 𝛽) − 𝑚| < 𝜖/2 + 𝜖/2 = 𝜖. That is, for each 𝜖 > 0, we have |ℓ − 𝑚| < 𝜖. Hence ℓ = 𝑚. For a function of one variable, there are only two directions for approaching a point; from left or from right. Whereas for a function of two variables, the limit refers only to the distance between (𝑥, 𝑦) and (𝑎, 𝑏). It does not refer to any specific direction of approach to (𝑎, 𝑏). That is, there are infinitely many directions, and infinite number of paths on which one can vary a point (𝑥, 𝑦) to approach this point (𝑎, 𝑏). If the limit exists, then 𝑓 (𝑥, 𝑦) must approach the same limit no matter how (𝑥, 𝑦) approaches (𝑎, 𝑏). Thus, if we can find two different paths of approach along which the function 𝑓 (𝑥, 𝑦) has different limits, then it follows that limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) approaches (𝑎, 𝑏) does not exist. We mention this fact as our next theorem. (1.6) Theorem Let 𝐷 be a region in the plane, (𝑎, 𝑏) ∈ 𝐷 and let 𝑓 : 𝐷 → R be a function. Suppose that 𝑓 (𝑥, 𝑦) → ℓ1 as (𝑥, 𝑦) → (𝑎, 𝑏) along a path 𝐶 1 lying in 𝐷, and 𝑓 (𝑥, 𝑦) → ℓ2 as (𝑥, 𝑦) → (𝑎, 𝑏) along a path 𝐶 2 lying in 𝐷. If ℓ1 ≠ ℓ2, then the limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (𝑎, 𝑏) does not exist. Of course, the limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) approaches a point (𝑎, 𝑏) along a path 𝑦 = 𝑔(𝑥) means the following: lim 𝑓 (𝑥, 𝑦) = lim 𝑓 𝑥, 𝑔(𝑥) , where lim 𝑔(𝑥) = 𝑏. (𝑥,𝑦)→(𝑎,𝑏) 𝑥→𝑎 𝑥→𝑎 along 𝑦=𝑔(𝑥) Differential Calculus 7 The last requirement merely says that as 𝑥 approaches 𝑎, 𝑦 = 𝑔(𝑥) must approach 𝑏. Similarly, the limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) approaches a point (𝑎, 𝑏) along a path 𝑥 = 𝑔(𝑦) means that lim 𝑓 (𝑥, 𝑦) = lim 𝑓 𝑔(𝑦), 𝑦 , where lim 𝑔(𝑦) = 𝑎. (𝑥,𝑦)→(𝑎,𝑏) 𝑦→𝑏 𝑦→𝑏 along 𝑥=𝑔(𝑦) Again, the condition that when 𝑦 approaches 𝑏, 𝑥 = 𝑔(𝑦) approaches 𝑎 must hold. (1.7) Example 𝑥 2 − 𝑦2 Consider 𝑓 (𝑥, 𝑦) = for (𝑥, 𝑦) ≠ (0, 0). What is its limit at (0, 0)? 𝑥 2 + 𝑦2 𝑥2 When 𝑦 = 0, limit of 𝑓 (𝑥, 𝑦) as 𝑥 → 0 is lim 2 = lim (1) = 1. 𝑥→0 𝑥 𝑥→0 That is, 𝑓 (𝑥, 𝑦) → 1 as (𝑥, 𝑦) → (0, 0) along the 𝑥-axis. −𝑦 2 When 𝑥 = 0, limit of 𝑓 (𝑥, 𝑦) as 𝑦 → 0 is lim 2 = −1. 𝑦→0 𝑦 That is, 𝑓 (𝑥, 𝑦) → −1 as (𝑥, 𝑦) → (0, 0) along the 𝑦-axis. Hence lim 𝑓 (𝑥, 𝑦) does not exist. (𝑥,𝑦)→(0,0) (1.8) Example 𝑥𝑦 Consider 𝑓 (𝑥, 𝑦) = for (𝑥, 𝑦) ≠ (0, 0). What is its limit at (0, 0)? 𝑥 2 + 𝑦2 Along the 𝑥-axis, 𝑦 = 0; the limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (0, 0) is 0. Along the 𝑦-axis, 𝑥 = 0; the limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (0, 0) is 0. Does it say that limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (0, 0) is 0? 𝑥2 Along the line 𝑦 = 𝑥, limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → 0 is lim 2 = 1/2. 𝑥→0 𝑥 + 𝑥 2 Hence lim 𝑓 (𝑥, 𝑦) does not exist. (𝑥,𝑦)→(0,0) (1.9) Example 𝑥𝑦 2 Consider 𝑓 (𝑥, 𝑦) = for (𝑥, 𝑦) ≠ (0, 0). What is its limit at (0, 0)? 𝑥 2 + 𝑦4 𝑚 2𝑥 If 𝑦 = 𝑚𝑥, for some 𝑚 ∈ R, then 𝑓 (𝑥, 𝑦) =. 1 + 𝑚 4𝑥 2 8 MA1101 Classnotes So, the limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (0, 0) along all straight lines is 0. 𝑦4 If 𝑥 = 𝑦 2, 𝑦 ≠ 0, then 𝑓 (𝑥, 𝑦) = 4 = 1/2. 𝑦 + 𝑦4 That is, as (𝑥, 𝑦) → (0, 0) along the curve 𝑥 = 𝑦 2, 𝑓 (𝑥, 𝑦) → 1/2. Hence lim 𝑓 (𝑥, 𝑦) does not exist. (𝑥,𝑦)→(0,0) Are lim 𝑓 (𝑥, 𝑦), lim lim 𝑓 (𝑥, 𝑦), lim lim 𝑓 (𝑥, 𝑦) all equal? (𝑥,𝑦)→(𝑎,𝑏) 𝑥→𝑎 𝑦→𝑏 𝑦→𝑏 𝑥→𝑎 (1.10) Example (𝑦 − 𝑥)(1 + 𝑥) Let 𝑓 (𝑥, 𝑦) = for 𝑥 + 𝑦 ≠ 0, −1 < 𝑥, 𝑦 < 1. Then (𝑦 + 𝑥)(1 + 𝑦) 𝑦 lim lim 𝑓 (𝑥, 𝑦) = lim = 1. 𝑦→0 𝑥→0 𝑦→0 𝑦 (1 + 𝑦) −𝑥 (1 + 𝑥) lim lim 𝑓 (𝑥, 𝑦) = lim = −1. 𝑥→0 𝑦→0 𝑥→0 𝑥 𝑥 (𝑚 − 1)(1 + 𝑥) 𝑚−1 Along 𝑦 = 𝑚𝑥, lim 𝑓 (𝑥, 𝑦) = lim =. (𝑥,𝑦)→(0,0) (𝑥,𝑦)→(0,0) 𝑥 (1 + 𝑚)(1 + 𝑚𝑥) 𝑚+1 For different values of 𝑚, we get the last limit value different. For instance, along the path 𝑦 = 𝑥, the limit is 0, whereas along the path 𝑦 = 2𝑥, the limit is 1/3. So, limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (0, 0) does not exist; and the two iterated limits exist, though they are not equal. (1.11) Example 1 1 Let 𝑓 (𝑥, 𝑦) = 𝑥 sin + 𝑦 sin for 𝑥 ≠ 0, 𝑦 ≠ 0. Then, 𝑦 𝑥 1 lim 𝑓 (𝑥, 𝑦) = lim 𝑥 sin does not exist. So, lim lim 𝑓 (𝑥, 𝑦) does not exist. 𝑦→0 𝑦→0 𝑦 𝑥→0 𝑦→0 1 lim 𝑓 (𝑥, 𝑦) = lim 𝑦 sin does not exist. So, lim lim 𝑓 (𝑥, 𝑦) does not exist. 𝑥→0 𝑥→0 𝑥 𝑦→0 𝑥→0 For the limit√︁ of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) approaches (𝑎, 𝑏), let 𝜖 > 0. Take 𝛿 = 𝜖/2. Suppose 0 < 𝑥 2 + 𝑦 2 < 𝛿. Then, √︁ √︃ √︃ |𝑓 (𝑥, 𝑦) − 0| ≤ |𝑥 | + |𝑦| = 𝑥 2 + 𝑦 2 ≤ 2 𝑥 2 + 𝑦 2 < 2𝛿 = 𝜖. Therefore, lim 𝑓 (𝑥, 𝑦) = 0. (𝑥,𝑦)→(0,0) That is, the two iterated limits do not exist, but the limit exists. Hence existence of the limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (𝑎, 𝑏) and the existence of two iterated limits have no connection. Differential Calculus 9 Suppose 𝑓 (𝑥, 𝑦) does not depend on 𝑥, say 𝑓 (𝑥, 𝑦) = 𝑔(𝑦). If lim 𝑔(𝑦) = ℓ, does 𝑦→𝑏 it follow that lim 𝑓 (𝑥, 𝑦) = ℓ ? The answer is ‘yes’, but with a constraint. (𝑥,𝑦)→(𝑎,𝑏) (1.12) Theorem Let 𝐷 be a region in the plane, (𝑎, 𝑏) ∈ 𝐷 and let 𝑓 : 𝐷 → R be a function. Suppose 𝑓 (𝑥, 𝑦) = 𝑔(𝑦), lim 𝑔(𝑦) = ℓ, and if 𝑔(𝑦) is defined at 𝑦 = 𝑏, then 𝑔(𝑏) = ℓ. Then 𝑦→𝑏 lim 𝑓 (𝑥, 𝑦) = ℓ. (𝑥,𝑦)→(𝑎,𝑏) Proof. Let 𝜖 > 0. We have a 𝛿 > 0 such that |𝑦 − 𝑏 | < 𝛿, 𝑦 ≠ 𝑏 ⇒ |𝑔(𝑦) − ℓ | < 𝜖. We plan to use the same √︁ 𝛿 for proving the conclusion. So, suppose (𝑥, 𝑦) ≠ (𝑎, 𝑏), 𝑓 (𝑥, 𝑦) is defined and (𝑥 − 𝑎) 2 + (𝑦 − 𝑏) 2 < 𝛿. We divide (𝑥, 𝑦) ≠ (𝑎, 𝑏) into two cases: √︁ Case 1: 𝑦 ≠ 𝑏. Then, |𝑦 − 𝑏 | ≤ (𝑥 − 𝑎) 2 + (𝑦 − 𝑏) 2 < 𝛿. It implies |𝑔(𝑦) − ℓ | < 𝜖. That is, |𝑓 (𝑥, 𝑦) − ℓ | < 𝜖. Case 2: 𝑦 = 𝑏. Here, 𝑓 (𝑥, 𝑦) = 𝑔(𝑦) is defined for 𝑦 = 𝑏, and 𝑥 ≠ 𝑎. We have |𝑓 (𝑥, 𝑦) − ℓ | = |𝑓 (𝑥, 𝑏) − ℓ | = |𝑔(𝑏) − ℓ | = 0 < 𝜖. Hence, lim 𝑓 (𝑥, 𝑦) = ℓ. (𝑥,𝑦)→(𝑎,𝑏) (1.13) Example sin 𝑦 sin 𝑦 1. Let 𝑓 (𝑥, 𝑦) = for 𝑦 ≠ 0. Here, is not defined at 𝑦 = 0. 𝑦 𝑦 sin 𝑦 We see that lim 𝑓 (𝑥, 𝑦) = lim = 1. (𝑥,𝑦)→(0,0) 𝑦→0 𝑦 ( 𝑦 if 𝑦 ≠ 0 2. Let 𝑓 (𝑥, 𝑦) = 1 if 𝑦 = 0. Along the line 𝑦 = 0, lim 𝑓 (𝑥, 𝑦) = lim 𝑓 (𝑥, 0) = lim 1 = 1. (𝑥,𝑦)→(0,0) (𝑥,0)→(0,0) 𝑥→0 Along the line 𝑦 = 𝑥, lim 𝑓 (𝑥, 𝑦) = lim 𝑓 (𝑥, 𝑥) = lim 0 = 0. (𝑥,𝑦)→(0,0) (𝑥,𝑥)→(0,0) 𝑥→0 Hence, lim 𝑓 (𝑥, 𝑦) does not exist. (𝑥,𝑦)→(0,0) The second one shows that the condition “if 𝑔(𝑦) is defined at 𝑦 = 𝑏, then 𝑔(𝑏) = ℓ ” is essential. The usual operations of addition, multiplication etc have the expected effects as the following theorem shows. Its proof is analogous to the single variable limits. 10 MA1101 Classnotes (1.14) Theorem (Algebra of limits) Let 𝐷 be a region in the plane, (𝑎, 𝑏) ∈ 𝐷 and let 𝑓 : 𝐷 → R be a function. Suppose that 𝐿, 𝑀, 𝑐, 𝑟 ∈ R, lim 𝑓 (𝑥, 𝑦) = 𝐿 and that lim 𝑔(𝑥, 𝑦) = 𝑀. Then (𝑥,𝑦)→(𝑎,𝑏) (𝑥,𝑦)→(𝑎,𝑏) (1) Constant Multiple : lim 𝑐 𝑓 (𝑥, 𝑦) = 𝑐𝐿. (𝑥,𝑦)→(𝑎,𝑏) (2) Sum : lim (𝑓 (𝑥, 𝑦) + 𝑔(𝑥, 𝑦)) = 𝐿 + 𝑀. (𝑥,𝑦)→(𝑎,𝑏) (3) Product : lim (𝑓 (𝑥, 𝑦) 𝑔(𝑥, 𝑦)) = 𝐿𝑀. (𝑥,𝑦)→(𝑎,𝑏) (4) Quotient : If 𝑀 ≠ 0 and 𝑔(𝑥, 𝑦) ≠ 0 in an open disk around the point (𝑎, 𝑏), then lim (𝑓 (𝑥, 𝑦)/𝑔(𝑥, 𝑦)) = 𝐿/𝑀 (𝑥,𝑦)→(𝑎,𝑏) (5) Power : If 𝐿𝑟 and (𝑓 (𝑥, 𝑦))𝑟 are well-defined and lim 𝑓 (𝑥, 𝑦) = 𝐿, (𝑥,𝑦)→(𝑎,𝑏) then lim (𝑓 (𝑥, 𝑦))𝑟 = 𝐿𝑟. (𝑥,𝑦)→(𝑎,𝑏) 1.3 Continuity Let 𝑓 (𝑥, 𝑦) be a real valued function defined on a subset 𝐷 of R2. We say that 𝑓 (𝑥, 𝑦) is continuous at a point (𝑎,√︁𝑏) ∈ 𝐷 iff for each 𝜖 > 0, there exists 𝛿 > 0 such that for all points (𝑥, 𝑦) ∈ 𝐷 with (𝑥 − 𝑎) 2 + (𝑦 − 𝑏) 2 < 𝛿 we have |𝑓 (𝑥, 𝑦) − 𝑓 (𝑎, 𝑏)| < 𝜖. Observe that if (𝑎, 𝑏) ∈ 𝐷 is an isolated point of 𝐷, then 𝑓 is continuous at (𝑎, 𝑏). If 𝐷 is a region, then (𝑎, 𝑏) ∈ 𝐷 is not an isolated point of 𝐷. In this case, 𝑓 is continuous at (𝑎, 𝑏) ∈ 𝐷 iff the following are satisfied: 1. 𝑓 (𝑎, 𝑏) is well defined, that is, (𝑎, 𝑏) ∈ 𝐷; 2. lim 𝑓 (𝑥, 𝑦) exists; and (𝑥,𝑦)→(𝑎,𝑏) 3. lim 𝑓 (𝑥, 𝑦) = 𝑓 (𝑎, 𝑏). (𝑥,𝑦)→(𝑎,𝑏) The function 𝑓 (𝑥, 𝑦) is said to be continuous on a subset of 𝐷 iff 𝑓 (𝑥, 𝑦) is continuous at all points in the subset. Unless otherwise mentioned, we assume that the domain 𝐷 ⊆ R2 of a function 𝑓 (𝑥, 𝑦) is a region, be it open, closed, bounded or unbounded. It then follows from the algebra of limits that constant multiples, sum, difference, product, quotient, and rational powers of continuous functions defined on a region are continuous provided they are well defined. Polynomials in two variables are continuous functions. Rational functions, i.e., ratios of polynomials, are continuous functions provided they are well defined. Differential Calculus 11 (1.15) Example 3𝑥 2𝑦 if (𝑥, 𝑦) ≠ (0, 0) Is the function 𝑓 (𝑥, 𝑦) = 𝑥 2 + 𝑦 2 continuous on R2 ? 0 if (𝑥, 𝑦) = (0, 0) At any point other than the origin, 𝑓 (𝑥, 𝑦) is a rational function; therefore, it is continuous. To see that√︁ 𝑓 (𝑥, 𝑦) is continuous at the origin, let 𝜖 > 0 be given. Take 𝛿 = 𝜖/3. Assume that 𝑥 2 + 𝑦 2 < 𝛿. Then 3𝑥 2𝑦 3(𝑥 2 + 𝑦 2 )𝑦 √︃ − 𝑓 (0, 0) ≤ ≤ 3|𝑦| ≤ 3 𝑥 2 + 𝑦 2 < 3𝛿 = 𝜖. 𝑥 2 + 𝑦2 𝑥 2 + 𝑦2 (1.16) Example 𝑥𝑦 (𝑥 2 − 𝑦 2 ) if (𝑥, 𝑦) ≠ (0, 0) Is the function 𝑓 (𝑥, 𝑦) = 𝑥 2 + 𝑦2 continuous on R2 ? 0 if (𝑥, 𝑦) = (0, 0) Being a rational function, it is continuous at all nonzero points. For the point (0, 0), √ let 𝜖 > 0 be given. Choose √︁ 𝛿 = 𝜖. Notice that 𝑥𝑦 ≤ 𝑥 2 + 𝑦 2 and 𝑥 2 − 𝑦 2 ≤ 𝑥 2 + 𝑦 2. For any (𝑥, 𝑦) with 𝑥 2 + 𝑦 2 < 𝛿, we have |𝑥 | · |𝑦| · (𝑥 2 − 𝑦 2 ) (𝑥 2 + 𝑦 2 )(𝑥 2 + 𝑦 2 ) |𝑓 (𝑥, 𝑦) − 0| = 2 2 ≤ 2 2 < 𝛿 2 = 𝜖. 𝑥 +𝑦 𝑥 +𝑦 Hence lim 𝑓 (𝑥, 𝑦) = 0 = 𝑓 (0, 0). (𝑥,𝑦)→(0,0) That is, the function 𝑓 (𝑥, 𝑦) is continuous. (1.17) Example 𝑥 2 − 𝑦2 The function 𝑓 (𝑥, 𝑦) = is continuous on 𝐷 = R2 \ {(0, 0)}. 𝑥 2 + 𝑦2 But it is not continuous at (0, 0) since (0, 0) ∉ 𝐷. Well, we redefine. Consider the function 𝑔(𝑥, 𝑦), where 𝑥 2 − 𝑦2 if (𝑥, 𝑦) ≠ (0, 0) 𝑔(𝑥, 𝑦) = 𝑥 2 + 𝑦 2 0 if (𝑥, 𝑦) = (0, 0). By (1.7), lim 𝑔(𝑥, 𝑦) does not exist. (𝑥,𝑦)→(0,0) Hence 𝑔(𝑥, 𝑦) is not continuous at (0, 0). As in the single variable case, composition of continuous functions is continuous. Try to prove the following result. 12 MA1101 Classnotes (1.18) Theorem Let 𝐷 be region in the plane, 𝑓 : 𝐷 → R be continuous at (𝑎, 𝑏) ∈ 𝐷 with 𝑓 (𝑎, 𝑏) = 𝑐 and let 𝑔 : 𝐼 → R be continuous at 𝑐 ∈ 𝐼 for some interval 𝐼 in R. Then the function 𝑔(𝑓 (𝑥, 𝑦)) from 𝐷 to R is continuous at (𝑎, 𝑏). For example, 𝑒 𝑥−𝑦 is continuous at all points in the plane. 𝑥𝑦 cos and ln(1 + 𝑥 2 + 𝑦 2 ) are continuous on R2. 1 + 𝑥2 tan−1 (𝑦/𝑥) is continuous everywhere except on the 𝑦-axis, where it is not defined. (𝑥 2 + 𝑦 2 + 𝑧 2 − 1) −1 is continuous everywhere except where ever it is not defined, that is, except on the sphere 𝑥 2 + 𝑦 2 + 𝑧 2 = 1. 1.4 Partial derivatives Let 𝑓 (𝑥, 𝑦) be a real valued function defined on a region 𝐷 ⊆ R2. Let (𝑎, 𝑏) ∈ 𝐷. If 𝐶 is the curve of intersection of the surface 𝑧 = 𝑓 (𝑥, 𝑦) with the plane 𝑦 = 𝑏, then the slope of the tangent line to 𝐶 at (𝑎, 𝑏, 𝑓 (𝑎, 𝑏)) is the partial derivative of 𝑓 (𝑥, 𝑦) with respect to 𝑥 at (𝑎, 𝑏). In the figure below, take 𝑥 0 = 𝑎, 𝑦0 = 𝑏. A formal definition of the partial derivative follows. The partial derivative of 𝑓 (𝑥, 𝑦) with respect to 𝑥 at the point (𝑎, 𝑏) is 𝜕𝑓 𝑑 𝑓 (𝑥, 𝑏) 𝑓 (𝑎 + ℎ, 𝑏) − 𝑓 (𝑎, 𝑏) 𝑓𝑥 (𝑎, 𝑏) = (𝑎, 𝑏) = = lim , 𝜕𝑥 𝑑𝑥 𝑥=𝑎 ℎ→0 ℎ provided this limit exists. Differential Calculus 13 𝜕𝑓 Notice that if 𝜕𝑥 (𝑎, 𝑏) exists, then 𝑓 (𝑥, 𝑏), as a function of 𝑥, is continuous at 𝑥 = 𝑎. The partial derivative of 𝑓 (𝑥, 𝑦) with respect to 𝑦 at the point (𝑎, 𝑏) is 𝜕𝑓 𝑑 𝑓 (𝑎, 𝑦) 𝑓 (𝑎, 𝑏 + 𝑘) − 𝑓 (𝑎, 𝑏) 𝑓𝑦 (𝑎, 𝑏) = (𝑎, 𝑏) = = lim , 𝜕𝑦 𝑑𝑦 𝑦=𝑏 𝑘→0 𝑘 provided this limit exists. If 𝑓𝑦 (𝑎, 𝑏) exists, then 𝑓 (𝑎, 𝑦) is continuous at 𝑦 = 𝑏. 𝑑 𝑓 (𝑥, 𝑏) Remark 1.19 In the definition of 𝑓𝑥 (𝑎, 𝑏), the expression is to be 𝑑𝑥 𝑥=𝑎 𝑓 (𝑎 + ℎ, 𝑏) − 𝑓 (𝑎, 𝑏) interpreted as the value of the limit lim. It means that if we ℎ→0 ℎ ′ write 𝑔(𝑥) = 𝑓 (𝑥, 𝑏), then it is equal to 𝑔 (𝑎). And, it is not necessarily equal to “ 𝑔′ (𝑥) obtained otherwise and then evaluated at 𝑥 = 𝑎 ”. For example, if 𝑔(𝑥) = 1 𝑔(ℎ) − 𝑔(0) 1 for 𝑥 ≠ 0 and 𝑔(0) = 0, then 𝑔′ (0) = lim = lim , which does not exist. ℎ→0 ℎ ℎ→0 ℎ 𝑑 (1) Whereas if wrongly interpreted, then one would find 𝑔′ (𝑥) = = 0 for 𝑥 ≠ 0, 𝑑𝑥 and then evaluated at 𝑥 = 0 would give the spurious result 0. Similar comments go for the expression in determining 𝑓𝑦 (𝑎, 𝑏). (1.20) Example Find 𝑓𝑥 (1, 1) where 𝑓 (𝑥, 𝑦) = 4 − 𝑥 2 − 2𝑦 2. (4 − (1 + ℎ) 2 − 2) − (4 − 1 − 2) −2ℎ − ℎ 2 𝑓𝑥 (1, 1) = lim = lim = −2. ℎ→0 ℎ ℎ→0 ℎ That is, treat 𝑦 as a constant and differentiate with respect to 𝑥. 𝑓𝑥 (1, 1) = 𝑓𝑥 (𝑥, 𝑦) (1,1) = −2𝑥 (1,1) = −2. The vertical plane 𝑦 = 1 crosses the paraboloid in the curve 𝐶 1 : 𝑧 = 2 − 𝑥 2, 𝑦 = 1. This curve is a parabola. The slope of the tangent line to this parabola at the point 14 MA1101 Classnotes (1, 1, 1) is 𝑓𝑥 (1, 1) = −2. It corresponds to (𝑥, 𝑦) = (1, 1). (1.21) Example The plane 𝑥 = 1 intersects the surface 𝑧 = 𝑥 2 + 𝑦 2 in a parabola. Find the slope of the tangent to the parabola at the point (1, 2, 5). The asked slope is 𝜕𝑧/𝜕𝑦 at (1, 2). It is 𝜕(𝑥 2 + 𝑦 2 ) (1, 2) = (2𝑦)(1, 2) = 4. 𝜕𝑦 Alternatively, the parabola is 𝑧 = 𝑥 2 + 𝑦 2, 𝑥 = 1 OR, 𝑧 = 1 + 𝑦 2. So, the slope at (1, 2, 5) is 𝑑𝑧 𝑑 (1 + 𝑦 2 ) = = (2𝑦)|𝑦=2 = 4. 𝑑𝑦 𝑦=2 𝑑𝑦 𝑦=2 In general, 𝑓𝑥 (𝑎, 𝑏) and lim 𝑓𝑥 (𝑥, 𝑦) are different. See the following two (𝑥,𝑦)→(𝑎,𝑏) examples. (1.22) Example ( 1 if 𝑥 > 0 Let 𝑓 (𝑥, 𝑦) = 0 if 𝑥 ≤ 0. Then 𝑓𝑥 (𝑥, 𝑦) = 0 for all 𝑥 > 0; and 𝑓𝑥 (𝑥, 𝑦) = 0 for all 𝑥 < 0. So, lim 𝑓𝑥 (𝑥, 𝑦) = 0. Notice that (𝑥,𝑦)→(0,0) 𝑓 (ℎ, 0) − 𝑓 (0, 0) 0 𝑓 (ℎ, 0) − 𝑓 (0, 0) 1 lim = lim = 0, lim = lim. ℎ→0− ℎ ℎ→0 ℎ ℎ→0+ ℎ ℎ→0 ℎ The latter limit does not exist. Hence, 𝑓𝑥 (0, 0) does not exist. (1.23) Example 𝑥3 if (𝑥, 𝑦) ≠ (0, 0) Let 𝑓 (𝑥) = 𝑥 2 + 𝑦 2 0 if (𝑥, 𝑦) = (0, 0). 𝑓 (0 + ℎ, 0) − 𝑓 (0, 0) ℎ3 Then, 𝑓𝑥 (0, 0) = lim = lim 2 = 1. ℎ→0 ℎ ℎ→0 ℎ · ℎ (𝑥 2 + 𝑦 2 ) · 3𝑥 2 − 𝑥 3 · 2𝑥 2 For (𝑥, 𝑦) ≠ 0, 𝑓𝑥 (𝑥, 𝑦) =. Thus, (𝑥 2 + 𝑦 2 ) 2 lim 𝑓𝑥 (𝑥, 𝑦) = lim 𝑓𝑥 (0, 𝑦) = lim 0 = 0. (𝑥,𝑦)→(0,0) 𝑦→0 𝑦→0 along 𝑥=0 Differential Calculus 15 3𝑥 4 − 6𝑥 5 lim 𝑓𝑥 (𝑥, 𝑦) = lim 𝑓𝑥 (𝑥, 0) = lim = 3. (𝑥,𝑦)→(0,0) 𝑥→0 𝑥→0 𝑥4 along 𝑦=0 Hence, lim 𝑓𝑥 (𝑥, 𝑦) does not exist. (𝑥,𝑦)→(0,0) Caution: 𝑓𝑥 (𝑎, 𝑏) is not the same as lim 𝑓𝑥 (𝑥, 𝑦). In fact, 𝑓𝑥 (𝑎, 𝑏) can exist (𝑥,𝑦)→(𝑎,𝑏) even if lim 𝑓𝑥 (𝑥, 𝑦) does not exist. (𝑥,𝑦)→(𝑎,𝑏) Of course, if 𝑓𝑥 (𝑥, 𝑦) is continuous at (𝑎, 𝑏), then 𝑓𝑥 (𝑎, 𝑏) = lim 𝑓𝑥 (𝑥, 𝑦). (𝑥,𝑦)→(𝑎,𝑏) For a function of one variable, 𝑓 ′ (𝑡) exists at 𝑡 = 𝑎 implies that 𝑓 (𝑡) is continuous at 𝑡 = 𝑎. Thus, if 𝑓𝑥 (𝑎, 𝑏) = 𝑑 𝑓 (𝑥, 𝑏)/𝑑𝑥 at 𝑥 = 𝑎 exists, then 𝑓 (𝑥, 𝑏) is continuous at 𝑥 = 𝑎. Similarly, if 𝑓𝑦 (𝑎, 𝑏) = 𝑑 𝑓 (𝑎, 𝑦)/𝑑𝑦 at 𝑦 = 𝑏 exists, then 𝑓 (𝑎, 𝑦) is continuous at 𝑦 = 𝑏. Is it true that if both 𝑓𝑥 (𝑥, 𝑦) and 𝑓𝑦 (𝑥, 𝑦) exist at (𝑎, 𝑏), then 𝑓 (𝑥, 𝑦) is continuous at (𝑎, 𝑏)? (1.24) Example ( 1 if 𝑥𝑦 ≠ 0 Consider the function 𝑓 (𝑥, 𝑦) = 0 otherwise. We compute its partial derivatives at the origin. 𝑓 (0 + ℎ, 0) − 𝑓 (0, 0) 0−0 𝑓𝑥 (0, 0) = lim = lim = 0, ℎ→0 ℎ ℎ→0 ℎ 𝑓 (0, 0 + 𝑘) − 𝑓 (0, 0) 0−0 𝑓𝑦 (0, 0) = lim = lim = 0. 𝑘→0 ℎ ℎ→0 ℎ So, both the partial derivatives at (0, 0), that is, 𝑓𝑥 (0, 0) and 𝑓𝑦 (0, 0) exist. Let us check whether 𝑓 (𝑥, 𝑦) is continuous at (𝑎, 𝑏). lim 𝑓 (𝑥, 𝑦) = lim 𝑓 (0, 𝑦) = lim 0 = 0. (𝑥,𝑦)→(0,0) 𝑦→0 𝑦→0 along 𝑥=0 lim 𝑓 (𝑥, 𝑦) = lim 𝑓 (𝑥, 𝑥) = lim 1 = 1. (𝑥,𝑦)→(0,0) 𝑥→0 𝑥→0 along 𝑦=𝑥 Thus, lim 𝑓 (𝑥, 𝑦) does not exist; 𝑓 (𝑥, 𝑦) is not continuous at (0, 0). (𝑥,𝑦)→(0,0) Thus, even if both 𝑓𝑥 (𝑎, 𝑏) and 𝑓𝑦 (𝑎, 𝑏) exist, 𝑓 (𝑥, 𝑦) need not be continuous at (𝑎, 𝑏). For another example, look at (1.27). It can be shown that if both 𝑓𝑥 (𝑥, 𝑦) and 𝑓𝑦 (𝑥, 𝑦) exist in a disk around (𝑎, 𝑏) and at least one of these is continuous at (𝑎, 𝑏) or, bounded in a disk around (𝑎, 𝑏) , then 𝑓 (𝑥, 𝑦) is continuous at (𝑎, 𝑏). 16 MA1101 Classnotes 1.5 The increment theorem The partial derivative 𝑓𝑥 (𝑎, 𝑏) is defined as the limit of the ratio of 𝑓 (𝑎+ℎ, 𝑏) − 𝑓 (𝑎, 𝑏) to ℎ as ℎ → 0. Conventionally, this increment ℎ in the independent variable 𝑥 is written as Δ𝑥. The expression 𝑓 (𝑎 + Δ𝑥, 𝑏) − 𝑓 (𝑎, 𝑏) measures the increment in 𝑓 (𝑥, 𝑦) at (𝑎, 𝑏) in the direction of 𝑥. Similarly, write the increment 𝑘 in the variable 𝑦 as Δ𝑦. Then, the expression 𝑓 (𝑎, 𝑏 + Δ𝑦) − 𝑓 (𝑎, 𝑏) measures the increment of 𝑓 (𝑥, 𝑦) at (𝑎, 𝑏) in the direction of 𝑦. The total increment in 𝑓 (𝑥, 𝑦) at (𝑎, 𝑏) is then measured by the expression 𝑓 (𝑎 + Δ𝑥, 𝑏 + Δ𝑦) − 𝑓 (𝑎, 𝑏) and it is denoted by (Δ𝑓 )(𝑎, 𝑏), or sometimes, by Δ𝑓 with the understanding that it is taken at the point (𝑎, 𝑏). That is, Δ𝑓 = 𝑓 (𝑎 + Δ𝑥, 𝑏 + Δ𝑦) − 𝑓 (𝑎, 𝑏) at the point (𝑎, 𝑏). If the partial derivatives of 𝑓 (𝑥, 𝑦) are continuous, then the total increment Δ𝑓 can be written in a more suggestive form. (1.25) Theorem (Increment Theorem) Let 𝐷 be an open region in the plane. Let the function 𝑓 : 𝐷 → R have continuous partial derivatives. Then 𝑓 is continuous and the total increment Δ𝑓 at (𝑎, 𝑏) ∈ 𝐷 can be written as Δ𝑓 = 𝑓𝑥 (𝑎, 𝑏)Δ𝑥 + 𝑓𝑦 Δ𝑦 + 𝜖1 Δ𝑥 + 𝜖2 Δ𝑦, where 𝜖1 → 0 and 𝜖2 → 0 as both Δ𝑥 → 0 and Δ𝑦 → 0. Proof. We prove the formula for Δ𝑓 , from which continuity of 𝑓 (𝑥, 𝑦) follows. Write ℎ instead of Δ𝑥 and 𝑘 in place of Δ𝑦 for better readability. Now, Δ𝑓 := 𝑓 (𝑎 + ℎ, 𝑏 + 𝑘) − 𝑓 (𝑎 + ℎ, 𝑏) + 𝑓 (𝑎 + ℎ, 𝑏) − 𝑓 (𝑎, 𝑏). By MVT, there exist 𝑐 ∈ [𝑎, 𝑎 + ℎ] and 𝑑 ∈ [𝑏, 𝑏 + 𝑘] such that 𝑓 (𝑎 + ℎ, 𝑏) − 𝑓 (𝑎, 𝑏) = ℎ[𝑓𝑥 (𝑐, 𝑏) − 𝑓𝑥 (𝑎, 𝑏)] + ℎ𝑓𝑥 (𝑎, 𝑏), 𝑓 (𝑎 + ℎ, 𝑏 + 𝑘) − 𝑓 (𝑎 + ℎ, 𝑏) = 𝑘 [𝑓𝑦 (𝑎 + ℎ, 𝑑) − 𝑓𝑦 (𝑎, 𝑏)] + 𝑘 𝑓𝑦 (𝑎, 𝑏). Write 𝜖1 = 𝑓𝑥 (𝑐, 𝑏) − 𝑓𝑥 (𝑎, 𝑏) and 𝜖2 = 𝑓𝑦 (𝑎 + ℎ, 𝑑) − 𝑓𝑦 (𝑎, 𝑏). When ℎ → 0 and 𝑘 → 0, we see that 𝑐 → 𝑎 and 𝑑 → 𝑏. Since 𝑓𝑥 and 𝑓𝑦 are assumed to be continuous, we have 𝜖1 → 0 and 𝜖2 → 0. Then the total increment can be written as Δ𝑓 = 𝑓 (𝑎 + ℎ, 𝑏 + 𝑘) − 𝑓 (𝑎, 𝑏) = ℎ𝑓𝑥 (𝑎, 𝑏) + 𝑘 𝑓𝑦 (𝑎, 𝑏) + 𝜖1ℎ + 𝜖2𝑘, where 𝜖1 → 0 and 𝜖2 → 0 as both ℎ → 0, 𝑘 → 0. Differential Calculus 17 Remark 1.26 Let (𝑎, 𝑏) be an interior point of a region 𝐷. For a function 𝑓 : 𝐷 → R if the total increment Δ𝑓 at (𝑎, 𝑏) can be written as Δ𝑓 = 𝑓𝑥 (𝑎, 𝑏)Δ𝑥 + 𝑓𝑦 Δ𝑦 + 𝜖1 Δ𝑥 + 𝜖2 Δ𝑦, where 𝜖1 → 0 and 𝜖2 → 0 as Δ𝑥 → 0 and Δ𝑦 → 0, then we say that 𝑓 is differentiable at (𝑎, 𝑏). The following statements give some connections between differentiability, continuity and the partial derivatives. Let 𝐷 be a region in R2. Let 𝑓 : 𝐷 → 𝑅 be such that both 𝑓𝑥 and 𝑓𝑦 exist on 𝐷 and at least one of them is continuous at an interior point (𝑎, 𝑏) of 𝐷. Then 𝑓 is differentiable at (𝑎, 𝑏). Let 𝐷 be a region in R2. Let 𝑓 : 𝐷 → 𝑅 be differentiable at an interior point (𝑎, 𝑏) of 𝐷. Then 𝑓 is continuous at (𝑎, 𝑏). The first statement strengthens the increment theorem. In most of the results that follow, we will assume that both 𝑓𝑥 and 𝑓𝑦 are continuous. All those results hold true if this assumption is replaced by the weaker assumption that 𝑓 is differentiable. However, to use differentiability will increase load on terminology, and it is also difficult to verify the condition of differentiability. Instead, we will work with the stronger assumption that 𝑓𝑥 and 𝑓𝑦 are continuous. For a function 𝑓 (𝑥, 𝑦), partial derivatives of second order are defined as follows: 𝜕 𝜕𝑓 𝜕2 𝑓 𝑓𝑥𝑥 = (𝑓𝑥 )𝑥 = =. 𝜕𝑥 𝜕𝑥 𝜕𝑥 2 𝜕𝑓𝑥 𝜕 𝜕𝑓 𝜕2 𝑓 𝑓𝑥𝑦 = (𝑓𝑥 )𝑦 = = =. 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦𝜕𝑥 𝜕𝑓𝑦 𝜕 𝜕𝑓 𝜕2 𝑓 𝑓𝑦𝑥 = (𝑓𝑦 )𝑥 = = =. 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕 𝜕𝑓 𝜕2 𝑓 𝑓𝑦𝑦 = (𝑓𝑦 )𝑦 = = 2. 𝜕𝑦 𝜕𝑦 𝜕𝑦 Similarly, higher order partial derivatives are defined. For instance, 𝜕 𝜕 𝜕𝑓 𝜕3 𝑓 𝑓𝑥𝑥𝑦 = =. 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑦𝜕𝑥 𝜕𝑥 The following example shows that some of the higher order partial derivatives at a point may exist but others do not. 18 MA1101 Classnotes (1.27) Example 𝑥𝑦 if (𝑥, 𝑦) ≠ (0, 0) 2 2 Let 𝑓 (𝑥, 𝑦) = 𝑥 + 𝑦 0 if (𝑥, 𝑦) = (0, 0). We have 𝑓 (𝑥, 0) = 0 = 𝑓 (0, 𝑦). Then, 𝑥2 1 lim 𝑓 (𝑥, 𝑦) = lim 𝑓 (0, 𝑦) = 0, lim 𝑓 (𝑥, 𝑦) = lim 2 2 =. (𝑥,𝑦)→(0,0) 𝑦→0 (𝑥,𝑦)→(0,0) 𝑥→0 𝑥 + 𝑥 2 along 𝑥=0 along 𝑦=𝑥 Hence, limit of 𝑓 (𝑥, 𝑦) as (𝑥, 𝑦) → (0, 0) does not exist, so that 𝑓 (𝑥, 𝑦) is not continuous at (0, 0). For any 𝑥, we have 𝑓 (𝑥 + ℎ, 0) − 𝑓 (𝑥, 0) 0−0 𝑓𝑥 (𝑥, 0) = lim = lim = 0. ℎ→0 ℎ ℎ→0 ℎ 𝑓𝑥 (ℎ, 0) − 𝑓𝑥 (0, 0) 0−0 𝑓𝑥𝑥 (𝑥, 0) = lim = lim = 0. ℎ→0 ℎ ℎ→0 ℎ Similarly, it follows that 𝑓𝑦 (0, 𝑦) = 0 and 𝑓𝑦𝑦 (0, 𝑦) = 0 for any 𝑦. In particular, we get 𝑓𝑥𝑥 (0, 0) = 0 = 𝑓𝑦𝑦 (0, 0). What about 𝑓𝑥𝑦 (0, 0) and 𝑓𝑦𝑥 (0, 0)? 𝑓 (ℎ, 𝑦) − 𝑓 (0, 𝑦) 𝑦 1 𝑓𝑥 (0, 𝑦) = lim = lim 2 2 =. ℎ→0 ℎ ℎ→0 ℎ + 𝑦 𝑦 𝑓 (𝑥, 𝑘) − 𝑓 (𝑥, 0) 𝑥 1 𝑓𝑦 (𝑥, 0) = lim = lim 2 2 =. 𝑘→0 𝑘 𝑘→0 𝑥 + 𝑘 𝑥 𝑓𝑥 (0, 𝑘) − 𝑓𝑥 (0, 0) 1/𝑘 − 0 𝑓𝑥𝑦 (0, 0) = lim = lim does not exist. 𝑘→0 𝑘 𝑘→0 𝑘 𝑓𝑦 (ℎ, 0) − 𝑓𝑦 (0, 0) 1/ℎ − 0 𝑓𝑦𝑥 (0, 0) = lim = lim does not exist. ℎ→0 ℎ ℎ→0 ℎ (1.28) Example 𝑥𝑦(𝑥 2 − 𝑦 2 ) if (𝑥, 𝑦) ≠ (0, 0) Consider 𝑓 (𝑥, 𝑦) = 𝑥 2 + 𝑦2 0 if (𝑥, 𝑦) = (0, 0). 𝑓 (𝑥, 0) = 𝑓 (0, 𝑦) = 𝑓 (0, 0) = 0. 𝑓𝑥 (𝑥, 0) = 𝑓𝑦 (0, 𝑦) = 𝑓𝑥𝑥 (0, 0) = 𝑓𝑦𝑦 (0, 0) = 0. 𝑓 (ℎ, 𝑦) − 𝑓 (0, 𝑦) 𝑓𝑥 (0, 𝑦) = lim = −𝑦. ℎ→0 ℎ 𝑓 (𝑥, 𝑘) − 𝑓 (𝑥, 0) 𝑓𝑦 (𝑥, 0) = lim = 𝑥. 𝑘→0 𝑘 𝑓𝑥 (0, 𝑘) − 𝑓𝑥 (0, 0) −𝑘 𝑓𝑥𝑦 (0, 0) = lim = lim = −1. 𝑘→0 𝑘 𝑘→0 𝑘 𝑓𝑦 (ℎ, 0) − 𝑓𝑦 (0, 0) ℎ 𝑓𝑦𝑥 (0, 0) = lim = lim = 1. ℎ→0 ℎ ℎ→0 ℎ Differential Calculus 19 That is, 𝑓𝑥𝑦 (0, 0) ≠ 𝑓𝑦𝑥 (0, 0). Thus, even if both 𝑓𝑥𝑦 and 𝑓𝑦𝑥 exist at a point, they need not be equal. However, if 𝑓𝑥 , 𝑓𝑦 , 𝑓𝑥𝑦 and 𝑓𝑦𝑥 are continuous, then they are equal. (1.29) Theorem (Clairaut) Let 𝐷 be an open region in the plane. Let 𝑓 : 𝐷 → R be a function, where 𝑓𝑥 , 𝑓𝑦 , 𝑓𝑥𝑦 and 𝑓𝑦𝑥 are continuous. Then 𝑓𝑥𝑦 = 𝑓𝑦𝑥. Proof. Assume that 𝑓𝑥𝑦 and 𝑓𝑦𝑥 are continuous. Let (𝑎, 𝑏) ∈ 𝐷. Let ℎ ≠ 0. Write 𝑔(𝑥) = 𝑓 (𝑥, 𝑏 + ℎ) − 𝑓 (𝑥, 𝑏) and 𝑔(𝑦) ˜ = 𝑓 (𝑎 + ℎ, 𝑦) − 𝑓 (𝑎, 𝑦). Now, 𝜙 (ℎ) := 𝑔(𝑎 + ℎ) − 𝑔(𝑎) = [𝑓 (𝑎 + ℎ, 𝑏 + ℎ) − 𝑓 (𝑎 + ℎ, 𝑏)] − [𝑓 (𝑎, 𝑏 + ℎ) − 𝑓 (𝑎, 𝑏)] = [𝑓 (𝑎 + ℎ, 𝑏 + ℎ) − 𝑓 (𝑎, 𝑏 + ℎ)] − [𝑓 (𝑎 + ℎ, 𝑏) − 𝑓 (𝑎, 𝑏)] ˜ + ℎ) − 𝑔(𝑏). = 𝑔(𝑏 ˜ Notice that 𝜙 (ℎ) is a function of ℎ. Consider the equality 𝜙 (ℎ) = 𝑔(𝑎 + ℎ) − 𝑔(𝑎). Since 𝑓𝑥 is continuous, 𝑔′ (𝑥) is continuous. By the Mean Value Theorem (MVT), we have 𝑐 between 𝑎 and 𝑎 + ℎ such that 𝜙 (ℎ) = 𝑔′ (𝑐)ℎ = ℎ[𝑓𝑥 (𝑐, 𝑏 + ℎ) − 𝑓𝑥 (𝑐, 𝑏)]. Now, 𝑓𝑥 (𝑐, 𝑦) is a function of 𝑦. Since 𝑓𝑥𝑦 is continuous, the function 𝑓𝑥 (𝑐, 𝑦) as a function of 𝑦, is continuously differentiable. Again, applying MVT on 𝑓𝑥 (𝑐, 𝑦), we get 𝑑 between 𝑏 and 𝑏 + ℎ such that 𝜙 (ℎ) = ℎ · ℎ · 𝑓𝑥𝑦 (𝑐, 𝑑) = ℎ 2 𝑓𝑥𝑦 (𝑐, 𝑑). Due to continuity of 𝑓𝑥𝑦 , we have 𝜙 (ℎ) lim = lim 𝑓𝑥𝑦 (𝑐, 𝑑) = 𝑓𝑥𝑦 (𝑎, 𝑏). ℎ→0 ℎ 2 (𝑐,𝑑)→(𝑎,𝑏) Similarly, considering the equality 𝜙 (ℎ) = 𝑔(𝑏 ˜ + ℎ) − 𝑔(𝑏), ˜ we obtain 𝜙 (ℎ) lim 2 = 𝑓𝑦𝑥 (𝑎, 𝑏). ℎ→0 ℎ Hence, 𝑓𝑥𝑦 (𝑎, 𝑏) = 𝑓𝑦𝑥 (𝑎, 𝑏). 1.6 Chain rules We continue to formulate and discuss our results for a function 𝑓 (𝑥, 𝑦) of two variables. Analogously, all these notions and results can be formulated and proved for a function 𝑓 (𝑥 1,... , 𝑥𝑛 ) of 𝑛 variables for 𝑛 > 2. 20 MA1101 Classnotes We apply the increment theorem to partially differentiate composite functions. The results in this section are formulated informally. Precise statements may be formulated so that the compositions make sense. (1.30) Theorem (Chain Rule 1) Let 𝑓 (𝑥, 𝑦) have continuous partial derivatives. If 𝑥 (𝑡) and 𝑦 (𝑡) are differentiable functions, then 𝑑𝑓 𝜕𝑓 𝑑𝑥 𝜕𝑓 𝑑𝑦 = +. 𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 Proof. Using the increment theorem (1.25) at a point 𝑃 we obtain Δ𝑓 𝜕𝑓 Δ𝑥 𝜕𝑓 Δ𝑦 Δ𝑥 Δ𝑦 = + + 𝜖1 + 𝜖2. Δ𝑡 𝜕𝑥 Δ𝑡 𝜕𝑦 Δ𝑡 Δ𝑡 Δ𝑡 As Δ𝑡 → 0, we have Δ𝑥 → 0, Δ𝑦 → 0, 𝜖1 → 0, 𝜖2 → 0. Then the result follows. For example, if 𝑧 = 𝑥𝑦 and 𝑥 = sin 𝑡, 𝑦 = cos 𝑡, then 𝑑𝑧 𝜕𝑧 ′ 𝜕𝑧 = 𝑥 (𝑡) + 𝑦 ′ (𝑡) = cos2 𝑡 − sin2 𝑡. 𝑑𝑡 𝜕𝑥 𝜕𝑦 Check: 𝑧 (𝑡) = sin 𝑡 cos 𝑡 = 1 2 sin 2𝑡. So, 𝑧 ′ (𝑡) = cos 2𝑡 = cos2 𝑡 − sin2 𝑡. (1.31) Theorem (Chain Rule 2) Let 𝑓 (𝑥, 𝑦), 𝑥 (𝑠, 𝑡) and 𝑦 (𝑠, 𝑡) have continuous partial derivatives. Then 𝜕𝑓 𝜕𝑓 𝜕𝑥 𝜕𝑓 𝜕𝑦 𝜕𝑓 𝜕𝑓 𝜕𝑥 𝜕𝑓 𝜕𝑦 = + , = +. 𝜕𝑠 𝜕𝑥 𝜕𝑠 𝜕𝑦 𝜕𝑠 𝜕𝑡 𝜕𝑥 𝜕𝑡 𝜕𝑦 𝜕𝑡 Its proof is similar to that of (1.31). In subscript notation, it looks like 𝑓𝑠 = 𝑓𝑥 𝑥𝑠 + 𝑓𝑦𝑦𝑠 , 𝑓𝑡 = 𝑓𝑥 𝑥𝑡 + 𝑓𝑦𝑦𝑡. (1.32) Example Let 𝑧 = 𝑒 𝑥 sin 𝑦, 𝑥 = 𝑠𝑡 2, 𝑦 = 𝑠 2𝑡. Then 𝜕𝑧 2 = (𝑒 𝑥 sin 𝑦)𝑡 2 + (𝑒 𝑥 cos 𝑦)2𝑠𝑡 = 𝑡𝑒 𝑠𝑡 (𝑡 sin(𝑠 2𝑡) + 2𝑠 cos(𝑠 2𝑡)). 𝜕𝑠 𝜕𝑧 2 = (𝑒 𝑥 sin 𝑦)2𝑠𝑡 + (𝑒 𝑥 cos 𝑦)𝑠 2 = 𝑠𝑒 𝑠𝑡 (2𝑡 sin(𝑠 2𝑡) + 𝑠 cos(𝑠 2𝑡)). 𝜕𝑡 Substitute expressions for 𝑥 and 𝑦 to get 𝑧 = 𝑧 (𝑠, 𝑡) and then check that the results are correct. Functions can be differentiated implicitly. If 𝐹 is defined on an open region 𝐷 in R3 containing a point (𝑎, 𝑏, 𝑐), where 𝐹 (𝑎, 𝑏, 𝑐) = 0, 𝐹𝑧 (𝑎, 𝑏, 𝑐) ≠ 0, and 𝐹𝑥 , 𝐹𝑦 , 𝐹𝑧 Differential Calculus 21 are continuous, then the equation 𝐹 (𝑥, 𝑦, 𝑧) = 0 defines a function 𝑧 = 𝑓 (𝑥, 𝑦) in an open ball around (𝑎, 𝑏, 𝑐) contained in 𝐷. Moreover, the function 𝑧 = 𝑓 (𝑥, 𝑦) can now be differentiated partially with 𝑧𝑥 = −𝐹𝑥 /𝐹𝑧 , 𝑧𝑦 = −𝐹𝑦 /𝐹𝑧. It is easier to differentiate implicitly than remembering the formula. (1.33) Example Find 𝑧𝑥 and 𝑧𝑦 if 𝑥 3 + 𝑦 3 + 𝑧 3 + 6𝑥𝑦𝑧 = 1. We differentiate ‘the equation’ with respect to 𝑥 and 𝑦 as follows: (𝑥 2 + 2𝑦𝑧) 3𝑥 2 + 3𝑧 2𝑧𝑥 + 6𝑦 (𝑧 + 𝑥𝑧𝑥 ) = 0 ⇒ 𝑧𝑥 = −. 𝑧 2 + 2𝑥𝑦 (𝑦 2 + 2𝑥𝑧) 3𝑦 2 + 3𝑧 2𝑧𝑦 + 6𝑥 (𝑧 + 𝑥𝑧𝑦 ) = 0 ⇒ 𝑧𝑦 = − 2. 𝑧 + 2𝑥𝑦 (1.34) Example Find 𝑤 𝑥 if 𝑤 = 𝑥 2 + 𝑦 2 + 𝑧 2 and 𝑥 2 + 𝑦 2 − 𝑧 = 0. As it looks, 𝑤 𝑥 = 2𝑥. This would have been if 𝑥, 𝑦, 𝑧 were independent variables. But this is not so since 𝑥 2 + 𝑦 2 − 𝑧 = 0. If 𝑧 is the dependent variable and 𝑥, 𝑦 are independent variables, then the second equation gives 𝑧 = 𝑥 2 + 𝑦 2. Then, 𝑤 = 𝑥 2 + 𝑦 2 + (𝑥 2 + 𝑦 2 ) 2. Thus, 𝑤 𝑥 = 2𝑥 + 4𝑥 3 + 4𝑥𝑦 2. If 𝑦 is the dependent variable and 𝑥, 𝑧 are independent variables, then 𝑦 2 = 𝑧 − 𝑥 2 so that 𝑤 = 𝑦 2 + (𝑧 − 𝑦 2 ) + 𝑧 2 = 𝑧 + 𝑧 2. Then 𝑤 𝑥 = 0. The correct procedure to get 𝜕𝑤/𝜕𝑥 in (1.34) is : 1. 𝑤 must be dependent variable and 𝑥 must be independent variable. 2. Decide which of the other variables are dependent or independent. 3. Eliminate the dependent variables from 𝑤 using the constraints. 4. Then take the partial derivative 𝜕𝑤/𝜕𝑥. (1.35) Example Given that 𝑤 = 𝑥 2 + 𝑦 2 + 𝑧 2 and 𝑧 (𝑥, 𝑦) satisfies 𝑧 3 − 𝑥𝑦 + 𝑦𝑧 + 𝑦 3 = 1, evaluate 𝜕𝑤/𝜕𝑥 at (2, −1, 1). Here, 𝑧, 𝑤 are dependent variables and 𝑥, 𝑦 are independent variables. Then, 𝜕𝑤 𝜕𝑧 𝜕𝑧 𝜕𝑧 = 2𝑥 + 2𝑧 , 3𝑧 2 −𝑦 +𝑦 = 0. 𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥 22 MA1101 Classnotes 𝜕𝑤 2𝑦𝑧 These two together imply = 2𝑥 +. 𝜕𝑥 𝑦 + 3𝑧 2 𝜕𝑤 Evaluating it at (2, −1, 1) gives (2, −1, 1) = 3. 𝜕𝑥 (1.36) Example Suppose 𝑧 = 𝑓 (𝑥, 𝑦) has continuous second order partial derivatives, 𝑥 = 𝑟 2 + 𝜃 2 and 𝑦 = 2𝑟𝜃. Find 𝑧𝑟𝑟 assuming that 𝑟 and 𝜃 are independent variables. We have 𝑥𝑟 = 2𝑟, 𝑦𝑟 = 2𝜃. Then 𝑧𝑟 = 𝑧𝑥 𝑥𝑟 + 𝑧𝑦𝑦𝑟 = 2𝑟𝑧𝑥 + 2𝜃𝑧𝑦. 𝑧𝑥𝑟 = 𝑧𝑥𝑥 𝑥𝑟 + 𝑧𝑥𝑦𝑦𝑟 = 2𝑟𝑧𝑥𝑥 + 2𝜃𝑧𝑥𝑦. 𝑧𝑦𝑟 = 𝑧𝑦𝑥 𝑥𝑟 + 𝑧𝑦𝑦𝑦𝑟 = 2𝑟𝑧𝑦𝑥 + 2𝜃𝑧𝑦𝑦. 𝜕𝑧𝑟 𝜕 𝑧𝑟𝑟 = = (2𝑟𝑧𝑥 + 2𝜃𝑧𝑦 ) = 2𝑧𝑥 + 2𝑟𝑧𝑥𝑟 + 2𝜃𝑧𝑦𝑟 𝜕𝑟 𝜕𝑟 = 2𝑧𝑥 + 2𝑟 (2𝑟𝑧𝑥𝑥 + 2𝜃𝑧𝑥𝑦 ) + 2𝜃 (2𝑟𝑧𝑦𝑥 + 2𝜃𝑧𝑦𝑦 ) = 2𝑧𝑥 + 4𝑟 2𝑧𝑥𝑥 + 8𝑟𝜃𝑧𝑥𝑦 + 4𝜃 2𝑧𝑦𝑦. 1.7 Directional derivative Recall that if 𝑓 (𝑥, 𝑦) is a function, then 𝑓𝑥 (𝑥 0, 𝑦0 ) is the rate of change in 𝑓 with respect to change in 𝑥, at (𝑥 0, 𝑦0 ), that is, in the direction 𝚤ˆ. Similarly, 𝑓𝑦 (𝑥 0, 𝑦0 ) is the rate of change at (𝑥 0, 𝑦0 ) in the direction 𝚥ˆ. How do we find the rate of change of 𝑓 (𝑥, 𝑦) at (𝑥 0, 𝑦0 ) in the direction of any unit vector 𝑢ˆ in the 𝑥𝑦-plane? Differential Calculus 23 Consider a smooth surface 𝑆 given by the equation 𝑧 = 𝑓 (𝑥, 𝑦). Let 𝑧 0 = 𝑓 (𝑥 0, 𝑦0 ). The point 𝑃 (𝑥 0, 𝑦0, 𝑧 0 ) lies on 𝑆. Let 𝑢ˆ be a unit vector in the 𝑥𝑦-plane. Translating 𝑢ˆ suitably, we may assume that 𝑢ˆ contains the point 𝑃. The vertical plane that passes through 𝑃 and contains the vector 𝑢ˆ intersects 𝑆 in a curve 𝐶. The slope of the tangent line 𝑇 to the curve 𝐶 at the point 𝑃 is the rate of change of 𝑧 in the direction of 𝑢. ˆ Convention: A vector is written as 𝑢® whereas a unit vector is written as 𝑢. ˆ In the context of the directional derivative 𝐷𝑢 𝑧, the vector 𝑢ˆ is taken as a unit vector. Let 𝑓 (𝑥, 𝑦) be a function defined in an open region 𝐷. Let (𝑥 0, 𝑦0 ) ∈ 𝐷. The directional derivative of 𝑓 (𝑥, 𝑦) in the direction of a unit vector 𝑢ˆ = 𝑎ˆ𝚤 + 𝑏 𝚥ˆ at (𝑥 0, 𝑦0 ) is given by 𝑓 (𝑥 0 + ℎ𝑎, 𝑦0 + ℎ𝑏) − 𝑓 (𝑥 0, 𝑦0 ) (𝐷𝑢 𝑓 )(𝑥 0, 𝑦0 ) = lim. ℎ→0 ℎ (1.37) Example Find the derivative of 𝑧 = 𝑥 2 + 𝑦 2 at (1, 2) in the direction 𝑖ˆ + 𝑗ˆ. The unit vector in the given direction is 𝑢ˆ = √𝚤ˆ + √𝚥ˆ. Then, 2 2 𝑓 1+ √ℎ , 2 + √ℎ − 𝑓 (1, 2) 2ℎ 2ℎ 2 2 √ +2· √ √ 2 2 (𝐷𝑢 𝑧)(1, 2) = lim = lim = 3 2. ℎ→0 ℎ ℎ→0 ℎ √ Notice that 𝑓𝑥 (1, 2) · √1 + 𝑓𝑦 (1, 2) · √1 = (2 + 2 · 2) · √1 = 3 2. 2 2 2 (1.38) Theorem Let 𝐷 be an open region in the plane. Let 𝑓 : 𝐷 → R have continuous partial derivatives. Then 𝑓 has a directional derivative at each (𝑥, 𝑦) ∈ 𝐷 in any direction 𝑢ˆ = 𝑎ˆ𝚤 + 𝑏 𝚥ˆ, and it is given by (𝐷𝑢 𝑓 )(𝑥, 𝑦) = 𝑓𝑥 (𝑥, 𝑦)𝑎 + 𝑓𝑦 (𝑥, 𝑦)𝑏. Proof. Due to our convention, it is assumed that 𝑢ˆ is a unit vector. Let (𝑥 0, 𝑦0 ) ∈ 𝐷. Define the function 𝑔 : R → R by 𝑔(ℎ) = 𝑓 (𝑥 0 + 𝑎ℎ, 𝑦0 + 𝑏ℎ). Then 𝑔(ℎ) is a continuously differentiable function of ℎ. Now, 𝑓 (𝑥 0 + 𝑎ℎ, 𝑦0 + 𝑏ℎ) − 𝑓 (𝑥 0, 𝑦0 ) 𝑔(ℎ) − 𝑔(0) (𝐷𝑢 𝑓 )(𝑥 0, 𝑦0 ) = lim = lim = 𝑔′ (0). ℎ→0 ℎ ℎ→0 ℎ Using the Chain rule and continuity of 𝑓𝑥 , 𝑓𝑦 , we have 𝑑𝑥 𝑑𝑦 𝑔′ (ℎ) = 𝑓𝑥 + 𝑓𝑦 = 𝑓𝑥 𝑎 + 𝑓𝑦 𝑏 ⇒ 𝑔′ (0) = 𝑓𝑥 (𝑥 0, 𝑦0 ) 𝑎 + 𝑓𝑦 (𝑥 0, 𝑦0 ) 𝑏. 𝑑ℎ 𝑑ℎ Therefore, (𝐷𝑢 𝑓 )(𝑥 0, 𝑦0 ) = 𝑓𝑥 (𝑥 0, 𝑦0 )𝑎 + 𝑓𝑦 (𝑥 0, 𝑦0 )𝑏. 24 MA1101 Classnotes (1.39) Example Find the directional derivative of 𝑓 (𝑥, 𝑦) = 𝑥 3 − 3𝑥𝑦 + 4𝑦 2 in the direction of the line that makes an angle of 𝜋/6 with the 𝑥-axis. √ The direction is given by the unit vector 𝑢ˆ = cos 𝜋6 𝚤ˆ + sin 𝜋6 𝚥ˆ = 23𝚤ˆ + 21 𝚥ˆ. Thus √ √ 3 1 3 1 3𝑥 2 − 3𝑦 + 𝐷𝑢 𝑓 (𝑥, 𝑦) = 𝑓𝑥 + 𝑓𝑦 = − 3𝑥 + 8𝑦 2 2 2 2 1h √ 2 √ i = 3 3𝑥 − 3𝑥 + (8 − 3 3)𝑦. 2 The formula for the directional derivative in the direction of the unit vector 𝑢ˆ = 𝑎ˆ𝚤 + 𝑏 𝚥ˆ can be written as 𝐷𝑢 𝑓 = 𝑓𝑥 𝑎 + 𝑓𝑦𝑏 = (𝑓𝑥 𝚤ˆ + 𝑓𝑦 𝚥ˆ) · (𝑎ˆ𝚤 + 𝑏 𝚥ˆ). 𝜕 𝜕 The vector operator ∇ := 𝚤ˆ + 𝚥ˆ is called the gradient and the gradient of 𝜕𝑥 𝜕𝑦 𝑓 (𝑥, 𝑦) is 𝜕𝑓 𝜕𝑓 ∇𝑓 := grad𝑓 := 𝚤ˆ + 𝚥ˆ. 𝜕𝑥 𝜕𝑦 Therefore, 𝐷𝑢 𝑓 = ∇𝑓 · 𝑢. ˆ That is, at (𝑥 0, 𝑦0 ), the directional derivative is given by (𝐷𝑢 𝑓 )(𝑥 0, 𝑦0 ) = (∇𝑓 )(𝑥 0, 𝑦0 ) · 𝑢. ˆ Caution: This formula has been derived under the assumptions that 𝑓𝑥 and 𝑓𝑦 are continuous at (𝑥 0, 𝑦0 ), and 𝑢ˆ is a unit vector. (1.40) Example Find the directional derivative of 𝑓 (𝑥, 𝑦) = 𝑥𝑒𝑦 + cos(𝑥𝑦) in the direction of the vector 3ˆ𝚤 − 4 𝚥ˆ at (2, 0). Here 𝑢ˆ = 35 𝚤ˆ − 45 𝚥ˆ. The partial derivatives of 𝑓 are continuous. We have ∇𝑓 = 𝑓𝑥 𝚤ˆ + 𝑓𝑦 𝚥ˆ = 𝑒𝑦 − 𝑦 sin(𝑥𝑦) 𝚤ˆ + 𝑥𝑒𝑦 − 𝑥 sin(𝑥𝑦) 𝚥ˆ. (∇𝑓 )(2, 0) = 1 · 𝚤ˆ + 2 · 𝚥ˆ. Thus, the directional derivative of 𝑓 in the direction of 3ˆ𝚤 − 4 𝚥ˆ at (2, 0) is (𝐷𝑢 𝑓 )(2, 0) = (∇𝑓 )(2, 0) · 35 𝚤ˆ − 54 𝚥ˆ = (ˆ𝚤 + 2 𝚥ˆ) · 35 𝚤ˆ − 54 𝚥ˆ = 35 − 85 = −1. The directional derivative can be used to approximate a function at a neighboring point. Assume that ℎ is (intuitively) small. Let 𝑢ˆ = 𝑎ˆ𝚤 + 𝑏 𝚥ˆ be a unit vector. Then, (𝑥 0 +𝑎ℎ, 𝑦0 +𝑏ℎ) is taken as a point close to (𝑥 0, 𝑦0 ) in the direction of 𝑢.ˆ The rate of change in 𝑓 (𝑥, 𝑦) at (𝑥 0, 𝑦0 ) in the direction of 𝑢ˆ is given by the directional derivative Differential Calculus 25 (𝐷𝑢 𝑓 )(𝑥 0, 𝑦0 ). Thus the change is approximately equal to ℎ (𝐷𝑢 𝑓 )(𝑥 0, 𝑦0 ). We get the approximation 𝑓 (𝑥 0 + 𝑎ℎ, 𝑦0 + 𝑏ℎ) ≈ 𝑓 (𝑥 0, 𝑦0 ) + ℎ (𝐷𝑢 𝑓 )(𝑥 0, 𝑦0 ). (1.41) Example How much the value of 𝑦 sin 𝑥 + 2𝑦𝑧 change if the point (𝑥, 𝑦, 𝑧) moves 0.1 units from (0, 1, 0) toward (2, 2, −2)? ⃗⃗ ⃗⃗⃗⃗⃗⃗⃗⃗ ˆ The Let 𝑓 (𝑥, 𝑦, 𝑧) = 𝑦 sin 𝑥 + 2𝑦𝑧. 𝑃 (0, 1, 0), 𝑄 (2, 2, −2). 𝑢 = 𝑃𝑄 = 2ˆ𝚤 + 𝚥ˆ − 2𝑘. ⃗⃗ ⃗ ⃗ unit vector in the direction of 𝑢 is 𝑢ˆ = 31 𝑣. We find 𝐷𝑢 𝑓 at 𝑃 which requires ∇𝑓. ˆ ∇𝑓 = (𝑦 cos 𝑥)ˆ𝚤 + (sin 𝑥 + 2𝑧) 𝚥ˆ + 2𝑦 𝑘. ⃗⃗ ˆ · 2𝚤ˆ + 1 𝚥ˆ − 2 𝑘ˆ = − 2. Then (𝐷𝑢 𝑓 )(𝑃) = (∇𝑓 )(0, 1, 0) · 𝑢 = (ˆ𝚤 + 2𝑘) 3 3 3 3 ⃗⃗ The change of 𝑓 (𝑥, 𝑦, 𝑧) in the direction of 𝑢 in moving 0.1 units is approximately Δ𝑓 ≈ 𝐷𝑢 (𝑃) × 0.1 = − 23 (0.1) = −0.067 units. The formula 𝐷𝑢 𝑓 = ∇𝑓 · 𝑢ˆ means that the directional derivative is the length of the projection of the gradient in the direction of 𝑢. ˆ (1.42) Theorem Let 𝐷 be an open region in the plane. Let the function 𝑓 : 𝐷 → R have con- tinuous partial derivatives. Then the maximum value of the directional derivative (𝐷𝑢 𝑓 )(𝑥, 𝑦) is |∇𝑓 |, and it is achieved in the direction of ∇𝑓. Proof. Let (𝑥, 𝑦) ∈ 𝐷. At the point (𝑥, 𝑦) we have 𝐷𝑢 𝑓 ≤ |𝐷𝑢 𝑓 | = |∇𝑓 · 𝑢ˆ | = |∇𝑓 | |𝑢ˆ | cos 𝜃 = |∇𝑓 | cos 𝜃, where 𝜃 is the angle between ∇𝑓 and 𝑢. ˆ Since maximum of cos 𝜃 is 1, maximum of 𝐷𝑢 𝑓 is |∇𝑓 |. The maximum is achieved when 𝜃 = 0, that is, when the directions of ∇𝑓 and 𝑢ˆ coincide. From (1.42) we observe the following: 𝑓 (𝑥, 𝑦) increases most rapidly in the direction of its gradient. 𝑓 (𝑥, 𝑦) decreases most rapidly in the opposite direction of its gradient. 𝑓 (𝑥, 𝑦) remains constant in any direction orthogonal to its gradient. (1.43) Example Find the directions in which the function 𝑓 (𝑥, 𝑦) = 21 (𝑥 2 + 𝑦 2 ) changes most, least, and not at all, at the point (1, 1). 26 MA1101 Classnotes Note that when we ask for a direction, we mean a unit vector. Now, ∇𝑓 = 𝑓𝑥 𝚤ˆ + 𝑓𝑦 𝚥ˆ = 𝑥ˆ𝚤 + 𝑦 𝚥ˆ. (∇𝑓 )(1, 1) = 𝚤ˆ + 𝚥ˆ. 𝚥ˆ Thus the function 𝑓 (𝑥, 𝑦) increases most at (1, 1) in the direction √𝚤ˆ + √. It 2 2 𝚥ˆ decreases most at (1, 1) in the direction − √𝚤ˆ − √. And it does not change at (1, 1) 2 2 in the directions ± √𝚤ˆ − √𝚥ˆ. 2 2 In higher dimensions, if 𝑓 (𝑥 1,... , 𝑥𝑛 ) is a function of 𝑛 independent variables defined on 𝐷 ⊆ R𝑛 , then its gradient at any point is 𝜕𝑓 𝜕𝑓 ∇𝑓 = ,...,. 𝜕𝑥 1 𝜕𝑥𝑛 ⃗⃗ The directional derivative at any point 𝑥 in the direction of a unit vector 𝑢ˆ = (𝑢 1,... , 𝑢𝑛 ) is ⃗⃗ ⃗⃗ 𝑓 (𝑥 +ℎ𝑢) ˆ − 𝑓 (𝑥) 𝐷𝑢 𝑓 = lim = ∇𝑓 · 𝑢ˆ = 𝑓𝑥 1𝑢 1 + · · · + 𝑓𝑥𝑛 𝑢𝑛. ℎ→0 ℎ The algebraic rules for the gradient are as follows: 1. Constant multiple: ∇(𝑘 𝑓 ) = 𝑘 ∇𝑓 for 𝑘 ∈ R. 2. Sum: ∇(𝑓 + 𝑔) = ∇𝑓 + ∇𝑔. 3. Difference: ∇(𝑓 − 𝑔) = ∇𝑓 − ∇𝑔. 4. Product: ∇(𝑓 𝑔) = 𝑓 ∇𝑔 + 𝑔 ∇𝑓. 𝑓 𝑔 ∇𝑓 − 𝑓 ∇𝑔 5. Quotient: ∇ =. 𝑔 𝑔2 1.8 Tangent planes and normal lines Partial derivatives can be used to derive an equation of the tangent plane to a surface at a point. Let 𝑆 be a smooth surface given by the equation 𝑧 = 𝑓 (𝑥, 𝑦) for Differential Calculus 27 (𝑥, 𝑦) ∈ 𝐷, an open region in the plane. Here, 𝑆 is smooth means that both 𝑓𝑥 and 𝑓𝑦 are continuous on 𝐷. Let (𝑎, 𝑏) ∈ 𝐷. Write 𝑐 = 𝑓 (𝑎, 𝑏). The point 𝑃 = (𝑎, 𝑏, 𝑐) lies on 𝑆. The tangent plane to 𝑆 at 𝑃 consists of the tangent lines at 𝑃 to all possible curves that lie on 𝑆 and pass through 𝑃. This plane approximates 𝑆 at 𝑃 most closely. Let 𝐶 1 be the curve of intersection of the plane 𝑦 = 𝑏 with 𝑆 and let 𝑇1 be the tangent line to the curve 𝐶 1 at the point 𝑃 = (𝑎, 𝑏, 𝑐). Similarly, let 𝑇2 be the tangent line at 𝑃 to the curve 𝐶 2 obtained by the intersection of the plane 𝑥 = 𝑎 with 𝑆. Then, the tangent plane to 𝑆 at 𝑃 is the plane that contains the lines 𝑇1 and 𝑇2. For the equation of the tangent plane, notice that any plane passing through 𝑃 = (𝑎, 𝑏, 𝑐) is given by 𝑧 − 𝑐 = 𝐴(𝑥 − 𝑎) + 𝐵(𝑦 − 𝑏). When 𝑦 = 𝑏, this tangent plane gives us the tangent line 𝑇1 with slope as 𝐴. That is, 𝐴 = 𝑓𝑥 (𝑎, 𝑏). Similarly, 𝐵 = 𝑓𝑦 (𝑎, 𝑏), the slope of the tangent line 𝑇2. Hence the equation of the tangent plane to the smooth surface 𝑆 given by 𝑧 = 𝑓 (𝑥, 𝑦) at the point (𝑎, 𝑏, 𝑐) is 𝑧 − 𝑐 = 𝑓𝑥 (𝑎, 𝑏)(𝑥 − 𝑎) + 𝑓𝑦 (𝑎, 𝑏)(𝑦 − 𝑏). Recall that the normal line to the surface 𝑧 = 𝑓 (𝑥, 𝑦) at (𝑎, 𝑏, 𝑐) is the line that passes through the point (𝑎, 𝑏, 𝑐) and is orthogonal to the tangent plane at the same point. Then the normal line has direction ratios 𝑓𝑥 (𝑎, 𝑏), 𝑓𝑦 (𝑎, 𝑏), −1. Thus the equation of the normal line to 𝑧 = 𝑓 (𝑥, 𝑦) at (𝑎, 𝑏, 𝑓 (𝑎, 𝑏)) in parametric form is 𝑥 = 𝑎 + 𝑓𝑥 (𝑎, 𝑏) 𝑡, 𝑦 = 𝑏 + 𝑓𝑦 (𝑎, 𝑏) 𝑡, 𝑧 = 𝑓 (𝑎, 𝑏) − 𝑡. (1.44) Example Find the equation of the tangent plane and the normal line to the elliptic paraboloid 𝑧 = 2𝑥 2 + 𝑦 2 at (1, 1, 3). Here, 𝑧𝑥 = 4𝑥, 𝑧𝑦 = 2𝑦. So, 𝑧𝑥 (1, 1) = 4, 𝑧𝑦 (1, 1) = 2. Then the equation of the tangent plane is 𝑧 − 3 = 4(𝑥 − 1) + 2(𝑦 − 1). It simplifies to 𝑧 = 4𝑥 + 2𝑦 − 3. The equation of the normal line is 𝑥 = 1 + 4𝑡, 𝑦 = 1 + 2𝑡, 𝑧 = 3 − 𝑡. An alternative derivation of the equations of tangent planes and normal lines uses the geometric meaning of the gradient. Let 𝑧 = 𝑓 (𝑥, 𝑦) be a given surface. 28 MA1101 Classnotes Assume that 𝑓𝑥 and 𝑓𝑦 are continuous. Recall that a level curve to this surface is a curve in the plane where 𝑓 (𝑥, 𝑦) is a constant. Fix some constant 𝑐 in the range of 𝑓. On the corresponding level curve, 𝑓 (𝑥, 𝑦) takes the constant value 𝑐. Suppose ⃗⃗ 𝑟 (𝑡) = 𝑥 (𝑡)ˆ𝚤 + 𝑦 (𝑡) 𝚥ˆ is a parametrization of this level curve. For each point on this level curve, 𝑓 (𝑥, 𝑦) = 𝑐, that is, 𝑓 𝑥 (𝑡), 𝑦 (𝑡) = 𝑐 for all 𝑡. Differentiating, we have 𝑑 𝑑𝑡 𝑓 𝑥 (𝑡), 𝑦 (𝑡) = 0. Or, ⃗⃗ 𝑑𝑥 𝑑𝑦 𝑑 𝑟 (𝑡) 𝑓𝑥 + 𝑓𝑦 = ∇𝑓 · = 0. 𝑑𝑡 𝑑𝑡 𝑑𝑡 ⃗⃗ ⃗⃗ ⃗⃗ We also write 𝑑 𝑟 /𝑑𝑡 as 𝑟 ′ (𝑡). Since 𝑟 ′ (𝑡) is the tangent to the curve, ∇𝑓 is the normal to the level curve, at any point. We thus obtain the following: Let 𝐷 be an open region in the plane, (𝑎, 𝑏) ∈ 𝐷 and let 𝑓 : 𝐷 → R have continuous partial derivatives at (𝑎, 𝑏). If (∇𝑓 )(𝑎, 𝑏) ≠ 0, then (∇𝑓 )(𝑎, 𝑏) is the direction of the normal to the level curve 𝑓 (𝑥, 𝑦) = 𝑓 (𝑎, 𝑏) at (𝑎, 𝑏). To determine the tangent planes and normal lines to a surface at a point 𝑃 = (𝑎, 𝑏, 𝑐) defined implicitly, say, by 𝑓 (𝑥, 𝑦, 𝑧) = 0, we consider the function 𝑤 = 𝑓 (𝑥, 𝑦, 𝑧), whose graph is in R4. Suppose 𝑓𝑥 , 𝑓𝑦 , 𝑓𝑧 are continuous in a ball around 𝑃. A ball around 𝑃 is a set of the form {(𝑥, 𝑦, 𝑧) ∈ R3 : (𝑥−𝑎) 2 +(𝑦−𝑏) 2 +(𝑧−𝑐) 2 < 𝜖 2 } for some 𝜖 > 0. The surface 𝑓 (𝑥, 𝑦, 𝑧) = 0 is a level surface of the function 𝑤 = 𝑓 (𝑥, 𝑦, 𝑧). ⃗⃗ Let 𝑟 (𝑡) = 𝑥 (𝑡)ˆ𝚤 + 𝑦 (𝑡) 𝚥ˆ + 𝑧 (𝑡)𝑘ˆ be a parametrization of a smooth curve on the level surface 𝑓 (𝑥, 𝑦, 𝑧) = 0 passing through 𝑃. Then 𝑓 𝑥 (𝑡), 𝑦 (𝑡), 𝑧 (𝑡) = 0 for all 𝑡. Differentiating this we get 𝑑 𝑓 /𝑑𝑡 = 0. By the Chain rule, it gives ⃗⃗ ∇𝑓 · 𝑟 ′ (𝑡) = 0. Look at all such smooth curves that pass through 𝑃 on the level surface. The above ⃗⃗ equation asserts that the velocity vectors 𝑟 ′ (𝑡) at 𝑃 to all these smooth curves are orthogonal to the gradient at 𝑃. That is, the direction of the normal line to the surface 𝑓 (𝑥, 𝑦, 𝑧) = 0 at 𝑃 is (∇𝑓 )(𝑃). Then, the equation of the normal line to the surface 𝑓 (𝑥, 𝑦, 𝑧) = 0 at 𝑃 = (𝑎, 𝑏, 𝑐) in parametric form is 𝑥 = 𝑎 + 𝑓𝑥 (𝑎, 𝑏, 𝑐) 𝑡, 𝑦 = 𝑏 + 𝑓𝑦 (𝑎, 𝑏, 𝑐) 𝑡, 𝑧 = 𝑐 + 𝑓𝑧 (𝑎, 𝑏, 𝑐) 𝑡. The tangent plane at 𝑃 = (𝑎, 𝑏, 𝑐) on the level surface 𝑓 (𝑥, 𝑦, 𝑧) = 0 is the plane through 𝑃 which is orthogonal to ∇𝑓 at 𝑃. Then, its equation is 𝑓𝑥 (𝑎, 𝑏, 𝑐)(𝑥 − 𝑎) + 𝑓𝑦 (𝑎, 𝑏, 𝑐)(𝑦 − 𝑏) + 𝑓𝑧 (𝑎, 𝑏, 𝑐)(𝑧 − 𝑐) = 0. If the surface is given in the form 𝑧 = 𝑓 (𝑥, 𝑦), then write 𝐹 (𝑥, 𝑦, 𝑧) = 𝑓 (𝑥, 𝑦) − 𝑧; the surface is given by 𝐹 (𝑥, 𝑦, 𝑧) = 0. Now, 𝐹𝑥 = 𝑓𝑥 , 𝐹𝑦 = 𝑓𝑦 , 𝐹𝑧 = −1. Using Differential Calculus 29 the equations derived in case of a surface given in implicit form, we see that the equation of the normal line is 𝑥 = 𝑎 + 𝑓𝑥 (𝑎, 𝑏) 𝑡, 𝑦 = 𝑏 + 𝑓𝑦 (𝑎, 𝑏) 𝑡, 𝑧 = 𝑐 − 𝑡. Similarly, the equation of the tangent plane is 𝑓𝑥 (𝑎, 𝑏)(𝑥 − 𝑎) + 𝑓𝑦 (𝑎, 𝑏)(𝑦 − 𝑏) − (𝑧 − 𝑓 (𝑎, 𝑏)) = 0 as obtained earlier. (1.45) Example Find the tangent plane and the normal line of the surface 𝑥 2 + 𝑦 2 + 𝑧 = 9 at the point (1, 2, 4). Here, 𝑓 (𝑥, 𝑦, 𝑧) = 𝑥 2 + 𝑦 2 + 𝑧 − 9. First, check that the point (1, 2, 4) lies on the surface. Next, 𝑓𝑥 (1, 2, 4) = 2, 𝑓𝑦 (1, 2, 4) = 4 and 𝑓𝑧 (1, 2, 4) = 1. The tangent plane is given by 2(𝑥 − 1) + 4(𝑦 − 2) + (𝑧 − 4) = 0. The normal line at (1, 2, 4) is given by 𝑥 = 1 + 2𝑡, 𝑦 = 2 + 4𝑡, 𝑧 = 4 + 𝑡. (1.46) Example Find the tangent line to the curve of intersec- tion of the surfaces 𝑓 (𝑥, 𝑦, 𝑧) := 𝑥 2 +𝑦 2 −2 = 0 and 𝑔(𝑥, 𝑦, 𝑧) := 𝑥 + 𝑧 − 4 = 0 at the point (1, 1, 3). The tangent line lies in the tangent plane to 𝑓 (𝑥, 𝑦, 𝑧) = 0 and also it lies in the tangent plane to 𝑔(𝑥, 𝑦, 𝑧) = 0, at (1, 1, 3). So, the tangent line is orthogonal to both ∇𝑓 and ∇𝑔 at (1, 1, 3). Thus it is parallel to ˆ = 2ˆ𝚤 − 2 𝚥ˆ − 2𝑘. ∇𝑓 × ∇𝑔 = (2ˆ𝚤 + 2 𝚥ˆ) × (ˆ𝚤 + 𝑘) ˆ Then the equation of the tangent line is 𝑥 = 1 + 2𝑡, 𝑦 = 1 − 2𝑡, 𝑧 = 3 − 2𝑡. 30 MA1101 Classnotes 1.9 Taylor’s formulas For a function of one variable, a polynomial approximation is given by Taylor’s formula. It has two forms: differential form and integral form. The differential form is a generalization of the Mean Value Theorem for differentiable functions. However, we will first prove the integral form, and then deduce the differential form. In what follows, if 𝑓 : [𝑎, 𝑏] → R, then its derivative at 𝑥 = 𝑎 is taken as the right hand derivative, and at 𝑥 = 𝑏, the derivative is taken as the left hand derivative of 𝑓 (𝑥). (1.47) Theorem (Taylor’s Formula in Integral Form) Let 𝑓 (𝑥) be an (𝑛 + 1)-times continuously differentiable function on [𝑎, 𝑏]. Let 𝑥 ∈ [𝑎, 𝑏]. Then 𝑓 ′′ (𝑎) 𝑓 (𝑛) (𝑎) 𝑓 (𝑥) = 𝑓 (𝑎) + 𝑓 ′ (𝑎)(𝑥 − 𝑎) + (𝑥 − 𝑎) 2 + · · · + (𝑥 − 𝑎)𝑛 + 𝑅𝑛 (𝑥), 2! 𝑛! ∫𝑥 (𝑥 − 𝑡)𝑛 (𝑛+1) where 𝑅𝑛 (𝑥) = 𝑓 (𝑡) 𝑑𝑡. An estimate for 𝑅𝑛 (𝑥) is given by 𝑎 𝑛! 𝑚 (𝑥 − 𝑎)𝑛+1 𝑀 (𝑥 − 𝑎)𝑛+1 ≤ 𝑅𝑛 (𝑥) ≤ (𝑛 + 1)! (𝑛 + 1)! where 𝑚 ≤ 𝑓 𝑛+1 (𝑥) ≤ 𝑀 for 𝑥 ∈ [𝑎, 𝑏]. Proof. We prove it by induction on 𝑛. For 𝑛 = 0, we should show that ∫𝑥 𝑓 (𝑥) = 𝑓 (𝑎) + 𝑅0 (𝑥) = 𝑓 (𝑎) + 𝑓 ′ (𝑡) 𝑑𝑡. 𝑎 But this follows from the Fundamental theorem of calculus. Now, suppose that Taylor’s formula holds for 𝑛 = 𝑘. That is, we have 𝑓 ′′ (𝑎) 𝑓 (𝑘) (𝑎) 𝑓 (𝑥) = 𝑓 (𝑎) + 𝑓 ′ (𝑎)(𝑥 − 𝑎) + (𝑥 − 𝑎) 2 + · · · + (𝑥 − 𝑎)𝑘 + 𝑅𝑘 (𝑥), 2! 𝑘! ∫𝑥 (𝑥 − 𝑡)𝑘 (𝑘+1) where 𝑅𝑘 (𝑥) = 𝑓 (𝑡) 𝑑𝑡. We evaluate 𝑅𝑘 (𝑥) using integration by 𝑎 𝑘! parts with the first function as 𝑓 (𝑘+1) (𝑡) and the second function as (𝑥 − 𝑡)𝑘 /𝑘!. Differential Calculus 31 Remember that the variable of integration is 𝑡 and 𝑥 is a fixed number. Then ∫𝑥 h (𝑘+1) (𝑥 − 𝑡)𝑘+1 i 𝑥 (𝑥 − 𝑡)𝑘+1 𝑅𝑘 (𝑥) = − 𝑓 (𝑡) + 𝑓 (𝑘+2) (𝑡) 𝑑𝑡 (𝑘 + 1)! 𝑎 𝑎 (𝑘 + 1)! ∫𝑥 (𝑘+1) (𝑥 − 𝑎)𝑘+1 (𝑥 − 𝑡)𝑘+1 =𝑓 (𝑎) + 𝑓 (𝑘+2) (𝑡) 𝑑𝑡 (𝑘 + 1)! 𝑎 (𝑘 + 1)! 𝑓 (𝑘+1) (𝑎) = (𝑥 − 𝑎)𝑘+1 + 𝑅𝑘+1 (𝑥). (𝑘 + 1)! This completes the proof of Taylor’s formula. For the estimate of 𝑅𝑛 (𝑥), Observe that ∫𝑥 (𝑥 − 𝑡)𝑛 −(𝑥 − 𝑡)𝑛+1 𝑥 (𝑥 − 𝑎)𝑛+1 𝑑𝑡 = =. 𝑎 𝑛! (𝑛 + 1)! 𝑎 (𝑛 + 1)! Since 𝑚 ≤ 𝑓 𝑛+1 (𝑥) ≤ 𝑀, the estimate for 𝑅𝑛 (𝑥) follows. To derive the differential form of Taylor’s formula, we use the following result. (1.48) Theorem (Weighted Mean Value Theorem) Let 𝑓 (𝑡) and 𝑔(𝑡) be continuous real valued functions on [𝑎, 𝑏], where 𝑔(𝑡) does not change sign in [𝑎, 𝑏]. Then there exists 𝑐 ∈ [𝑎, 𝑏] such that ∫𝑏 ∫𝑏 𝑓 (𝑡)𝑔(𝑡) 𝑑𝑡 = 𝑓 (𝑐) 𝑔(𝑡) 𝑑𝑡. 𝑎 𝑎 Proof. Without loss of generality assume that 𝑔(𝑡) ≥ 0. Since 𝑓 (𝑡) is continuous, let 𝛼 = min 𝑓 (𝑡) and 𝛽 = max 𝑓 (𝑡) in [𝑎, 𝑏]. Then ∫𝑏 ∫𝑏 ∫𝑏 𝛼 𝑔(𝑡) 𝑑𝑡 ≤ 𝑓 (𝑡)𝑔(𝑡) 𝑑𝑡 ≤ 𝛽 𝑔(𝑡) 𝑑𝑡. 𝑎 𝑎 𝑎 ∫𝑏 ∫𝑏 ∫𝑏 ∫𝑏 If 𝑔(𝑡) 𝑑𝑡 = 0, then 𝑎 𝑓 (𝑡)𝑔(𝑡) 𝑑𝑡 = 0. In this case, 𝑎 𝑓 (𝑡)𝑔(𝑡) 𝑑𝑡 = 𝑓 (𝑐) 𝑎 𝑔(𝑡) 𝑑𝑡. 𝑎 ∫𝑏 ∫𝑏 So, suppose that 𝑎 𝑔(𝑡) 𝑑𝑡 ≠ 0. Then 𝑎 𝑔(𝑡) 𝑑𝑡 > 0. Consequently, ∫𝑏 𝑎 𝑓 (𝑡)𝑔(𝑡) 𝑑𝑡 𝛼≤ ∫𝑏 ≤ 𝛽. 𝑎 𝑔(𝑡) 𝑑𝑡 By the intermediate value theorem, there exists 𝑐 ∈ [𝑎, 𝑏] such that ∫𝑏 𝑎 𝑓 (𝑡)𝑔(𝑡) 𝑑𝑡 ∫𝑏 = 𝑓 (𝑐). 𝑎 𝑔(𝑡) 𝑑𝑡 (1.49) Theorem (Taylor’s Formula in Differential Form) Let 𝑛 ∈ N. Suppose that 𝑓 (𝑛) (𝑥) is continuously differentiable on [𝑎, 𝑏]. Then there 32 MA1101 Classnotes exists 𝑐 ∈ [𝑎, 𝑏] such that 𝑓 ′′ (𝑎) 𝑓 (𝑛) (𝑎) 𝑓 (𝑛+1) (𝑐) 𝑓 (𝑥) = 𝑓 (𝑎)+𝑓 ′ (𝑎)(𝑥 −𝑎)+ (𝑥 −𝑎) 2 +· · ·+ (𝑥 −𝑎)𝑛 + (𝑥 −𝑎)𝑛+1. 2! 𝑛! (𝑛 + 1)! Proof. Let 𝑥 ∈ (𝑎, 𝑏). The function 𝑔(𝑡) = (𝑥 − 𝑡)𝑛 does not change sign in [𝑎, 𝑥]. By the weighted mean value theorem, there exists 𝑐 ∈ [𝑎, 𝑥] such that ∫𝑥 ∫𝑥 𝑛 (𝑛+1) (𝑛+1) (𝑥 − 𝑡)𝑛+1 𝑥 (𝑥 − 𝑡) 𝑓 (𝑡) 𝑑𝑡 = 𝑓 (𝑐) (𝑥 − 𝑡)𝑛 𝑑𝑡 = −𝑓 (𝑛+1) (𝑐) 𝑎 𝑎 𝑛+1 𝑎 (𝑥 − 𝑎) 𝑛+1 = 𝑓 (𝑛+1) (𝑐). 𝑛+1 Using the Taylor’s formula in integral form, we have 1 (𝑛+1) (𝑥 − 𝑎)𝑛+1 𝑓 (𝑛+1) (𝑐) ∫ 1 𝑥 𝑛 (𝑛+1) 𝑅𝑛 (𝑥) = (𝑥 − 𝑡) 𝑓 (𝑡) 𝑑𝑡 = 𝑓 (𝑐) = (𝑥 − 𝑎)𝑛+1. 𝑛! 𝑎 𝑛! 𝑛+1 (𝑛 + 1)! Remark 1.50 Taylor’s formula in differential form can be proved directly by repeated use of the Mean value theorem, or Rolle’s theorem. It is as follows. For 𝑥 = 𝑎, the formula holds. So, let 𝑥 ∈ (𝑎, 𝑏]. For any 𝑡 ∈ [𝑎, 𝑥], let 𝑓 ′′ (𝑎) 𝑓 (𝑛) (𝑎) 𝑝 (𝑡) = 𝑓 (𝑎) + 𝑓 ′ (𝑎)(𝑡 − 𝑎) + (𝑡 − 𝑎) 2 + · · · + (𝑡 − 𝑎)𝑛. 2! 𝑛! Here, we treat 𝑥 as a certain point, not a variable; and 𝑡 as a variable. Write 𝑓 (𝑥) − 𝑝 (𝑥) 𝑔(𝑡) = 𝑓 (𝑡) − 𝑝 (𝑡) − (𝑡 − 𝑎)𝑛+1. (𝑥 − 𝑎) 𝑛+1 We see that 𝑔(𝑎) = 0, 𝑔′ (𝑎) = 0, 𝑔′′ (𝑎) = 0,... , 𝑔 (𝑛) (𝑎) = 0, and 𝑔(𝑥) = 0. By Rolle’s theorem, there exists 𝑐 1 ∈ (𝑎, 𝑥) such that 𝑔′ (𝑐 1 ) = 0. Since 𝑔(𝑎) = 0, apply Rolle’s theorem once more to get a 𝑐 2 ∈ (𝑎, 𝑐 1 ) such that 𝑔′′ (𝑐 2 ) = 0. Continuing this way, we get a 𝑐𝑛+1 ∈ (𝑎, 𝑐𝑛 ) such that 𝑔 (𝑛+1) (𝑐𝑛+1 ) = 0. Since 𝑝 (𝑡) is a polynomial of degree at most 𝑛, 𝑝 (𝑛+1) (𝑡) = 0. Then 𝑓 (𝑥) − 𝑝 (𝑥) 𝑔 (𝑛+1) (𝑡) = 𝑓 (𝑛+1) (𝑡) − (𝑛 + 1)!. (𝑥 − 𝑎)𝑛+1 𝑓 (𝑥) − 𝑝 (𝑥) Evaluating at 𝑡 = 𝑐𝑛+1 we have 𝑓 (𝑛+1) (𝑐𝑛+1 ) − (𝑛 + 1)! = 0. That is, (𝑥 − 𝑎)𝑛+1 𝑓 (𝑥) − 𝑝 (𝑥) 𝑓 (𝑛+1) (𝑐𝑛+1 ) =. (𝑥 − 𝑎)𝑛+1 (𝑛 + 1)! Differential Calculus 33 𝑓 (𝑛+1) (𝑐𝑛+1 ) Consequently, 𝑔(𝑡) = 𝑓 (𝑡) − 𝑝 (𝑡) − (𝑡 − 𝑎)𝑛+1. (𝑛 + 1)! Evaluating it at 𝑡 = 𝑥 and using the fact that 𝑔(𝑥) = 0, we get 𝑓 (𝑛+1) (𝑐𝑛+1 ) 𝑓