Solve \ddot{x}(t)+16 x(t)=\cos 2 t for the response to arbitrary initial conditions x_0 and v_0 using the convolution integral. Next, compare this to the result obtained by solving this problem using the method of undetermined coefficients explained in Section 2.1 and given in equation (2.11).
x(t)=\frac{v_0}{\omega_n} \sin \omega_n t+\left(x_0-\frac{f_0}{\omega_n^2-\omega^2}\right) \cos \omega_n t+\frac{f_0}{\omega_n^2-\omega^2} \cos \omega t (2.11)
Solution From the equation of motion, m=1, \omega_n=4, \omega=2, and F_0=f_0=1, where the units are assumed to be consistent. Using the convolution expression, equation (3.12), the particular solution has the form
x(t)=\int_0^t F(\tau) h(t-\tau) d \tau (3.12)
x_p(t)=\int_0^t h(t-\tau) F(\tau) d \tau
The impulse response function, h(t-\tau), for an undamped system is found from equation (3.8) with \zeta=0. With the values given above for mass and frequency, the impulse response function is
h(t)=\frac{1}{m \omega_d} e^{-\zeta \omega_n t} \sin \omega_d t (3.8)
h(t-\tau)=\frac{1}{4} \sin (4 t-4 \tau)
Thus the convolution expression for the particular solution is
x_p(t)=\frac{1}{4} \int_0^t \sin (4 t-4 \tau) \cos (2 \tau) d \tau
Integrating (using a symbolic code or repeated use of trig identities) yields
x_p(t)=\frac{1}{4}\left(\frac{\cos (4 t-2 \tau)}{4}+\frac{\cos (4 t-6 \tau)}{12}\right)_0^t=\frac{1}{12}(\cos 2 t-\cos 4 t)
The total solution is of the form
x(t)=A \sin 4 t+B \cos 4 t+\frac{1}{12}(\cos 2 t-\cos 4 t)
Using the initial conditions to evaluate the constants of integration A and B yields
x(0)=x_0=A \sin (0)+B \cos (0)+\frac{1}{12}(\cos (0)-\cos (0)),
\dot{x}(0)=v_0=4 A \cos (0)+4 x_0 \sin (0)-\frac{2}{12} \sin (0)+\frac{4}{12} \sin (0)
Solving this set of equations for A and B yields
A=\frac{v_0}{4} \text { and } B=x_0
The total solution is then
x(t)=\frac{v_0}{4} \sin 4 t+\left(x_0-\frac{1}{12}\right) \cos 4 t+\frac{1}{12} \cos 2 t
This is in total agreement with the solution given in equation (2.11) with m=1, \omega_n=4, \omega=2, F_0=f_0=1, and \omega_n^2-\omega^2=12.
The purpose of this is example is to show that two different methods yield the same answer, as they should. The method of undetermined coefficients is a much simpler calculation to make, but only works for harmonic forcing functions. The convolution approach is more complicated, but can be used for any forcing function and is thus a more general approach.