## Exercises - Extrema of Functions

1. Let $f(x) = e^x - x$. Determine, if they exist, the absolute maximum and the absolute minimum values of $f(x)$ on $[-1,2]$.

First we find the critical values associated with $f(x)$. That is to say, we find the values of $x$ where $f'(x) = 0$ or $f'(x)$ is undefined.

Differentiating, we find $f'(x) = e^x - 1$.

Solving $f'(x) = 0$ leads to $x=0$, which notably is in the interval $[-1,2]$. There are no values of $x$ in $[-1,2]$ where $f(x)$ is undefined.

The absolute maximum and absolute minimum must then occur at this single critical value of $x=0$ or at the endpoints of the interval, $x = -1$ or $x = 2$.

Finding the function values for each of these, we discover $f(0) = 1$, $f(-1)=\frac{1}{e} + 1$, and $f(2) = e^2 - 2$. Noting that $2 \lt e \lt 3$ tells us $f(-1)$ is somewhere between $1$ and $2$ and $e^2 - 2$ is greater than $2$. Thus, there is an absolute maximum of $e^2-2$ when $x = 2$ and an absolute minimum of $1$ when $x = 0$.

2. Let $f(x) = 2x + 3x^{2/3}$. Determine, if they exist, the absolute maximum and the absolute minimum values of $f(x)$ on $[-2,1]$. Fully justify your answer. (Fun fact: $\frac{4}{3} \lt \sqrt[3]{4} \lt \frac{5}{3}$)

First we find the critical values associated with $f(x)$ in this interval (i.e., places where the derivative is zero or undefined).

$$f'(x) = 2 + 2x^{-1/3} = 2 + \frac{2}{x^{1/3}} = \frac{2(x^{1/3} + 1)}{x^{1/3}}$$

Note that $f'(x)$ is undefined when $x=0$, and solving where $f'(x) = 0$ leads to $x=-1$. These are the critical values of $f(x)$.

To find the extreme values on $[-2,1]$, we thus evaluate $f(x)$ at these critical values and at the endpoints of the interval:

As $f(-1) = 1$, $f(0)=0$, $f(-2) = -4 + 3 \sqrt[3]{4}$, and $f(1)=5$, we see there $f$ has an absolute maximum of $5$ at $x=1$ and an absolute minimum of $0$ at $x=0$.

3. Let $f(x) = \sin^2 x + 2 \cos x$. Determine, if they exist, the absolute maximum and the absolute minimum values of $f(x)$ on $\displaystyle{\left[\frac{-\pi}{3},\frac{2\pi}{3}\right]}$.

We first find the critical values associated with $f(x)$ on the given interval (i.e., where the derivative is zero or undefined).

Differentiating, we have $f'(x) = 2\sin x \cos x - 2\sin x$. Solving where this is zero by factoring we have

$$2\sin x (\cos x - 1) = 0$$

So either $\sin x = 0$, or $\cos x - 1 = 0$, which occur at $x = \pm n\pi$ and $x = \pm 2\pi n$, for integers $n$, respectively. As the first set of $x$ values includes the second, we have as critical values integer multiples of $\pi$ in the interval. This of course consists only of $x=0$.

Note that $f'(x)$ is never undefined in the given interval (or ever).

Consequently, we evaluate the function $f$ at the one critical value we found and at the endpoints of the interval in question.

Finding $f(-\frac{\pi}{3}) = \frac{3}{4} + 2 \cdot \frac{1}{2} = \frac{7}{4}$,   $f(0) = 2$,   and   $f(\frac{2\pi}{3}) = \frac{3}{4} + 2 \cdot \frac{-1}{2} = \frac{-1}{4}$, we discover $f$ has an absolute maximum of $2$ when $x = 0$ and an absolute minimum of $-\frac{1}{4}$ when $x = \frac{2\pi}{3}$.

4. Find all points of local or absolute extrema for the following functions, if they exist.

1. $f\,(x) = 1 + \sqrt{4-x^2}$

2. $f\,(x) = 3-x^2$

3. $f\,(x) = x^{2/3}$

4. $f\,(x) = 3 - |x+1|$

1. absolute and local maximum at $(0,2)$; absolute min at $(-2,0)$ and $(2,0)$
2. absolute and local maximum at $(0,2)$; no absolute minimum
3. absolute and local minimum at $(0,0)$; no absolute maximum
4. absolute and local maximum at $(-1,3)$; no absolute minimum
5. Explain why the function defined below has no local minimum at $x = 2$.

$$f(x) = \left\{ \begin{array}{cl} \cos x + 1 & 0 \lt x \le 1\\ -3x-4 & 1 \lt x \le 2 \end{array} \right.$$

To have a local minimum at $x = c$, it must be true that in some open interval containing $c$, we have $f(x) \ge f(c)$ for all $x$ in that interval. As there is no open interval containing $2$, we can't possibly have a local minimum there. However, we do have an absolute minimum at $x=2$.