fieldplot([y, -x-x^3], x=-1..1, y=-1..1, arrows=SLIM, axes=BOXED, title="hard Oscillator field plot"); DEplot([diff(x(t),t)=y(t),diff(y(t),t)=-x(t)-x(t)^3],[x(t),y(t)],0.1..0.2,x=0..1, y=0..1,arrows=slim, axes=BOXED, title=`hard oscillator direction field`); DEplot([diff(x(t),t)=y(t),diff(y(t),t)=-x(t)-x(t)^3],[x(t),y(t)],-2..2,{[0, 0, 1], [0, 1, 0]}, color = y^2 + x^2 + (1/2)*x^4, arrows=THICK, title=`hard oscillator, color = energy`); contourplot(x^2 + y^2 + (1/2)*x^4, x = 0..2, y = 0..2, title=`hard oscillator` ); phaseportrait([diff(x(t),t)=y(t),diff(y(t),t)=-x(t)-x(t)^3],[x(t),y(t)],0..8,{[0, 0, 1], [0, 1, 0]}, scene=[x,y], stepsize=.1,title=`hard oscillator phase portrait`);