Solution (source code)

= Solution

The <step response of a damped oscillator> is the time integral of its <causal Green function of a damped oscillator>. Put $s=t-b$ and define $K(s)=\int_0^s e^{-ku}\sin(\omega u)/\omega\,du$ for $s\geq0$. Then $K(0)=K'(0)=0$ and its oscillator equation has constant right side $1$. Integrating explicitly gives
$$
\boxed{y_3(t,b)=\frac{H(t-b)}{k^2+\omega^2}\left\{1-e^{-k(t-b)}\left[\cos\omega(t-b)+\frac k\omega\sin\omega(t-b)\right]\right\}}.
$$
This formula applies when $\omega\ne0$. It is a <convolution> of the causal impulse response with the shifted <Heaviside step function>, so the response is zero before the forcing starts and has the stated zero initial data.

The integral definition also handles the degenerate parameters without division ambiguities. For $\omega=0,k\ne0$,
$$
y_3=H(s)\frac{1-e^{-ks}(1+ks)}{k^2};
$$
for $\omega=k=0$, $y_3=H(s)s^2/2$. These are the continuous zero-frequency limits of the step response.