find the minimum and maximum value of a function y=x^3 -3x^2 +6