Let us return to the forced oscillations. Consider a mass-spring system as before, where we have a mass \(m\) on a spring with spring constant \(k\), with damping \(c\), and a force \(F(t)\) applied to the mass. Suppose the forcing function \(F(t)\) is \(2L\)-periodic for some \(L>0\). We have already seen this problem in chapter 2 with a simple \(F(t)\).
\[\label{eq:1} mx''(t)+cx'(t)+kx(t)=F(t). \]
The general solution consists of \(\eqref{eq:1}\) consists of the complementary solution \(x_c\), which solves the associated homogeneous equation \( mx''+cx'+kx=0\), and a particular solution of Equation \(\eqref{eq:1}\) we call \(x_p\). For \(c>0\), the complementary solution \(x_c\) will decay as time goes by. Therefore, we are mostly interested in a particular solution \(x_p\) that does not decay and is periodic with the same period as \(F(t)\). We call this particular solution the steady periodic solution and we write it as \(x_{sp}\) as before. What will be new in this section is that we consider an arbitrary forcing function \(F(t)\) instead of a simple cosine.
For simplicity, let us suppose that \(c=0\). The problem with \(c>0\) is very similar. The equation
where \( \omega_0= \sqrt{\dfrac{k}{m}}\). Any solution to \(mx''(t)+kx(t)=F(t)\) is of the form \(A \cos(\omega_0 t)+ B \sin(\omega_0 t)+x_{sp}\). The steady periodic solution \(x_{sp}\) has the same period as \(F(t)\).
In the spirit of the last section and the idea of undetermined coefficients we first write
\[ F(t)= \dfrac{c_0}{2}+ \sum^{\infty}_{n=1} c_n \cos \left(\dfrac{n \pi}{L}t \right)+ d_n \sin \left(\dfrac{n \pi}{L}t \right). \nonumber \]
\[ x(t)= \dfrac{a_0}{2}+ \sum^{\infty}_{n=1} a_n \cos \left(\dfrac{n \pi}{L}t \right)+ b_n \sin \left(\dfrac{n \pi}{L}t \right), \nonumber \]
where \(a_n\) and \(b_n\) are unknowns. We plug \(x\) into the differential equation and solve for \(a_n\) and \(b_n\) in terms of \(c_n\) and \(d_n\). This process is perhaps best understood by example.
Resonance
Just like when the forcing function was a simple cosine, resonance could still happen. Let us assume \(c=0\) and we will discuss only pure resonance. Again, take the equation
\[ mx''(t)+kx(t)=F(t). \nonumber \]
When we expand \(F(t)\) and find that some of its terms coincide with the complementary solution to \( mx''+kx=0\), we cannot use those terms in the guess. Just like before, they will disappear when we plug into the left hand side and we will get a contradictory equation (such as \(0=1\)). That is, suppose
\[ x_c=A \cos(\omega_0 t)+B \sin(\omega_0 t), \nonumber \]
where \( \omega_0= \dfrac{N \pi}{L}\) for some positive integer \(N\). In this case we have to modify our guess and try
\[ x(t)= \dfrac{a_0}{2}+t \left( a_N \cos \left( \dfrac{N \pi}{L}t \right)+ b_N \sin \left( \dfrac{N \pi}{L}t \right) \right) + \sum_{\underset{n \neq N}{n=1}}^{\infty} a_n \cos \left( \dfrac{n \pi}{L}t \right)+ b_n \sin \left( \dfrac{n \pi}{L}t \right). \nonumber \]
In other words, we multiply the offending term by \(t\). From then on, we proceed as before.
Of course, the solution will not be a Fourier series (it will not even be periodic) since it contains these terms multiplied by \(t\). Further, the terms \( t \left( a_N \cos \left( \dfrac{N \pi}{L}t \right)+ b_N \sin \left( \dfrac{N \pi}{L}t \right) \right) \) will eventually dominate and lead to wild oscillations. As before, this behavior is called pure resonance or just resonance.
Note that there now may be infinitely many resonance frequencies to hit. That is, as we change the frequency of \(F\) (we change \(L\)), different terms from the Fourier series of \(F\) may interfere with the complementary solution and will cause resonance. However, we should note that since everything is an approximation and in particular \(c\) is never actually zero but something very close to zero, only the first few resonance frequencies will matter.
Example \(\PageIndex{2}\)
Find the steady periodic solution to the equation
\[\label{eq:19} 2x''+18 \pi^2 x=F(t), \]
where
\[F(t)= \left\{ \begin{array}{ccc} -1 & {\rm{if}} & -1<t<0, \\ 1 & {\rm{if}} & 0<t<1, \end{array} \right. \nonumber \]
extended periodically. We note that
\[ F(t)= \sum^{\infty}_{ \underset{n ~\rm{odd}}{n=1} } \dfrac{4}{\pi n} \sin(n \pi t). \nonumber \]
Exercise \(\PageIndex{1}\)
Compute the Fourier series of \(F\) to verify the above equation.
As \(\sqrt{\frac{k}{m}}=\sqrt{\frac{18\pi ^{2}}{2}}=3\pi\), the solution to \(\eqref{eq:19}\) is
\[ x(t)= c_1 \cos(3 \pi t)+ c_2 \sin(3 \pi t)+x_p(t) \nonumber \]
for some particular solution \(x_p\).
If we just try an \(x_{p}\) given as a Fourier series with \(\sin (n\pi t)\) as usual, the complementary equation, \(2x''+18\pi^{2}x=0\), eats our \(3^{\text{rd}}\) harmonic. That is, the term with \(\sin (3\pi t)\) is already in in our complementary solution. Therefore, we pull that term out and multiply it by \(t\). We also add a cosine term to get everything right. That is, we try
\[ x_p(t)= a_3 t \cos(3 \pi t) + b_3 t \sin(3 \pi t) + \sum^{\infty}_{ \underset{\underset{n \neq 3}{n ~\rm{odd}}}{n=1} } b_n \sin(n \pi t). \nonumber \]
Let us compute the second derivative.
\[ x_p''(t)= -6a_3 \pi \sin(3 \pi t) -9 \pi^2 a_3 t \cos(3 \pi t) + 6b_3 \pi \cos(3 \pi t) -9 \pi^2 b_3 t \sin(3 \pi t) +\sum^{\infty}_{ \underset{\underset{n \neq 3}{n ~\rm{odd}}}{n=1} } (-n^2 \pi^2 b_n) \sin(n \pi t). \nonumber \]
We now plug into the left hand side of the differential equation.
\[\begin{align}\begin{aligned} 2x_p'' + 18\pi^2 x_p = & - 12 a_3 \pi \sin (3 \pi t) - 18\pi^2 a_3 t \cos (3 \pi t) + 12 b_3 \pi \cos (3 \pi t) - 18\pi^2 b_3 t \sin (3 \pi t) \\ & \phantom{\, - 12 a_3 \pi \sin (3 \pi t)} ~ {} + 18 \pi^2 a_3 t \cos (3 \pi t) \phantom{\, + 12 b_3 \pi \cos (3 \pi t)} ~ {} + 18 \pi^2 b_3 t \sin (3 \pi t) \\ & {} + \sum_{\substack{n=1 \\ n~\text{odd} \\ n\not= 3}}^\infty (-2n^2 \pi^2 b_n + 18\pi^2 b_n) \, \sin (n \pi t) . \end{aligned}\end{align} \nonumber \]
If we simplify we obtain
\[ 2x_p'' +18 \pi^2 x= -12a_3 \pi \sin(3 \pi t)+ 12b_3 \pi \cos(3 \pi t) +\sum^{\infty}_{ \underset{\underset{n \neq 3}{n ~\rm{odd}}}{n=1} } (-2n^2 \pi^2 b_n+ 18 \pi^2 b_n) \sin(n \pi t.) \nonumber \]
This series has to equal to the series for \(F(t)\). We equate the coefficients and solve for \(a_3\) and \(b_n\).
\[\begin{align}\begin{aligned} a_3 &= \frac{4/(3 \pi)}{-12 \pi}= \frac{-1}{9 \pi^2}, \\ b_3 &= 0, \\ b_n &= \frac{4}{n \pi(18 \pi^2 -2n^2 \pi^2)}=\frac{2}{\pi^3 n(9-n^2 )} ~~~~~~ {\rm{for~}} n {\rm{~odd~and~}} n \neq 3.\end{aligned}\end{align} \nonumber \]
That is,
\[ x_p(t)= \frac{-1}{9 \pi^2}t \cos(3 \pi t)+ \sum^{\infty}_{ \underset{\underset{n \neq 3}{n ~\rm{odd}}}{n=1} } \frac{2}{\pi^3 n(9-n^2)} \sin(n \pi t.) \nonumber \]
When \(c>0\), you will not have to worry about pure resonance. That is, there will never be any conflicts and you do not need to multiply any terms by \(t\). There is a corresponding concept of practical resonance and it is very similar to the ideas we already explored in Chapter 2. Basically what happens in practical resonance is that one of the coefficients in the series for \(x_{sp}\) can get very big. We will not go into details here.