I'm a bit confused on this question, I've had a go at it and any help would be much appreciated.
Determine all the optimal points of the following function, and indicate whether the optimal solutions are global or local:
$$f(x) = \left\{ \begin{array}{l l} x^2+1 & \quad -1 \leq x \leq 0\\ x & \quad 0 \leq x \leq 1 \end{array} \right.$$
This is what I have tried so far:
Stationary points:
$$f'(x) = \left\{ \begin{array}{l l} 2x=0 & \quad \Rightarrow x=0\\ 1=0 & \quad \Rightarrow 1 \neq 0 \end{array} \right.$$
Boundary points: $x=-1$ and $x=1$.
Non-differentiable points: $f(0) = 0$, $f(-1) = 2$, $f(1)=2$.
I have followed the technique used by my teacher but not sure where to go from here...
Many thanks in advance for any help.