<s>[INST] Analyzing a function I am having a problem with the following function:
$f(x)=\sin^2(x)-\cos(3x)$
I need to examine the sign of $f'(x)$
I noticed that f is $2\pi$-periodic, therefore we need to analyze f(x) on $[0;2\pi]$
In addition to that $f(x)=-4\cos^3(x)-\cos^2(x)+3\cos(x)+1$
Hence $\forall x \in ]0;2\pi[, f'(x)=(-12\cos^2(x)-2\cos(x)+3)(-\sin(x))$
Let us solve $f'(x)=0$
We have $\forall x \in ]0;2\pi[ -\sin(x)=0 \Leftrightarrow x=\pi$
For the second equation, I know that there are two solution on $]0;2\pi[$ (since I visualized it on the graph), but I am unable to determine them by calculuation.
Please help.
Thank you in advance
 [/INST] $$
\begin{align}
f'(x)&=2 \cos x\sin x +3 \sin (3x) = 2 \cos x \sin x +3 (3 \sin x - 4 \sin^3 x) \\
&= \sin x \left( 2 \cos x + 9 -12 \sin^2 x \right) = \sin x \left( 2 \cos x + 9 -12 (1-\cos^2 x) \right)
\end{align}
$$
so that you have $\sin x=0$ and $12 \cos^2 +2 \cos x -3=0$.
</s>