Solution (source code)

= Solution

Assume $k>0$, $m>0$ and $\gamma\ge0$. The <spring constant> $k$ measures restoring <force> per displacement from the equilibrium position $x_0$. The term $-\gamma m v$ is <linear drag>, with damping rate $\gamma$ in inverse-time units. Writing $\omega_0=\sqrt{k/m}$, the equation is
$$
\ddot x+\gamma\dot x+\omega_0^2(x-x_0)=0.
$$
For small positive damping it gives <underdamped> motion: oscillations about $x_0$ with a decaying amplitude. If $\gamma=0$, the motion is undamped <simple harmonic motion>.