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?

As John Molokach commented, expand the expression to get $$2 a^2+2 i a b-18=0$$ Comparing the real and imaginary parts, you then have $$2a^2-18=0$$ $$2ab=0$$ The first equation gives $a=\pm3$ and the second $b=0$.
