In Exercises $15-20,$ sketch the graph of each function and determine
whether the function has any absolute extreme values on its domain.
Explain how your answer is consistent with Theorem $1 .$
$$
f(x)=\left\{\begin{array}{ll}{x+1,} & {-1 \leq x<0} \\ {\cos x,} & {0 < x \leq \frac{\pi}{2}}\end{array}\right.
$$