<s>[INST] Introduction of a phase term in the solution of the wave equation I would like to understand this step in the solution of the wave equation as presented here. The wave equation is formulated as
$$u_{tt}=c^2\Delta u$$
where $u$ is a function of time $t$ and space coordinates; $c^2$ is a positive constant, and $\Delta u$ the Laplacian.
Through separation of variables, the solution $u$ is hoped to be the product of a function of space $f$ and time $T,$ as in $u=Tf,$ in which case
$$T^{''}f = c^2T\Delta f,$$
implying then that the quotients below are constant:
$$\frac{T^{''}}{T}= c^2 \frac{\Delta f}{f} = -c^2 \omega^2,$$ 
leading to
$$T^{''} = -c^2 \omega^2 T$$
and
$$\Delta f = -c^2 \omega^2 f$$
From there,
$$T=A \sin(c\omega t) + B \cos(c\omega t)$$
and
$$\begin{align}
u &= \sum C f(x,y,z)\left(A \sin(c\omega t) + B \cos(c\omega t) \right)\\[3ex]
&=\sum C f(x,y,z) \sqrt{A^2+B^2}  \sin(c\omega t + \beta) \\[3ex]
&= \sum \tilde C f(x,y,z) \sin(c\omega t + \beta)
\end{align}$$
with $\beta$ coming from $\sin\beta=\frac{B}{\sqrt{A^2 + B^2}}$ and $\cos\beta= \frac{A}{\sqrt{A^2+B^2}}.$
THE QUESTION: What trigonometric identity explains the last set of equations?
 [/INST] Rewrite that expression in the following way:
$$A\sin(\omega t) + B\cos(\omega t) = \sqrt{A^2+B^2}\left(\frac{A}{\sqrt{A^2+B^2}}\sin(\omega t) + \frac{B}{\sqrt{A^2+B^2}}\cos(\omega t) \right)$$
Notice that the coefficients are not only numbers that have an absolute value less than $1$, they are also conveniently already ratios of sides of a right triangle. So define
$$\sin\beta = \frac{B}{\sqrt{A^2+B^2}} \hspace{20 pt} \cos\beta \frac{A}{\sqrt{A^2+B^2}}$$
Then we have
$$=\sqrt{A^2+B^2}\left(\sin(\omega t)\cos\beta + \cos(\omega t)\sin\beta\right) = \sqrt{A^2+B^2}\sin\left(\omega t + \beta\right)$$
by the angle addition identites. Notice that $\beta$ could have also been defined as 
$$\tan\beta = \frac{A}{B}$$
so one heuristic way of interpreting this formula is that we've turned a sum of sine and cosine into their "polar" form and we found the "magnitude" and the "angle" relative to the $x$ axis assuming sine represented the $y$ component and cosine represented the $x$.
</s>