I tried by solving $f'(x)=0$ and then plugging those values in the initial function. I also noticed that $f(x)=\sin x+\sin\left(x+\frac{\pi}{2}\right)-2\sin x\sin \left(x+\frac{\pi }{2} \right)$. Perhaps there’s a more efficient way to find local extrema than looking for critical points?
HINT
To begin with, I would start with rearranging the proposed expression as follows:
\begin{align*} \sin(x) + (1 - 2\sin(x))\cos(x) & = \sin(x) + \cos(x) - 2\sin(x)\cos(x)\\\\ & = \sin(x) + \cos(x) - (1 + 2\sin(x)\cos(x)) + 1\\\\ & = \sin(x) + \cos(x) - (\sin(x) + \cos(x))^{2} + 1 \end{align*}
Now you can make the substitution $u = \sin(x) + \cos(x)$.
Can you take it from here?
I fully approve the expression of @APCorreia till
$$(\sin(x) + \cos(x)) - (\sin(x) + \cos(x))^{2} + 1$$
but I wouldn't advise to make the suggested substitution.
I think preferable to write the above expression under the form
$$f(x)=\tfrac54-((\cos x + \sin x)-\tfrac12)^2$$
$$f(x)=\tfrac54-(\sqrt{2}\cos(x-\tfrac{\pi}{4})-\tfrac12)^2$$
which is easy to differentiate
$$f'(x)=2(\sqrt{2}\cos(x-\tfrac{\pi}{4})-\tfrac12)\sqrt{2}\sin(x-\tfrac{\pi}{4})$$
Let $a=\operatorname{acos}\dfrac{\sqrt{2}}{4}.$
The derivative is zero for values:
$$x=\pi/4+a;x=\pi/4-a;x=\pi/4;x=5\pi/4;x=-3\pi/4$$
(red points on the graphic below). It remains to discuss the sign of $f'$ on an interval with length $2 \pi$, due to the periodicity of $f$.
-
$\begingroup$ Strange that you haven't commented this solution. It's usual on this site that all people contributing in a significant way to answer a question get at least a little comment. $\endgroup$ – Jean Marie Apr 12 at 10:02
\left(...\right)
when you need the parentheses to grow as necessary (for example. when they contain fractions or other other tall expressions). Otherwise, it's enough to use(...)
. For example,$f'(x)=0$
, not${f}'\left( x \right)=0$
. $\endgroup$ – Théophile Apr 7 at 22:14