Question: Preferably I would like the code in python but I can always translate from another language such as c++. Needs to be semi-implicit(symplectic) Euler method.
1. The Driven Harmonic Oscillator For the case of a driven and damped harmonic oscillator, Newton's 2nd law is m + ci +k Fo cos (wet). By dividing the latter equation by the mass m and the undamped frequency we can write this as where we have used the constants Fo e_ and fo= 2 as well as the dimensionless time =wot. Dr
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
