Solve $z\cdot |z|-2z-i+1=0$ I have an equation with complex numbers that I can't solve
$$z\cdot |z|-2z-i+1=0$$
My problem is that $z$ appears not only as an unknown quantity but also its modulus.

Let $z=a+bi$, where $a$ and $b$ are reals. 
Thus, $$(a+bi)\sqrt{a^2+b^2}-2(a+bi)-i+1=0,$$
which gives
$$a\sqrt{a^2+b^2}=2a-1$$ and
$$b\sqrt{a^2+b^2}=2b+1$$ or
$$\sqrt{a^2+b^2}=\frac{2a-1}{a}$$ and
$$\sqrt{a^2+b^2}=\frac{2b+1}{b},$$
which gives
$$\frac{2a-1}{a}=\frac{2b+1}{b}$$ or
$$a=-b.$$
Thus, $\sqrt2a|a|=2a-1$ and the rest is smooth.
