Velocity-switched driven oscillator (source code)

= Velocity-switched driven oscillator
{title2=$\ddot x+2k\dot x+\omega^2x=a\,1_{\{\dot x>0\}}$}

This <damped harmonic oscillator> receives a constant force only while moving toward increasing $x$. For $0<k<\omega$, a positive maximum $X$ evolves without forcing to a minimum $-rX$, then with forcing to the next maximum $r^2X+(1+r)a/\omega^2$, where $r=e^{-k\pi/\sqrt{\omega^2-k^2}}$. Its unique periodic maximum is $a/[\omega^2(1-r)]$ and its period is $2\pi/\sqrt{\omega^2-k^2}$. Position and velocity are continuous at switches, but acceleration has jumps. The slope $r^2<1$ of this <turning-point return map> shows attraction of nearby turning-point amplitudes.