# van der Pol equation ch1-van-der-Pol.ode # First, write the 2nd-order van der Pol equation as a system # of two first-order ODEs as follows: dx/dt = y dy/dt = -beta*(x^2-1)*y - x # Set the default value of the parameter beta: # Don't put spaces between the parameter name, the equal sign, and the parameter value! par beta=1.0 # Set the default initial conditions: init x=1.0 y=0.0 # Set the axes to plot a trajectory in the phase plane: @ xplot=x, yplot=y # Set the stopping time, time step, and default viewing window @ total=10,dt=.01,xlo=-3.0,xhi=3.0,ylo=-3.0,yhi=3.0 done