# Bound for $\left|\sin(x) +\cos(x)\right|$

I'm taking a numerical analysis class and i'm needing to bound $\left|\sin(x) + \cos(x)\right|$ quite often. So far i've been putting that this is always $\leq |1 + 1| = 2$. Is this the minimal bound? I sort of get a feeling that it might be $\sqrt{2}$. If anyone knows and could give an explanation that would be great.

• The correct way to prove it's less than 2, by the way, is $|\sin(x)+\cos(x)|\le|\sin(x)|+|\cos(x)|\le 1+1=2$, by using the triangle inequality. – user18862 Sep 9 '14 at 0:15

You can use $(a+b)^2\leq 2(a^2+b^2)$ which in this case says $$(\sin x+\cos x)^2\leq 2\implies|\sin x+\cos x|\le\sqrt{2}.$$ This bound is achieved, say, when $x=\frac{\pi}{4}$.
$$\cos x+\sin x=\sqrt2(\cos x\cos\frac\pi4+\sin x\sin\frac\pi4)=\sqrt2\cos(x-\frac\pi4)$$ so $|\cos x+\sin x|\le\sqrt2$.
More generally, the maximum value of $|a\cos x+b\sin x|$ is $\sqrt{a^2+b^2}$.