 Welcome back to our lecture series Math 1210, Calculus I for students at Southern Utah University. As usual, I'll be your professor today, Dr. Andrew Misseldine. This is the first video of lecture 33 for which we're going to talk about the so-called first derivative test. It turns out that the first derivative, as we learned previously with the mean value theorem, has a huge effect on the shape of a function's graph. And so we want to explore more about that today, the first derivative test. The first derivative test will be a tool to determining where the local extrema of a function are. We've talked previously with the extreme value theorem how to find the absolute maximum or absolute minimum of graph. But in this discussion, the first derivative test will figure out how to find the local maxima or the local minima. So how does the first derivative affect the shape of the graph, beyond what we've already seen before? Well, we've kind of been using the fact that the first derivative gives us the monotonicity of a function. But we haven't exactly made it explicit in our lecture series yet. Let's do that right now. Suppose that a function f is differentiable on some open domain, some open interval, okay? Then, if f prime of x is greater than 0, so if the first derivative is positive for each x in that open interval, then f is in fact an increasing function on that interval. And because the first derivative is positive, the slope of the tangent line is necessarily positive at each of those points. In converse, if the first derivative is less than 0 on each x in this open interval, then f is going to be decreasing on that interval. And that's because the slope of the tangent line is going to be negative at each point on this interval. And finally, if the derivative is equal to 0 for each x in that interval, like we saw previously, that implies that the function is, in fact, constant for each point on that interval, in which case every point would have a horizontal tangent line and such. And so this proposition you can summarize in the following table right here that when the first derivative is positive, that's exactly when the function is increasing. When the derivative is negative, that's exactly when the function is decreasing. Let's take a look with a specific example. So I've switched over to Desmos right here to illustrate for you this idea of tangent lines, their sine versus the monotony of the function. So for the sake of example, let's take the function f of x equals x cubed minus 3x, which you can see this in the bluish-green function illustrated here on the screen. This orange line right here is the tangent line of that function at the specific point. And I've set this up on Desmos that if I slide around the point of tangency, it'll automatically change the tangent line here. I'm going to turn off this label here because it's kind of getting in the way. We can slide this thing around. And I computed this formula for the tangent line, the usual formula we have. You have y minus f of a times f prime of a, which you see the formula, the derivative of x cubed minus 3x would be 3x squared minus 3. I've plugged in the specific number a and you get x minus a. So this is the equation of the tangent line. So I move this around. So notice that when the tangent line has this positive upward direction, right, that is it goes from the bottom left to the top right, that indicates you have a positive slope on your tangent line. On the other hand, if we move it to somewhere like here, now we see that our tangent line, it goes from the top left to the bottom right. That's a negative slope of the tangent line. Negative slope on your tangent line means a negative derivative. A positive slope on your tangent line means that you have a positive derivative. So on this portion of the graph, you see that since the slope is positive for the tangent line, this would imply that the derivative is positive on this interval. If we come over here though, you see that the direction of the tangent line is now flipped around in the slopes now negative. This is a place where the first derivative would be negative on this graph. And then when we come back over here, we see that the first derivative would be positive in this interval because the tangent line has positive slope. So let's go through the whole story here. So if we go from like the edge of the screen, notice here that my slope is positive, positive, positive. So in this situation, my first derivative would be positive, but wait, this also coincides with where the function was increasing. As I go from negative infinity all the way up to this point right here, this point, oh, can I get it? Boom. When we get this point right here when x equals negative one, the function everywhere to the left and negative one was increasing. When we hit negative one, it's, we get a horizontal tangent line. And this is the place where it switches directions. It was increasing from negative infinity to negative one. Now we can see that as we go past negative one, and we're going towards positive one over here, in this interval from negative one to one, we see that the tangent slope is negative. And as such, the first derivative would be negative in this situation. This coincides for where the function is decreasing. Once we get to one, oh, can I get it back to one? When you get to x equals one, we get a horizontal tangent line. And then past that, it's going to switch to having a positive first derivative again, which that coincides with the function increasing. So we can see that, oh, positive derivative means increasing. Negative derivative means decreasing. And then positive derivative again means that the function is back to increasing. But two points that we really care about on this graph are the local extrema. There's this local extrema at x equals negative one. In fact, this is going to be a local maximum. How do we know this is a local maximum we can see on the graph? But what we can notice from the first derivative is that when you're a little bit to the left of a local maximum, the tangent lines are positive, which means the derivative is positive. And then when you're a little bit to the right of a local maximum, that means that your function, your first derivative is actually negative because the tangent lines are decreasing. And so that suggests that the function was decreasing. So when you switch from an increasing interval to a decreasing interval, that means you have a local maximum with the function. But we can then say that for the derivative as well. If we switch from a positive derivative to a negative derivative, that means you had a local maximum. Well, let's come back down here to our local minimum at x equals one. If we're a little bit to the left of the local minimum, notice our derivative is negative. If we're a little bit to the right of our local minimum, then our derivative would be positive. In which case we see that a local minimum occurs when you switch from decreasing to increasing. So with regard to the derivative, if you switch from a negative derivative to a positive derivative that meant at your critical number, you must have been a local minimum. And I should mention that by the intermediate value theorem, if our first derivative is continuous, that means that, which it is in this case, that means that the critical numbers of our functions can be used as the endpoints of open intervals. And if we do that, then the sign of the derivative of any point in that interval will be the same. It will be the same sign as any other point. So like if I keep my, if I keep my derivative between negative one and positive one, it doesn't matter where I'm at. The derivative will always be negative in that interval. It only can switch the sign when you hit a critical number. So you switch from negative to positive, or you switch from positive to negative, okay? Therefore the process of finding the intervals of increasing or decreasing for a function is outlined by simply solving the inequality f prime of x is greater than zero. If we can determine when the derivative is positive or negative, then we can determine where the function's increasing, decreasing. We can use that to also find the local extrema. So summarizing what we just described here, we get the so-called first derivative test. And again, this is exactly what we saw a moment ago. Let c be a critical number for our function. So you have some critical number. We're going to call it c for a moment, okay? So suppose that f is continuous on the interval a to b and it's differentiable on a to b, except maybe at c, right? Because c is a critical number. So that means the derivative is either zero at c or it's undefined at c. So we aren't necessarily differentiable at c, but we do expect it to be continuous. So it could be like a sharp corner. That will be continuous but not differentiable, all right? So we're taking some interval where it'll be differentiable everywhere, but maybe not at the critical number, but it's still at least continuous at the critical number, all right? So consider our first derivative here. If, so reading part a here, f of c is a relative maximum of f if the derivative is positive on the interval a to c and negative on the interval c to b. So if it goes from positive to negative, so that means your function was actually increasing and then it switched to decreasing. So what does our picture have to do? It's got to do something like this, right? And maybe it's a sharp corner, maybe it's not. And so in particular, this indicates that we have a maximum value, a local maximum on our graph. If your first derivative switches from positive to negative, it must have been a local maximum. Well, another possibility here is you have your critical number c. What if your, so f of c is a relative minimum of f if the derivative, first derivative f prime is negative when you're on the interval a to c and it's positive on the interval c to b. That would indicate you have a local minimum. Well, why is that? Well, if the function is, if the first derivative is negative, that means the function was decreasing. If the first derivative is positive, that means the function is increasing. And if you think in your mind what that's all about, decreasing to increasing, that would indicate that you have a local minimum. So whenever you see a sign change with the first derivative, that means you have an extremum. Positive to negative gives you a local maximum or a negative switch to a positive is example of a local minimum. If the derivative f prime has the same sign on the intervals a to c. So if you go, you know, if you go from, you know, positive to positive or negative to negative with your first derivative, well, there's no sign change. Then now it suggests there's actually no extremum. There's no extremum at that point. As an example we saw previously, we've considered the function y equals x cubed, which you'll notice that if you take the derivative, you're going to get 3x squared like so. Well, the critical number is going to be c equals zero. And if you think of the sign change right there, if you take c equals zero, if you take a number bigger than zero, and it doesn't matter which number it is, but again, by the intermediate value theorem, as long as you pick something bigger, that's all that matters. So like take as a test point x equals one, if you take three times one squared, you're going to get three, that's a positive three. If you take something to the left, like negative one, you're likewise going to get positive three. So there's no switch there. It's the same. It's positive positive. It indicates that you have no extremum on this point. And that makes sense given the graph of y equals x cubed. Your standard graph is going to look something, of course, like the following. You see that at the origin, there is no extreme value. And that's because the derivative didn't switch its signs as you went from that critical number to another one. And so the next video, I want to actually give you some examples of functions that using the first derivative test will be able to find and identify their local extrema, their local maxima and their local minima.