Lecture 9: Implicit and Logarithmic Differentiation PDF

Summary

This document is a lecture on implicit and logarithmic differentiation, part of a course in calculus. It includes examples of how to find derivatives when a function is defined implicitly, and how using logarithms simplifies complex differentiation.

Full Transcript

Math 231E, Lecture 9. Implicit and Logarithmic Differentiation 1 Implicit Differentiation The Van der Waals equation n2 a   P+...

Math 231E, Lecture 9. Implicit and Logarithmic Differentiation 1 Implicit Differentiation The Van der Waals equation n2 a   P+ (V − nb) = nRT V where P is pressure n is the number of moles, T is the absolute temperature and R is the ideal gas constant (R = 8.3143Jmol−1 K −1 ) and a, b > 0 positive defined constants that depend on the particular gas It’s a generalization of the ideal gas equation P V = nRT What is ∂V  ∂V T =? In most of the cases we have already seen, we have y explicitly defined as a function of x, e.g. y = x2 , y = sin(x) cos(x),... What if, on the other hand, we have x2 + y 2 = 25, how can we find dy/dt? Of course, we could solve for y and then proceed: p y 2 = 25 − x2 , y = ± 25 − x2 , but then we do not have a function, and we have to take care of the fact that we are dealing with a multi- valued object. And in any case, there are some functions of x and y which we could not possibly solve, say x2 y 2 sin(xey ) = 0. Because of all of this, we need a way to differentiate when we only know the function y implicitly. For 1 example: x2 + y 2 = 25 d 2 d (x + y 2 ) = 25 dx dx d 2 d 2 d x + y = 25 dx dx dx dy 2x + 2y =0 dx dy 2y = −2x dx dy −2x x = =−. dx 2y y We can even do the more difficult example without much more trouble: x2 y 2 sin(xey ) = 0 d 2 2 (x y sin(xey )) = 0   dx   dy dy 2xy 2 sin(xey ) + x2 2y + x2 y 2 cos(xey ) xey =0 dx dx  dy 2x2 y + x3 y 2 ey cos(xey ) = −2xy 2 sin(xey ) dx dy −2xy 2 sin(xey ) = 2 dx 2x y + x3 y 2 ey cos(xey ) dV Calculate dP : n2 a dV n2 a dV (1 − )(V − nb) + (P + 2 ) =0 V dP V dP thus n3 ab n2 a dV (−n2 a + +P + 2 ) = nb − V V V dP One notices that we always seem to be able to solve for dy/dx in these equations. Will this always be true? d ∂F ∂F dy F (x, y(x)) = + dx ∂x ∂y dx 1.1 Inverse Trigonometric Functions Let us compute the derivative of the inverse trig function y = sin−1 (x) = arcsin(x). (See Figure 1.) Of course, simply using the definition we can write x = sin(y), and now we differentiate this implicitly, as: dy 1 = cos(y) dx 1 dy =. cos(y) dx 2 sin-1HxL 1.5 x -1 1 -1.5 Figure 1: A plot of y = arcsin(x) This statement is technically correct, but not entirely useful for us. We would like an expression that de- pends explicltly on x. But we have a formula, so we can write dy 1 1 = = , dx cos(y) cos(sin−1 (x)) and as long as we know what cos(sin−1 (x)) is, we are good. But what is that? We have to use a triangle! 1 x √ 1 − x2 Figure 2: We choose a right triangle such that the interior angle θ has sin(θ) = x, and then Pythagoras gives us the third side! √ We see from this triangle that sin(θ) is x, and using the Pythagorean theorem, we have that cos(θ) = 1 − x2. Therefore p 1 − x2 = cos(θ) = cos(sin−1 (x)), so we have dy 1 y = arcsin(x) =⇒ =√. dx 1 − x2 We can also compute the derivative of arctan(x) similarly. If we write y = arctan(x), x = tan(y), then differentiating gives dy dy 1 = sec2 (y) , or, = cos2 (y) = cos2 (tan−1 (x)). dx dx 3 Using a different triangle (see Figure 3) gives 1 cos2 (tan−1 (x)) =. 1 + x2 √ 1 + x2 x 1 Figure 3: Another triangle! 1.2 Inverse Functions in General Whenever we have an equation defined using an inverse function, i.e. y = f −1 (x), then we proceed in the same manner. We write x = f (y), dy 1 = f 0 (y) , dx dy 1 1 = 0 = 0 −1 , dx f (y) f (f (x))) The only trick will be, in general, to figure out how to compute f 0 (f −1 (x)) explicitly, and this is usually done in a function-dependent manner. 2 Logarithmic Differentiation We know that d 1 ln(x) =. (1) dx x Using the chain rule, this allows us to differentiate the logarithm composed with any function, e.g. d 1 cos(x) ln(sin(x)) = · cos(x) = = cot(x). dx sin(x) sin(x) This rule is great, but it has the problem that it is not defined when sin(x) < 0, which is a lot of x! If x < 0, then ln(x) is not defined. However, ln(−x) is defined, and ln(−x) 1 1 · (−1) =. (2) = −x x 4 We can combine (2, 1) together to form: d 1 ln |x| = dx x and this formula is defined for all x 6= 0. In general, we have that This formula can be very useful for complicated derivatives quickly! Example 2.1. Let (x − 9)6 (x2 + 2x − 3)7 f (x) =. (x2 − 1)8 We could use the product and chain rules to compute this derivative exactly, but this would take a lot of work. We can also do the following: (x − 9)6 (x2 + 2x − 3)7 ln |f (x)| = ln , (x2 − 1)8 = ln |(x − 9)6 | + ln |(x2 + 2x − 3)7 | − ln |(x2 − 1)8 | = 6 ln |x − 9| + 7 ln |x2 + 2x − 3| − 8 ln |x2 − 1|. We then take derivatives of both sides, to obtain d d 6 ln |x − 9| + 7 ln |x2 + 2x − 3| − 8 ln |x2 − 1|  ln |f (x)| = dx dx f 0 (x) 6 7(2x + 2) 8(2x) = + 2 − 2 f (x) x − 9 x + 2x − 3 x − 1 6 14x + 14 16x = + −. x − 9 x2 + 2x − 3 x2 − 1 Now, this is not the formula for f 0 (x), but it is the formula for f 0 (x)/f (x). To get f 0 (x), we multiply both sides by f (x) (which we know) to obtain:   0 6 14x + 14 16x f (x) = f (x) + − x − 9 x2 + 2x − 3 x2 − 1 (x − 9)6 (x2 + 2x − 3)7   6 14x + 14 16x = + −. (x2 − 1)8 x − 9 x2 + 2x − 3 x2 − 1 More on this in a bit. 3 Differentials We know from Taylor series that a function f (x) can be approximated near a by f (x) = f (a) + f 0 (a)(x − a) + O(x − a)2. Now let us write x = a +  and note that x − a = , so f (a + ) = f (a) + f 0 (a) + O(2 ). We write an  to remind us that it is small! The first-order Taylor polynomial in this expansion is commonly called the linearization (since we’re keeping only the linear term). It is very useful when approximating. 5 √ √ Example 3.1. Let f (x) = x and choose a = 9. Note that f 0 (x) = 1/2 x. Then 1 f (a + ) ≈ f (a) + f 0 (a) = 3 + . 6 √ So, for example, if we want to approximate 9.03, we choose a = 9,  = 0.03, and we would guess √ 1 9.03 = 3 + (0.03) = 3.005. 6 √ In fact, 9.03 = 3.00499584026 · · · , so√notice that this approximation is off only by 5 × 10−6. Similarly, if we want to compute 8.91, we choose a = 9 and  = −0.09, and we have √ 1 8.91 ≈ 3 + (−0.09) = 2.985, 6 √ where 8.91 ≈ 2.98496231132... and again we are only off by 4 × 10−5. The strength of differentials is to use this idea in functional form. If we write f (a + ) ≈ f (a) + f 0 (a) Rearrange this to obtain f (a + ) − f (a) = f 0 (a). Thinking of  as “a small change in x” we now write it as ∆x, and we think of f (a + ) − f (a) as “the change in f ” and write it as ∆f , and we thus obtain the equation for a differential, namely ∆f = f 0 (a)∆x. The way to interpret this equation is: “Changes in output are (approximately) proportional to changes in input, and the constant of proportionality is f 0 (a).” This is the way to think of the 1/6 in the previous example: when we kick the input by a small amount , the function’s value gets kicked by about /6. Example 3.2. Given that we have measured the radius of a sphere as 10 cm with a relative error of 5%, what is the error in measuring its volume? 4 We know that V (r) = πr3 , so we use the differential approach, writing 3 dV = V 0 (r) dr = 4πr2 dr. Therefore dV = 4π(10 cm)2 (10 cm · 5%) = 4π(100 cm2 )(0.5 cm) = 200π cm3 ≈ 628 cm3. The represents the absolute error given by the approximation. The volume is 4 4000π V (10 cm) = π(10 cm)3 = cm3 , 3 3 so the relative error is dV 200π cm3 3 = = 15%. V 4000π 20 cm3 3 6 In short, the relative error gets multiplied by about a factor of three (again, we say about since these calcu- lations are approximations). Again, to see this factor of three in action, we write dV /V dV r r = · = 4πr2 · = 3. dr/r dr V 4 πr3 3 Generalizing the pattern seen in the previous example, if we ever have a function f (x) = Cxp , then df = Cpxp−1 dx, so df Cpxp−1 dx p dx dx = = =p. f Cxp x x So we see that relative errors get multiplied by about a factor of p. Another way to see this (remember logarithmic derivatives!!) is that df d(ln f ) = , f so if f (x) = Cxp , then ln(f ) = ln(Cxp ) = p ln(x) + C, so df dx =p. f x Example 3.3. The ideal gas law is a law that relates pressure, volume, and temperature of a gas, and is given by P V = nRT, where P is the pressure, V is the volume, T is the temperature, n is the number of moles in the gas, the R is the ideal gas constant J R ≈ 8.314. K · mol Let us use differentials to solve the following problem: given a (relative) increase in pressure by 2% and a (relative) decrease in temperature by 3%, what the is approximate relative change in volume? We have ln(P V ) = ln(nRT ) ln(P ) + ln(V ) = ln(nR) + ln(T ) dP dV dT + =. P V T Thus we have (2%) + dV /V = (−3%), or dV /V = −5%. 7

Use Quizgecko on...
Browser
Browser