THE UNIVERSITY OF MELBOURNE SCHOOL OF MATHEMATICS AND STATISTICS MAST10006 Calculus 2 Lecture Notes © School of Mathematics and Statistics, University of Melbourne, 2022. STUDENT NAME: These notes have been written by Christine Mangelsdorf, Anthony Morphett, TriThang Tran and Binzhou Xia. Reproduction of any part of this work other than that authorised by Australian Copyright Law without permission of the copyright owners is unlawful. EMAIL: This compilation has been made in accordance with the provisions of Part VB of the copyright act for the teaching purposes of the University. These notes are for the use of students of the University of Melbourne enrolled in the subject MAST10006 Calculus 2. Edition 22, July 2022. Table of Contents Section 0 - Notation used in MAST10006 Calculus 2 Section 0 - Notation used in MAST10006 Calculus 2 2 Section 1 - Limits, Continuity, Sequences and Series 7 Section 2 - Hyperbolic Functions Standard Abbreviations 1. such that or given that: | 2. for all: ∀ 88 Section 3 - Complex Numbers 117 3. there exists: ∃ Section 4 - Integral Calculus 142 4. equivalent to: ≡ Section 5 - First Order Ordinary Differential Equations 181 Section 6 - Second Order Ordinary Differential Equations 249 Section 7 - Functions of Two Variables 311 5. that is: i.e 6. approximate: ≈ 7. much smaller than: ≪ 1 / 394 2 / 394 Standard Notation for Sets of Numbers Standard Notation for Intervals 1. element of: ∈ so a ∈ X means “a is an element of the set X ” 1. natural numbers: N = {1, 2, 3, . . . } 2. integers: Z = {0, ±1, ±2, . . . } 2. open interval: (a, b) so x ∈ (0, 1) means “0 < x < 1” 3. rational numbers: Q = { mn | m, n ∈ Z, n , 0} 3. closed interval: [a, b] so x ∈ [0, 1] means “0 ≤ x ≤ 1” 4. real numbers: R (rational numbers plus irrational numbers) 5. complex numbers: C = {x + iy | x, y ∈ R, i2 = −1} 4. partial open and closed interval: (a, b] or [a, b) so x ∈ [0, 1) means “0 ≤ x < 1” 6. R2 = {(x, y) | x, y ∈ R} (xy plane) 5. not including: \ so x ∈ R \ {0} means “x is any real number excluding 0”. Alternatively, we could write (−∞, 0) ∪ (0, ∞) where ∪ means the ”union of the two intervals”. 7. R3 = {(x, y, z) | x, y, z ∈ R} (3 dimensional space) 4 / 394 3 / 394 More Standard Notation Greek Alphabet 1. natural logarithm (base e): log x base 10 logarithm: log10 x α β γ δ ϵ or ε ζ η θ ι κ λ µ Alternative notations for natural logarithms used in textbooks: loge x, ln x 2. inverse trigonometric functions: arcsin x, arctan x etc Alternative notations used in textbooks: sin−1 x, tan−1 x etc 3. implies: ⇒ so p ⇒ q means “p implies q” 4. if and only if (iff): ⇔ (means both ⇐ and ⇒) so p ⇔ q means “p implies q” AND “q implies p” alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu ν ξ o π ρ σ τ υ ϕ χ ψ ω nu xi omicron pi rho sigma tau upsilon phi chi psi omega 5. approaches: → so f (x) → 1 as x → 0 means “f (x) approaches 1 as x approaches 0” 5 / 394 6 / 394 Section 1: Limits, Continuity, Sequences, Series Definition of limit of a function Let f be a real-valued function. Why do we study limits and continuity in calculus? The limit of f (x) as x approaches a is L, written lim f (x) = L x→a if f (x) gets arbitrarily close to L whenever x is close enough to a but x , a. Note: If it exists, the limit L must be a unique finite real number. 8 / 394 7 / 394 ( Example 1.1: If f (x) = 2x x , 1 , evaluate lim f (x). 4 x=1 x→1 Example 1.2: If f (x) = 1 , evaluate lim f (x). x→0 x2 f HxL f HxL 4 3 2 1 -3 Solution: -2 -1 1 2 3 x x -1 Solution: Note: The limit of f as x approaches a does not depend on f (a). The limit can exist even if f is undefined at x = a. 9 / 394 10 / 394 ( Example 1.3: If f (x) = We can describe this behaviour in terms of one-sided limits. We write 1 x<0 , evaluate lim f (x). 2 x≥0 x→0 f HxL 2 1 Theorem: x lim f (x) = L if and only if lim− f (x) = L and lim+ f (x) = L. Solution: x→a x→a x→a Thus the limit exists if and only if the left and right hand limits exist and are equal. 11 / 394 Limit Laws x3 + 2x2 − 1 Example 1.4: Use the limit laws to evaluate lim . x→2 5 − 3x Let f and g be real-valued functions and let c ∈ R be a constant. If lim f (x) and lim g(x) exist, then x→a x→a Solution: 1. lim [f (x) + g(x)] = lim f (x) + lim g(x). x→a x→a 12 / 394 x→a 2. lim [cf (x)] = c lim f (x). x→a x→a 3. lim [f (x)g(x)] = lim f (x) · lim g(x). x→a x→a # lim f (x) f (x) x→a = 4. lim x→a g(x) lim g(x) x→a " x→a provided lim g(x) , 0. x→a 5. lim c = c. x→a 6. lim x = a. x→a 13 / 394 14 / 394 Limits as x Approaches Infinity Example 1.5: Evaluate lim e−x . x→∞ The limit of f (x) as x approaches positive infinity is L, y = e-x lim f (x) = L x→∞ H0,1L if f (x) gets arbitrarily close to L whenever x is sufficiently large and positive. The limit of f (x) as x approaches negative infinity is M, lim f (x) = M x x→−∞ Solution: if f (x) gets arbitrarily close to M whenever x is sufficiently large and negative. Note: 1. L and M must be finite. 2. Limit laws (1)-(5) apply to limits as x → ±∞. 3. lim f (x) = lim f (−x). x→−∞ x→∞ 16 / 394 15 / 394 Some Standard Limits Terminology The following are all equivalent ways of expressing lim f (x) = L: x→a ▶ The limit of f (x) as x approaches a is L ▶ f (x) converges to L as x approaches a We can use the following standard limits without further proof: ▶ f (x) → L as x → a 1 (1) lim p = 0 (p > 0) x→∞ x These all mean the same thing. If the limit lim f (x) exists, we say that (2) lim rx = 0 x→∞ x→a (0 ≤ r < 1) f (x) converges as x approaches a. If the limit lim f (x) does not exist, we say that x→a f (x) diverges as x approaches a. We will see more standard limits later. Similarly for limits as x → ±∞. Note: Diverges simply means does not converge. 17 / 394 18 / 394 More about divergence Example 1.6: Explain why the following limits diverge. 1. lim sin x How do we show that a limit lim f (x) diverges? x→a x→∞ 2. lim x→0 1 x2 Solution: 19 / 394 f (x) ∞ has indeterminate form as x → a if g(x) ∞ f (x) → ∞ and g(x) → ∞. Notation and ∞ We say a function ∞ is not a number, and should not appear as a number in your writing. In other textbooks, you will often see the notation lim x→0 mean that 1 x2 20 / 394 3x2 − 2x + 3 . x→∞ x2 + 4x + 4 Example 1.7: Evaluate lim 1 = ∞ to x2 Solution: diverges to infinity. You should not use this notation in Calculus 2 and will lose notation marks for this! Why? 21 / 394 22 / 394 Sandwich Theorem (version for x → a) We say a function f (x) − g(x) has indeterminate form ∞ − ∞ as x → a if f (x) → ∞ and g(x) → ∞. Example 1.8: Evaluate lim √ x→∞ If g(x) ≤ f (x) ≤ h(x) when x is near a but x , a, and lim g(x) = lim h(x) = L x2 + 1 − x . x→a then x→a lim f (x) = L. Solution: x→a y hHxL f HxL L a gHxL x Note: “x is near a but x , a” means that x ∈ (b, a) ∪ (a, c) for some b < a < c. We will finish this example later. 23 / 394 Sandwich Theorem (version for x → ∞) 24 / 394 1 Example 1.9: Evaluate lim x2 sin . x→0 x A version of the Sandwich Theorem also works for limits as x → ∞. Solution: If g(x) ≤ f (x) ≤ h(x) when x is sufficiently large, and lim g(x) = lim h(x) = L then x→∞ x→∞ lim f (x) = L. x→∞ Similarly, the theorem holds for x → −∞. Note: “x is sufficiently large” means x ∈ (c, ∞) for some real number c. 25 / 394 26 / 394 1 Example 1.10: Evaluate lim x sin . x→0 x Example 1.8 (continued) lim Solution: x→∞ √ x2 + 1 − x = lim √ x→∞ 1 x2 + 1 + x 27 / 394 28 / 394 Continuity f HxL Example 1.11: Let ( 2x x , 1 f (x) = 4 x = 1. 4 3 2 Is f continuous at x = 1? Definition of continuity 1 -3 Let f be a real-valued function. -2 -1 1 2 3 x -1 The function f is continuous at x = a if Solution: lim f (x) = f (a). x→a 29 / 394 30 / 394 2 x −4 x−2 x,2 Example 1.12: Let f (x) = 4 x = 2. Theorem: The following function types are continuous at every point in their domains: ▶ polynomials Is f continuous at x = 2? ▶ trigonometric functions: sin x, cos x, tan x, sec x, cosec x, cot x, arcsin x, arccos x, arctan x ▶ exponential functions: ax for a > 0 Solution: ▶ logarithm functions: loga x for a > 0 √ ▶ nth root functions: n x for n ∈ {2, 3, 4, ...} ▶ hyperbolic functions: sinh x, cosh x, tanh x, sech x, cosech x, coth x, arcsinh x, arccosh x, arctanh x 32 / 394 31 / 394 Example 1.13: Evaluate lim sin (e−x ) . x→∞ Let f and g be real-valued functions and b ∈ R. Solution: Theorem: If lim g(x) = b and f is continuous at b then x→a lim f g(x) = f lim g(x) = f (b). x→a x→a Note: This theorem also holds for limits as x → ∞. 33 / 394 34 / 394 Let f and g be real-valued functions and c ∈ R be a constant. Theorem: If the functions f and g are continuous at x = a, then the following functions are continuous at x = a: Recall that ( g ◦ f )(x) = g( f (x)). 1. f + g, Theorem: 2. cf , If f is continuous at x = a and g is continuous at x = f (a), then g ◦ f is continuous at x = a. 3. fg, 4. f if g(a) , 0. g Note: The theorem follows from limit laws. 35 / 394 Example 1.14: Let f (x) = sin x2 + 1 log x 36 / 394 . For which values of x is f continuous? Solution: Note: This set can also be written as 37 / 394 38 / 394 3 x − cx + 8, x ≤ 1 Example 1.15: f (x) = x2 + 2cx + 2, x > 1. For which values of c is f continuous at all x ∈ R? Justify your answer. Solution: 39 / 394 40 / 394 Where does this definition come from? Differentiability Before seeing what is filled in from the lectures, try to come up with a picture that explains where the definition comes from. Definition of derivative Let f be a real-valued function whose domain contains an open interval around x = a. The derivative of f at x = a is defined by f ′ (a) = lim h→0 f (a + h) − f (a) . h The function f is differentiable at x = a if this limit exists. 41 / 394 42 / 394 Geometrically, f is differentiable at x = a if the graph y = f (x) has a tangent line at x = a. f HxL Differentiability and Continuity f HxL Theorem: If f is differentiable at x = a, then f is continuous at x = a. x a Differentiable at x=a x What about the converse? Not differentiable at x=0 f HxL If f is differentiable at x = a, then f HxL y = f (a) + f ′ (a)(x − a) is the tangent line to the curve y = f (x) at the point x = a, and f (x) ≃ f (a) + f ′ (a)(x − a) x a Differentiable at x=a when x is close to a. x Not differentiable at x=0 That is, the tangent line is a linear approximation for the function close to the point x = a. 43 / 394 L’Hôpital’s Rule Let f and g be differentiable functions near x = a, and at all points x near a with x , a. If g′ (x) 44 / 394 Example 1.16: Evaluate lim ,0 x→0 sin x . x Solution: f (x) lim x→a g(x) has the indeterminate form lim x→a 0 ∞ or then 0 ∞ f (x) f ′ (x) = lim ′ x→a g (x) g(x) if the limit involving the derivatives exists. Note: L’Hôpital’s Rule also holds for limits as x → ∞, and for one-sided limits x → a+ and x → a− for a ∈ R. 45 / 394 46 / 394 3x2 − 2x + 3 Example 1.17: Evaluate lim 2 . x→∞ x + 4x + 4 1 Example 1.18: Evaluate lim x− 3 log x . Solution: Solution: x→∞ (0 · ∞) 48 / 394 47 / 394 Aside - What is a limit really?* Aside - What is a limit really?* Recall our definition of limit: Example 1.19: Using the definition, prove that lim f (x) = L if f (x) gets arbitrarily close to L whenever x is close lim 2x = 2 x→a enough to a but x , a. x→1 Solution: What do ‘arbitrarily close’ and ‘close enough’ mean? For an arbitrary positive real number ε, More formally, 1 |f (x) − 2| = 2|x − 1| < ε if and only if |x − 1| < ε = δ. 2 This shows that |f (x) − 2| can be arbitrarily small whenever |x − 1| is small enough but not equal to 0. for any arbitrary positive real number ε, there is a positive real number δ such that |f (x) − L| < ϵ whenever 0 < |x − a| < δ. In other words, f (x) can be arbitrarily close to 2 whenever x is close enough to 1 but x , 1. This formal definition of limit is covered in MAST20026 Real Analysis, but as a taster we do two examples. Therefore, lim f (x) = 2. x→1 * Slides 49-51 are not examinable in MAST10006. 49 / 394 50 / 394 Aside - What is a limit really?* Sequences Definition of sequence Example 1.20: Sketch a proof of the limit law A sequence is a function f : N → R. It can be thought of as an ordered list of real numbers lim [f (x) + g(x)] = lim f (x) + lim g(x) x→a x→a x→a a1 , a2 , a3 , a4 , . . . , an . . . Solution: Suppose lim f (x) = L and lim g(x) = M. x→a Thus, f (n) = an . The sequence is denoted by (an ), where an is the nth term. x→a For an arbitrary positive real number ε, to make |f (x) + g(x) − (L + M)| < ε ε ε we only need to make |f (x) − L| < and |g(x) − M| < . 2 2 These will be satisfied whenever x is close enough to a but x , a since lim f (x) = L and lim g(x) = M. x→a Sometimes the notation {an } is also used. Example 1 1 1 1 1, , , , , . . . 2 3 4 5 x→a Hence f (x) + g(x) can be arbitrarily close to L + M whenever x is close enough to a but x , a, which means that x→a 1 n Example 1, −1, 1, −1, 1, −1, . . . lim [f (x) + g(x)] = L + M = lim f (x) + lim g(x). x→a an = x→a an = (−1)n−1 52 / 394 51 / 394 Limits of Sequences The graph of a sequence (an ) can be plotted on a set of axes with n on the x-axis and an on the y-axis. Example: an = Definition of limit of sequence Example: an = (−1)n−1 1 n A sequence (an ) has the limit L if an can be made arbitrarily close to L by making n sufficiently large. We write an an 1 1 lim an = L n→∞ 1 −1 2 3 4 5 n 1 2 3 4 5 or an → L as n → ∞. n If the limit exists we say that the sequence converges. Otherwise, we say that the sequence diverges. −1 Note: If it exists, L must be a unique finite real number. 53 / 394 54 / 394 Theorem (Limit Laws): Example 1.21: Determine whether the following sequences 1 converge or diverge: (a) (b) (−1)n−1 (c) (n) n Let (an ) and (bn ) be sequences of real numbers and c ∈ R a constant. If lim an and lim bn exist, then n→∞ Solution: n→∞ 1. lim [an + bn ] = lim an + lim bn . n→∞ n→∞ n→∞ 2. lim [can ] = c lim an . n→∞ n→∞ 3. lim [an bn ] = lim an · lim bn . n→∞ n→∞ 4. lim n→∞ n→∞ lim an an n→∞ = bn lim bn provided lim bn , 0. n→∞ n→∞ 5. lim c = c. n→∞ 56 / 394 55 / 394 The Factorial Function Standard Limits The factorial function n! (n = 0, 1, 2, ...) is defined by n! = n(n − 1)! , or (1) lim n→∞ 1 =0 np 1 0! = 1 (3) lim a n = 1 n→∞ n! = n × (n − 1) × (n − 2) × ... × 3 × 2 × 1 (p > 0) (2) lim rn = 0 (a > 0) (4) lim n n = 1 an = 0 (a ∈ R) n→∞ n! a n (7) lim 1 + = ea (a ∈ R) n→∞ n (5) lim Therefore 1! = 1 2! = 2 × 1 = 2 3! = 3 × 2 × 1 = 6 4! = 4 × 3 × 2 × 1 = 24 (9) lim arctan(cn) = n→∞ Example (2n + 2)! = (2n + 2) × (2n + 1) × (2n) × (2n − 1) × ... × 3 × 2 × 1 or n→∞ (|r| < 1) 1 n→∞ (6) lim log n =0 np (8) lim np =0 an n→∞ n→∞ (p > 0) (p ∈ R, a > 1) π (c > 0) 2 Note: (2n + 2)! = (2n + 2) × (2n + 1) × (2n)! 57 / 394 Standard limits (1), (3), (4), (6), (7), (8), (9) also hold for limits of real-valued functions as x → ∞ by replacing n with x. Standard limit (2) also holds for x → ∞ when 0 ≤ r < 1. 58 / 394 " Example 1.22: Evaluate lim n→∞ n−2 n n # 4n2 + n . 3 Example 1.23: Find the limit of the sequence an = Solution: 3n + 2 , n ≥ 1. 4n + 2n Solution: 59 / 394 60 / 394 Sandwich Theorem for sequences Let (an ), (bn ) and (cn ) be sequences of real numbers. Note: If an ≤ cn ≤ bn for all n > N for some N, and The order hierarchy can be used to help identify the largest term in an expression: lim an = lim bn = L log n ≪ np ≪ an ≪ n! then n→∞ n→∞ lim cn = L. n→∞ 61 / 394 62 / 394 1 + sin2 Example 1.24: Evaluate lim √ n→∞ n nπ 3 Continuity theorem for sequences . Solution: Let f (x) be a real-valued function, (an ) a sequence of real numbers and b ∈ R. Theorem: If lim an = b and f is continuous at x = b then n→∞ lim f (an ) = f lim an = f (b). n→∞ n→∞ 64 / 394 63 / 394 The only difference between lim an = L and lim f (x) = L is h i Example 1.25: Evaluate lim log(3n2 + 2) − log n2 . n→∞ n→∞ x→∞ that n is a natural number whereas x is a real number. Solution: Theorem: Let f (x)) be a real-valued function and (an ) be a sequence of real numbers such that an = f (n). If lim f (x) = L then x→∞ lim an = L. n→∞ This means that we can use the techniques for evaluating limits of functions to evaluate limits of sequences. Note: lim an = L n→∞ =⇒ ̸ lim f (x) = L. x→∞ eg. an = sin(2πn), f (x) = sin(2πx). 65 / 394 66 / 394 Example 1.26: Prove Standard Limit 6: lim n→∞ log n =0 np (p > 0) Solution: Note: We must change from a limit of a sequence (in terms of n) to a limit of a real-valued function (in terms of x) before applying L’Hôpital’s rule. 67 / 394 68 / 394 n 1 Example 1.27: Find the sum S of an = , n ≥ 1. 2 Solution: Adding Infinitely Many Numbers Starting with any sequence (an ), adding the an ’s together in order gives a sequence (sn ): s1 = a1 , s2 = a1 + a2 , s3 = a1 + a2 + a3 , .. .. .. .. . . . . The sequence of partial sums (sn ) may or may not converge. If it does converge, we call S = lim sn = lim (a1 + a2 + . . . + an ) n→∞ n→∞ the sum of the an ’s. 69 / 394 70 / 394 Series A series with terms an is denoted by the sum ∞ X an . n=1 If the associated sequence of partial sums (sn ) converges then ∞ X we say that the series an converges. Otherwise we say that n=1 the series diverges. Example The constant sequence with an = 2 is the sequence 2, 2, 2, 2, . . . ∞ ∞ X X an = 2 represents the sum 2 + 2 + 2 + · · · The series n=1 n=1 The sequence of terms converges, but the series diverges to infinity. 71 / 394 Application: Decimals 72 / 394 Properties of Series The decimal representation of a number is actually a series. Let Example The sequence 1 10n If = 0.1, 0.01, 0.001, . . .. ∞ X 1 The series = 0.1 + 0.01 + 0.001 + . . . = 0.11111111 . . . 10n an and n=1 ∞ X n=1 n=1 an and n=1 2. If For a number x ∈ (0, 1) with decimal digits d1 , d2 , d3 , d4 , . . . ∞ X dn x = 0.d1 d2 d3 d4 · · · = 10n bn be series, and c ∈ R\{0} a constant. bn converge then ∞ X ∞ X n=1 n=1 (an + bn ) = an + ∞ X bn converges. n=1 ∞ ∞ X X (can ) = c an converges. n=1 In General ∞ X n=1 ∞ X 1. 1 The sequence converges to 0 while the series converges to . 9 ∞ X ∞ X n=1 an diverges then n=1 ∞ X (can ) diverges. n=1 Note: n=1 These follow from the properties of the limits of sequences. 73 / 394 74 / 394 Geometric Series Example 1.28: What does the series A geometric series has the form ∞ X arn = n=0 ∞ X ∞ n X 1 n=0 arn−1 = a + ar + ar2 + ar3 + . . . 2 =1+ 2 3 1 1 1 + + ... + 2 2 2 converge to? n=1 where a ∈ R\{0} and r ∈ R. Solution: The series converges if |r| < 1 and diverges if |r| ≥ 1. If |r| < 1, we have ∞ X arn = n=0 a . 1−r Note: This follows from the fact that n X ark = k=0 a(1 − rn+1 ) for r , 1. 1−r 76 / 394 75 / 394 Harmonic p Series Divergence Test If lim an , 0 then A harmonic p series has the form n→∞ ∞ X 1 . np ∞ X an diverges. n=1 Note: n=1 lim an , 0 includes the case that the limit lim an does not exist. n→∞ The series converges if p > 1 and diverges if p ≤ 1. n→∞ If lim an = 0 then n→∞ ∞ X Example 1. an may converge or diverge. n=1 ∞ ∞ X X 1 1 converges BUT diverges. 2 n n n=1 n=1 2. The Divergence Test is not applicable, so we need to use ∞ X another test to determine if an converges or diverges. n=1 77 / 394 78 / 394 Example 1.29: Does the series ∞ X n+1 n=1 n converge? Solution: 79 / 394 Comparison Test Let ∞ X Example 1.30: Does n=1 an be a series with non-negative terms (i.e. an ≥ 0). 1. If bn is another series such that n=1 0 ≤ bn ≤ an for all n, then ∞ X ∞ X 3+ 5 n 2n2 + n + 2 converge or diverge? Solution: n=1 ∞ X ∞ X bn diverges and n=1 an also diverges. n=1 2. If ∞ X cn is another series such that n=1 cn ≥ an for all n, then ∞ X ∞ X cn converges and n=1 an also converges. n=1 To apply the comparison test we compare a given series to a harmonic p series or geometric series. 80 / 394 81 / 394 Example 1.31: Does ∞ X n2 + 4 n=1 n3 + 5 converge or diverge? Solution: 82 / 394 Ratio Test Let ∞ X 83 / 394 Example 1.32: Does ∞ X 10n n=1 converge or diverge? Solution: an be a positive term series (i.e. an > 0 for all n). Let n=1 n! an+1 . n→∞ an L = lim 1. If L < 1, ∞ X an converges. n=1 2. If L > 1, ∞ X an diverges. n=1 3. If L = 1, the ratio test is inconclusive. The ratio test is useful if an contains an exponential or factorial function of n. 84 / 394 85 / 394 Example 1.33: Does ∞ X (2n)! n=1 n! n! converge or diverge? Solution: 87 / 394 86 / 394 Section 2: Hyperbolic Functions y = cosh(x) y 4 Even Functions y y = x2 4 A function f is an even function if We define the hyperbolic cosine function: 3 3 2 f (−x) = f (x) 2 1 x e + e−x , x ∈ R cosh x = 2 1 Example 1 x f (x) = cos x and f (x) = x2 −2 −1 1 y x 2 −3 Odd Functions 1 2 3 Properties 4 A function f is an odd function if −1 −1 y = x3 8 −2 x f (−x) = −f (x) −2 −1 1 2 −4 Example f (x) = sin x and f (x) = x3 −8 88 / 394 89 / 394 y y We define the hyperbolic tangent function: y = sinh(x) 4 3 We define the hyperbolic sine function: sinh x = 1 x e − e−x , 2 x∈R tanh x = 2 = 1 x −3 −2 −1 1 2 3 = −1 2 sinh x cosh x 1 x −x 2 (e − e ) 1 x −x 2 (e + e ) ex − e−x ex + e−x , y = tanh(x) 1 x −3 −2 −1 1 2 3 −1 x ∈ R. −2 −2 Properties Properties −3 −4 90 / 394 Why call them hyperbolic functions? 91 / 394 So (x, y) = (cosh t, sinh t) denotes a point on the hyperbola x2 − y2 = 1. Since x ≥ 1, the right hand branch of the hyperbola can be parametrised by x = cosh t, y = sinh t, t ∈ R. Let x = cosh t and y = sinh t then y x2-y2=1 t>0 4 t x=cosh t y=sinh t 2 4 2 -4 -2 -2 -4 92 / 394 x t=0 t<0 93 / 394 Application: Catenary Example 2.1: If cosh x = 13 12 and x < 0 find sinh x and tanh x. Solution: A flexible, heavy cable of uniform mass per length ρ and tension T at its lowest point has shape ρgx T y= cosh ρg T where g is the acceleration due to gravity. y Support Support x 94 / 394 95 / 394 Addition Formulae 96 / 394 sinh(x + y) = sinh x cosh y + cosh x sinh y cosh(x + y) = cosh x cosh y + sinh x sinh y sinh(x − y) = sinh x cosh y − cosh x sinh y cosh(x − y) = cosh x cosh y − sinh x sinh y 97 / 394 Double Angle Formulae Example 2.2: Prove the sinh(x + y) addition formula. Solution: sinh(2x) = 2 sinh x cosh x cosh(2x) = cosh2 x + sinh2 x cosh(2x) = 2cosh2 x − 1 cosh(2x) = 2sinh2 x + 1 These can be proved using the addition formulae. 99 / 394 98 / 394 Reciprocal Hyperbolic Functions Reciprocal Hyperbolic Functions We define the three reciprocal hyperbolic functions: coth x = sech x = 1 , x∈R cosh x cosech x = 1 , x ∈ R \ {0} sinh x cosh x 1 = , tanh x sinh x x ∈ R \ {0} y y y 3 1.0 2 0.5 1 2 y = sech(x) x −3 −2 −1 1 −0.5 y = coth(x) 1 2 3 −3 −2 −1 1 2 y = cosech(x) x 3 x −3 −2 −1 1 2 3 −1 −1 −2 −2 −3 100 / 394 101 / 394 Basic Identities Derivatives of Hyperbolic Functions cosh2 x − sinh2 x = 1 coth2 x − 1 = cosech2 x 1 − tanh2 x = sech2 x d (cosh x) dx = sinh x, x∈R d (sinh x) dx = cosh x, x∈R d (tanh x) dx = sech2 x, x∈R d (sech x) dx = − sech x tanh x, d (cosech x) dx = − cosech x coth x, d (coth x) dx = − cosech2 x, x∈R x ∈ R \ {0} x ∈ R \ {0} 102 / 394 Example 2.3: Prove that d (cosh x) = sinh x. dx 103 / 394 Example 2.4: Let y = Solution: p sinh(6x), x > 0. Find dy . dx Solution: 104 / 394 105 / 394 Inverses of Hyperbolic Functions 2. Inverse hyperbolic cosine function: arccosh x We define three inverse hyperbolic functions. Restrict domain of cosh x to be [0, ∞) to give a 1-1 function. Then 1. Inverse hyperbolic sine function: arcsinh x Since sinh x is a 1-1 function domain arcsinh x = domain arccosh x = range sinh x = R. range arcsinh x = range arccosh x = domain sinh x = R. arcsinh(sinh x) = x, x ∈ R. sinh(arcsinh x) = x, x ∈ R. x ≥ 1. arccosh(cosh x) = x, x ≥ 0. y 4 3 y = arcsinh(x) 2 −2 y = arccosh(x) 2 1 −3 y = cosh(x) 5 3 −4 restricted domain cosh x = [0, ∞). cosh(arccosh x) = x, y = sinh(x) y range cosh x = [1, ∞). −1 2 1 3 4 x 1 −1 2 1 −2 3 4 5 x −3 106 / 394 3. Inverse hyperbolic tangent function: arctanh x The inverse hyperbolic functions can be expressed in terms of natural logarithms. Since tanh x is a 1-1 function domain arctanh x = 107 / 394 range tanh x = (−1, 1). range arctanh x = domain tanh x = R. tanh(arctanh x) = x, −1 < x < 1. arctanh(tanh x) = x, x ∈ R. y 3 arcsinh x = √ log x + x2 + 1 , x∈R arccosh x = √ log x + x2 − 1 , x≥1 arctanh x = 1 1+x log , 2 1−x −1 < x < 1 y = arctanh(x) 2 y = tanh(x) 1 −4 −3 −2 We can also define inverse reciprocal hyperbolic functions: • arcsech x (0 < x ≤ 1) −1 • arccosech x (x , 0) −2 • arccoth x (x < −1 or x > 1) −1 1 2 3 4 x −3 108 / 394 109 / 394 Example 2.5: Proof of arcsinh x relation. Solution: 111 / 394 110 / 394 Derivatives Example 2.6: Simplify cosh(arcsinh x) for x ∈ R. Solution: d (arcsinh x) dx = 1 √ 2 x +1 d (arccosh x) dx = √ d (arctanh x) dx = 1 x2 1 1 − x2 −1 (x ∈ R) (x > 1) (−1 < x < 1) Each formula is derived using implicit differentiation or by differentiating the logarithm definition of each function. 112 / 394 113 / 394 Example 2.7: Prove that d 1 (arcsinh x) = √ . dx x2 + 1 Solution: 114 / 394 Example 2.8: Find 115 / 394 Section 3: Complex Numbers d (arctanh(2x) cosh(3x)). dx The Cartesian form of a complex number z ∈ C is Solution: z = x + iy where x, y ∈ R and • x = Re(z) is the real part of z, • y = Im(z) is the imaginary part of z, • i2 = −1. ImHzL z=x+iy r y Θ x 116 / 394 ReHzL 117 / 394 The Complex Exponential The complex number can be written as z = r(cos θ + i sin θ) where q • r = |z| = x2 + y2 y • tan θ = x Note: The angle θ is not unique – only defined up to multiples of 2π. We choose θ such that −π < θ ≤ π and call this angle the principal argument of z. 119 / 394 118 / 394 The Complex Exponential Example 3.2: Write z = −1 + i in polar form. We define the complex exponential using Euler’s formula ImHzL eiθ = cos θ + i sin θ -1+i for θ ∈ R. 2 1 Α We can then write the polar form of a complex number as 1 z = reiθ Θ ReHzL Solution: Example 3.1: Simplify eiπ + 1. 120 / 394 121 / 394 Properties of the Complex Exponential Products and Division in Polar Form 1. ei0 = 1 Proof: ei0 = cos 0 + i sin 0 = 1. If z = r1 eiθ and w = r2 eiϕ then 2. eiθ eiϕ = ei(θ+ϕ) Proof: eiθ eiϕ = (cos θ + i sin θ) cos ϕ + i sin ϕ = cos θ cos ϕ + i cos θ sin ϕ + i sin θ cos ϕ − sin θ sin ϕ = cos θ cos ϕ − sin θ sin ϕ + i cos θ sin ϕ + sin θ cos ϕ = cos θ + ϕ + i sin(θ + ϕ) zw = r1 r2 ei(θ+ϕ) z w = r1 i(θ−ϕ) e r2 = ei(θ+ϕ) . 123 / 394 122 / 394 Solution: Example 3.3: Using the complex exponential, simplify √ √ √ 3−i ( 3 − i)(1 + 3i) and √ . 1 + 3i ImHzL 1+ 3 i 2 3 Α2 1 Α1 2 ReHzL 3 1 3 -i 124 / 394 125 / 394 126 / 394 De Moivre’s Theorem: 127 / 394 √ 15 Example 3.4: Evaluate 1 + 3i . Solution: If z = reiθ and n is a positive integer then n zn = reiθ = rn einθ 128 / 394 129 / 394 Exponential Form of sin θ and cos θ Equation (1) − (2) gives Now eiθ = cos θ + i sin θ (1) eiθ − e−iθ = 2i sin θ ⇒ e−iθ = cos(−θ) + i sin(−θ) ⇒ e−iθ = cos θ − i sin θ ⇒ sin θ = 1 iθ e − e−iθ 2i (2) Note: Equation (1) + (2) gives These formulae give a connection between the hyperbolic and trigonometric functions. 1 iθ e + e−iθ = cos θ cosh(iθ) = 2 eiθ + e−iθ = 2 cos θ ⇒ cos θ = 1 iθ e + e−iθ 2 sinh(iθ) = 1 iθ e − e−iθ = i sin θ 2 130 / 394 131 / 394 Differentiation via the Complex Exponential Example 3.5: Express sin5 θ in terms of the functions sin(nθ) for integers n. If z = x + yi where x, y ∈ R then we define ez = ex+iy = ex eiy = ex (cos y + i sin y). Solution: Derivatives of functions from R to C are defined similarly as those from R to R. Differentiation to functions from R to C is also linear and follows the product law. Show that d kt e = kekt when k = a + bi ∈ C. dt d h (a+bi)t i d h at ibt i e = e e dt dt 132 / 394 133 / 394 = i d h at e (cos(bt) + i sin(bt)) dt = aeat [cos(bt) + i sin(bt)] + eat [−b sin(bt) + bi cos(bt)] h i = aeat [cos(bt) + i sin(bt)] + eat bi2 sin(bt) + bi cos(bt) = aeat [cos(bt) + i sin(bt)] + bieat [cos(bt) + i sin(bt)] = (a + bi)eat [cos(bt) + i sin(bt)] = (a + bi)eat eibt = (a + bi)e(a+ib)t . 134 / 394 d56 −t Example 3.6: Find 56 e cos t . dt Solution: 135 / 394 136 / 394 Note: Example 3.6 also gives the answer to d56 −t e sin t . dt56 137 / 394 Integration via the Complex Exponential Z Example 3.7: Evaluate e3x sin(2x) dx. Solution: d kx Since e = k ekx if k = a + bi (a, b ∈ R) , then dx Z k ekx dx = ekx + C Z ⇒ ekx dx = 1 kx e +D k 138 / 394 139 / 394 Note: Z e3x cos(2x) dx. Example 3.7 also gives the answer to 140 / 394 Section 4: Integral Calculus 141 / 394 Derivative Substitutions Review of integration To evaluate Z f [g(x)]g′ (x)dx put u = g(x) ⇒ du = g′ (x). dx Then Z Z f [g(x)]g (x)dx = ′ f (u) du dx dx Z = 142 / 394 f (u) du 143 / 394 Z Example 4.1: Evaluate Z (6x + 10) sinh(x + 5x − 2)dx. 2 3 Example 4.2: Evaluate Solution: sech2 (3x) dx. 10 + 2 tanh(3x) Solution: 145 / 394 144 / 394 Integration by Parts Z Example 4.3: Evaluate xe5x dx. The product rule for differentiation is Solution: d du dv (uv) = v+u dx dx dx Integrate Z d (uv) dx = dx Z ⇒ uv = Z ⇒ Z ! dv du v+u dx dx dx du v dx + dx Z dv u dx = uv − dx u dv dx dx Z v du dx dx 146 / 394 147 / 394 Z Example 4.4: Evaluate Z 2 x log x dx (x > 0). log x dx Example 4.5: Evaluate Solution: (x > 0). Solution: 149 / 394 148 / 394 Z Example 4.6: Evaluate e3x sin(2x) dx. Solution: Note: This technique can also be used to integrate inverse trigonometric functions and inverse hyperbolic functions. 150 / 394 151 / 394 153 / 394 152 / 394 Trigonometric and Hyperbolic Substitutions Integrand √ a2 − x2 , √ a2 + x2 , √ We can use trigonometric and hyperbolic substitutions to integrate expressions containing √ a2 − x2 , √ √ a2 + x2 , √ x2 − a2 , 1 a2 + x2 32 , , a2 + x2 − 32 , 52 a2 − x2 1 Substitution a2 − x2 etc. x = a sin θ or x = a cos θ etc. x = a sinh θ etc. x = a cosh θ where a is a positive real number. √ Method: Z Put x = g(θ). Then Z f (x) dx = f [g(θ)]g′ (θ) dθ x2 − a2 , 1 √ x2 − a2 1 , a2 + x2 154 / 394 x2 − a2 1 (a2 2 + x2 ) etc. x = a tan θ 155 / 394 Z Example 4.7: Evaluate 1 √ x2 − 25 dx using a substitution. Solution: 156 / 394 157 / 394 Z √ Example 4.8: Evaluate 9 − 4x2 dx if |x| ≤ 32 . Solution: Note: Note the identity √ x2 = |x| (x ∈ R) 158 / 394 159 / 394 Z 32 Example 4.9: Evaluate x2 + 1 dx . Solution: 160 / 394 161 / 394 Powers of Hyperbolic Functions Consider the integral: Z sinhm x coshn x dx where m, n are integers (≥ 0). • If m or n is odd, use a “derivative substitution” after rewriting one of the odd power terms using identities if necessary. • If m and n are even, use double angle formulae. 162 / 394 163 / 394 Z Example 4.10: Evaluate cosh4 θ dθ. Solution: 165 / 394 164 / 394 Z Finish Example 4.9: Example 4.11: Evaluate sinh5 x cosh6 x dx. Solution: 166 / 394 167 / 394 Z Example 4.12: Evaluate I = sinh5 x cosh7 x dx. Solution: 169 / 394 168 / 394 Partial Fractions Let f (x) and g(x) be polynomials, then f (x) −→ degree n g(x) −→ degree d can be written as the sum of partial fractions. Case 1: n < d 1. Factorise g over the real numbers. 2. Write down partial fraction expansion. 3. Find unknown coefficients A, A1 , A2 , . . . , Ar , B, B1 , B2 , . . . , Br . 170 / 394 171 / 394 Denominator Factor Partial Fraction Expansion (x − a) A x−a (x − a)r A1 A2 Ar + + ··· + x − a (x − a)2 (x − a)r (x2 + bx + c) Ax + B x2 + bx + c (x2 + bx + c)r A1 x+B1 x2 +bx+c A2 x+B2 (x2 +bx+c)2 + + ··· + Ar x+Br (x2 +bx+c)r 172 / 394 Z Example 4.13: Evaluate 4 dx + 2) x2 (x (x , 0, −2). Solution: 173 / 394 174 / 394 175 / 394 Z Example 4.14: Evaluate (x2 4x dx (x , 2). + 4)(x − 2) Solution: 176 / 394 177 / 394 Case 2: n ≥ d Use long division, then apply case 1. Example 4.15: Find Z 5x4 + 13x3 + 6x2 + 4 dx x3 + 2x2 Solution: 178 / 394 180 / 394 (x , 0, −2). 179 / 394 Section 5: First Order Differential Equations A solution of an ODE is a function y(x) that satisfies the ODE for all x in some interval. Ordinary Differential Equations Example 5.2: Verify by substitution that y(x) = x2 + An ordinary differential equation (ODE) is an equation of the form ! dy d2 y dn y f x, y, , 2 , . . . , n = 0 dx dx dx solution of dy y + = 3x for all x ∈ R \ {0}. dx x 2 is a x Solution: The order of an ODE is the order of the highest derivative occurring in the ODE. dy d4 y Example 5.1: What order is 3 4 = dx dx !2 + 2x2 y? 181 / 394 182 / 394 First Order ODEs Sketch of the family of solutions of dy The general form of a first order ODE is = f (x, y). dx Example 5.3: Solve dy = x3 dx y dy = x3 . dx 6 Solution: 4 2 c=4 c=2 c=0 -4 A solution like this which contains an arbitrary constant c ∈ R is called a general solution. -2 2 -2 x c=-2 -4 The general solution represents a family of solutions, where each value of c corresponds to a different solution of the ODE. 183 / 394 184 / 394 Initial value problem for a first order ODE Solve Separable ODEs A separable first order ODE has the form: dy = f (x, y) subject to the condition y(x0 ) = y0 . dx dy = M(x)N(y), dx dy Example 5.4: Solve = x3 given y(0) = 2. dx To solve, use separation of variables dy dx Solution: 1 dy N(y) dx ⇒ Z Z ⇒ dy y = dx 1 + x = M(x)N(y) = M(x) 1 dy dx = N(y) dx ⇒ Example 5.5: Solve (M(x) , 0, N(y) , 0) 1 dy N(y) (N(y) , 0) Z M(x)dx Z = M(x) dx 185 / 394 186 / 394 187 / 394 188 / 394 (x , −1). Solution: Family of solutions y c=2 6 c=1 4 H-1,0L -6 -4 2 -2 2 x 4 -2 -4 c=-1 -6 Example 5.6: Solve dy −x = dx y c=-2 189 / 394 190 / 394 191 / 394 192 / 394 (y , 0) if y(0) = 3. Solution: Family of solutions Linear First Order ODEs y 5 Example 5.7: Solve x 4 Solution: d = 16 3 2 1 dy + y = ex . dx d=9 d=4 d=1 x -4 -3 -2 -1 0 1 2 3 4 5 -1 d = 1 -2 -3 d= 4 d=9 d = 16 -4 194 / 394 193 / 394 A linear first order ODE has the form: Aim: dy + P(x)y = Q(x) dx Find an integrating factor I so the left side will be the derivative of yI. Then To solve: dy d yI ≡ I + PIy dx dx dy dy dI ⇒ I+y = I + PIy dx dx dx Multiply ODE by I(x) I(x) dy + P(x)I(x)y = Q(x)I(x) dx If the left side can be written as the derivative of y(x)I(x), then ⇒ y dI = PIy dx ⇒ dI = PI dx To solve for all y d y(x)I(x) = Q(x)I(x) dx which can be solved by integrating with respect to x. 195 / 394 (separable) 196 / 394 ⇒ Z ⇒ 1 dI I dx = P 1 dI = I Z So one integrating factor is Pdx I(x) = e Z ⇒ log |I| = P dx + c ⇒ |I| = e R = e R ⇒I = R Pdx Note: Pdx+c Pdx Since we only need one integrating factor I, we can neglect the ‘+c’ and modulus signs when calculating I. · ec ±ec ·e |{z} R Pdx constant 197 / 394 198 / 394 199 / 394 200 / 394 Example 5.8: Find the general solution of dy y + = sin x dx x (x , 0). Solution: Example 5.9: Solve 1 dy − xy = x 2 dx if y(0) = −3. Solution: 201 / 394 202 / 394 Note: 203 / 394 204 / 394 Other First Order ODEs Example 5.10: Solve the homogeneous type differential equation y dy y y = + cos2 − π2 < x < π2 dx x x Sometimes it is possible to make a substitution to reduce a general first order ODE to a separable or linear ODE. y by substituting u = . x • A homogeneous type ODE has the form y dy =f dx x Solution: y Substituting u = reduces the ODE to a separable ODE. x • Bernoulli’s equation has the form Substituting u = y1−n dy + P(x)y = Q(x)yn dx reduces the ODE to a linear ODE. 205 / 394 206 / 394 207 / 394 208 / 394 Example 5.11: Solve the Bernoulli equation dy + y = e3x y4 dx (y , 0) by substituting u = y−3 . Solution: 209 / 394 210 / 394 211 / 394 Population Models Malthus (Doomsday) model Note: The Doomsday model predicts: Rate of growth is proportional to the population p at time t. dp dt dp ⇒ dt • k > 0 : unbounded exponential growth ∝ p = kp • k < 0 : population dies out (separable/linear) where k is a constant of proportionality representing net births per unit population per unit time. • k = 0 : population stays constant If the initial population is p(0) = p0 , then the solution is Unbounded exponential growth is unrealistic in the long term. p(t) = p0 ekt You should check that you can derive this on your own! 212 / 394 Equilibrium Solutions 213 / 394 Example 5.12: Find all equilibrium solutions of the ODE Definition An equilibrium is a constant solution of an ODE. Solution: dx = 3x − 2. dt Note: For the ODE dx = f (x, t), this means dt ▶ x(t) = C where C is a constant ▶ dx =0 dt Terminology The plural form of equilibrium is equilibria. 214 / 394 215 / 394 Phase plots A phase plot is a plot of Example 5.13: For the ODE dx = 3x − 2, dt dx as a function of x. dt A phase plot will give ▶ the equilibria (a) Draw a phase plot (b) Sketch the family of solutions of the ODE, including any equilibria. ▶ the behaviour of solutions close to the equilibria (c) Describe the long-term behaviour of solutions with initial conditions 1 i. x(0) = 2 Note: Phase plots are only useful for ODEs of the form dx = f (x) dt ii. x(0) = 1 i.e., when the right-hand side has no explicit dependence on t. ODEs of this form are called autonomous. 217 / 394 216 / 394 (b). Solution: (a). The phase plot is dx dt Family of solutions: x dx >0 dt 23 -2 1- x 2/3- dx <0 dt equilibrium x(t) = 2/3 1/2- t 218 / 394 219 / 394 (c) From the phase plot and family of solutions, we can see that Stability of equilibria An equilibrium is stable if solutions that start nearby move closer to the equilibrium as t increases. x Note: x0 Stable We do not need to solve the ODE analytically to determine the qualitative behaviour of the solutions. t When drawing a family of solutions, we include at least one example of a solution with each possible qualitative behaviour (unless stated otherwise in the question). On a phase plot: Two solutions have the same qualitative behaviour if their shape and long-term behaviour are the same. Otherwise they are qualitatively different. 220 / 394 Stability of equilibria 221 / 394 Stability of equilibria An equilibrium is semistable if on one side of the equilibrium, solutions that start nearby move closer as t increases, whereas on the other side, solutions move further away as t increases. An equilibrium is unstable if solutions that start nearby move further away as t increases. x x x x0 Unstable x0 Semistable x0 t t Semistable t On a phase plot: On a phase plot: 222 / 394 223 / 394 Example 5.13 (continued): (d) Determine the stability of the equilibrium. Solution: Doomsday model with harvesting. Remove some of the population at a constant rate. dp = kp − h, h > 0. dt 224 / 394 225 / 394 Solution: From Example 5.13 we know Example 5.14: A pharmaceutical company grows engineered yeast to produce a drug. The yeast is continuously harvested to collect the drug. The population p (in millions of yeast cells) at time t days is described by dp = 3p − 2 dt • the equilibrium is • the phase plot is dp dt dp >0 dt (p ≥ 0, t ≥ 0) 23 For what initial population sizes p(0) will the yeast population eventually die out? -2 p dp <0 dt dies out! 226 / 394 227 / 394 • Logistic model. the family of solutions is p Include “competition” term in Malthus’ model since overcrowding, disease, lack of food and natural resources will 2/3- Unstable cause more deaths. dp k = kp − p2 = dt a t dies out! ↗ The population will die out if p kp 1 − a ↖ z }| { z }| { net birth rate competition term where a > 0 is the carrying capacity. 229 / 394 228 / 394 • Phase plot Example 5.15: Find the equilibrium solutions and their stability for the ODE dp p =p 1− dt 4 dp dt (k = 1, a = 4) 1 Solution: dp >0 dt • Equilibrium solutions 0 2 4 p dp <0 dt 230 / 394 231 / 394 • Family of solutions: p Note: The logistic model accurately describes pH0L=4 • population in a limited space (e.g. bacteria culture). • population of USA from 1790-1950. pH0L=0 t 233 / 394 232 / 394 Solution: Logistic model with harvesting. Remove some of the population at constant rate: p dp = kp 1 − − h, h > 0, a > 0 dt a Example 5.16: For the logistic model with harvesting dp p 3 3 = p 1− − a = 4, k = 1, h = dt 4 4 4 determine the long-term consequences for the population predicted by the model. 234 / 394 235 / 394 • • Stability and family of solutions: Phase plot: 1dp dt dp >0 dt 1 4 1 3 4 dp <0 dt 3 p p dp <0 dt pH0L=3 pH0L=1 t dies out! dies out! 237 / 394 236 / 394 • Interpretation: Example 5.16 (continued): Find the time taken until the 1 population dies out if p(0) = . 2 Solve analytically for p(t) and set p(t) = 0. dp 1 (separable - use = − (p − 3)(p − 1) separation of variables) dt 4 Note: Case (2) is unrealistic in practice, as even a small deviation from p(0) = 1 will result in the solution following case (1) or (3). 238 / 394 239 / 394 Mixing Problems Example 5.17: Effluent (pollutant concentration 2g/m3 ) flows into a pond (volume 1000m3 , initially 100g pollutant) at a rate of 10m3 /min. The pollutant mixes quickly and uniformly with pond water and flows out of pond at a rate of 10m3 /min. Find the concentration of pollutant in the pond at any time, and interpret the long-term behaviour of the system. 240 / 394 241 / 394 242 / 394 243 / 394 Derive the ODE: Let x be the amount (grams) of pollutant in pond at time t x minutes. Then C = is the concentration of pollutant in pond V (grams/m3 ), where V is the volume of the pond (m3 ) at time t. dx = rate pollutant flows in - rate pollutant flows out dt Solve analytically: Interpret: x dx + = 20 dt 100 (Linear/Separable) General solution is conc. Hgm3L −t x(t) = 2000 + ce 100 (working omitted). Initial condition is x(0) = 100 ⇒ 2 c = −1900 −t ⇒ x(t) = 2000 − 1900e 100 Find concentration: 0.1 tHminL 245 / 394 244 / 394 Example 5.18: Derive an ODE describing the amount x (g) of pollutant in the lake at time t (minutes), if the input flow rate is decreased to 5m3 /min. Definitions 1. Transient terms: terms decaying to 0 as t → ∞. 2. Steady state terms: terms NOT decaying to 0 as t → ∞. The solution for the concentration can be classified as follows. 246 / 394 247 / 394 Section 6: Second Order Differential Equations Let V be the volume in pond (m3 ) at time t minutes. A second order ODE has the form ! dy d2 y F x, y, , 2 = 0 dx dx The general form of a linear second order ODE is dy d2 y + P(x) + Q(x)y = R(x) 2 dx dx • If R(x) = 0, the ODE is homogeneous (H). • If R(x) , 0, the ODE is inhomogeneous (IH). Note: A homogeneous linear ODE is different to a homogeneous type first order ODE. 249 / 394 248 / 394 Homogeneous 2nd Order Linear ODEs The general solution of a second order ODE typically has two arbitrary constants. Theorem: Initial value problem for a second order ODE The general solution of Solve d2 y dy + P(x) + Q(x)y = R(x) 2 dx dx y” + P(x)y′ + Q(x)y = 0 is the function y given by subject to the conditions y(x0 ) = y0 and y′ (x0 ) = y1 . y(x) = c1 y1 (x) + c2 y2 (x) where Boundary value problem for a second order ODE Solve • y1 , y2 are two linearly independent solutions of the homogeneous ODE, d2 y dy + P(x) + Q(x)y = R(x) 2 dx dx • c1 , c2 ∈ R are arbitrary constants. subject to the conditions y(a) = y0 and y(b) = y1 . 250 / 394 251 / 394 Aside - A connection with Linear Algebra* Definition: Why are these ODEs called linear? Two functions y1 and y2 are linearly independent if Because they can be written in terms of a linear transformation. The ODE c1 y1 (x) + c2 y2 (x) = 0 ⇒ c1 = c2 = 0 d2 y dy + P(x) + Q(x)y = R(x) 2 dx dx or equivalently, if neither function is a non-zero constant multiple of the other function. Example 6.1: (a) Are y1 (x) = x2 , y2 (x) = 2x2 linearly independent? can be written as T(y) = R(x) where T(y) = (b) Are y1 (x) = e2x , y2 (x) = xe2x linearly independent? d2 y dy + P(x) + Q(x)y 2 dx dx is a linear transformation on a vector space of functions. These concepts are covered in MAST10007 Linear Algebra. * This slide is not examinable in MAST10006. 252 / 394 253 / 394 Homogeneous 2nd Order Linear ODEs with Constant Coefficients General form: ay” + by′ + cy = 0 where a, b, c are constants. To solve for y(x): Try y(x) = eλx . Then y′ (x) = λeλx and y′′ (x) = λ2 eλx . Substitute into the ODE: ay′′ + by′ + cy = aλ2 eλx + bλeλx + ceλx = 0 aλ2 + bλ + c eλx = 0 |{z} ,0 ⇒ aλ2 + bλ + c = 0 Characteristic Equation √ −b ± b2 − 4ac ⇒λ= 2a 254 / 394 Example 6.2: Solve y” + 7y′ + 12y = 0 for y(x). Solution: Case 1: b2 − 4ac > 0 • 2 distinct real values λ1 , λ2 • 2 linearly independent solutions eλ1 x , eλ2 x • General Solution: y(x) = Aeλ1 x + Beλ2 x 255 / 394 256 / 394 Case 2: b2 − 4ac = 0 • 1 real value λ = −b 2a • 1 solution is eλx • 2nd linearly independent solution is xeλx (found using variation of parameters — not in syllabus). • General Solution: y(x) = Aeλx + Bxeλx 257 / 394 258 / 394 We now verify that xeλx is a solution: Example 6.3: Solve y” + 2y′ + y = 0 for y(x). If y(x) = xeλx , then Solution: λx y (x) = (λx + 1) e , ′ y”(x) = λ2 x + 2λ eλx . So ay” + by′ + cy = a λ2 x + 2λ eλx + b (λx + 1) eλx + cxeλx = xeλx aλ2 + bλ + c + (2λa + b) eλx | {z } | {z } = 0 =0 =0 So y(x) = xeλx is a solution. 259 / 394 260 / 394 Case 3: b2 − 4ac < 0 • 2 complex conjugate values λ1 = α + iβ, λ2 = α − iβ • 2 complex linearly independent solutions e(α+iβ)x , e(α−iβ)x • General Solution: y(x) = C1 e(α+iβ)x + C2 e(α−iβ)x where C1 , C2 ∈ C = C1 eαx cos(βx) + i sin(βx) + C2 eαx cos(βx) − i sin(βx) = (C1 + C2 ) eαx cos(βx) + (C1 i − C2 i) eαx sin(βx) | {z } | {z } 261 / 394 A B 262 / 394 Example 6.4: Solve y” − 4y′ + 13y = 0 for y(x) if y(0) = 1 and y′ (0) = 6. Put A = C1 + C2 and B = (C1 − C2 )i. If C1 = C2 , then A, B ∈ R. Solution: Note: Imposing real conditions on the ODE will always lead to real coefficients A and B. • 2 real linearly independent solutions eαx cos(βx), eαx sin(βx) Real General Solution: y(x) = Aeαx cos(βx) + Beαx sin(βx) 263 / 394 264 / 394 265 / 394 266 / 394 This solution has the form y(x) = e2x (a cos θ + b sin θ). Hence we can rewrite the solution from Example 6.4 as In general, for a, b > 0, ! √ a b 2 2 a cos θ + b sin θ = a + b √ cos θ + √ sin θ a2 + b2 a2 + b2 = √ a2 + b2 cos ϕ cos θ + sin ϕ sin θ = √ a2 + b2 cos(θ − ϕ). This form is sometimes preferable for graphing or further manipulation. 267 / 394 268 / 394 Inhomogeneous 2nd Order Linear ODEs with Constant Coefficients Inhomogeneous 2nd Order Linear ODEs Theorem: General form: The general solution of ay” + by′ + cy = R(x) where a, b, c are constants. y” + P(x)y′ + Q(x)y = R(x) is the function y given by Example 6.5: Solve y” + 2y′ − 8y = R(x) where y(x) = yH (x) + yP (x) where (a) R(x) = 1 − 8x2 • yH (x) = c1 y1 (x) + c2 y2 (x) is the general solution of the homogeneous ODE (called the homogeneous solution, GS(H)), (b) R(x) = e3x • yP (x) is a solution of the inhomogeneous ODE (called a particular solution, PS(IH)), (c) R(x) = 85 cos x (d) R(x) = 3 − 24x2 + 7e3x . 269 / 394 270 / 394 Solution: Step 2: Find a particular solution of y” + 2y′ − 8y = R(x). Step 1: Find the general solution of y” + 2y′ − 8y = 0. (a) R(x) = 1 − 8x2 : y” + 2y′ − 8y = 1 − 8x2 271 / 394 272 / 394 (b) R(x) = e3x : 273 / 394 y” + 2y′ − 8y = e3x e3x is NOT part of GS(H) 274 / 394 (c) R(x) = 85 cos x : y” + 2y′ − 8y = 85 cos x 276 / 394 275 / 394 Superposition of Particular Solutions Theorem: A particular solution of ay” + by′ + cy = α R1 (x) + β R2 (x) is yP (x) = αy1 (x) + βy2 (x) where • y1 (x) is a particular solution of ay” + by′ + cy = R1 (x), • y2 (x) is a particular solution of ay” + by′ + cy = R2 (x), • a, b, c, α, β are constants. 277 / 394 278 / 394 Example 6.6: Solve y” − y = ex . Example 6.5 (d): R(x) = 3 − 24x2 + 7e3x . Solution: Solution: GS(H) : yH (x) = Aex + Be−x 279 / 394 280 / 394 281 / 394 282 / 394 Example 6.7: Solve y” + 2y′ + y = e−x . Solution: GS(H) : yH (x) = (A + Bx) e−x Example 6.8: Solve y” + 49y = 28 sin(7t). Solution: GS(H) : yH (t) = A cos(7t) + B sin(7t) 284 / 394 283 / 394 The forces are: Springs - Free Vibrations Consider an object (of mass m kg) attached to a spring hanging from a fixed support. • gravitational force, given by the gravitational law: W = mg Suppose that the natural length of the spring when unloaded is L m, and that when the object is attached, it causes the spring to stretch by s m downwards at equilibrium. (g = 9.8m/s2 on Earth) • restoring force in spring, given by Hooke’s Law: T = −k · extension (k > 0) 0 spring constant Note: The negative sign in Hooke’s law is because the direction of the force T is opposite to the direction of extension: ▶ if the spring is stretched downwards, then it pulls up ▶ if the spring is compressed upwards, then it pushes down. 285 / 394 286 / 394 Suppose the object is set in motion. Let y(t) be the displacement of the object below the equilibrium position (y = 0) at time t seconds. At equilibrium, the net force is zero, so Note: Since displacement y is measured below the equilibrium position, downwards is the positive direction. 287 / 394 288 / 394 Derive the equation of motion Newton’s Law states that When the object is moving, there is an extra force acting: net force = mass · acceleration • damping force is proportional to velocity R = −βẏ Fnet = m · ÿ (β ≥ 0) Apply Newton’s Law to the object: 0 damping constant Note: The negative sign is because the direction of the damping force is opposite the direction of motion. 289 / 394 290 / 394 To solve, try y(t) = eλt ⇒ mλ2 + βλ + k = 0 ⇒ λ= • If β = 0 : λ = ±ib √ • If 0 < β < 2 mk : −β ± β2 − 4mk 2m p simple harmonic motion λ = a ± ib underdamped, weak damping √ • If β = 2 mk : λ = a, a critical damping √ • If β > 2 mk : λ = a, b overdamped, strong damping 291 / 394 Example 6.9: A 40 kg mass stretches a spring hanging 49 from a fixed support by 0.2m. The mass is released from the equilibrium position with a downward velocity of 3m/s. Find the position of the mass y below equilibrium at any time t, if the damping constant β is: (a) 0 (b) 160 49 (c) 80 7 (d) 2000 49 Solution: 292 / 394 293 / 394 (a) β = 0 : ÿ + 49y = 0 y 3 7 Equil. t Π 7 - 2Π 7 3Π 7 3 7 Simple harmonic motion 294 / 394 (b) β = 160 49 : 295 / 394 ÿ + 4ẏ + 49y = 0 y 1 5 Equil. t 1 - 1 2 Weak damping 5 296 / 394 297 / 394 (c) β = 80 7 ÿ + 14ẏ + 49y = 0 : y 0.15 0.1 critical damping 0.05 Equil. t 0.5 1 299 / 394 298 / 394 (d) β = 2000 49 : ÿ + 50ẏ + 49y = 0 y 0.06 0.03 strong damping Equil. t 2 300 / 394 4 301 / 394 Springs - Forced Vibrations Example 6.10: Apply an external downwards force f (t) = If an external downwards force f is applied to the spring-mass system at time t, the forces acting on the mass are: 160 7 sin(7t) in Example 6.9. Solution: 302 / 394 (a) β = GS(IH) : 80 7 : 303 / 394 ÿ + 14ẏ + 49y = 28 sin(7t) y(t) = (A + Bt) e−7t − 72 cos(7t) y 0.4 GSHHL contributes Equil. 1 -0.4 304 / 394 2 3 t 4 oscillatory motion due to PSHIHL 305 / 394 (b) β=0: GS(IH) : ÿ + 49y = 28 sin(7t) y 10 y(t) = A cos(7t) + B sin(7t) − 2t cos(7t) 5 Equil. 2 4 6 t -5 Resonance -10 Definition Resonance: Resonance occurs when the external force f has the same form as one of the terms in the GS(H). If β = 0, then the PS(IH) will grow without bound as t → ∞. 306 / 394 RLC series electric circuit 307 / 394 RLC series electric circuit The circuit components are An RLC series electric circuit is an electric circuit with 4 components connected sequentially in a loop: Circuits such as this are common in radio communications. 308 / 394 309 / 394 RLC series electric circuit Let q(t) be the charge on the capacitor (measured in Coulomb) at time t seconds. The charge satisfies the second-order ODE L d2 q dq q +R + =V 2 dt C dt This equation has the same form as the equation of motion for a spring with external driving force, and can exhibit all the same solution types as the spring system. 310 / 394 Section 7: Functions of Two Variables We can represent the function f by its graph in R3 . The graph of f is: n o (x, y, z) ∈ R3 : (x, y) ∈ D and z = f (x, y) . Example The temperature T at a point on the Earth’s surface at a given time depends on the latitude x and the longitude y. We think of T being a function of the variables x, y and write T = f (x, y). This is a surface lying directly above the domain D. The x and y axes lie in the horizontal plane and the z axis is vertical. In general A function of two variables is a mapping f that assigns a unique real number z = f (x, y) to each pair of real numbers (x, y) in some subset D of the xy plane R2 . We also write f :D→R where D is called the domain of f . Example If f (x, y) = x2 + y3 then f (2, 1) = 4 + 1 = 5. 311 / 394 312 / 394 Equations of a Plane The Cartesian equation of a plane has the form ax + by + cz = d where a, b, c, d are real constants. n = ai + bj + ck is a normal vector to the plane. In fact, the plane passing through a point (x0 , y0 , z0 ) with a normal vector (a, b, c) consists of the points (x, y, z) such that (a, b, c) is perpendicular to (x − x0 , y − y0 , z − z0 ) and thus has equation a(x − x0 ) + b(y − y0 ) + c(z − z0 ) = 0, that is, ax + by + cz = ax0 + by0 + cz0 . 313 / 394 314 / 394 315 / 394 316 / 394 Example 7.1: Sketch the plane 4x + 3y + z = 2. Solution: Level Curves Sketching Functions of Two Variables The key steps in drawing a graph of a function of two variables z = f (x, y) are: A curve on the surface z = f (x, y) for which z is a constant is a contour. 1. Draw the x, y, z axes. For right handed axes: the positive x axis is towards you, the positive y axis points to the right, and the positive z axis points upward. The same curve drawn in the xy plane is a level curve. So a level curve of f has the form 2. Draw the y − z cross section. {(x, y) : f (x, y) = c} 3. Draw some level curves and their contours. 4. Draw the x − z cross section. where c ∈ R is a constant. 5. Label any x, y, z intercepts and key points. 317 / 394 318 / 394 Example 7.2: Find the level curves, and cross sections in p 2 the x-z and y-z planes of z = 1 − x − y2 . Hence sketch the surface and identify it. Solution: y H0,1L H-1,0L c=1 319 / 394 c=0 Level curves H1,0L x H0,-1L 320 / 394 Consider cross sections (slices) to help sketch graph. z z H0,1L H-1,0L Surface is a hemisphere radius 1, centre at (0, 0, 0) for z ≥ 0. H0,1L H1,0L H-1,0L x H1,0L y 322 / 394 321 / 394 Example 7.3: Sketch the graph of z = 4x2 + y2 . Consider cross sections (slices) to help sketch graph. Solution: y H0,2L c=4 z 4 Level curves H-1,0L H1,0L z 4 z=4x2 x z=y2 c=0 -1 1 x -1 1 y H0,-2L 323 / 394 324 / 394 Example 7.4: Sketch the graph of z = The surface is an elliptic paraboloid (parabolic bowl). p 4x2 + y2 . Solution: y H0,2L c=2 Level curves H-1,0L H1,0L x c=0 H0,-2L 325 / 394 Cross sections The surface is an elliptic cone. z z 2 -1 326 / 394 2 x 1 z=2ÈxÈ -1 y 1 z=ÈyÈ 327 / 394 328 / 394 Limits Continuity Let f : D → R be a real-valued function, where D ⊆ R2 . We say f has the limit L as (x, y) approaches (x0 , y0 ) lim (x,y)→(x0 ,y0 ) Let f : R2 → R be a real-valued function. f (x, y) = L f is continuous at (x, y) = (x0 , y0 ) if if when (x, y) approaches (x0 , y0 ) along ANY path in the domain, f (x, y) gets arbitrarily close to L. lim (x,y)→(x0 ,y0 ) f (x, y) = f (x0 , y0 ) Note: Note: The continuity theorems for functions of one variable can be generalised to functions of two variables. 1 L must be finite. 2 The limit can exist if f is undefined at (x0 , y0 ). 3 The usual limit laws apply. 330 / 394 329 / 394 Example 7.5: Let f (x, y) = x2 + y2 . For which values of x and y is f continuous? Example 7.6: Evaluate lim (x,y)→(2,1) log(1 + 2x2 + 3y2 ). Solution: Solution: 331 / 394 332 / 394 First Order Partial Derivatives Geometric Interpretation of Let f : R2 → R be a real-valued function. The first order partial derivatives of f with respect to the variables x and y are defined by the limits: fx = ∂f f (x + h, y) − f (x, y) = lim h ∂x h→0 fy = ∂f f (x, y + h) − f (x, y) = lim h ∂y h→0 ∂f ∂f and ∂x ∂y Note: • • ∂f measures the rate of change of f with respect to x ∂x when y is held constant. ∂f measures the rate of change of f with respect to y ∂y when x is held constant. 334 / 394 333 / 394 Example 7.7: Let f (x, y) = xy2 . Find ∂f from first ∂y principles. Let C1 be the curve where the vertical plane y = y0 intersects ∂f the surface. Then gives the slope of the tangent to C1 ∂x (x0 ,y0 ) at (x0 , y0 , z0 ). Solution: Let C2 be the curve where the vertical plane x = x0 intersects ∂f the surface. The gives the slope of the tangent to C2 at ∂y (x0 ,y0 ) (x0 , y0 , z0 ). • T1 and T2 are the tangent lines to C1 and C2 . 335 / 394 336 / 394 Example 7.8: Let f (x, y) = 3x3 y2 + 3xy4 . Find Example 7.9: Let f (x, y) = y log x + x tanh(3y). Find fx , fy at (1, 0). ∂f ∂f and . ∂x ∂y Solution: Solution: 337 / 394 338 / 394 The tangent line T1 has equation (y = y0 fixed): Tangent Planes and Differentiability Let f : R2 → R be a real-valued function. We say that f is differentiable at (x0 , y0 ) if the tangent lines to all curves on the surface z = f (x, y) passing through (x0 , y0 , z0 ) form a plane, called the tangent plane. z − z0 = ∂f ∂x (x0 ,y0 ) (x − x0 ) The tangent line T2 has equation (x = x0 fixed): z − z0 = This holds if fx and fy exist and are continuous near (x0 , y0 ). ∂f ∂y (x0 ,y0 ) (y − y0 ) Since a plane passing through (x0 , y0 , z0 ) has the form z − z0 = α(x − x0 ) + β(y − y0 ) the tangent plane has equation z − z0 = ∂f ∂x (x0 ,y0 ) ∂f ∂x (x0 ,y0 ) (x − x0 ) + ∂f ∂y (x0 ,y0 ) (x − x0 ) + ∂f ∂y (x0 ,y0 ) (y − y0 ) or equivalently, z = z0 + 339 / 394 (y − y0 ). 340 / 394 Linear Approximations Example 7.10: Find the equation of the tangent plane to the surface z = f (x, y) = 2x2 + y2 at (1, 1, 3). Solution: If f is differentiable at (x0 , y0 ), we can approximate z = f (x, y) by its tangent plane at (x0 , y0 , z0 ), when (x, y) is close to (x0 , y0 ). That is: f (x, y) ≈ z0 + ∂f ∂x (x0 ,y0 ) | (x − x0 ) + ∂f ∂y (x0 ,y0 ) {z (y − y0 ) } equation of tangent plane when (x, y) is close to (x0 , y0 ). This is called the linear approximation to f near (x0 , y0 ). 342 / 394 341 / 394 Example 7.11: Find the linear approximation of f (x, y) = xexy at (1, 0). Hence, approximate f (1.1, −0.1). Solution: Note: The actual value is (1.1)e−0.11 ≈ 0.98542 343 / 394 344 / 394 Approximate Change Example 7.12: Let z = f (x, y) = x2 + 3xy − y2 . If x changes from 2 to 2.05 and y changes from 3 to 2.96, estimate the change in z. Rearranging the linear approximation equation, we get f (x, y) − f (x0 , y0 ) ≃ ∂f ∂x (x0 ,y0 ) (x − x0 ) + ∂f ∂y Solution: (x0 ,y0 ) (y − y0 ). Let ∆x = x − x0 , ∆y = y − y0 , ∆f = z − z0 = f (x, y) − f (x0 , y0 ). The approximate change in f near (x0 , y0 ), for small changes ∆x and ∆y in x and y, is: ∆f ≈ ∂f ∆x ∂x (x ,y ) 0 0 + ∂f ∆y ∂y (x ,y ) 0 0 345 / 394 346 / 394 Second Order Partial Derivatives Let f : R2 → R be a real-valued function. The second order partial derivatives of f with respect to x and y are defined by: • fxx Note: • fyy The actual change in f is ∆f • fxy = f (2.05, 2.96) − f (2, 3) = 13.6449 − 13 = 0.6449 • fyx 347 / 394 ! ∂2 f ∂ ∂f = fx = = 2 x ∂x ∂x ∂x ! ∂2 f ∂ ∂f = 2 = fy = y ∂y ∂y ∂y ! ∂2 f ∂ ∂f = fx = = y ∂y ∂x ∂y∂x ! ∂2 f ∂ ∂f = fy = = x ∂x ∂y ∂x∂y 348 / 394 Example 7.13: Find the second order partial derivatives of f : R2 → R given by f (x, y) = x sin(x + 2y). Solution: Theorem: If the second order partial derivatives of f exist and are continuous then fxy = fyx . 349 / 394 350 / 394 Chain Rule 1. If z = f (x, y) and x = g(t), y = h(t) are differentiable functions, then z = f (g(t), h(t)) is a function of t, and dz ∂z dx ∂z dy = + dt ∂x dt ∂y dt Note: fxy = fyx as expected since trigonometric functions and polynomials are continuous for all (x, y) ∈ R2 . 351 / 394 352 / 394 dz Example 7.14: If z = x2 − y2 , x = sin t, y = cos t. Find at dt π t= . 6 Solution: 353 / 394 354 / 394 Example 7.15: If z = ex sinh y, x = st2 , y = s2 t. ∂z Find . ∂s 2. If z = f (x, y) and x = g(s, t), y = h(s, t) are differentiable functions, then z is a function of s and t with ∂z ∂z ∂x ∂z ∂y = + ∂s ∂x ∂s ∂y ∂s Solution: ∂z ∂z ∂x ∂z ∂y = + ∂t ∂x ∂t ∂y ∂t 355 / 394 356 / 394 Directional Derivatives The straight line starting at P0 = (x0 , y0 ) with velocity û = (u1 , u2 ) has parametric equations: Let û = (u1 , u2 ) be a unit vector in the xy-plane (so + = 1). The rate of change of f at P0 = (x0 , y0 ) in the direction û is the directional derivative Dû f P . u21 u22 x = x0 + tu1 , y = y0 + tu2 . Hence, 0 Geometrically this represents the slope of the surface z = f (x, y) above the point P0 in the direction û. Dû f = rate of change of f along the straight line at t = 0 P0 = value of d f (x0 + tu1 , y0 + tu2 ) at t = 0 dt = fx (x0 , y0 )x′ (0) + fy (x0 , y0 )y′ (0) by the chain rule = fx (x0 , y0 ) u1 + fy (x0 , y0 ) u2 . We can also write this as a dot product ! ∂f ∂f Dû f P = , · (u1 , u2 ). 0 ∂x P0 ∂y P0 358 / 394 357 / 394 Gradient Vectors Example 7.16: Find the directional derivative of f (x, y) = xey 1 at (2, 0) in the direction from (2, 0) towards , 2 . 2 If f : R2 → R is a differentiable function, we can define the gradient of f to be the vector ∂f ∂f ∂f ∂f i+ j= , grad f = ∇f = ∂x ∂y ∂x ∂y Solution: • ! direction û Then the directional derivative of f at the point P0 in the direction û is the dot product Dû f P0 = ∇f P0 · û 359 / 394 360 / 394 Example 7.17: Find ! the directional derivative of x π f (x, y) = arcsin at (1, 2) in the direction anticlockwise y 4 from the positive x axis. Solution: • direction û 361 / 394 362 / 394 363 / 394 364 / 394 Properties of ∇f and Dû f So for fixed ∇f : • Dû f is maximum when cos θ = 1 so θ = 0 The directional derivative of f is Dû f = ∇f · û = |∇f | |û| cos θ ⇒ f increases most rapidly along ∇f . = |∇f | cos θ • Dû f is minimum when cos θ = −1 so θ = π where θ is the angle between ∇f and û, and |v| denotes the length of a vector v. ⇒ f decreases most rapidly along −∇f . 365 / 394 • Dû f = 0 when cos θ = 0 so θ = 366 / 394 Example 7.18: Let f (x, y) = 4x2 + y2 . (a) Find ∇f at (1, 0) and (0, 2). (b) Show that ∇f is perpendicular to the level curves, by sketching ∇f at these points and the level curves of f . π and ∇f ⊥ û. 2 Solution: But Dû f = 0, whenever û is tangent to a level curve of f (where f = constant). ⇒ ∇f ⊥ level curves of f 367 / 394 368 / 394 Example 7.19: In what direction does f (x, y) = xey (b) (a) increase y (b) decrease most rapidly at (2, 0)? Express direction as a unit vector. 4j Solution: 0,2 From Example 7.16 Level curves of f x,y 1,0 8i ∇f (2, 0) = i + 2j x 369 / 394 370 / 394 Stationary Points A stationary point of f is a point (x0 , y0 ) at which ∇f = 0 So ∂f ∂f = 0 and = 0 simultaneously at (x0 , y0 ). ∂x ∂y Geometrically, this means that the tangent plane to the graph z = f (x, y) at (x0 , y0 ) is horizontal, i.e. parallel to the xy-plane. 371 / 394 372 / 394 Three important types of stationary points are A function f has a 1. local maximum at (x0 , y0 ) if f (x, y) ≤ f (x0 , y0 ) for all (x, y) in some disk centred at (x0 , y0 ), 2. local minimum at (x0 , y0 ) if f (x, y) ≥ f (x0 , y0 ) for all (x, y) in some disk centred at (x0 , y0 ), 3. saddle point at (x0 , y0 ) if (x0 , y0 ) is a stationary point, and there are points near (x0 , y0 ) with f (x, y) > f (x0 , y0 ) and other points near (x0 , y0 ) with f (x, y) < f (x0 , y0 ). 374 / 394 373 / 394 Second Derivative Test Any local maximum or minimum of f will occur at a critical point (x0 , y0 ) such that 1. ∇f (x0 , y0 ) = 0 2. If ∇f (x0 , y0 ) = 0 and the second partial derivatives of f are or continuous on an open disk centred at (x0 , y0 ), consider the Hessian function ∂f ∂f and/or do not exist at (x0 , y0 ). ∂x ∂y evaluated at (x0 , y0 ). H(x, y) = fxx fyy − (fxy )2 Then (x0 , y0 ) is a 1. local minimum if H(x0 , y0 ) > 0 and fxx (x0 , y0 ) > 0. 2. local maximum if H(x0 , y0 ) > 0 and fxx (x0 , y0 ) < 0. 3. saddle point if H(x0 , y0 ) < 0. q z = x2 + y2 . Minimum at (0, 0) BUT ∇f does not exist at (0, 0). Note: Test is inconclusive if H(x0 , y0 ) = 0. 375 / 394 376 / 394 Example 7.20: Find and classify the stationary points of f : R2 → R given by f (x, y) = x3 + y3 + 3x2 − 3y2 − 8. Solution: 377 / 394 378 / 394 Example 7.21: Find and classify the stationary points of f : R2 → R given by f (x, y) = y sin x. Solution: 379 / 394 380 / 394 Partial Integration Let f : R2 → R be a continuous function over a domain D in R2 . The partial indefinite integrals of f with respect to the first and second variables (say x and y) are denoted by: Z Z f (x, y) dx and f (x, y) dy. Z f (x, y) dx is evaluated by holding y fixed and integrating • with respect to x. Z • f (x, y) dy is evaluated by holding x fixed and integrating with respect to y. 381 / 394 382 / 394 Z Example 7.22: Evaluate Z (3x2 y + 12y2 x3 ) dx. 1 (3x2 y + 12y2 x3 ) dy. Example 7.23: Evaluate 0 Solution: Solution: Note: 383 / 394 384 / 394 Double Integrals Let f : R2 → R be a continuous function over a domain D in R2 . We can evaluate the double integral: " " f (x, y) dx dy f (x, y) dA = Δx D D " Δy f (x, y) dA is the volume under the surface z = f (x, y) that D lies above the domain D in the xy plane, if f (x, y) ≥ 0 in D. Volume of thin rod = (Area base) · (height) | {z } | {z } ∥ ∆x∆y ∥ f (x, y) 386 / 394 385 / 394 Double Integrals Over Rectangular Domains The double integral is defined as the limit of sums of the volumes of the rods: " Definitions 1. R = [a, b] × [c, d] is a rectangular domain defined by a ≤ x ≤ b, c ≤ y ≤ d. " f (x, y) dA = D f (x, y) dx dy D = lim lim ∆x→0 ∆y→0 n X f (x, y)∆x∆y i i=1 Note: If f (x, y) = 1 then " " dA = D dx dy D 2. gives the area of the domain D. R dR b c a f (x, y) dx dy = R d R b c a f (x, y) dx dy means integrate with respect to x first and then integrate with respect to y. 387 / 394 388 / 394 " Fubini’s Theorem (x2 + y2 ) dx dy if Example 7.24: Evaluate R = [−1, 1] × [0, 1]. Solution: Let f : R2 → R be a continuous function over the domain R = [a, b] × [c, d]. Then " Z dZ b f (x, y)dA = f (x, y) dx dy R c a d bZ Z R = f (x, y) dy dx a c So order of integration is not important. 390 / 394 389 / 394 Note: As expected, the order of integration is not important since polynomials are continuous for all (x, y) ∈ R2 . 391 / 394 392 / 394 Example 7.25: Using double integrals, find the volume of the wedge shown below. Solution: 393 / 394 394 / 394