Consider the wave equation: $$\frac{\partial^2 u}{\partial t^2}=c^2\frac{\partial^2 u}{\partial x^2}.$$
The general solution is given by $$u(x,t)=f(x-ct)+g(x+ct).$$
However, separation of variables $u(x,t)=X(x)T(t)$ leads to $$ u(x,t)=\int_{-\infty}^{+\infty} \left( A_k \cos(kx)+B_k\sin(kx) \right) \left( C_k \cos(ckt)+ D_k \sin(ckt) \right) dk $$
where $A_k, B_k, C_k, D_k$ are independent of $x$ and $t$.
How are these two forms related? Is there more general context to this? How can they be transformed into another?
Using simple trigonometry you can write $$u(x,t)=\int_{-\infty}^\infty[\alpha_k\cos(kx-kct)+\beta_k\sin(kx-kct)+\gamma_k\cos(kx+kct)+\delta_k\sin(kc+kct)]dk\\=\int_{-\infty}^\infty[\alpha_k\cos(kx-kct)+\beta_k\sin(kx-kct)]dk+\int_{-\infty}^\infty[\gamma_k\cos(kx+kct)+\delta_k\sin(kc+kct)]dk$$ The first term is the Fourier representation of $f(x-ct)$ and the second term is the Fourier representation for $g(x+ct)$.