Relative and absolute extrema are studied and the important Extreme Value Theorem is detailed. Finding a function’s critical numbers and using the derivative of the function to understanding its behavior is the crucial step in finding relative and absolute extrema. We illustrate these ideas with several examples.

## Relative Extreme Values

If a function is defined on an open interval and if at some point in that interval the function reaches a maximum or minimum value (relative to that interval), then we say that the function has a relative extrema on that interval. A maximum or minimum value that occurs at an endpoint is not, by definition, a relative maximum nor a relative minimum. A relative maximum or relative minimum must occur in the interior of an interval. Now we define relative extrema and state the relative extrema theorem.

**Definition**. Let $f$ be a function defined on an open interval $I$ with $c\in I.$

(1) If $f(c)\geq f(x)$ for all $x$ in $I,$ then $f(c)$ is called a ** relative maximum** of $f$ on $I.$

(2) If $f(c)\leq f(x)$ for all $x$ in $I,$ then $f(c)$ is called a

**of $f$ on $I.$**

*relative minimum*(3) If $c\in I$ and $f(c)$ is either a relative maximum or a relative minimum then $f(c)$ is a relative extrema, and we say that $f(c)$ is a

**of $f.$**

*relative extreme value*A relative maximum is sometimes called a ** local maximum**. A relative minimum is sometimes called a

**.**

*local minimum*The following proposition is sometimes called Fermat’s theorem due to acknowledgment that Fermat realized the result first. The following examples show that even when $f'(c)=0$ there need not be a maximum or minimum at $c.$ In other words, the converse of Fermat‘s Theorem is false in general. Furthermore, there may be an extreme value when $f'(c)\neq 0$ or when $f'(c)$ does not exist. We state Fermat’s wonderful observation as the ** Relative Extrema Theorem**.

**Theorem**. (** Relative Extrema Theorem**) If $f$ has a relative extremum at $c$ and $f'(c)$ exists then $f'(c)=0.$

**Proof**. Since $f$ is differentiable at $c,$ $f'(c)$ must be positive, zero, or negative. If \begin{equation}f'(c)=\lim _{x\to c}\frac{f(x)-f(c)}{x-c}>0 \end{equation} then there exists an interval $(a,b)$ containing $c$ such that $$ \frac{f(x)-f(c)}{x-c}>0 $$ for all $x\neq c$ in $(a,b).$ This produces the following inequalities for $x$-values in the interval $(a,b).$ If $xc$ then $f(x)>f(c)$ and so $f(c)$ is not a relative maximum. So the assumption that $f'(c)>0$ leads to a contradiction. Assuming that $f'(c)<0$ will also lead to a similar contradiction. Thus it must be the case $f'(c)=0$ as desired.

**Example**. Determine if the Relative Extrema Theorem applies and if so find the relative extrema for the function \begin{equation} f(x)= \begin{cases}

2x-3 & x<2/3 \\ 3-7x & x\geq 2/3 \end{cases} \end{equation}

**Solution**. The function $f$ has its maximum value (local and absolute) at $x=2/3,$ but we can not find this absolute maximum by setting $f'(x)=0$ because $f’$ is not defined at $x=2/3.$ Since $f'(2/3)$ does not exist the Relative Extrema Theorem does not apply.

**Example**. Determine if the Relative Extrema Theorem applies and if so find the relative extrema for the function $h(x)=x^3+4.$

**Solution**. Since $h'(x)=3x^2$ we have $h'(0)=0.$ However, since $h$ does not have a relative extremum at $x=0$ the Relative Extrema Theorem does not hold.

## Critical Numbers

In general, the critical numbers divide the domain of a function into intervals on which the sign of the derivative remains the same, either positive or negative. Therefore, if a function is defined on that interval it is either increasing or decreasing on that interval. In particular the graph can not change directions on that interval. This is the crucial idea behind using the derivative to analyze graphs of function.

**Definition**. A real number $c$ is called a ** critical number** of the function $f$ provided:

$c$ is in the domain of $f$ and $f'(c)=0$ or

$c$ is in the domain of $f$ and $c$ is not in the domain of $f’.$

Or said differently, a critical number of a function $f$ is a real number $c$ in the domain of $f$ such that $f'(c)=0$ or $f'(c)$ does not exist.

**Theorem**. If $f$ is a continuous function and has a relative extremum at $c,$ then $c$ is a critical number of $f.$

**Example**. Find the critical numbers, if there are any, for the function \begin{equation} f(x)=|x+2|-3. \end{equation}

**Solution**. The function $f(x)=|x+2|-3$ can be rewritten as a piecewise function as \begin{equation} f(x)=\left\{\begin{array}{cc} x-1 & x\geq -2 \\ -x-5 & x<-2 \end{array}\right. \end{equation} The graph of the function $f$ has a sharp corner at $x=-2$ which can be seen by evaluating the left derivative of $f$ at $x=-2$ and the right derivative of $f$ at $x=-2.$ Therefore $f’$ is not defined at $x=-2.$ Since $f’$ is defined everywhere else and $f’$ is not 0 anywhere the only critical number is $-2.$

**Example**. Find the critical numbers, if there are any, for the function \begin{equation} g(x)=x^3+2. \end{equation}

**Solution**. The function $g$ has derivative $g'(x)=3x^2$ which is defined for all real numbers. Notice that at $x=0,$ $g'(0)=0$ and so 0 is a critical number. Also notice that $x=0$ is not a relative extrema nor an absolute extrema. In summary, critical numbers allow us to check if there are any extrema at that point, but not conversely.

**Example**. Find the critical numbers, if there are any, for the function \begin{equation} h(x)=\sin x. \end{equation}

**Solution**. The function $h(x)=\sin x$ has derivative $h'(x)=\cos x$ which is defined for all real numbers. So to check for extrema we will need to determine where $h'(x)=0.$ This occurs at $x=\frac{\pi }{2}+\pi k$ where $k$ is any integer. In fact, in this case the absolute extrema of $h$ occurs at these values.

**Example**. Find the critical numbers, if there are any, for the function $$ f(x)=x^{2/3}(1-x). $$

**Solution**. The function $f$ has derivative, \begin{equation}f'(x)=\frac{2}{3} x^{-1/3}(1-x) + x^{2/3}(-1)=\frac{2-5 x}{3 x^{1/3}}\end{equation} and so we need to check for any $x$ in the domain of $f$ such that $f'(x)=0$ or $f'(x)$ is undefined. We see that $f’$ is undefined for $x=0;$ and $f'(x)=0$ for $x=\frac{2}{5}.$ So for this function $f$ there are two critical numbers namely $x=0$ and $x=\frac{2}{5}.$

**Example**. Find the critical numbers, if there are any, for the function \begin{equation} f(x)=\sqrt{9-x^2}. \end{equation}

**Solution**. The function $f$ has derivative, \begin{equation} f'(x)=\frac{1}{2}\left(9-x^2\right)^{-1/2}(-2x)=-\frac{x}{\sqrt{9-x^2}} \end{equation} and so we need to check for any $x$ in the domain of $f$ such that $f'(x)=0$ or $f'(x)$ is undefined. We see that $f’$ is undefined for $x=\pm 3;$ and $f'(x)=0$ for $x=0.$

So there are three critical numbers of $f$ namely, $x=0$ and $x=\pm 3.$

**Example**. Find the critical numbers, if there are any, for the function \begin{equation} f(x)=\frac{x^2}{x^2-3}. \end{equation}

**Solution**. The function $f$ has derivative, \begin{equation}f'(x)=\frac{\left(x^2-3\right)2x-x^2(2x)}{\left(x^2-3\right)^2}=\frac{-6 x}{\left(-3+x^2\right)^2} \end{equation} and so we need to check for any $x$ in the domain of $f$ such that $f'(x)=0$ or if $f'(x)$ is undefined. We see that $f’$ is undefined for $x=\pm \sqrt{3};$ and $f'(x)=0$ for $x=0.$ So there are three critical numbers of $f$ namely $x=0$ and $x=\pm \sqrt{3}.$

**Example**. Find the critical numbers, if there are any, for the function \begin{equation} f(x)=\ln \sqrt{x-2}. \end{equation}

**Solution**. The function $f$ has derivative, \begin{equation} f'(x)=\frac{1}{2(-2+x)} \end{equation} and so we need to check for any $x$ in the domain of $f$ such that $f'(x)=0$ or $f'(x)$ is undefined. We see that $f’$ is undefined for $x=2;$ and there are no real numbers with $f'(x)=0.$ One might be tempted to say that there is one critical numbers of $x=2.$ However, $x=2$ is not a critical number because $x=2$ is not in the domain of $f(x)=\ln \sqrt{x-2}.$

## Absolute Extrema

Now we turn our attention to absolute extrema which take into account the whole domain of a given $f$ and not just an open interval in the domain as do relative extrema. Absolute extrema are defined and a procedure for finding absolute extrema on a given closed bounded interval is given. We give a couple of examples to illustrate this procedure.

**Definition**. Let $f$ be a function with domain $D.$

(1) If $f(c)\geq f(x)$ for all $x$ in $D,$ then $f$ has an ** absolute maximum** at $c.$

(2) If $f(c)\leq f(x)$ for all $x$ in $D,$ then $f$ has an

**at $c.$**

*absolute minimum*(3) If $f$ has either an absolute maximum or a absolute minimum at $c$, then we say $f$ has an

**at $c$, and we say that $f(c)$ is an**

*absolute extrema***.**

*extreme value*Sometimes an absolute maximum is called a ** global maximum**. Sometimes an absolute minimum is called a

**.**

*global minimum***Example**. State whether linear functions, quadratic functions, and the six trigonometric functions have absolute extrema on their domains.

**Solution**. Linear functions $f(x)=a x+b$ do not have absolute extrema on their natural domain of $\mathbb{R}$ unless in the trivial case of $a=0.$

Quadratic functions $f(x)=a x^2+b x+c$ have an absolute maximum or absolute minimum depending on the sign of $a.$ The vertex is given by \begin{equation}

\left(\frac{-b}{2 a},f\left(\frac{-b}{2a}\right)\right) \end{equation} and is always an absolute maximum (if $a>0$) or absolute minimum (if $a<0$). The trigonometric functions sine and cosine have global maximum and global minimum; and since these functions are periodic they attain these values periodically. However, the functions secant, cosecant, tangent and cotangent do not have any absolute maximum and absolute minimum values on their natural domain. The reader should verify the last statement with either a graph of each of these functions or by analyzing these four functions in terms of sine and cosine.

**Theorem**. (** Extreme Value Theorem**) If $f$ is a continuous function on a closed bounded interval $[a,b],$ then $f$ must attain an absolute maximum value $f(s)$ and an absolute minimum value $f(t)$ at some numbers $s$ and $t$ in $[a,b].$

The extreme value theorem is an existence theorem because the theorem tells of the existence of maximum and minimum values but does not show how to find it.

**Example**. State whether the function has absolute extrema on its domain \begin{equation} f(x)= \begin{cases} -x^2 & x\neq 0 \\ -1 & x=0 \end{cases} \end{equation}

**Solution**. The function $f$ does not have a global maximum since it takes on all values less than, but arbitrarily close to 0. However, it never reaches the value of $0.$ Notice that this function is not continuous on a closed bounded interval containing 0 and so the Extreme Value Theorem does not apply.

**Example**. State whether the function has absolute extrema on its domain \begin{equation} g(x)= \begin{cases} x & x> 0 \\ 3 & x\leq 0 \end{cases} \end{equation}

**Solution**. The function $g$ does not have a global minimum since it takes on all values greater than, but arbitrarily close to 0. However, it never reaches the value of $0.$ Notice that this function is not continuous on a closed bounded interval containing 0 and so the Extreme Value Theorem does not apply.

**Theorem**. Let $f$ be a continuous function whose domain contains $[a,b].$

Then to find the absolute extrema of $f$ on $[a,b]$ perform the following steps.

(1) Find all critical numbers of $f$ on $[a,b]$ and evaluate $f$ for each of these numbers.

(2) Evaluate $f$ at the boundary; that is, find $f(a)$ and $f(b).$

(3) Select the largest and smallest values those listed in (1) and (2).

(4) The largest value is the absolute maximum and the smallest value is the absolute minimum.

**Example**. Find the absolute extrema of $f(x)=x^4-4x^2+2$ on the interval $[-3,2].$

**Solution**. The function $f$ has derivative, $f'(x)=4 x^3-8 x.$ Since $f'(x)=0$ only when $x=0, \pm \sqrt{2}$ and $f’$ is defined for all $x$, the only critical numbers are $x=0, \pm \sqrt{2}.$ The following table determines the absolute extrema of the function $f.$ \begin{align*} \begin{array}{c|c|c|l} x & f(x) & f'(x) & \text{Conclusion} \\ \hline -3 & 47 & – & \text{boundary, absolute maximum} \\ -\sqrt{2} & -2 & 0 & \text{critical number, absolute minimum} \\

0 & 2 & 0 & \text{critical number} \\ \sqrt{2} & -2 & 0 & \text{critical number, absolute minimum} \\ 2 & 2 & – & \text{boundary} \end{array} \end{align*} as desired.

**Example**. Find the absolute extrema of $f(x)=x^{4/5}$ on the interval $[-32,1].$

**Solution**. The function $f$ has derivative, $f'(x)=4/(5 x^{1/5}).$ Since $f'(x)\neq0$ for every $x$ in the domain of $f$ and $f'(x)$ is undefined only when $x=0$, the only critical numbers are $x=0.$ The following table determines the absolute extrema of the function $f.$ \begin{align*} \begin{array}{c|c|c|l} x & f(x) & f'(x) & \text{Conclusion} \\ \hline -32 & 16 & – & \text{boundary, absolute maximum} \\ 0 & 0 & 0 & \text{critical number, absolute minimum} \\ 1 & 1 & – & \text{boundary} \end{array} \end{align*} as desired.

**Example**. Find the absolute extrema of $\displaystyle f(x)=\frac{x}{x+1}$ on the interval $[1,2].$

**Solution**. The function $f$ has derivative, $$f'(x)=\frac{1}{(1+x)^2} $$ and so there are no critical numbers because $x=-1$ is not in our domain of $[1,2]$ and $f’$ is defined for all $x$ in $[1,2].$ The following table determines the absolute extrema of the function $f.$ \begin{equation} \begin{array}{c|c|c|l} x & f(x) & f'(x) & \text{Conclusion} \\ \hline 1 & 1/2 & – & \text{absolute minimum} \\ 2 & 2/3 & – & \text{absolute maximum} \end{array} \end{equation} as desired.

**Example**. Find the absolute extrema of $f(x)=\sin x + \cos x$ on the interval $[0,\pi/3].$

**Solution**. The function $f$ has derivative, $f'(x)=\cos x-\sin x$ and so to find our critical number we need to solve $\sin x=\cos x$ or $\tan x=1$ which is of course $x=\frac{\pi }{4}+\pi k$ where $k$ is any integer. However, for our given domain of $[0,\pi /3]$ the only critical number is $\pi /4$. The following table determines the absolute extrema of the function $f.$ \begin{equation} \begin{array}{c|c|c|l} x & f(x) & f'(x) & \text{Conclusion} \\ \hline 0 & 1 & – & \text{boundary, absolute minimum} \\ \pi /4 & \sqrt{2} & 0 & \text{critical number, absolute maximum} \\ \pi /3 & 1 & – & \text{boundary}

\end{array} \end{equation} as desired.

## Exercises on Extreme Value Theorem

**Exercise**. Find the critical numbers of the given functions.

$(1) \quad f(x)=x^2(2x-1)^{2/3}$

$(2) \quad g(x)=\frac{x+1}{x^2+x+1}$

$(3) \quad h(x)=\sqrt[3]{x^2-x}$

**Exercise**. Find the absolute maximum and minimum values of the function $f(x)=x^2-1$ on the interval $-1\leq x\leq 2.$ Then graph the function. Identify the points on the graph where the absolute extrema occur, and include their coordinates.

**Exercise**. Find the absolute maximum and minimum values of the function $f(x)=-1/x$ on the interval $-2\leq x\leq -1.$ Then graph the function. Identify the points on the graph where the absolute extrema occur, and include their coordinates.

**Exercise**. Find the absolute maximum and minimum values of the function $f(x)=\tan x$ on the interval $\frac{-\pi }{3}\leq x\leq \frac{\pi}{4}.$ Then graph the function. Identify the points on the graph where the absolute extrema occur, and include their coordinates.

**Exercise**. Find the absolute maximum and minimum values of the function $f(x)=2-|x|$ on the interval $-1\leq x\leq 3.$ Then graph the function. Identify the points on the graph where the absolute extrema occur, and include their coordinates.

**Exercise**. Find the absolute maximum and minimum values of the function $f(x)=x e^{-x}$ on the interval $-1\leq x\leq 1.$ Then graph the function. Identify the points on the graph where the absolute extrema occur, and include their coordinates.

**Exercise**. Find the absolute maximum and minimum values of the function $f(x)=x^{4/3}$ on the interval $-1\leq x\leq 8.$ Then graph the function. Identify the points on the graph where the absolute extrema occur, and include their coordinates.

**Exercise**. Find the absolute maximum and minimum values of the function $f(x)=3 x^{2/3}$ on the interval $-27\leq x\leq 8.$ Then graph the function. Identify the points on the graph where the absolute extrema occur, and include their coordinates.

**Exercise**. Find the absolute maximum and absolute minimum values of the given function on the given interval.

$(1) \quad \displaystyle h(x)=\frac{x}{x+1}\text{ on }[1,2]$

$(2) \quad \displaystyle i(x)=\cos ^{-1}x \tan ^{-1}x\text{ on }[0,1]$

$(3) \quad \displaystyle j(x)=e^{-x}(\cos x+\sin x)\text{ on }[0,4\pi ]$

$(4) \quad \displaystyle k(x)=\sqrt[3]{x}\sqrt[3]{(x-3)^2}\text{ on }[-1,4]$

**Exercise**. Find the extreme values of the function $\displaystyle y=x^3+x^2-8x+5$ and where they occur.

**Exercise**. Find the extreme values of the function $\displaystyle y=\frac{1}{\sqrt{1-x^2}}$ and where they occur.

**Exercise**. Find the extreme values of the function $\displaystyle y=\frac{x}{x^2+1}$ and where they occur.

**Exercise**. Find the extreme values of the function $\displaystyle y=e^x-e^{-x}$ and where they occur.

**Exercise**. Find the extreme values of the function $\displaystyle y=\cos ^{-1} \left(x^2\right)$ and where they occur.

**Exercise**. Find the derivative at each critical point and determine the local extreme values for the function $\displaystyle y=x^{2/3}\left(x^2-4\right).$

**Exercise**. Find the derivative at each critical point and determine the local extreme values for the function \begin{equation}y= \begin{cases} 4-2x & x\leq 1 \\ x+1 & x>1 \end{cases} \end{equation}

**Exercise**. Find the derivative at each critical point and determine the local extreme values for the function \begin{equation}y=\begin{cases} \frac{-1}{4}x^2-\frac{1}{2}x+\frac{15}{4} & x\leq 1 \\ x^3-6x^2+8x & x>1 \end{cases} \end{equation}

**Exercise**. Let $f(x)=\left|x^3-9x\right|.$ Does $f'(0)$ exist? Does $f'(3)$ exist? Does $f'(-3)$ exist? Determine all extrema of $f.$

**Exercise**. What is the largest possible area for a right triangle whose hypotenuse is $5\text{cm}$ long?

**Exercise**. The height of a body moving vertically is given by $$ s=\frac{-1}{2}g t^2+v_0t+s_0, \qquad g>0 $$ with $s$ in meters and $t$ in seconds. Find the body’s maximum height.

**Exercise**. Show that $5$ is a critical number of the function $$ g(x)=2+(x-5)^3 $$ but $g$ does not have a relative extremum at $x=5.$

**Exercise**. Consider the cubic function $f(x)=a x^3+b x^2+c x+d$ where $a\neq 0.$ Show that $f$ can have zero, one, or two critical numbers and give examples of each.

**Exercise**. Explain why the function $$ f(x)=\frac{8}{\sin x}+\frac{27}{\cos x} $$ must attain a minimum in the open interval $\left(0,\frac{\pi }{2}\right).$