Using Python and the Runge-Kutta 45 method numerically solve the following force-damped harmonic oscillator equation x¨=-2ζω0x˙-ω02x+10sinωt with initial conditions x(0)=1 and x˙(0)=0. In addition, use ζ=110,ω0=10π and ω=ω0 for plot 1 and ω=2ω0 for plot 2 . Note, you will be solving the equation twice, one for a driving force equal to sinw0t and the second with a driving force equal to sin2w0t. h=0.1 and 0≤t≤40 Compare the number of steps used for RK45 with the a Forward Euler Solution using the same level of convergence as the RK45. Plot both solutions and the same graph.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter14: Numerical Methods
Section14.6: The Trapezoidal Rule
Problem 1E
icon
Related questions
Question
Using Python and the Runge-Kutta 45 method numerically solve the following force-damped harmonic oscillator equation
x¨=-2ζω0x˙-ω02x+10sinωt
with initial conditions x(0)=1 and x˙(0)=0. In addition, use ζ=110,ω0=10π
and ω=ω0 for plot 1 and ω=2ω0 for plot 2 . Note, you will be solving the
equation twice, one for a driving force equal to sinw0t and the second with a
driving force equal to sin2w0t.
h=0.1 and 0≤t≤40
Compare the number of steps used for RK45 with the a Forward Euler
Solution using the same level of convergence as the RK45. Plot both
solutions and the same graph.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Embedded software development
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage