Solution (source code)

= Solution

The pulse height is the constant $t_0$, not the time variable. In the undamped case the <convolution> therefore reduces to
$$
x(t)=\frac{t_0}{2}\int_0^{\min(t,t_0)}\sin[2(t-\tau)]\,d\tau.
$$
Integration gives the continuous displacement and velocity
$$
\boxed{x(t)=\begin{cases}
\displaystyle\frac{t_0}{4}(1-\cos2t),&0\leq t<t_0,\\
\displaystyle\frac{t_0}{4}\left[\cos2(t-t_0)-\cos2t\right],&t\geq t_0.
\end{cases}}
$$
The post-pulse expression is equivalently $x(t)=(t_0/2)\sin t_0\sin(2t-t_0)$. Since $t_0>0$, it vanishes for every subsequent time precisely when $\sin t_0=0$. Thus
$$
\boxed{t_0=n\pi,\qquad n=1,2,3,\ldots.}
$$
These are integer multiples of the oscillator's natural period $\pi$. At such switch-off times both $x(t_0)$ and $x'(t_0)$ are zero. Vanishing displacement alone would not suffice: a nonzero switch-off velocity would restart an oscillation. This is <rectangular-pulse cancellation of an undamped oscillator>.