What is the maximal value of $2 \sin x - 7 \cos x$? What is the maximal value of $2 \sin x - 7 \cos x$?
How do I calculate this? Do I have to write out the $\sin$ and the $\cos$?
 A: Hint: one can use formula
$$\sin x \cos y- \cos x \sin y = \sin(x-y),$$
and use such 'tricky' $y_0$, that
$$
\sin y_0 = \dfrac{7}{?}, \;\cos y_0 = \dfrac{2}{?}.
$$

 Let $y_0$ is such that $\sin y_0 = \dfrac{7}{\sqrt{7^2+2^2}} = \dfrac{7}{\sqrt{53}}$, and $\cos y_0 = \dfrac{2}{\sqrt{53}}$, namely $y_0 = \arcsin(7/\sqrt{53})$. 

Then $2\sin x - 7\cos x =\sqrt{53}\left(\dfrac{2}{\sqrt{53}}\sin x - \dfrac{7}{\sqrt{53}}\cos x\right)
 = \sqrt{53}\sin(x-y_0)$.
A: By the Cauchy-Schwarz inequality
$$ \left|2\sin(x)-7\cos(x)\right|\leq \sqrt{(2^2+7^2)(\sin^2(x)+\cos^2(x))}=\sqrt{53} $$
and equality is achieved when $\left(\sin(x),\cos(x)\right)=\lambda\left(2,-7\right)$.
A: $$\sqrt{2^2+(-7)^2}=\sqrt{53}$$
A: Let us first develope a general methodology by considering the general identity: 
$$\ \tag{1} f(x)=A \cos(x) + B \sin(x)=C\left(\dfrac{A}{C}\cos(x) + \dfrac{B}{C} \sin(x)\right)$$
with $C:=\sqrt{A^2+B^2}$. 
As $\left(\dfrac{A}{C}\right)^2 + \left(\dfrac{B}{C}\right)^2=1$, point $\left(\dfrac{A}{C},\dfrac{B}{C}\right)$ is on the unit circle.
Thus, there exist an $x_0$ such that 
$$\ \tag{2} \cos(x_0)=\dfrac{A}{C} \ \ and \ \ \sin(x_0)=\dfrac{B}{C}$$
Remark : $\tan(x_0)=\dfrac{B}{A}$ (unless $A=0$).
Plugging (2) into (1) gives $f(x) = C cos(x-x_0)$
which is thus maximal for $x=x_0$ with maximal value $C$.
With the numerical values at hand, using remark above, the maximum occurs for $x=x_0=$atan$\left( \dfrac{-7}{2}\right)\approx -1.2925...$ and its value is 

$$\sqrt{53}\approx7.2801...$$ 

as can be seen on figure below.

