{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

math245lab08 - Math245 Computer Lab set#8 Fall 2008 Beat...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Math245 Computer Lab set #8, Fall 2008 Beat and resonance We consider the undamped linear, forced 2nd-order ODE in the form: y 00 + ω 2 0 y = F 0 cos ω f t (1) where ω 0 is the natural frequency of the system, ω f is the forcing frequency, and F 0 is the forcing amplitude. Example let ω 0 = 1, F 0 = 1 / 2. y 00 + y = 1 2 cos ω f t. Simulate the system for ω f = 4 / 5 , 7 / 8 , 1 for 0 t 100. Step #1: Let y = y 1 and y 0 = y 2 , and rewriting the equation into a set of first order ODEs. y 0 1 = y 2 , (2) y 0 2 = - y 1 + 1 2 cos ω f t. (3) Step #2: Define RHS of above ODEs in a function file. function dy=odefun(t,y,omgf) dy=[ y(2) -y(1)+0.5*cos(omgf*t) ]; Step #3: Write the main program, and run it for different value of ω f . omgf=4/5; tspan=[0,100]; y0=[0,0]; [t, y]=ode45(@odefun,tspan,y0,[],omgf); figure plot(t,y(:,1)) Solution plot is shown in figure below. Analytical solution Analytical solution to Eqn(1) is written y ( t ) = F 0 ω 2 0 - ω 2 f (cos ω f t - cos ω 0 t ) . (4) Using trigonometric identity cos A - cos B = 2 sin A - B 2 t sin A + B 2 t , 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
0 20 40 60 80 100 -2 0 2 y ϖ f =4/5 0 20 40 60 80 100 -5 0 5 y ϖ f =7/8 0 20 40 60 80 100
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern