<s>[INST] Find the maximum and minimum value of $\cos^2x-6\sin(x)\cos(x)+3\sin^2x+2$ Find the maximum and minimum value of $$\cos^2x-6\sin(x)\cos(x)+3\sin^2x+2$$.
i simplified and reach to expression as follows :
$5 + 2\sin(x)[\sin(x)-3\cos(x)]$. How do i go from here?
Thanks
 [/INST] $$
\begin{align}
\frac{d}{dx} \cos^2x-6\sin(x)\cos(x)+3\sin^2x+2 &= -6 \cos(2 x) + 2 \sin(2 x)
\end{align}
$$
as a result of a simple differential calculation; now you'd like the $RHS$, namely $ -6 \cos(2 x) + 2 \sin(2 x)$, to be $0$ as to find the local minima and maxima of the function.
$$
\begin{align}
-6 \cos(2 x) + 2 \sin(2 x) &= 0 \iff \\
x &= \pi n + \arctan \big( \frac{1}{3} (-1 - \sqrt{10} \big) \bigvee \\
x &= \pi n + \arctan \big( \frac{1}{3} (-1 + \sqrt{10} \big) \\
\forall &n \in \mathbb{Z}
\end{align}
$$
From here you can find the absolute minima and maxima by several methods.
</s>