I recently asked a question similar to this, but that question only wanted a local maximum. Now I have one asking for values to get a certain max AND min.

Problem:Find values of a, b, and c so that the function $\displaystyle f(x) = 2x^3 + ax^2 + bx + c$ has a local maximum at the point (-2, 22) and a local minimum at the point ( 1, -5).

So far, I've taken the derivative, which is $\displaystyle 6x^2 + 2ax + b$, then I solved for b, which is $\displaystyle b = -x(6x + 2a)$. I then set b to 0 and solved for x, getting x = 0 and $\displaystyle x = \frac{-2a}{6}$.

Then, plugging in -2 for x, I got a = 6.

I don't think what I'm doing is right. How do I solve this taking into account both a max AND a min?

Could you please show your steps and explain a little about what you do and why? Thank you SO much! I'm really struggling with these problems.