Given:

$\displaystyle f(x)=\left\{\begin{array}{cc}-x^3+1 ,&\mbox{ if }

x\leq 0\\-x^2 +2x, & \mbox{ if } x>0\end{array}\right.$

Find the critical numbers and open intervals on which the function is increasing or decreasing.

Would I simply compute the derivative of -x^3+1 and -x^2+2x seperately and solve each down?

Can anyone offer some instruction for piecewise functions ?