# Video: Finding the Absolute Maximum and Minimum Values of a Piecewise Function in a Given Interval

Find the absolute maximum and minimum values of the function 𝑓(𝑥) = 𝑥³ + 3𝑥² if 𝑥 ≤ 0, 𝑓(𝑥) = 𝑥² − 6𝑥 if 𝑥 > 0 in the interval [−5, 13].

03:24

### Video Transcript

Find the absolute maximum and minimum values of the function 𝑓 of 𝑥 equals 𝑥 cubed plus three 𝑥 squared if 𝑥 is less than or equal to zero, 𝑥 squared minus six 𝑥 if 𝑥 is greater than zero in the closed interval negative 5 to 13.

To find the absolute maximum and minimum values of a function, we need to consider a number of things. But firstly, we’ll look for critical points of the function. These are points where our first derivative is equal to zero. They can indicate relative maxima and relative minima. If we’re looking for absolute extremer, we also need to consider the endpoints of our function. So, what we’ll do is begin by differentiating our function with respect to 𝑥.

Now, of course, our function is piecewise. So, we’re going to do this for both parts. Let’s begin by differentiating 𝑥 cubed plus three 𝑥 squared with respect to 𝑥. The derivative of 𝑥 cubed is three 𝑥 squared. And then, when we differentiate three 𝑥 squared, we multiply the entire term by the exponent and reduce the exponent by one. So, we get two times three 𝑥, which is six 𝑥. And so, when 𝑥 is less than or equal to zero, the derivative is three 𝑥 squared plus six 𝑥.

We’ll now differentiate 𝑥 squared minus six 𝑥 with respect to 𝑥. The derivative of 𝑥 squared is two 𝑥 and the derivative of negative six 𝑥 is negative six. And so, we found the first derivative. We’re now going to set each part of this function equal to zero and solve for 𝑥. Let’s set three 𝑥 squared plus six 𝑥 equal to zero. We’re going to factor that expression on the left-hand side. But when we do, we see that three 𝑥 times 𝑥 plus two is equal to zero. Now, of course, for this statement to be true, either three 𝑥 is equal to zero, which means 𝑥 must itself be equal to zero or 𝑥 plus two must be equal to zero, which means 𝑥 itself must be negative two.

Let’s set the other part of our derivative equal to zero. That’s two 𝑥 minus six equals zero. This time, we solve by adding six to both sides. And then, we divide through by two. And we find that 𝑥 equals three is the location of the third critical point. To establish the absolute minimum and maximum values of our function. We’re going to work out the value of the function at each of the three critical points and at the two endpoints. So, we have critical points 𝑥 equals zero, negative two, and three and the endpoints of our intervals are 𝑥 equals negative five and 𝑥 equals 13.

We will need to be a little bit careful which part of the function we use. Remember, it’s a piecewise function. So, it has a different function depending on the value of 𝑥. When 𝑥 is equal to zero, the function we use is 𝑥 cubed plus three 𝑥 squared. 𝑓 of zero is, therefore, zero cubed plus three times zero squared, which is zero. Well, similarly, when 𝑥 is less than zero, we use that same function. Here, 𝑥 is equal to negative two. So, we get negative two cubed plus three times negative two squared, which is equal to four. At our third critical point, 𝑥 is equal to three. That’s greater than zero. So, we use the second part of our piecewise function. We get three squared minus six times three, which is negative nine.

We go back to the first function, where 𝑥 is equal to negative five. And we substitute that into 𝑥 cubed plus three 𝑥 squared and we find that 𝑓 of negative five is negative 50. Our final value to check is 𝑥 equals 13. Again, that’s greater than zero. So, we substitute that into 𝑥 squared minus six 𝑥. And that gives us 91.

We said that the absolute maximum and minimum values of the function will either occur at the critical points or at the endpoints. Well, here, we see that the absolute minimum value is negative 50. That occurs when 𝑥 is equal to negative five, whereas the absolute maximum is 91.

The absolute minimum value is negative 50 and the absolute maximum value of our function is 91.