The First Derivative and Second Derivative Test James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 8, 2017 Outline Extremal Values The First Derivative Test Cooling Models
We often want to know where a function has a minimum or maximum value. We know that a likely place for this is where the tangent line is flat as from simple drawings, we can see that where the tangent line is flat we often have a local minimum or local maximum of our function. We also know a function can have a minimum or maximum at a point where the functions has a corner or a cusp in general where the function s derivative fails to exist. Finally, if the function was defined on a closed interval [a, b], the function could have extreme behavior at an endpoint. These types of points are called critical points of the function. Definition Critical Points Points p where f (p) = 0 The critical points of a function f are Points p where f (p) does not exist Points p that are boundary points of the domain of f. We can be more precise. If p is a point where the tangent line to f is flat, then we know f (p) = 0. The first order Taylor expansion is f (x) = f (p) + f (p)(x p) + 1 2 f (c)(x p) 2, for some c with c between p and x. Now since f (p) = 0, this reduces to f (x) = f (p) + 1 2 f (c)(x p) 2,
Now let s step back and talk about continuity and positive and negative values. Let s assume f (p) > 0. We have done this argument before, but it is not a bad thing to go over it again! Let ɛ = f (p)/2. Then from the definition of continuity, there is a radius r > 0 so that p r < x < p + r f (p)/2 < f (x) f (p) < f (p)/2 p r < x < p + r f (x) > f (p)/2 > 0. We say if f is positive at a point p and continuous there, then it must be positive locally as well. Let s assume f (p) < 0. Let ɛ = f (p)/2 > 0. Then from the definition of continuity, there is a radius r > 0 so that p r < x < p + r f (p)/2 < f (x) f (p) < f (p)/2 p r < x < p + r f (x) < f (p)/2 < 0. We say if f is negative at a point p and continuous there, then it must be negative locally as well. If f is continuous at p we can say the same thing. If f (p) > 0, Let ɛ = f (p)/2 > 0. Then from the definition of continuity, there is a radius r > 0 so that p r < x < p + r f (x) > f (p)/2 > 0. So f positive at a point p and continuous there, implies it must be positive locally as well. Let s assume f (p) < 0. Let ɛ = f (p)/2 > 0. Then from the definition of continuity, there is a radius r > 0 so that p r < x < p + r f (x) < f (p)/2 < 0. So f negative at a point p and continuous there, implies it must be negative locally as well. We can then do the same sort of thing for f.
Theorem If f is continuous at p and f (p) is nonzero, there is a positive r so that f (x) is nonzero with the same sign on (p r, p + r). Proof We have already sketched out the reasoning behind this result. Theorem If f is continuous at p and f (p) is nonzero, then there is a radius r where f (x) is nonzero with the same sign on (p r, p + r). Proof We have already sketched out the reasoning behind this result. Back to our problem! We have f (p) = 0 and we have written down the first order Taylor expansion at p for f. So as long as f is continuous at p, we can say f (p) > 0 implies f (c) > 0 within some circle centered at p. This tells us f (x) = f (p) + a positive number on this circle. Hence, f (x) > f (p) locally which tells us p is a point where f has a local minimum. f (p) < 0 implies f (c) < 0 within some circle centered at p. This tells us f (x) = f (p) a positive number on this circle. Hence, f (x) < f (p) locally which tells us p is a point where f has a local maximum.
This gives our second order test for maximum and minimum values. Theorem Second Order Test for Extremals: If f is continuous at p, f (p) = 0, then f (p) > 0 tells us f has a local minimum at p and f (p) < 0 tells us f has a local maximum at p. If f (p) = 0, we don t know anything. This fact comes from the examples f (x) = x 4 for which f (0) = 0 even though f (0) is a minimum and f (x) = x 4 which has a maximum at x = 0 even though f (0) = 0. Proof We have already sketched out the reasoning behind this result as well. Example Show f (x) = x 2 + 2x + 1 has a minimum at x = 1. Solution We have f (x) = 2x + 2 which is zero when 2x + 2 = 0 or x = 1. We also have f (x) = 2 > 0 and so we have a minimum.
Example Show f (x) = 2x 2 + 5x + 1 has a minimum at x = 5/4. Solution We have f (x) = 4x + 5 which is zero when 4x + 5 = 0 or x = 5/4. We also have f (x) = 4 > 0 and so we have a minimum. Example Show f (x) = 2x 2 + 5x + 1 has a maximum at x = 5/4. Solution We have f (x) = 4x + 5 which is zero when 4x + 5 = 0 or x = 5/4. We also have f (x) = 4 < 0 and so we have a maximum.
Example Show f (x) = 2x 3 + 5x 2 + 1 has a maximum at x = 10/6. Solution We have f (x) = 6x 2 + 10x = x( 6x + 10) which is zero when x( 6x + 10) = 0 or when x = 0 or x = 10/6. We also have f (x) = 12x + 10. Since f (0) = 10 we see x = 0 is a minimum. Since f (10/6) = 12(10/6) + 10 < 0, we have x = 10/6 is a maximum. We can have a maximum or minimum for the function f at p even if f (p) does not exist or has value 0. We still assume f is continuous at p though. Assume we can find a positive radius r so that f (x) < 0 on (p r, p) and f (x) > 0 on (p, p + r). Applying the Mean Value Theorem on the interval [x, p] with x < p, f (x) f (p) we have x p = f (c) for some x < c < p. But here f (c) < 0, so we have f (x) f (p) x p < 0. Since x < p, this tells us f (x) > f (p). Now apply the Mean Value Theorem on the interval [p, x] with f (x) f (p) p < x. We have x p = f (c) for some p < c < x. But here f f (x) f (p) (c) > 0, so we have x p > 0. Since x > p, this tells us f (x) > f (p) again. Combining, we see f (p) is a local minimum. If we can find a positive radius r so that f (x) > 0 on (p r, p) and f (x) < 0 on (p, p + r), a similar analysis shows f (p) is a local maximum.
This leads to the First Derivative Test stated below: Theorem (First Derivative Test): Assume there is an r > 0 so that (1) f is + on (p r, p) and f is on (p, p + r). Then f has a maximum at p. (2) f is on (p r, p) and f is + on (p, p + r). Then f has a minimum at p. Proof We just finished arguing this in the previous slide. Things do not have to be so nice. Let f (x) = x 2 + x 2 sin 2 (1/x). We see, letting y = 1/x, that lim f (x) = lim x 2 + x 0 x 0 lim y ± sin2 (y)/y 2 = 0 Thus, f has a removeable discontinuity at 0 and the renamed function is continuous at 0. Now consider the derivative of f for x 0. We have f (x) = 2x + 2x sin 2 (1/x) + x 2 (2) sin(1/x) cos(1/x) ( 2/x 2 ) = 2x + 2x sin 2 (1/x) 4 sin(1/x) cos(1/x) = 2x + 2 sin2 (1/x) 2 sin(2/x) 1/x Now as x 0, we can find r > 0 so that 1/2 < 2x + 2 sin2 (1/x) < 1/2 1/x since these first two terms go to zero. However, in the interval ( r, r) there are infinitely many points (x 1 n ) where 2 sin(2/x 1 n ) = 2 and infinitely many points (x 2 n ) where 2 sin(2/x 2 n ) = 2.
Thus, f (x 1 n ) ( 1/2 + 2, 1/2 + 2) = (3/2, 5/2) implying f (x 1 n ) > 0. f (x 2 n ) ( 1/2 2, 1/2 2) = ( 5/2, 3/2) implying f (x 2 n ) < 0. The sequences (x 1 n ) and (x 2 n ) both converge to 0 as x 1 n = 2/( π/2 + 2nπ) and x 2 n = 2/(π/2 + 2nπ). Hence, it is not possible to find any r > 0 so that f < 0 on ( r, 0) and f > 0 on (0, r). But f (0) = 0 is the minimum value of f globally at 0 because x 2 + x 2 sin 2 (1/x) > 0 for all x 0. So f is a function the FDT fails on. Note using the new definition of f at 0, we have f (x) f (0) lim x 0 x 0 = x 2 + x 2 sin 2 (1/x) lim x 0 x ( = lim x 0 x + sin2 (1/x) 1/x ) = 0 Thus, f (0) exists and equals 0. But f (x) = 2x + 2 sin2 (1/x) 1/x 2 sin(2/x) and lim x 0 f (x) = 2 and limx 0 f (x) = 2 which tells us f is not continuous at 0. So f always exists but is not continuous at the point 0. The behavior of the functions f (x) = x p sin(1/x q ), f (x) = x p sin 2 (1/x q ) is always interesting for positive integers p and q.
Newton formulated a law of cooling by observing how the temperature of a hot object cooled. As you might expect, this is called Newton s Law Of Cooling. If we let T (t) represent the temperature of the liquid in some container and A denote the ambient temperature of the air around the container, then Newton observed that T (t) (T (t) A). We will assume that the temperature outside the container, A, is smaller than the initial temperature of the hot liquid inside. So we expect the temperature of the liquid to go down with time. Let the constant of proportionality be k. Next, we solve T (t) = k (T (t) A), T (0) = T0 where T0 is the initial temperature of the liquid. For example, we might want to solve T (t) = k(t (t) 70), T (0) = 210 where all of our temperatures are measured in degrees Fahrenheit. We use our usual solution methods to solve this. Divide both sides dt by T 70 to get T 70 = k dt. Then integrate both sides to get ln T (t) 70 = kt + C. Then, exponentiate: T (t) 70 = Be kt. Now, since we start at 210 degrees and the ambient temperature is 70 degrees, we know the temperature of our liquid will go down with time. Thus, we have T (t) 70 = Be kt.
Solving, we find T (t) = 70 + Be kt. Since the initial condition is T (0) = 210, we find T (0) = 210 = 70 + Be 0 = 70 + B, and so B = 140. Putting all of this together, we see the solution to the model is T (t) = 70 + 140e kt. Now since the temperature of our liquid is going down, it is apparent that the proportionality constant k must be negative. In fact, our common sense tells us that as time increases, the temperature of the liquid approaches the ambient temperature 70 asymptotically from above. Example Solve T (t) = k(t (t) 70) with T (0) = 210 and then use the conditions T (10) = 140 to find k. Here time is measured in minutes. Solution First, we solve as usual to find T (t) = 70 + 140e kt. Next, we know T (10) = 140, so we must have T (10) = 140 = 70 + 140e 10k. Thus 70 = 140e 10k 1 2 = e10k ln(2) = 10k. and so k = ln(2)/10 =.0693.
Homework 31 31.1 Solve T (t) = k(t (t) 90) with T (0) = 205 and then use the conditions T (20) = 100 to find k. Here time is measured in minutes. 31.2 Analyze fully the function f (x) = x 4 sin(1/x 2 ). 31.3 Let f (x) = 2 x 200/2 + 10 x 180/10 + 20 x 160/20. Follow the example in Lecture 19 and find where f attains its minimum. Then let g(x) = 4(x 200/2) 2 + 100(x 180/10) 2 + 400(x 160/20) 2 and find the minimum of g. Compare and comment on your results.