Critical Numbers And Extreme Values Of A Piecewise Function? Please determine the critical numbers and extreme values of the :
$$
f(x) =
\begin{cases}
2-2x-x^2, &amp; -2\le x \le 0 \\
|x-2|, &amp; 0&lt;x&lt;3 \\
\frac {1}{3}(x-2)^3, &amp; 3\le x \le 4
\end{cases}
$$
I even know that the derivative of $f(x)$ is$$ f(x) =
\begin{cases}
-2-2x, &amp; -2\le x &lt; 0 \\
\frac {x-2}{|x-2|}, &amp; 0&lt;x&lt;3 \\
(x-2)^2, &amp; 3&lt; x \le 4
\end{cases}
$$
I think $x=0$ is the only critical number!

Thanks in advance!
Hint:

First notice that the function is continuous except at $x=3$.

Notice that the derivative vanishes at $x=-1$, that the left derivative does not equal the right derivative at $x=0$ and $x=2$, and since the function is not continuous at $x=3$, the derivative cannot exist there.

Further Hint:

Now, simply look at the function between these points:

a) at $x=-1$, there is a local maximum: $f(-2)=2$, $f(-1)=3$, and $f(0)=2$.

b) at $x=0$, the left derivative is $-2$ and the right derivative is $-1$.

c) at $x=2$, the left derivative is $-1$ and the right derivative is $+1$.

d) at $x=3$, the function jumps from $1$ to $\frac13$.



You should consider

$f(-2)=2\qquad$endpoint
$\color{#C00000}{f(-1)=3}\qquad$derivative is $0$
$\color{#C00000}{f(2)=0}\ \ \ \qquad$left derivative has different sign than right derivative
$f(3-)=1\qquad$left side of jump discontinuity
$f(3)=\frac13\ \,\qquad$right side of jump discontinuity
$f(4)=\frac83\ \,\qquad$endpoint

$\hspace{3cm}$
It seems like there is a relative minimum from the right of x=3.  From the left, the function isn't defined at x=3, so we can't have a relative maximum.