Factoring a polynomial with complex coefficients 
Given  $$3z^2+6z+3i=0$$ Find the complex roots and write in the form $a+bi$. 

I want to see how to factor it when there is an $i$ being multiplied by the constant.
 A: $$3z^2+6z+3i=0\Longleftrightarrow$$
$$3(z^2+2z+i)=0\Longleftrightarrow$$
$$z^2+2z+i=0\Longleftrightarrow$$
$$z=\frac{-2\pm\sqrt{2^2-4\cdot 1 \cdot i}}{2\cdot 1}\Longleftrightarrow$$
$$z=\frac{-2\pm\sqrt{4-4\cdot i}}{2}\Longleftrightarrow$$
$$z=\frac{-2\pm\sqrt{4-4i}}{2}\Longleftrightarrow$$
$$z=\frac{-2+\sqrt{4-4i}}{2}  \vee z=\frac{-2-\sqrt{4-4i}}{2}\Longleftrightarrow$$
$$z=-1+\frac{1}{2}\sqrt{4-4i}  \vee z=-1-\frac{1}{2}\sqrt{4-4i}\Longleftrightarrow$$
$$z=-1+\sqrt{1-i}  \vee z=-1-\sqrt{1-i}\Longleftrightarrow$$
$$z=-1+\frac{\sqrt{2+\sqrt{2}}}{2^{\frac{3}{4}}}-\frac{\sqrt{2-\sqrt{2}}}{2^{\frac{3}{4}}}i  \vee z=-1-\frac{\sqrt{2+\sqrt{2}}}{2^{\frac{3}{4}}}+\frac{\sqrt{2-\sqrt{2}}}{2^{\frac{3}{4}}}i $$
A: Dividing by $3$
$$z^{2}+2z+i=0$$
Completing the square
$$(z+1)^{2}=1-i$$
$$z=-1+\sqrt{1-i}$$
where $1-i=\sqrt{2}e^{-i\pi/4}=\sqrt{2}e^{i7\pi/4}$
$$\sqrt{1-i}=\sqrt[4]{2}e^{-i\pi/8}$$
$$\sqrt{1-i}=\sqrt[4]{2}e^{7i\pi/8}$$
So the solutions are
$$z=-1+\sqrt[4]{2}e^{-i\pi/8}$$
$$z=-1+\sqrt[4]{2}e^{7i\pi/8}$$
