Combining sine and cosine

Consider the graph of y=sinx+cosxy = \sin x + \cos x. Combining the two terms gives a single sine, sinx+cosx=2sin(x+π4)\sin x + \cos x = \sqrt{2}\,\sin\left(x + \dfrac{\pi}{4}\right).

This has amplitude 2\sqrt{2} and is y=sinxy = \sin x shifted left by π4\dfrac{\pi}{4}. The value stays between 2-\sqrt{2} and 2\sqrt{2}, reaching its maximum 2\sqrt{2} when x+π4=π2x + \dfrac{\pi}{4} = \dfrac{\pi}{2}, that is x=π4x = \dfrac{\pi}{4}. The upper and lower lines y=±2y = \pm\sqrt{2} show the amplitude, and the large dot marks the maximum point (π4,2)\left(\dfrac{\pi}{4}, \sqrt{2}\right).