Let $a$ &$ b$ be complex numbers (which may be real) and let, $Z = z^3 + (a + b + 3i) z^2 + (ab + 3 ia + 2 ib - 2) z + 2 abi -2a$
We have to find all purely imaginary numbers $a$ & $b$ when $z = 1 + i$ and $Z$ is a real number .
I tried and factorised it as
Z$=(z+b+i)(z^2+(a+2i)z+2ai)$
But now how to proceed?