<s>[INST] Minimizing trigonometric expression How can one get the minimum of a trigonometric expression if the first-order derivative is not in a nice form?
The expression is this:
$$
\left[\cos ^{2}\left(\dfrac{\theta }{2}\right) +
\,\sqrt{\,{1 - \gamma}\,}\,\sin^{2}\left(\dfrac{\theta }{2}\right)\right] ^{2} + \dfrac{\gamma }{4}\,\sin^{2}\left(\theta\right)\quad
\mbox{where}\quad 0 \le \gamma \le 1.
$$
I have tried to solve this but I reach a term which is not easily solvable.
 [/INST] Note $$\cos^2 \frac{\theta}{2} = \frac{1 + \cos \theta}{2}, \quad \sin^2 \frac{\theta}{2} = \frac{1 - \cos \theta}{2},$$ and $$\sin^2 \theta = 1 - \cos^2 \theta.$$ So if we let $x = \cos \theta$, we get the function $$\begin{align}f(x) &= \left( \frac{1 + x}{2} + \sqrt{1-\gamma} \frac{1 - x}{2} \right)^2 + \frac{\gamma}{4} (1 - x^2) \\
&= ax^2 + bx + c,
\end{align}$$ where $$\begin{align} a &= \frac{1 - \gamma - \sqrt{1-\gamma}}{2}, \\ b &= \frac{\gamma}{2}, \\ c &= \frac{1 + \sqrt{1-\gamma}}{2}. \end{align}$$  Now compute the critical point(s) of $f$ with respect to $x$ and consider where these have absolute value less than or equal to $1$, since we require $|x| = |\cos \theta| \le 1$.
</s>