Find maximum value of $f(x)=2\cos 2x + 4 \sin x$ where $0 < x <\pi$ Find the maximum value of $f(x)$ where 
\begin{equation}
 f(x)=2\cos 2x + 4 \sin x \ \
 \text{for} \ \ 0<x<\pi
\end{equation}

$f(x)=2\cos 2x+4\sin x$
$=2(1-2\sin^2x)+4\sin x$
$=2-4\sin^2x+4\sin x$
$=2-(4\sin^2 x-2(2\sin x)+1)+1$
$=2+1-(2\sin x-1)^2\le (2+1)=3$
Equality holds iff $2\sin x-1=0\Rightarrow \sin x=1/2$
