The polynomials f
x and g
x are defined by
f
x = x
3 + ax2 + b and g
x = x
3 + bx2 − a,
where a and b are constants. It is given that
x + 2 is a factor of f
x. It is also given that, when g
x
is divided by
x + 1, the remainder is −18.
(i) Find the values of a and b. [5]
(ii) When a and b have these values, find the greatest possible value of g
x − f
x as x varies.