# Please could you explain how sin(x) + cos(x) = sqrt(2)sin(x+45)? I understand how you get sqrt(2) through sin(x)cos(45)+cos(x)sin(45). But I don’t. Understand how you end up with sin(x+45) or sin(x+π/4) depending on how you see it. Thanks a lot

May 13, 2018

$\sin x + \cos x = \sin x + \sin \left(90 - x\right)$
Use trig identity:
$\sin a + \sin b = 2 \sin \left(\frac{a + b}{2}\right) \cos \left(\frac{a - b}{2}\right)$
In this case:
$\sin \left(\frac{a + b}{2}\right) = \sin \left(45\right) = \frac{\sqrt{2}}{2}$
$\cos \left(\frac{a - b}{2}\right) = \cos \left(45 - x\right) = \sin \left(90 - \left(45 - x\right)\right) = \sin \left(x + 45\right)$
Therefor,
$\sin x + \cos x = \sqrt{2} \sin \left(x + 45\right)$

Phase shift.

#### Explanation:

The sine and cosine are two facets of the same function, and morph into each other when you apply a "phase shift": by the addition formula
sin(x+ϕ)=sin(x)cos(ϕ)+cos(x)sin(ϕ),
A shifted sine is a linear combination of a sine and a cosine. For specific values of the shift, one of the terms vanishes. For example,
sin(x+π/2)=cos(x).
Likewise, For π/4, the terms get the same amplitude,
sin(x+π/4)=1/sqrt (2)(sin(x)+cos(x)).