Math 241- Maple Workshop
Fall Semester, 2001

 © 2001, All Rights Reserved, SDSU & Joseph M. Mahaffy
San Diego State University -- This page last updated 25-Aug-01


Damped Oscillator

Maple provides a powerful tool to visualize the solutions of differential equations and other objects in mathematics. Below is the classical example of a damped oscillator given by the differential equation:

y" + 0.4y' + y = 0

or the equivalent system of differential equations:

The Maple command for viewing the 3-D solution is given by

> with(DEtools):

> DEplot3d({D(x)(t)=y(t), D(y)(t)=-x(t) - 0.4*y(t)}, [x(t),y(t)], t=0..10, [[x(0)=0,y(0)=1], [x(0)=0,y(0)=.5], [x(0)=0,y(0)=-1], [x(0)=0,y(0)=-.5], [x(0)=1,y(0)=0], [x(0)=0.5,y(0)=0], [x(0)=-1,y(0)=0], [x(0)=-0.5,y(0)=0]], scene=[t,x(t),y(t)], stepsize=.1, title=`Damped oscillations`, linecolour=t-sqrt(t));

Below we show a shockwave flash movie with different viewing angles of this damped oscillator, including the 2-D special views of time vs. position, time vs. velocity, and velocity vs. position (Phase portrait).