<s>[INST] Superposition of Sine and Cosine functions I was wondering this:
Let a and b be real numbers. Is it always possible to find real numbers c, d, and e such that $$a\sin(x)+b\cos(x)=c\cos\left(\frac{x+d}e\right)$$
Why is this the case?
Thanks.
 [/INST] $$a\sin(x)+b\cos(x)=\sqrt{a^2+b^2}\left(\dfrac{a}{\sqrt{a^2+b^2}} \sin{x} + \dfrac{b}{\sqrt{a^2+b^2}} \cos{x} \right)\\
=\sqrt{a^2+b^2}\left(\sin{\varphi} \sin{x} + \cos{\varphi} \cos{x} \right)=\sqrt{a^2+b^2}\cos{(x-\varphi)},$$ where
$$\sin{\varphi} =\dfrac{a}{\sqrt{a^2+b^2}}, \\
\cos{\varphi} =\dfrac{b}{\sqrt{a^2+b^2}}.
$$
</s>