<s>[INST] Solve $P(z)=0$, over complex field and factorise $P(z)=0$ over real field $P(z)=3z^4+10z^3+6z^2+10z+3$
The roots are $z=-3, -1/3, i,-i$ but I couldn't find $i,-i$ as the root.
Also the factorised version is meant to be $(z+3)(3z+1)(z^2+1)$ but I got something fabulous like $z^2(z+\frac{1}{z})(3z+\frac{3}{z}-10)$
I feel like I've butchered the equation already.
 [/INST] I like to write complete solution:
\begin{align}
P(z)
&= 3z^4+10z^3+6z^2+10z+3 \\
&= 3z^4+3 + 10z^3+10z+6z^2 \\
&= 3z^2\left(z^2+\dfrac{1}{z^2}\right)+10z^2\left(z+\dfrac{1}{z}\right)+6z^2 \\
&= z^2\Big[3\left(z^2+\dfrac{1}{z^2}\right)+10\left(z+\dfrac{1}{z}\right)+6\Big] \\
&= z^2\Big[3\left(z+\dfrac{1}{z}\right)^2+10\left(z+\dfrac{1}{z}\right)\Big] \\
&= z^2\left(z+\dfrac{1}{z}\right)\Big[3\left(z+\dfrac{1}{z}\right)+10\Big] \\
&= z\left(z+\dfrac{1}{z}\right)z\Big[3\left(z+\dfrac{1}{z}\right)+10\Big] \\
&= \left(z^2+1\right)(3z^2+10z+3) \\
&= (z+i)(z-i)(3z+1)(z+3) \\
\end{align}
which gives $z=-i,i,-\dfrac13,-3$ as roots.
</s>