I'm reading a paper and there is a part looks easy but I could not figure it out. So I need help.
We want to maximize the function $$|f(z_{\theta})|^2=(17-8\cos\theta)(2-2\cos\theta)(5+4\cos\theta)$$ where $z_{\theta}=\cos\theta+i\sin\theta$
The author claims that the function is maximized for $\cos\theta=\frac{5}{8}-\frac{3}{8}\sqrt{7}.$
I have been trying differentiating the function to get a critical point, it does not seem wise to do so. I am curious, is there any smart way to justify this?
Set $\frac d{d\theta}|f(z_{\theta})|^2=0$ to get,
$$\sin\theta \ (32\cos^2\theta -40\cos\theta-19)=0$$
which yields the valid solution for the maximum value at $\cos\theta=\frac{5}{8}-\frac{3}{8}\sqrt{7}$. (Note $\sin\theta = 0$ yields the minimum.)