Maxima, Minima and Inflection Points
Can you find the local maximum and local minimum in the graph above? Yes, of course. Now look at the same places and think about what the slope is at those two locations. Correct, the slope is zero at those locations. Is the slope equal to zero anywhere else on the graph? The answer is no. So if you want to find maximums or minimums a good way to get started is to find out where the slope of the function is equal to zero. When you don't have a graph to look at the best way to find where the slope is zero is to set the derivative equal to zero.
Critical Points
Let's go through an example. Given f(x) = x3-6x2+9x+15 , find any and all local maximums and minimums.
Step 1. f '(x) = 0
, Set derivative equal to zero and solve for "x" to find critical points. Critical points are where the slope of the function is zero or undefined.
f(x) = x3-6x2+9x+15 f '(x) = 3x2-12x+9 3x2-12x+9 = 0 3(x2-4x+3) = 0 3(x-1)(x-3) = 0 x=1, or x=3.
Ok, now we have our critical points but which one is the minimum and which one is the maximum? Don't try to guess. We don't have enough information yet.
We need to find out more about what is happening near our critical points. Ok your right, we need to find out what is happening on either side of our critical points.
Shot Gun Method Step 2 Option 1.
Pick numbers on either side of the critical points to "see what's happening". But what exactly are we looking for? Well let's say we use x=0 and x=2 as our numbers on either side of our first critical point. If you plug x=0 into f(x) = x3-6x2+9x+15, you get f(0) = 15 and using x=2, you get f(2) = 17. (Do your own math to verify this.) So what? What can we conclude from this? Pretty much nothing. If you also calculate at x=1, you get f(1) = 19. Now we can see that at x=1, f(x) is bigger than it's neighbors and thus can be called a local maximum.
Can you see why this is sometimes called the shotgun method? Let's connect the "buckshot" and get a better idea of the shape of the function.
We could do something similar for x=3 but let's not.
First Derivative Test Step 2 Option 2.
Let's try another technique. How about we use just the numbers on either side and see what the derivative says about the function at those locations. (This boils down to only have to test two numbers instead of testing three.) If we use x = 0 with f '(x) = 3x2-12x+9, we get f '(0) = 9, and at x=2 we get f '(2)=-3. Remembering that when the derivative is positive the slope of the function is positive and when the derivative is negative the slope of the function is negative and we get the following results.
The function must follow the path of the arrows and we can conclude that the function must have the following shape and there is a local maximum at x=1.
Thus we can see from above that is the function is increasing before x=1 and decreasing after x=1, then x=1 has to be a local maximum. Let's now look at the other critical point, x=3. To finish our analysts we only need to find out about the slope of the function after x=3. Let's test x=4 in the derivative f '(x) = 3x2-12x+9. Since f '(4)=9 is positive we can then conclude that if the function is decreasing before x=3 and increasing after x=3, then x=3 has to be a local minimum. See below.
With this extra information about the slopes, we get an even more complete picture of the basic shape of the function. We can see that there is also a local minimum at x=3.
Using the first derivative to test numbers on either side of the critical points to see if the function is increasing or decreasing is commonly called the First Derivative Test. It works pretty well and is almost guaranteed to be hassle free provided that you can handle derivatives. But if you are comfortable using derivatives then you might as well learn about the Second Derivative Test. It is even fast then the First Derivative Test.
Second Derivative Test Step 2 Option 3.
Let's redo the above example continuing from where we just found the critical points but don't know anything else about the function.
Given f(x) = x3-6x2+9x+15, the derivative is still f '(x) = 3x2-12x+9, and thus the second derivative is: f "(x) = 6x-12. Since we know that the second derivative describes concavity, instead of testing numbers on either side if our critical points, let's test the concavity at our critical points. Using x=1 with f "(x) = 6x-12, we get f "(1)=-6 and this means that the function is concave down at x=1. Using x=3 with f "(x) = 6x-12, we get f "(3)=6 and this means that the function is concave up at x=3.
You can basically look at the above picture and see where the local maximum and local minimum is. Since the function is concave down at x=1 and has a critical point at x=1 (zero slope) then the function has a local maximum at x=1. Since the function is concave up at x=3 and has a critical point at x=3 (zero slope) then the function has a local minimum at x=3. Below is the same information with a possible shape of f(x).
In summary after finding the critical points you can use any one of the three methods above to determine if they are a local maximum or a local minimum (or possible neither?). For most functions it does not matter which method you use because they will all work. When given the freedom to choose you might prefer the second derivative test because it is a little faster than the other two. Sometimes the second derivative test does not work as you had plan and you will need to go back and use one of the other two methods (first derivative test next easiest method).
To learn more about what to do if the second derivative test doesn't work as you hoped or how a critical point might not be a local maximum or a local minimum you can continue with the next lesson on Inflection Points.
Inflection Points
Inflection points are where the function changes concavity. Since concave up corresponds to a positive second derivative and concave down corresponds to a negative second derivative, then when the function changes from concave up to concave down (or vise versa) the second derivative must equal zero at that point. So the second derivative must equal zero to be an inflection point. But don't get excited yet. You have to make sure that the concavity actually changes at that point.
Example 1 with f(x) = x3
.
Let's do an example to see what really happens. Given f(x) = x3, find the inflection point(s). (Might as well find any local maximum and local minimums as well.)
Start with getting the first derivative:
f '(x) = 3x2.
Then the second derivative is:
f "(x) = 6x.
Now set the second derivative equal to zero and solve for "x" to find possible inflection points.
6x = 0
x = 0.
We can see that if there is an inflection point it has to be at x = 0. But how do we know for sure if x = 0 is an inflection point? We have to make sure that the concavity actually changes. To do this pick a number on either side of x = 0 and check what the concavity is at those locations. Let's use x = -1 and x = 1 to check. At x = -1, the second derivative gives:
f "(-1) = -6
and the function is concave down at x = -1. If we check x = 1 we get:
f "(1) = 6
which means the function is concave up at x = 1.
Thus we can see that the function has different concavities on either side of x =0 and the inflection point is at x=0. Note the inflection point is not necessarily where the function crosses the x-axis but is where the concavity actually changes.
Let's now go back and find the local maximums and local minimums of this function. Start by finding the critical points.
f '(x) = 3x2
3x2= 0
x = 0
We only have one critical point, x = 0. Is it a local max or a local min? Let's try using the second derivative test.
f "(x) = 6x
f "(0) = 6(0)
f "(0) = 0.
Well that's unfortunate because that means the function is neither concave up nor concave down. We still don't know if it is a local max or a local min. I guess we'll have to try another technique. Let's try the first derivative test.
Try using x=-1 and x=1 for numbers on either side of our critical point x=0. Plug them into the first derivative.
f '(-1) = 3(-1)2
f '(-1) = 3.
f '(1) = 3(1)2
f '(1) = 3.
Since the derivative is positive in either side of the critical point, the function is increasing on both side of the critical point and there is no local maximum or local minimum.
Example 2 with f(x) = x4
Example 2:
Let's look at f(x) = x4. Set the derivative equal to zero to find the critical point(s).
f(x) = x4
f '(x) = 4x3 = 0
x3 = 0
x = 0
The only critical point is at x = 0. Let's try using the second derivative to test the concavity to see if it is a local maximum or a local minimum.
F "(x) = 12x2
f "(0) = 12(0)2 = 0
Since the second derivative is zero, the function is neither concave up nor concave down at x = 0. It could be still be a local maximum or a local minimum and it even could be an inflection point.
Let's test to see if it is an inflection point. We need to verify that the concavity is different on either side of x = 0. Let's test x = -1 and x = 1 in the second derivative.
f "(-1) = 12(-1)2 = 12
f "(1) = 12(1)2 = 12
Since the second derivative is positive on either side of x = 0, then the concavity is up on both sides and x = 0 is not an inflection point (the concavity does not change). Well it could still be a local maximum or a local minimum so let's use the first derivative test to find out.
f '(-1) = 4(-1)3 = -4
f '(1) = 4(1)3 = 4
Since the function goes from decreasing to increasing on either side of x = 0, we can see that x = 0 is a local minimum.
Even though f(x) = x4 appears to be concave up every where, it is momentarily "flat" at x = 0 since the second derivative is zero at x = 0.