Solution
= Solution
For the <damped harmonic oscillator>, the characteristic roots are $-k\pm i\omega$. For $\omega\ne0$, the real general solution is
$$
\boxed{y_1(t)=e^{-kt}\left(A\cos\omega t+B\sin\omega t\right)}.
$$
If the frequency parameter is zero, the characteristic root is repeated and the complete limiting basis is $e^{-kt},te^{-kt}$, so $y_1=e^{-kt}(A+Bt)$. No sign restriction on $k$ is needed for these formulas, although $k>0$ corresponds to decay.