I'm trying to solve this problem, but I don't understand how the z can be a solution to the equation when it already is an input.
Let z = a + ib be a complex number. Find real numbers p and q such that z is a solution of $$z^2 + pz + q = 0$$
I have tried to use the quadratic formula, but that does not lead me anywhere since p and q is yet defined.
There second part of the problem asks for
Find all complex numbers w such that w and i are solutions of a polynomial $$z^2 + pz + q$$ with p and q real.
Is it correct to let $w = z_1$ and $i = z_2$ from the quadratic formula?
For the first part, note that when there is a complex root, its complex conjugate is also a root. Then, if $z=a+ib$, then its complex conjugate will be $\bar{z}=a-ib$ and they will be solutions for the equation $z^2 + pz + q = 0$. Then, you can use Vietta's Formulas as in usual quadratics to determine them.
For the second part, since it demands that $w$ and $i$ are solutions of the quadratic polynomial, recall that you can write it as in a factorized way :
$$z^2 + pz + q = (z-i)(z-w)$$
You can figure out $w$ from the expression above, when $p,q \in \mathbb R$.