# Maximum and Minimum Values

Now that we know how to take derivatives, we can start to learn about applications of them. One important application of derivatives is the ability to locate the maximum and minimum values of a function.

**Definition: **A function f has an absolute maximum at c if $f(c) \ge f(x)$ for all x in the domain f. A function f has an absolute minimum at c if $f(c) \le f(x)$ for all x in the domain of f. The maximum and minimum values are called extreme values.

This statement is simply saying if there exists a point c that is bigger than any other point on f(x) than it is the largest value or absolute maximum. Similarly, if there exists a point c that is smaller than any other point on f(x) than it is the smallest value or absolute minimum.

It is important to note that absolute maximums and minimums related to the whole domain of f(x). If we want to find the largest or smallest value within a certain subset of the domain, we can look at the local maximum or minimum instead.

**Definition: **A function f has a local maximum at c if $f(c) \ge f(x)$ when x is near c. A function f has a local minimum at c if $f(c) \le f(x)$ when x is near c.

We can define "x is near c" as broadly as we want. It can be a large range of values, or a small range of values, the choice is up to us, depending on what we need for the current application.

Knowing these definitions, we can now look at how derivatives help us find maximum and minimum values.

**Fermat's Theorem: **If f has a local maximum or minimum at c, and if f'(c) exists, then f'(c) = 0.

First, let's understand what this theorem really says. It says that when we are at a local maximum or minimum, the slope of the function is 0, or flat. Let's see why this is true.

First suppose that f(x) has a local maximum, and that local maximum is c. That means that by definition, $f(c) \ge f(x)$, when x is near c. We can also phrase this as: $f(c) \ge f(c + h)$ as h approaches 0.

We will next rearrange this inequality so that we can get the derivative definition out of it.

$f(c) \ge f(c + h)$

$\Longrightarrow f(c+h) - f(c) \le 0$

$\Longrightarrow lim_{h \to 0} \frac{f(c+h) - f(c)}{h} \le 0$

So far, this tells us that the derivative must be less than or equal to 0. Knowing this, let's assume f now has a local minimum, and that local minimum is c. We can once again derive the limit definition of the derivative, and arrive at the following result:

$f(c) \le f(c + h)$

$\Longrightarrow f(c+h) - f(c) \ge 0$

$\Longrightarrow lim_{h \to 0} \frac{f(c+h) - f(c)}{h} \ge 0$

This means that the limit is less than or equal to zero, and greater than or equal to zero. The only way this can be true is if $lim_{h \to 0} \frac{f(c+h) - f(c)}{h} = 0$, which proves the derivative is 0.

Now, it isn't quite as simple as just finding where the derivative is zero and concluding it is a maximum or minimum value. We need to analyze the function a little more closely than this. To determine where maximum and minimum values exist, we utilize the closed interval method.

**The
Closed Interval Method: **To find an absolute maximum and minimum value of a function f on a
closed interval [a,b]:

- Find the values where f'(x) = 0 on the interval (a,b)
- Find the values of f at f(a) and f(b)
- The largest and smallest values out of steps 1 and 2 are the maximum and minimum values on the interval

Let's see how this works with an example.

**Example: **Find the maximum and minimum values of f(x) where $f(x) = x^3 - 4x^2$ on the interval $ -1 \le x \le 3$

Our first step is to calculate the derivative of f(x).

$f'(x) = 3x^2-8x$

This function is equal to zero at two points, x = 0 and x = $\frac{8}{3}$. Once we know this, we can evalulate the function at these points.

$f(0) = 0$

$f(\frac{8}{3}) = \frac{-256}{27}$

Next, we evaluate the function at the endpoints, x = -1 and x = 3.

$f(-1) = -5$

$f(3) = 9$

Now, we find the largest and smallest values out of the ones we evaluated. We see there is a minimum value at $x = \frac{8}{3}$ and $x = 3$.

This shows that we can effectively determine maximum and minimum values by finding the zeros of derivatives.