The solution to a damped oscillator with a periodic driving force is derived.

In a different node we examined a damped harmonic oscillator (damped-harmonic-oscillator), here we look at what happens when we drive the damped oscillator with a sinusoid force. The equation of motion for the system is becomes \begin{equation*} \ddot{x} + \gamma \dot{x} + \omega_0^2 x = f_0\cos(\omega_f t), \end{equation*} where \(\omega_f\) is the driving angular frequency, \(\omega_0\) is the angular frequency of the undamped oscillator by itself, and \(\gamma\) is the viscous damping rate.

Formally, the general solution to this type of equation is the sum of two terms, \(x(t) = x_c(t) + x_p(t)\). The first term, \(x_c(t)\) is the general solution of the homogeneous equation (where \(f_0=0\)), also know as the complementary equation, and for which we already know the solution! That is, \begin{equation*} x_c(t) = A e^{-\frac{\gamma}{2} t} \cos(\omega_d t+\phi) \end{equation*} where \(\omega_d = \sqrt{\omega_0^2-\gamma^2/4}\).

We will again focus exclusively on the under-damped case. The second term, \(x_p(t)\), is any solution to the full equation, and is called the *particular solution*.
There are several methods to find the particular solution to a linear differential equations but none of them guarantee success. In our case, it is easily found by the method of undetermined coefficients — which, really, is just an educated guess. We look at the form of the inhomogeneity and use it to guess the possible forms in the solution, multiplying each one by a coefficient to be determined later. Since the the RHS of the equation has a \(\cos( \cdot)\) term and we are differentiating on the LHS, a good guess for the solution would be one containing \(\cos(\cdot)\) and \(\sin(\cdot)\) terms, since up to signs, differentiation turns \(\cos(\cdot)\) into \(\sin(\cdot)\) and vice versa. We postulate then
\begin{equation*}
x_p(t) = A \cos(\omega_f t) + B \sin(\omega_f t).
\end{equation*}

Now throw this into the LHS of the equation and we get: \begin{equation*} A \omega_0^2 \cos(\omega_f t)-A \omega_f^2 \cos(\omega_f t)+ B \omega_0^2 \sin(\omega_f t)-B \omega_f^2 \sin(\omega_f t) -A \gamma \omega_f \sin(\omega_f t)+B \gamma \omega_f \cos(\omega_f t) \end{equation*} Comparing terms with those on the RHS we see \begin{gather*} -A\gamma \omega_f+B(\omega_0^2-\omega_f^2) = 0 \\ B\gamma \omega_f+A(\omega_0^2-\omega_f^2) = f_0 \end{gather*} We have two unknowns and two equations so we can solve for the coefficients \(A\) and \(B\): \begin{equation*} A = \frac{f_0(\omega_0^2-\omega_f^2)}{\gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2} \qquad B = \frac{\gamma f_0\omega_f}{\gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2} \end{equation*} So now we know our guess works, provided we choose the coefficients as above. i.e. \begin{equation}\label{eq:xpalmost} x_p(t) = \frac{f_0}{\gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2} \left[(\omega_0^2-\omega_f^2)\cos(\omega_f t) + \gamma \omega_f\cos(\omega_f t - \pi/2)\right] \end{equation} where we have used \(\sin(\theta)=\cos(\theta-\pi/2)\) in the last expression. We can simplify this expression further by considering the last two terms as the \(x\)-components of a vector \(\mathbf{a}\) with magnitude \(\omega_0^2-\omega_f^2\), and a vector \(\mathbf{b}\) with magnitude \(\gamma\omega_f\). Referring to the diagram below, it's immediately clear that the sum can be thought of as the \(x\)-components of the resulting vector \(\mathbf{R}\) so that \begin{equation*} R^2 = a^2 + b^2 = \gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2 \end{equation*} and \begin{equation*} \phi_p = \tan^{-1}\left(\frac{-\gamma\omega_f}{\omega_0^2-\omega_f^2}\right). \end{equation*}

Combining with the factor at the beginning of \eqref{eq:xpalmost} we finally get the particular solution in a nice form: \begin{align*} x_p(t) &= A_p\cos(\omega_f t + \phi_p) \\ A_p &= \frac{f_0}{\sqrt{(\omega_0^2-\omega_f^2)^2+\gamma^2\omega_f^2}} \\ \phi_p &= \tan^{-1}\left(\frac{-\gamma\omega_f}{\omega_0^2-\omega_f^2}\right). \end{align*}

Summarising, the full solution is
\begin{equation*}
x(t) = x_c(t) + x_p(t) = A e^{-\frac{\gamma}{2} t} \cos(\omega_d t+\phi) + A_p\cos(\omega_f t + \phi_p).
\end{equation*}
We can see that this solution will have two regimes — a short time solution called the *transient* regime where both terms interact, and a long time solution called the *steady state* regime which is dominated by \(x_p(t)\).

On short timescales the solution is a combination of the damped solution and of the driving term and can get quite complicated, for example exhibiting beats if the damped frequency \(\omega_d\) is close to the driving frequency \(\omega_f\). This regime is called the transient regime. Two examples are given below with dashed lines indicating the decay envelope of the complementary solution.

On long enough time scales, the \(x_c(t)\) term decays away due to the \(e^{-\gamma/2\; t}\) factor, leaving the solution to be dominated by the \(x_p(t)\) term. This also means the system `forgets' any initial conditions and is completely determined by the driving and damping parameters. This long-time limit is called the *steady state* regime.

One of the key features of the steady state regime is *resonance*. We will examine this in more detail in a different article. In the meantime here is a simulation of the solution for you to explore:

Click figure to download the CDF demo.

2
Duration: 5 min

A thin loop is hung on a horizontal nail. If the period of small angle oscillations is 2.0s what is the radius of the loop?

2
Duration: 10 min

A bullet of mass \(m\) is fired at a wooden block of mass \(M\) that rests on a frictionless surface and is attached to a wall by an ideal spring of spring constant \(k\). The block is initially at rest. Assume the bullet effectively instantaneously embeds itself in the block and sets the combined system into motion. Note that this is an inelastic collision so kinetic energy is *not* conserved. If the maximum amplitude of the spring is observed to be \(x_0\) after the collision, what was the initial velocity of the bullet, \(v_0\)?

2
Duration: 5 min

Show that the following different ways of writing the solutions to the harmonic oscillator are all equivalent to each other:

- \(x(t) = A \cos(\omega_0 t + \phi_1)\),
- \(x(t) = B \sin(\omega_0 t + \phi_2)\),
- \(x(t) = C \cos(\omega_0 t) + D \sin(\omega_0 t)\),
- \(x(t) = E e^{i \omega_0 t} + E^* e^{-i \omega_0 t}\), for \(E\) complex where \(^*\equiv\) complex conjugation.

2
Duration: 5 min

If we were to suspend a mass on a spring vertically and have gravity act on the mass as well, how would the resulting oscillations change?