Find the maximum and minimum values of $x-\sin2x+\frac{1}{3}\sin 3x$ in $[-\pi,\pi]$.
Let $f(x)=x-\sin2x+\frac{1}{3}\sin 3x$
$f'(x)=1-2\cos2x+\cos3x$
Put $f'(x)=0$
$1-2\cos2x+\cos3x=0$ gives $2\sin^2x-\cos2x+\cos3x=0$
I am stuck here.I cannot find the critical values and the maximum and minimum values of the function.Please help me.
Hint:
$$f'(x)=1-2(2\cos^2x-1)+4\cos^3 x-3\cos x$$ $$=4\cos^3 x-4\cos^2 x-3\cos x+3$$
For $f'(x)=0$, $\cos x=1$ is a solution.