Solution (source code)

= Solution

Use the <Fourier transform> convention $\widetilde y(\omega)=\int_{\mathbb R}y(t)e^{-i\omega t}dt$. For a transformable response with the necessary boundary terms vanishing, <integration by parts> gives
$$
\widetilde{\dot y}=i\omega\widetilde y,\qquad\widetilde{\ddot y}=-\omega^2\widetilde y.
$$
Transforming the differential equation therefore gives $(5-\omega^2+2i\omega)\widetilde y=\widetilde f$, so
$$
\boxed{\widetilde y(\omega)=\frac{-\widetilde f(\omega)}{\omega^2-2i\omega-5}.}
$$
The identities also hold for <tempered distributions>. The denominator factors as $(\omega-i-2)(\omega-i+2)$; its two poles are in the upper half-plane, corresponding under inverse factor $e^{i\omega t}$ to the <causal Green function of a damped oscillator>.

The frequency-domain formula selects the Fourier-transformable response. Decay of the force alone would not remove arbitrary homogeneous solutions, which grow towards negative time and do not have an ordinary bilateral Fourier transform.