1The general solution changes depending on if the forcing function is \(\sin \) or \(\cos \). But the particular solution is the same.



ODE solution




\(m\ddot{x}+kx=F_{0}\cos \omega t\) \(x\left ( t\right ) =\left ( x_{0}-\frac{x_{st}}{1-r^{2}}\right ) \cos \omega _{n}t+\frac{\dot{x}_{0}}{\omega _{n}}\sin \omega _{n}t+\frac{x_{st}}{1-r^{2}}\cos \omega t\)


\(m\ddot{x}+kx=F_{0}\sin \omega t\) \(x\left ( t\right ) =x_{0}\cos \omega _{n}t+\left ( \frac{\dot{x}_{0}}{\omega _{n}}-\frac{r}{1-r^{2}}x_{st}\right ) \sin \omega _{n}t+\frac{x_{st}}{1-r^{2}}\sin \omega t\)