f(x) = x^3-ax^2-a^2x+1
f'(x) = 3x^2-2ax-a^2 = 0
(3x+a)(x-a) = 0
x = a or -a/3
f''(x) =6x-2a
f''(a) = 6a -2a = 4a > 0 ( min)
f''(-a/3) = -2a-2a = -4a < 0 ( max)
f(a) = -a^3 + 1
f(-a/3) = -a^3/27 - a^3/9 + a^3/3 +1
= 5a^3/27 +1
maxf(x) = f(-a/3) = 5a^3/27 +1
minf(x) = f(a) = -a^3 + 1