Solve $z^2+|z|=0$

Solve for $z$: $$z^2+|z|=0$$ I found this question on my textbook but I unable to derive an answer to it as a modulus of $z$ is present. I am unable to take an approach please guide me ..thanks


Let $z=re^{i\theta}$. Then the equation becomes $$r^2e^{2i\theta}+r=0$$ So either $r=0$ or $re^{2i\theta}=-1$. $$re^{2i\theta}=-1\Leftrightarrow r=1 \text{ and } 2\theta=\pi+2n\pi.$$ Plug in we get $z=0$ or $z=i,-i$.


Let $z=re^{i\theta}$ then $r^2e^{i2\theta}=-r$ or $re^{i2\theta}=-1$ or $r=-e^{-i2\theta}$ then $r=1$ and $e^{-i2\theta}=-1$ this concludes $\cos2\theta-i\sin2\theta=-1$ that is $$\cos2\theta=-1\,\,\,,\,\,\,\sin2\theta=0$$ thus $2\theta=k\pi$ and $2\theta=2k'\pi+\pi$. you can find $\theta$.


put:$z=x+iy$ $$z^2=(x+iy)^2=x^2+i^2y^2+i(2xy)=(x^2-y^2)+i(2xy)\\|z|=\sqrt{x^2+y^2}\\\to z^2+|z|=0\\(x^2-y^2)+i(2xy)+\sqrt{x^2+y^2}=0$$It is better to say $$(x^2-y^2)+i(2xy)+\sqrt{x^2+y^2}=\color{red} {0+0i} \to \begin{cases}(1) \space 2xy=0\\(2) \space (x^2-y^2)+\sqrt{x^2+y^2}= 0\end{cases}\\(1) x=0 \to (2)\space 0-y^2+\sqrt{0+y^2}=0 \to -y^2+|y|=0 \to y=0,1,-1$$ $$(1) \space y=0 \to (2) \space x^2-0+\sqrt{x^2+0}=0 \to \\x^2+|x|=0 \to x=0$$ so finally $$(x,y)=(0,0),(0,1),(0,-1)\\z=0+0i \\z=0+i\\z=0-i$$