Let f be the function given by f(x)= (x^3)-(6x^2)+p, where p is an arbitrayry constant.

a)Write an expression for f'(x) and use it to find the relative maximum and minimum values of f in terms of p. Show the analysis that leads to your conclusion.

b)For what values of the constant p does f have 3 distinct roots?

c)Find the value of p such that the average value of f over the closed interval [-1,2] is 1.

For a), I found the derivative, which is f'(x)=(3x^2)-12x. I set that equal to 0, which gives me x=0,4. I put these values back into the original equation and got f(0)=o and f(4)=-32. In terms of p, I got 0=p and 32=p. Is this right?

I have no clue how to do b). I kind of know how to do c) but I would appreciate some help with it. Thanks a lot.