I'm trying to teach myself separation of variables and have been following some notes for the wave equation, but there's one part which really confuses me and I'm not exactly sure how it makes the step.
For the wave equation
$$u_{tt} - c^2 u_{xx} = 0$$
with length $l$ and fixed ends, $u(0,t)=u(l,t)=0$ we seek a solution in the form $$u(x,t)=v(x)q(t)$$ and substituting this into the equation gives $$\frac{1}{q(t)}\frac{d^2 q}{dt^2}=c^2 \frac{1}{v(x)}\frac{d^2 v}{dx^2}=-\omega ^2$$
and I understand all of this so far. But when solving the equation $$q''+\omega ^2 q = 0$$ the general solution is $$q(t)=A \cos(\omega t +\alpha)$$ where $A$ and $\alpha$ are constants - which is the part which I'm not exactly sure on how it gets to.
Could someone explain this step to me? Thanks!