I want to use maple2015 to perform a Monte-Carlo simulation of a one dimensional Harmonic Oscillator.
Consider a particle having displacements, x=na where n is an integer, i.e 0 plus minus one, etc.
The potential energy of the particle is given by U(x)= 1/2 kx^2 = 1/2 ka^2 n^2.
For this simulation will choose ka^2 = 0.01 k_B T where k_B is Boltzmann's constant, and T is the temprature in Kelvin.
So we should perform a Monte-Carlo simulation starting from x(0)=20a, and perfroming individual steps by selecting an attmept to move x=+-a ,with equal probability, and choose whether to make the actual step according to energy change expected in that step.
I need to draw particle's position and x(t), and particle's energy E(t).
After that I need to calculate and draw the autocorrelation functions \phi_x(t) and \phi_E(t).
I found some code that might help me, but I am nor sure how to implement the above two lines on maple; your help is appreciated.