Find maximum of $f(x)=3\cos{2x}+4\sin{2x}.$ Find maximum of $f(x)=3\cos{2x}+4\sin{2x}.$ The shortest way to do this is to only consider $2x\in[0,2\pi)$, set $t=2x$ and note that


*

*Max$(\cos{t})=1$ for $t=0.$

*Max$(\sin{t})=1$ for $t=\frac{\pi}{2}.$


Max of these two functions added is when $t$ equals the angle exactly in the middle of $[0,\pi/2]$, which is $t=\pi/4.$ For this $t$ we have that $\cos{\pi/4}=\sin{\pi/4}=\sqrt{2}/2.$ So; $$f\left(\frac{\pi}{4}\right)=3\frac{\sqrt{2}}{2}+4\frac{\sqrt{2}}{2}=\frac{7\sqrt{2}}{2}.$$
Correct answer: $5$. My answer is slightly less than $5$. Why?

With $\tan t=\dfrac43$ then $\cos t=\dfrac{1}{\sqrt{1+(\dfrac43)^2}}=\dfrac35$ so
\begin{align}
3\cos{2x}+4\sin{2x}
&=3(\cos{2x}+\tan t\sin{2x})\\
&=\dfrac{3}{\cos t}(\cos t\cos{2x}+\sin t\sin{2x})\\
&=\dfrac{3}{\cos t}\cos(t-2x)\\
&=5\cos(t-2x)\\
&\leqslant5
\end{align}
