Simplifying quartic complex function in terms of $\cos nx$ $$z= \cos(x)+i\sin(x)\\
3z^4 -z^3+2z^2-z+3$$
How would you simplify this in terms of $\cos(nx)$?
 A: Hint:
since $z=0$ is not a solution we can divide by $z^2$ and we have:
$$
3\left(z^2+\dfrac{1}{z^2}\right)-\left(z+\dfrac{1}{z}\right)+2=0
$$
than: $z=\cos x+i\sin x \Rightarrow z+\dfrac{1}{z}=2\cos x$ and $z^2+\dfrac{1}{z^2}=2\cos 2x$
A: Hint:
By De Moivre's formula,
$$(\cos{x}+i\sin{x})^n=\cos{nx}+i\sin{nx}$$
A: $$z= \cos(x)+i\sin(x)=e^{xi}$$
$$3z^4 -z^3+2z^2-z+3$$
So we got:
$$3(e^{xi})^4-(e^{xi})^3+2(e^{xi})^2-(e^{xi})+3=$$
$$3e^{4xi}-e^{3xi}+2e^{2xi}-e^{xi}+3=$$
$$(e^{ix}+e^{2ix}+1)(-4e^{ix}+3e^{2ix}+3)=$$
$$2e^{2ix}(2\cos(x)+1)(3\cos(x)-2)=$$
$$2e^{2ix}\left(6\cos^2(x)-\cos(x)-2\right)=$$
$$(2(\cos(2x)+\sin(2x)i))\left(6\cos^2(x)-\cos(x)-2\right)=$$
$$(2(\cos(2x)+((2(\cos\left(\frac{\pi}{2}-x\right)))\cos(x))i))\left(6\cos^2(x)-\cos(x)-2\right)=$$
$$\left(2\cos(2x)+\left(\left(2\cos\left(\frac{\pi}{2}-x\right)\right)\cos(x)\right)i\right)\left(6\cos^2(x)-\cos(x)-2\right)=$$
$$\left(2\cos(2x)+\left(2\cos(x)\cos\left(\frac{\pi}{2}-x\right)\right)i\right)\left(6\cos^2(x)-\cos(x)-2\right)=$$
$$\left(2\cos(2x)+2\cos(x)\cos\left(\frac{\pi}{2}-x\right)i\right)\left(6\cos^2(x)-\cos(x)-2\right)$$
A: I believe it will not work as you might expect (without $\sin(x)$?).
If you substitute $z$ into your polynomial and factor, the imaginary part has the form
$-s(12cs^2-s^2-12c^3+3c^2-4c+1) = -s(12c(1-c^2)
-(1-c^2)-12c^3+3c^2-4c+1)$
with $c=\cos(x),s=\sin(x)$, so it boils down to the question how you would treat that single factor $s$?
