Question: Please provide with python code Q1. Anharmonic oscillator (20 points) In elementary mechanics, we studied the motion of a simple harmonic oscillator using analytical methods

Please provide with python code

Please provide with python code Q1. Anharmonic oscillator (20 points) In elementary

Q1. Anharmonic oscillator (20 points) In elementary mechanics, we studied the motion of a simple harmonic oscillator using analytical methods and learnt that its period of oscillation is a constant, independent of its amplitude. Frequently in physics, however, we also come across anharmonic oscillators (for example, to understanding the melting of solids), whose period varies with amplitude and we have to rely on numerical methods to investigate its behavior. Let us consider a particle of mass m in a concave potential well V(x). For V(x)x2, it corresponds to a harmonic oscillator and any other form gives an anharmonic oscillator. The total energy of the system is E=K.E.+P.E.=21m(dtdx)2+V(x), which is a constant over time. Assume the potential is symmetric about x=0. At time t=0, the particle is released from rest at x=a such that a is the amplitude of the oscillation. We have E=V(a) since dx/dt=0 at t=0. The particle then rock back and forth in the well. (a) When the particle reaches the origin at the first time, it has gone through 1/4 of a period of the oscillation. By rearranging Eq.(1) above for dx/dt and then integrating with respect to t from 0 to T/4, show that the period T is given by T=8m0aV(a)V(x)1dx. (b) Suppose the potential is V(x)=x4 and the mass of the particle is m=1. Write a Python function that calculates the period of the oscillator for a given amplitude a using Gaussian quadrature with N=20 points. Then use your function to make a graph of the period versus the amplitude a[0,2]. Comment on your result

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