Determine the maximum Problem: Determine $$\max_{z \in \mathbb{C}, |z|=1} |z^3-z+2|$$
Solution: We have $z = \cos t + i \sin t$, and replacing, we get: $$E=|{{z}^{3}}-z+2|=\sqrt{2\left| 1- \cos 2x+2\cos 3x-2\cos x \right|}.$$
Replacing the formula $\cos 2x, \cos 3x$ with the $\cos x$, and denoting $\cos x=t$, we get 
$$E=\sqrt{4\left| 4{{t}^{3}}+{{t}^{2}}-2t+1 \right|},t\in \left[ -1,1 \right].$$ 
Denoting $f(t)=4{{t}^{3}}+{{t}^{2}}-2t+1$, the maximum on $\left[ -1,1 \right]$ yields
$$\max \left\{ f\left( -\frac{1}{2} \right),f(1) \right\} =\max \left\{ \frac{7}{4},4 \right\}=4.$$
Am I right?

After
$E^2 = 4\cos(3x)-2\cos(2x)-4\cos x+6$
reducing to $\cos x$ we have
$$
E^2 = 16\cos^3 x-4\cos^2x-16\cos x+8
$$
and now calling $y = \cos x$ the problem becomes
$$
\max_{y\in [-1,1]}\sqrt{16 y^3-4 y^2-16 y+8}
$$
