Find the critical points, domain endpoints, and local extreme values for the function: $$\displaystyle y=\begin{cases} -x^2-4x+5 & \text{if }\;\;\; x \leq 1\\ -x^2+5x-4 & \text{if }\;\;\; x>1\\ \end{cases}$$
I found the local maximum: $(-2,9),\left(\dfrac{5}{2},\dfrac{9}{4}\right)$
I don't know how to find the local minimum for this problem. The answer for the local min is $(1,0),$ and I don't see how to get that.