Solving equation with Complex Numbers and two unknowns. I have the following track:
If $z=a+bi$, with the imaginary number $i$, solve the following equation
    $$z^2+|z|^2-18=0$$
Well, first of all I replaced $z$ with $a+bi$ and then $|a+bi|^2$ with $(a^2+b^2)$.
After, I got $a$ as a function of $b$, but in this case I have two unknowns.
Any suggestion?

After substitution you can solve the first square to obtain:
$$a^2-b^2+2abi+a^2+b^2=18;$$
in other words: $2a^2+2abi=18$. Now $18$ is real, this mean: $a=0$ or $b=0$. If $a=0$ then $0=18$ which is false, so $b=0$; then $2a^2=18$, so the solutions are $a=\pm 3$.
