Prove: $|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$ 
$$|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$$

I have tried: $$|a\sin x+b \cos x|\leq |a+b|\leq \sqrt{a^2+b^2}$$
enough to prove: $$|a+b|\leq \sqrt{a^2+b^2}$$
But I can find how to continue from here
 A: $$|a \sin x + b \cos x|=\big|\sqrt{a^2+b^2}\left(\frac a{\sqrt{a^2+b^2}}\sin x+\frac b{\sqrt{a^2+b^2}}\cos x\right)\big|=$$
$$=\sqrt{a^2+b^2}|\left(\sin(x+\phi)\right)|\le\sqrt{a^2+b^2}$$
A: Find the extrema of
$$a\cos(x)+b\sin(x).$$
By canceling the derivative,
$$-a\sin(z)+b\cos(z)=0$$ or$$\tan(z)=\frac ba.$$
Then, with
$$\cos(z)=\pm\frac1{\sqrt{\tan^2(z)+1}}=\pm\frac a{\sqrt{a^2+b^2}},\\\sin(z)=\pm\frac{\tan(z)}{\sqrt{\tan^2(z)+1}}=\pm\frac b{\sqrt{a^2+b^2}},$$
you obtain
$$a\cos(z)+b\sin(z)=\pm\sqrt{a^2+b^2}.$$
Then for all $x$,
$$-\sqrt{a^2+b^2}\le a\cos(x)+b\sin(x)\le\sqrt{a^2+b^2}.$$
A: Use Cauchy-Schwarz inequality :
\begin{align}|a\sin x+b \cos x| = |(a,b)\cdot (\sin x,\cos x)|
&\leq \sqrt{a^2+b^2}\sqrt{\sin^2 x+\cos^2 x}=\sqrt{a^2+b^2}.\end{align}
A: If we square the inequality we get $$a^2\sin^2 x+b^2\cos^2 x+2ab\sin x\cos x\leq a^2+b^2\\2ab\sin x\cos x\leq a^2(1-\sin^2 x) +b^2(1-\cos^2 x) =a^2\cos^2x+b^2\sin ^2 x\\0\leq a^2\cos^2x-2ab\sin x \cos x+b^2\cos^2 x=(a\cos x-b\sin x) ^2$$
The last equation is always true, and we can square inequality because both sides are positive.
A: $$a\sin{x}+b\cos{x}=\sqrt{a^2+b^2}(\frac{a}{\sqrt{a^2+b^2}}\sin{x}+\frac{b}{\sqrt{a^2+b^2}}\cos{x}$$
now let $$\sin{\alpha}=\frac{b}{\sqrt{a^2+b^2}}$$ then  $$\cos{\alpha}=\frac{a}{\sqrt{a^2+b^2}}$$ thus $$a\cos{x}+b\sin{x}=\sqrt{a^2+b^2}\sin({\alpha+x})<\sqrt{a^2+b^2}$$
A: Take two vectors: $v_1 = (a,b)$ and $v_2 = (\sin x, \cos x)$. Their scalar product is $(v_1, v_2) = |v_1||v_2|cos(\phi) = a \sin x + b \cos x$ where $\phi$ is the angle between $v_1$ and $v_2$, but $|v_1| = \sqrt{a^2 + b^2}, |v_2| = 1$.
