# Solving $\lvert z\rvert^2+iz+i=0$

I want to solve: $$\lvert z\rvert^2+iz+i=0$$

Let $$z=x+iy$$

$$\implies(x^2+y^2)+i(x+iy)+i=0 \\ \iff x^2+y^2-y+ix+i=0 \\$$ Comparing left and right side:$$\iff (x^2+y^2-y)+i(x+1)=0+0i$$

$$\implies x+1=0 \implies \boxed{x=-1}\\\implies((-1)^2+y^2-y=0)\iff y^2-y+1=0 \\ \implies \boxed{y_{1,2}=\frac{1}{2} \pm \frac{\sqrt3}{2}i}$$

Substituting $$x,y$$ back into $$x+iy$$, I get two complex solutions:

$$z_1=-1+i\left(\frac{1}{2} + \frac{\sqrt3}{2}i\right)=-1-\frac{\sqrt{3}}{2}+\frac{1}{2}i\\ z_2 =-1+i\left(\frac{1}{2} - \frac{\sqrt3}{2}i\right)=-1+\frac{\sqrt{3}}{2}+\frac{1}{2}i$$

However, these solutions don't seem to satisfy my equation:

$$\implies \left( \frac{-2-\sqrt{3}}{2}\right)^2+\left( \frac{1}{2}\right)^2+i\left( -1-\frac{\sqrt{3}}{2}+\frac{1}{2}i \right)+i\not=0 \\$$

What am I doing wrong here?

You forgot that $$y$$ is a real number. Therefore, the conclusion that you should have obtained is that the equation has no solutions.

• Oh....Is it always the case that z=$x+iy$ demands that $x,y \in \mathbb R$? – Nullspace Feb 2 at 9:29
• Otherwise, how do you know that $\lvert x+yi\rvert^2=x^2+y^2$? – José Carlos Santos Feb 2 at 9:31
• Ah I see! Thank you for your help! – Nullspace Feb 2 at 9:37