Math 31A Discussion Session Week 5 Notes February 2 and 4, 2016 This week we re going to learn how to find tangent lines to curves which aren t necessarily graphs of functions, using an approach called implicit differentiation. One of the most important applications of implicit differentiation occurs in related rates problems, so we ll explore some such problems. We will also briefly touch on the topic of linear approximation, time permitting. Implicit Differentiation and Related Rates So far the derivatives we ve taken have been derivatives of functions, but we know that not all graphs are graphs of functions. For example, suppose we want to find the slope of the line tangent to the circle x 2 + y 2 = 4 at the point ( 3, 1). How would we do this? Our answer will be implicit differentiation, wherein we treat y as if it were a function of x, and then take derivatives accordingly. Notice that the curve determined by x 2 + y 2 = 4 doesn t pass the vertical line test, and thus does not determine y as a function of x. But at most points (which ones?), we can pretend that y is a function of x by restricting our attention to some small portion of the curve. For example, the upper half of the circle is simply the plot y = f(x), where f(x) = 4 x 2. This means that we can find the slope of a tangent line that touches the top half of the circle by considering the plot of the above function. Typically we ll streamline our notation a bit by taking the derivative of the equation that determines our curve, remembering to pretend that y is a function of x, and ignoring coordinates (x, y) that would break our calculations. In our current example this looks like d ( x 2 + y 2) = d (4) 2x + 2y = 0. Solving for y, we find that = x. Notice that this doesn t make sense when y = 0. That y is, we still don t have a derivative at ( 2, 0) and (2, 0). This is okay, though no matter how small a portion of the circle we look at around either of these points, the curve will not pass the vertical line test. Now just as before, the derivative continues to be interpreted as the slope of a tangent line. In particular, the slope of the tangent line to x 2 + y 2 = 4 at ( 3, 1) is = 3 = 3. ( 3,1) 1 We can see the tangent line in the plot below: 1
Example. Find an equation for the line tangent to the graph of xy + x 2 y 2 = 6 at the point (2, 1). (Solution) We begin by differentiating the given equation. Notice our use of the product and chain rules. ( ) ( (1)(y) + x + (2x)(y 2 ) + (x 2 ) 2y ) = 0. So ( x + 2x 2 y ) = y 2xy2 In particular, the derivative at (2, 1) is = 1 (2,1) 2. So an equation of the tangent line is given by y = 1 (x 2) + 1. 2 = y 2xy2 x + 2x 2 y The right-hand plot above shows our curve and tangent line. y(1 + 2xy) = x(1 + 2xy) = y x. Example. Find all horizontal tangent lines to the curve determined by y 2 = x 3 3x + 1. (Solution) First, we take a derivative: 2y = 3x2 3 = 3x2 3. 2y We re interested in the points where this derivative vanishes, since a horizontal line has slope zero, and the derivative gives the slope of the tangent line. But = 0 precisely when 2
3x 2 3 = 0, or when x = ±1. We then substitute these x-values into our original equation. When x = 1 we have y 2 = 1 3 + 1 = 1, which has no real solutions. When x = 1 we have y 2 = 1 + 3 + 1 = 3, so the tangent line will be horizontal at ( 1, 3) and ( 1, 3). These tangent lines will be given by y = 3 and y = 3, and can be seen below: One of the most common uses for implicit differentiation is in related rates problems. These problems are not part of this particular iteration of Math 31a, but because of their importance in mathematical modeling, we ll give a few examples here. 1 These are problems where we have two quantities, related by some equation, and we want to know how quickly one of the quantities is changing, given the rate of change of the other quantity. There s a common strategy that will be helpful to you in most related rates problems: 1. Draw a picture of the situation. 2. Determine relevant variables. 3. Write down what you know (as equations and formulae). In particular, relate your variables somehow. 4. Differentiate the equation relating your variables. 5. Solve for the unknown variable(s) and derivative(s). 1 In all likelihood, we ll only cover the first example in discussion session. 3
We ll demonstrate (most of) this strategy in the following, classic example. Example. A 4 meter ladder leans against a wall. At time t = 0, the bottom of the ladder is 1 meter away from the wall, and the bottom of the ladder begins moving away from the wall at a constant rate of 0.5m/s. Find the velocity of the top of the ladder at time t = 2. (Solution) The part of our strategy that we ll skip is drawing a picture. The picture you draw should be a triangle, with the hypotenuse representing the length of the ladder. Determine relevant variables. At time t, let s call the height of the ladder y(t) and the distance of the base of the ladder from the wall x(t). As in the statement of the problem, t will represent the time elapsed since the ladder began falling, measured in seconds. Write down what you know. Using the Pythagorean identity, we can relate x and y: (x(t)) 2 + (y(t)) 2 = 4 2. (1) We also know the position of the base of the ladder at time t = 0: x(0) = 1, and we know the constant rate at which the base is moving: = 0.5m/s. Differentiate the equation relating your variables. We can differentiate (??) to obtain 2x(t) + 2y(t) = 0. Solve for the unknown. The quantity we re interested in is the velocity of the top of the ladder, which is represented by. We can solve for this by rearranging the above equation. = x(t) y(t) = x(t) y(t) 0.5m/s. In particular, we want to know the velocity at time t = 2, so this will require us to compute x(2) and y(2). Since the base of the ladder is moving at a constant rate of 0.5m/s, Then, using (??), So x(2) = x(0) + 0.5m/s 2s = 1m + 1m = 2m. y(2) = 16 (x(2)) 2 = 16 4 = 2 3m. = 2 2 3 0.5m/s = 1 2 3 m/s. So after 2 seconds the ladder is falling at a rate of 1/2 3 0.288675 meters per second. 4
Local Linear Approximation One immediate use we have for derivatives is local linear approximation. On small neighborhoods around a point, a differentiable function behaves linearly. That is, if we zoom in enough on a point on a curve, the curve will eventually look like a straight line. We can use this fact to approximate functions by their tangent lines. You ve seen all of this in lecture, so we ll jump straight to the formula for local linear approximation. If f is differentiable at x = a and x is close to a, then f(x) L(x) = f(a) + f (a)(x a). Example. Use local linear approximation to estimate the value of sin(47 ). (Solution) We know that f(x): = sin(x) is differentiable everywhere, and we know the value of sin(45 ). Since 47 is reasonably close to 45, this problem is ripe for local linear approximation. We know that f (x) = π π cos(x) (the term comes from the fact that x 180 180 is measured in degrees), so f (45 ) = π 180. Then 2 sin(47 ) sin(45 ) + f (45 )(47 45) = 1 π + 2 2 180 2 = 90 + π 90 2 0.7318. For comparison, Google says that sin(47 ) = 0.7314, so our estimate is pretty good. Alternatively, we could have considered g(θ) := sin(θ), with θ measured in radians. This would normalize our derivative, but we would still pick up a π term in our estimate, because we 180 would be estimating g ( π 47). 180 Considering the fact that most folks now have (extremely powerful) calculators in their pockets, the above example is a very inefficient way to compute sin(47 ). Local linear approximation is no longer especially useful for estimating particular values of functions, but it can still be a very useful tool. In a lot of applications it is convenient to assume that certain functions are linear. 2 The theory of local linear approximations allows us to do this on relatively small neighborhoods. Example. Box office revenue at a cinema in Paris is given by R(p) = 3600p 10p 3 euros per showing when the ticket price is p euros. Calculate R(p) for p = 9 and use linear approximation to estimate R if p is raised or lowered by 0.5 euros. (Solution) First we compute R(9) = 3600 9 10 9 3 = 25, 110. 2 For example, the velocity of a falling object does not behave exactly linearly, but this nonlinear function is well-behaved enough that we can approximate it with a linear function. 5
We also see that so R (p) = 3600 30p 2, R (9) = 3600 30 9 2 = 1, 170. Then we can use local linear approximation to make the estimates and R(8.5) R (9)(8.5 9) + R(9) = (1, 170)( 0.5) + 25, 110 = 24, 525 R(9.5) R (9)(9.5 9) + R(9) = (1, 170)(0.5) + 25, 110 = 25, 695. So it seems that the cinema s revenue would be about 25,700 euros per showing if they increase the price p to 9.5 euros. Notice that we have R = (1, 170)(±0.5) = ±585 euros in each case. For a reality check, we can compute the actual values of R(8.5) and R(9.5) and compare to our estimates: R(8.5) = 24, 458.8 and R(9.5) = 25, 626.3. Other Related Rates Examples Example. Gas is escaping from a spherical balloon at the rate of 1000 cubic inches per minute. At the instant when the radius is 10 inches, at what rate is the radius decreasing? At what rate is the surface area decreasing? (Solution) We ll call the radius of the balloon r(t) and the volume of the balloon V (t). These are related by the formula V = 4 3 πr3, and we know that dv = 1000in 3 /min at all times. We may differentiate the above equation to find that dv dr dr = 4πr2 = 1 dv 4πr 2. Substituting in our radius, we find that when the radius of the balloon is 10 inches, dr = 1 400π ( 1000) = 5 2π in/min. So the radius is decreasing at a rate of 5/(2π) 0.795775 inches per minute. For the surface area we have the formula A = 4πr 2. Differentiating this we have da = 8πr dr. 6
Then, when r = 10in, ( da = 8π(10) 5 ) = 200in 2 /min. 2π So when the radius is 10 inches, the surface area is decreasing at a rate of 200 square inches per minute. Example. The thin lens equation in physics is 1 s + 1 S = 1 f, (2) where s represents the distance of an object from a lens, S represents the distance from the lens of the image of this object, and f is the focal length of the lens. Suppose that a certain lens has a focal length of 6cm and that an object is moving toward the lens at a rate of 2cm/s. How fast is the image distance changing at the instant when the object is 10cm from the lens? Is the image moving away from the lens or toward the lens? (Solution) Since the image distance is represented by S, we re looking for ds, so we differentiate (??): 1 ds s 2 + 1 ds S 2 = 0. (The focal length of the lens is constant.) Then When s = 10cm, we have 1 10 + 1 S = 1 6 ds = S2 /s 2 ds/. S = 15cm, so ds = 225/100 = 1.125cm/s. 2 Since the derivative of the distance is positive, the image is moving away from the lens at a rate of 1.125 centimeters per second. Example. Coffee is draining from a conical filter into a cylindrical coffeepot at a rate of 10 in 3 /min. The filter is a circular cone with a height of 6 inches and a 6 inch diameter. The cylindrical coffeepot has a diameter of 6 inches. (a) How fast is the level in the pot rising when the coffee in the cone is 5 inches deep? (b) How fast is the level in the cone falling at this point in time? 7
(Solution) (a) Denote the volume in the pot at time t by V p (t), and the height by h p (t). Then V p and h p are related by V p = π(3in) 2 h p V p = (9in 2 )πh p. Differentiating this equation with respect to time, we obtain dv p = (9in2 )π dh p dh p = 1 dv p (9in 2 )π. Since the coffee is draining into the pot at a rate of 10 in 3 /min, dv p / = 10in 3 /min, so dh p = 1 dv p (9in 2 )π = 10 9π in/min. Note that this rate is constant, and thus does not depend on the height of the coffee in the cone. (b) As with the cylinder, we have a formula relating the volume of the liquid in the filter at time t to the height of the liquid in the filter at time t: V f (t) = π(r f (t)) 2 h f (t), where r f (t) is the radius of the surface of the liquid in the cone. We also immediately have dv f = 10in 3 /min. The radius depends linearly on the height of the liquid, and can be written as r f (t) = 3in h f(t) 6in = h f(t) 2. (So the radius is 0 when the height is 0 and the radius is 3 inches when the height is 6 inches, in agreement with our original assumptions.) The formula for the volume now becomes ( ) 2 hf (t) V f (t) = π h f (t) = π 2 4 (h f(t)) 3. Differentiating this with respect to t gives dv f = 3π 4 (h f(t)) 2 dh f dh f = 4 3π(h f (t)) 2 dv f. So, when h f = 5 in, dh f = hf =5 4 3π 25in 2 ( 10 in3 /min) = 8 15π in/min. 8