Solve the complex equation The equation is $$z^2 -4z +4+ 2i = 0$$ 
I know that i am supposed to use $$(a+bi)^2 = a^2 + 2abi + bi^2$$ to solve the equation but i am stuck on how to expand the equation.
Can you help out with which term to expand?
 A: Hint: Since $z^2-4z+4 = (z-2)^2$, we can write this equation as $(z-2)^2+2i = 0$. 
This gives you $(z-2)^2 = -2i$. Can you find the two square roots of $-2i$?
A: The quadratic rule still applies and 
$$\begin{align}
z&=\frac{4\pm\sqrt{16-4(4+i2)}}{2}\\\\
&=2\pm \sqrt{-i2}\\\\
&=2\pm \sqrt{2}e^{-i\pi/4}\\\\
&=2\pm(1-i)
\end{align}$$
The roots are 
$$\bbox[5px,border:2px solid #C0A000]{z=3-i \,\,\,\text{and}\,\,\,z=1+i}$$
A: This is equivalent to $(z-2)^{2}=-2i=2e^{\frac{i3\pi}{2}}$ so $z-2=\sqrt{2}e^{\frac{i3\pi}{4}}$ or $z-2=-\sqrt{2}e^{\frac{i3\pi}{4}}$.
A: Notice, we have $$z^2-4z+4+2i=0$$
$$(z-2)^2+2i=0$$
$$(z-2)^2=-2i\iff (z-2)^2=2i^3$$
$$z-2=\sqrt{2}i^{3/2}$$ Since, $i=\cos\frac{\pi}{2}+i\sin\frac{\pi}{2}$, hence we get $$z-2=\sqrt{2}\left(\cos\frac{\pi}{2}+i\sin\frac{\pi}{2}\right)^{3/2}=\sqrt{2}\left(\cos\left(2k\pi+\frac{\pi}{2}\right)+i\sin\left(2k\pi+\frac{\pi}{2}\right)\right)^{3/2}$$
$$=\sqrt{2}\left(\cos\left(\frac{4k\pi+\pi}{2}\right)+i\sin\left(\frac{4k\pi+\pi}{2}\right)\right)^{3/2}$$
$$z-2=\sqrt{2}\left(\cos\frac{3(4k\pi+\pi)}{4}+i\sin\frac{3(4k\pi+\pi)}{4}\right)$$
Now, setting $k=0$, we get first root as follows
$$z=\sqrt{2}\left(\cos\frac{3\pi}{4}+i\sin\frac{3\pi}{4}\right)+2$$
$$=\sqrt{2}\left(-\frac{1}{\sqrt2}+i\frac{1}{\sqrt2}\right)+2$$
$$=-1+i+2=1+i$$
$$\bbox[5px, border:2px solid #C0A000]{\color{red}{z=1+i}}$$
Now, setting $k=1$, we get second root as follows
$$z=\sqrt{2}\left(\cos\frac{15\pi}{4}+i\sin\frac{15\pi}{4}\right)+2$$
$$=\sqrt{2}\left(\frac{1}{\sqrt2}-i\frac{1}{\sqrt2}\right)+2$$
$$=1-i+2=3-i$$
$$\bbox[5px, border:2px solid #C0A000]{\color{red}{z=3-i}}$$
