WOLFRAM|DEMONSTRATIONS PROJECT

Anharmonic Oscillator Phase Space Trajectories 2D

​
seed for random potential
anharmonicity
frequency
total time
initial position
initial velocity
ShowContourPlot[
2
DemonstrationsTools`x
+
2
y
+0.5(-0.218836Cos[5.15201+3
DemonstrationsTools`x]Cos[2.04424+y]-0.217447Cos[2.88337+4
DemonstrationsTools`x]Cos[2.88301+y]+0.634779Cos[0.70007+DemonstrationsTools`x]
Cos[4.96074+y]-0.154299Cos[1.55506+2DemonstrationsTools`x]Cos[6.13975+y]-
0.624394Cos[1.51652+DemonstrationsTools`x]Cos[0.413049+2y]+0.18652Cos[3.25955+3
DemonstrationsTools`x]Cos[1.06194+2y]+0.455034Cos[4.96727+4
DemonstrationsTools`x]Cos[1.65417+2y]+0.650326Cos[5.81368+2
DemonstrationsTools`x]Cos[3.63203+2y]-0.0548697Cos[5.07154+3
DemonstrationsTools`x]Cos[0.0743644+3y]-0.404971Cos[2.78902+4
DemonstrationsTools`x]Cos[0.347528+3y]+0.0844932Cos[1.45239+
DemonstrationsTools`x]Cos[2.48818+3y]-0.414261Cos[1.30722+2
DemonstrationsTools`x]Cos[3.64723+3y]-0.366248Cos[4.96249+3
DemonstrationsTools`x]Cos[0.07526+4y]-0.0368573Cos[4.63885+4
DemonstrationsTools`x]Cos[1.27556+4y]-0.742358Cos[1.92534+2
DemonstrationsTools`x]Cos[4.4737+4y]+0.400948Cos[1.33094+DemonstrationsTools`x]
Cos[4.70395+4y]),{DemonstrationsTools`x,xmin$75403-δx$75403,xmax$75403+
δx$75403},{y,ymin$75403-δy$75403,ymax$75403+δy$75403},MaxRecursion
ControlActive[0,1],ColorFunction(GrayLevel[0.6#1]&)],
,ImageSize
{400,400},ImagePadding{{35,20},{20,20}}
Independent of the initial conditions, the trajectories in a 2D harmonic oscillator are ellipses. Adding an anharmonic contribution to the potential generally changes the form of the trajectories (obtained by solving Newton's equations of motion), into nonperiodic, complicated curves. This demonstrates trajectories of an anharmonic 2D oscillator plotted over a contour plot of the potential.