## Problem #18

Consider the forced but undamped system described by the initial value problem

$$u''+u=3\cos(\omega t),\quad u(0)=0,\quad u'(0)=0.$$

(a) Find the solution $u(t)$ for $\omega\neq 1$

(b) Plot the solution $u(t)$ versus $t$ for $\omega=0.7$, $\omega=0.8$, and $\omega=0.9$. Describe how the response $u(t)$ changes as $\omega$ varies in this interval. What happens as $\omega$ takes on values closer and closer to $1$? Note that the natural frequency of the unforced system is $\omega_0=1$.

## Part (a)

The solution to this initial value problem for $\omega\neq1$ must be found by hand or by using technology with symbolic manipulation capabilities. Here is the solution:

$$y(t)=\tfrac{3}{1-\omega^2}(\cos(\omega t)-\cos(t))$$

## Part (b)

The MATLAB module Ch03Sec08Prob18.m plots one solution to this initial value problem for a value of $\omega$ specified by the user. For brevity, six of these plots are shown together below, created by the following MATLAB code.

  >> tmin=0;
>> tmax=300;
>> figure
>> hold on
>> omega=[.7 .8 .9 .95 .97 .99];          % we'll plot one solution for each of these values
>> for i=1:6                              % Loop -- repeat once for each omega
ustr=sprintf('3/(1-%g^2)*(cos(%g*t)-cos(t))',omega(i),omega(i));
u=inline(ustr,'t');
subplot(3,2,i)                 % selects plot i of a 3x2 grid of plots
fplot(u,[0,tmax])              % plot solution curve
amp=abs(6/(1-omega(i)^2));     % determine height of plot based on
ymax=10*(ceil(amp/10));        %    amplitude of graph
axis([tmin tmax -ymax ymax]);
xlabel('t')                    % label axes and plot
ylabel('u(t)')
title(sprintf('Solution with omega = %g',omega(i)));
end
>>


.

Notice that in all six of these graphs, the horizontal scale is the same, although the vertical scale changes from figure to figure. We can see from this set of graphs that as $\omega$ approaches $1$, the period of the envelope function (what we see as 'pulses') increases. The amplitude of the envelope function increases as well.
(Note: In the last figure, the graph does have 'pulses', the period is just longer than the 300 units allowed by the graphing window.)

Further questions to explore: What happens if $\omega=1$? What happens for values of $\omega$ greater than 1?