Roots and coefficients of complex quadratic equation

Given that $1+2i$ is a root of the equation $z^2+(p+5i)z+q(2-i)=0$, find the values of $p$ and $q$ and the other root of the equation.

Assuming that the roots are $\alpha+\beta = -b/a$ and $\alpha\beta =c/a$ with $\alpha = 1+2i$

Substitution gives $\beta = -p-1-7i$

Substitution of $\alpha$ and $\beta$ in the quadratic equation gives $$p(1+2i)+q(2-i)-13 = 0$$ for both roots! no simultaneous equation solution possible.

Further substitution gave me $p = \frac{11-8i}{1+2i}$ and $q = \frac{16-33i}{3}$

I have still not found the solution for $p$ and $q$ (ans $p=-1$, $q=7$, root is $-7i$)

Any help or comments appreciated.

• Hint : Seperate real and imaginary part – Peter Apr 23 '18 at 11:11

Hint: If $p$ and $q$ are both real, then one complex equation becomes two simultaneous real equations.
Substitute one of the roots to obtain $$(1+2i)^2 + (p+5i)(1+2i) + q(2-i) = 0$$ $$(-3 + 4i) + (p-10) + (5+2p)i + (2q - qi) = 0$$ $$(p+2q-13) + (2p-q+9)i = 0$$
This leads to two equations since both the real and imaginary parts have to be $0$