Question: Please, write a program in a Python and explain all steps. Please, complete the all task! Write a program that uses a second-order symplectic method
Please, write a program in a Python and explain all steps. Please, complete the all task!
Write a program that uses a second-order symplectic method to integrate the Hamiltonian equations of motion (see above). To this end, use a function verletstep(f, to, z0,dt) that has the same input and output as rk4step and calculates one step using a Verlet method. Test your program again with the harmonic oscillator potential using k=1,m=3. You can also check the error order of your integrator using different step sizes. q=pH,p=qHH(q,p)=2mp2+V(q)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
