Question: % % Solve the ODE y + c * y ' + omega 0 ^ 2 * y = cos ( omega * t

%% Solve the ODE y"+c*y'+ omega0^2*y = cos(omega*t) given y(0)=0,
y'(0)=0;
omega =1.4;
omega0=2; c =1; omega =1.4; % define parameters
param =[omega0,c,omega]; % convert parameters into form usable by ODE45
t0=0; y0=0; v0=0; Y0=[y0;v0]; tf =50; % define interval and
intial condition
options = odeset('AbsTol',1e-10,'RelTol',1e-10); % adjust
tolerance/precision of ODE45
[t,Y]= ode45(@f,[t0,tf],Y0,options,param);
y = Y(:,1); v = Y(:,2); % y in output has 2 columns corresponding to y and
y'
figure(1); % starts a new figure
plot(t,y,'b-'); % graph solution
grid on; % display grid
%% Question 1
% What is the long term behavior of the solution? (Be as exact as
% possible. You may wish to use the ZOOM feature in the Figures.)
%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!