Question: (e) Are the results affected by changes in the initial conditions? Answer this question both numerically (by modifying the initial conditions in LAB06ex2.m) and theoretically

(e) Are the results affected by changes in the initial conditions? Answer this question both numerically (by modifying the initial conditions in LAB06ex2.m) and theoretically (by analyzing the expression for C in (3)). Note that the initial conditions for the DE are y0 and v0. NOTE: Modify the initial conditions and in LAB06ex2.m and run the file with the new initial conditions. Then answer the following question and justify your answer theoretically (by analyzing the formula for C). Delete this note upon submission. Don't forget to reset the initial conditions to the original values once you are done experiementing. Is the amplitude of the forced oscillation, , affected by the initial conditions?

clear all; % this deletes all variables omega@ = 4; ( = 1} OMEGA = 2:0.01:5; C = zeros (size (OMEGA) ); Ctheory = zeros (size (OMEGA)); to = 0; y0 = 0; v0 = 0; Y0 = [yo; vo]; tf = 60; t1 = 25; for k = 1:length (OMEGA) omega = OMEGA(K); param = [omega0, c, omega]; [t, Y] = ode45 (@f, [to, tf], Ye, , param); i = find(t t1); C(k) = (max(Y(i,1) ) - min(Y(i,1) ) ) / 2; Ctheory (k) = 1 / sqrt((omega0*2 - omega*2)^2 + (c * omega)~2); end % Find the maximum amplitude and corresponding omega [maxC, maxIndex] = max(C); optimalomega = OMEGA(maxIndex) ; figure(2) plot (OMEGA, C, 'b-", OMEGA, Ctheory, 'r--"); grid on; xlabel( '\\omega" ); ylabel( 'C'); legend( 'computed numerically', 'theoretical" ); % Display results fprintf( 'Practical resonance frequency (numerical) = %.2f\\', optimalomega); fprintf( 'Maximum amplitude (numerical) = %.4f\\", maxC); function dvdt = f(t, Y, param) y = Y(1); V = Y(2); omegao = param (1) ; c = param(2) ; omega = param(3); dYdt = [v; cos (omega*t) - omega0 2*y - C*V]; end

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 Physics Questions!