 Welcome back to our lecture series, Math 1210, Calculus I for students at Southern Utah University. As usual, I'll be a professor today, Dr. Andrew Misildine. In lecture 34, we're going to talk about the so-called second derivative test. But before we do that, I want to review the ideas of the first derivative test, which you talked about in lecture 33. So the main idea behind the first derivative test is that whenever the first derivative is positive, that implies that the original function is increasing. And likewise, when the first derivative is negative, that implies that the original function is decreasing. So the first derivative determines the monotonicity of the function. It increases at this moment. It decreases at other moments. And so if you have a critical number, some critical number right here, if we know the signs of the derivative, if we know it goes from positive to negative, that means that our function was increasing, then it switched to decreasing. And so if you think of the graph there, that would have to form some type of local maximum. Or similarly, if our function's derivative switched from negative to positive, that would say that the function was decreasing, it switched to increasing. And now it suggests that you have some type of local minimum value. That's the first derivative test. Now, we also saw in the previous lecture, lecture 33, that the second derivative also affects the shape of the graph of the original function. Because the second derivative, as the derivative of the first derivative, when the second derivative is positive, that means that the first derivative is increasing. And that has a consequence of saying that the original function is concave up. So whenever the second derivative is positive, the function is concave up. And similarly, when the second derivative is negative, that means the first derivative is increasing, which then forces the original function to be concave down. In particular, the second derivative being negative means the function's concave down. Now, concavity can be used to determine whether a critical value is a local extremum or not. So think about it in the following way. If you have some critical number, right, you have some critical number, and this is to say that f prime at c is equal to zero. So this means we have some type of horizontal tangent line. A critical number is also when the first derivative is undefined. But if the first derivative is undefined, then the second derivative will also be undefined. So don't worry about that necessarily. If we have a critical number, the first derivative is equal to zero, you have a horizontal tangent line. The only picture that we can draw that'll reconcile these two ideas when we are concave upward. And we have a horizontal tangent line at c. This would suggest that we in fact have a local minimum at c. Likewise, if your function was concave downward, then our graph and it has a horizontal tangent line at c, then we'd have to get a picture look something like this or concave downward down. And then c would have to be a local maximum. So if we know the concavity at a horizontal tangent line, that is when the first derivative is equal to zero, we can also determine whether we have a local extremum or not. This leads to the so-called second derivative test because it's a derivative test using the second derivative to determine whether we have an extreme point or not. Let the second derivative exist on some open interval containing c and suppose that f prime at c equals zero. So c is a critical number, we already established that. Well, like we saw in the previous slide, if the second derivative is positive, since the function is concave up, that means the critical number must be a relative minimum. And likewise, if the second derivative is negative, that means the function is concave down at that location and therefore it must be a local maximum. Now it turns out that if the first derivative is zero and the second derivative is zero or if the second derivative is undefined, that is if c is a critical number of the first derivative as well, then we actually don't have enough information to determine whether it's an extremum or not. So to understand this a little bit better, let's consider three situations. The first situation, we're going to take y equals x to the fourth right here. Well, its first derivative would then be 4x cubed. Its second derivative is then going to be 12x squared. Consider the critical number because notice that when x equals zero, this first derivative here goes to zero. So this is a critical number. If we think of the graph of this function, the original function y equals x to the fourth, it's kind of like a parabola, but we squished it a little bit. It's going to be flatter near the origin, something like this. x equals zero is right here. This is a minimum value, but notice the second derivative at zero is equal to zero. So we got a minimum when the second derivative is zero. On the other hand, let's take the function y equals negative x to the fourth. Its first derivative is going to be negative 4x cubed. Its second derivative will be negative 12x squared. If we graph that function, it's going to look just like the other graph, but it's been reflected across the x-axis. So we get something like that. If we look again at x equals zero because that makes the derivative go to zero, if we plug that into the second derivative, we still get zero, but in this case it's a maximum. So see, we have a critical number in both situations, one times a minimum, one times it's a maximum. And then one last example, let's take y equals x cubed for example, then the first derivative is equal to 3x squared. The second derivative is equal to 6x. Notice that the first derivative is equal to zero at x equals zero. And if you plug it into the second derivative, you'll likewise get zero. But if we consult the graph of what's going on here, we see that the graph looks something like the following. And so at x equals zero, you actually get neither a maximum or a minimum. In this case, it turns out to be a point of inflection. But the point is, if your first derivative and second derivative are simultaneously zero, that information about the second derivative is insufficient, we need to know more information. And so in particular, if you have a point which makes the first derivative and the second derivative simultaneously zero, you should just use the first derivative to determine whether it's a maximum or a minimum. But if your first derivative is zero at a point, but it's positive or negative at that same point with the second derivative, then you can actually determine whether it's a max or min using the second derivative test. So let's find all of the relative extrema for the function f of x equals 4x cubed plus 7x squared minus 10x plus 8. And we're going to do this using the second derivative test. Now, whether we're using the first derivative test or the second derivative test, we have to calculate the first derivative in order to find the critical numbers. The critical numbers are where the relative extrema will be listed. So by the usual calculations of derivative, the first derivative of f of x here is going to be 12x squared plus 14x minus 10. We want to set this equal to zero. We're going to want to factor this thing. We could also use the quadratic formula. It doesn't matter. I can do this by factoring. We can factor out a 2 that leaves behind 6x squared plus 7x minus 5. So notice now we got to bring in 6 times negative 5. That's going to give us negative 30. We need factors of negative 30 to add up to be 7. We could get away with 10 and negative 3, like so. So that's going to be our magic pair of numbers. We proceed to factor this thing by groups. So we're going to get 6x squared plus 10x minus 3x minus 5. And so we put these into groups, right? So we have our first group, 6x squared plus 10x. We have our second group, negative 3x minus 5. Factor out the common divisor from the first group. We can take out between the 6x squared plus 10x, the gcd would be 2x, leaving behind 3x plus 5. From the second group, you have a negative 3x minus 5. The greatest common divisor there is going to be a negative 1, leaving behind a 3x plus 5. You'll now notice that the thing in the parentheses are identical. So we can factor them out, giving us the factorization we sought. So we get 2 times 2x minus 1, and we're going to get 3x plus 5. Like so, when we set this equal to zero, we get our two critical numbers. Our critical numbers are going to be, from the first factor, 2x minus 1, we're going to get 1 half. From the second factor, 3x plus 5, we get negative 5 thirds. Like so, these are our two critical numbers. These are the places where we could have local extrema. If we want to calculate whether these are maximum, minima, or neither, we could use the second derivative test. To do that, we have to calculate the second derivative. So we have kind of two options here. We can calculate the derivative from this expanded form or from this factor form. I'm going to prefer the original, because that way I don't have to use the product rule. It's going to be much easier to calculate the derivative of a polynomial when it's expanded. The derivative will look like 24x plus 14. And so then we're going to plug these numbers into the second derivative. Like if we plug in the 1 half, we get the second derivative at 1 half is equal to 24 times 1 half plus 14. Notice 1 half times 24 is equal to 12. 12 plus 14 is positive, but in particular, we add it together. We're going to get 26 there, which is positive. What this tells us is the function is, if it's concave upward at a horizontal tangent line, this tells us, if we summarize what we have here, f has a local minimum at x equals 1 half. We get that from the second derivative test. Well, what happens if we take the negative 5 thirds and plug it into the second derivative? We're going to end up with f double prime and negative 5 thirds. We'll get 24 times negative 5 thirds plus 14. Three goes into 24 eight times. Eight times negative five is going to give you a negative 40 plus 14. Again, I already know this is going to be negative. If we want to be more specific, of course, we can add those things together and end up with a negative 26 in that situation. But it's the fact that's negative that matters. If the function, if the second derivative is negative, that means the function is concave down. If you're concave downward at a horizontal tangent line, that must be a maximum value. And so then we can conclude that at negative 5 thirds, we have a local maximum. So f has a local minimum at x equals 1 half and a local maximum at x equals negative 5 thirds. And so we are able to determine the extrema of our function using this so-called second derivative test. Well, why would we want to use a second derivative test if we already have the first derivative test? Because the second derivative test requires we calculate the second derivative. Why is that? Well, there's two reasons for that. One, when you start working in higher dimensions like multivariable calculus, turns out the second derivative test is much easier to generalize to the multivariable setting than the so-called first derivative test. But even in a single variable calculus class like this lecture series that you're watching right now, when we go into the future applications, when we're considering extrema, it means we're considering monotonicity. We want to know when the function's going up, when it's going down. But when we consider monotonicity, we typically also are considering concavity in the same breadth. We want to know where is it increasing, decreasing, but we also want to know where it's concave up, concave down. We want to know extrema, but we also want to know points of inflection. And so because we will often be investigating concavity side by side with monotonicity, we already will have the second derivative, and so we can use the second derivative to help us evaluate it. So I guess what I'm saying is if you already have the second derivative, then it's easier to test an extrema using the second derivative test. We don't need a sign chart used to evaluate the derivative at this, at the second derivative at the critical number and see whether it's positive or negative. It's all it is. It's a simple test if you have the second derivative. And in practical sense, you pretty much will always have the second derivative when you want to be considering these type of problems. So this second derivative test actually proves to be very, very useful in practice.