Back to 34A

Back to 34B

Max and Min's

 

 

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

Note: the section on inflection points is usually covered in Math 34B but some teachers will cover it in Math 34A.

Back to 34A

Back to 34B