(a) find the critical numbers of $f$ (if any), (b) find the open interval(s) on which the function is increasing or decreasing, (c) apply the First Derivative Test to identify all relative extrema, and (d) use a graphing utility to confirm your results.
$$f(x)=\left\{\begin{array}{ll}
-x^{3}+1, & x \leq 0 \\
-x^{2}+2 x, & x>0
\end{array}\right.$$