16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

26 CHAPTER 1. PHASE-PLANE PORTRAITS<br />

asymptotically approaches a stable focal point at the origin. This behavior is<br />

characteristic of underdamping.<br />

v<br />

1<br />

0.5<br />

–1 –0.5 0 0.5 x 1<br />

–0.5<br />

–1<br />

Figure 1.8: Phase-plane portrait for ¯ =3.<br />

Finally, for ¯ = 3, the phase-plane trajectory shown in Figure 1.8 approaches a<br />

stable nodal point at the origin, a behavior characteristic of overdamping. Itis<br />

left as an exercise for you to determine the critical damping threshold between<br />

under- and overdamping.<br />

Unlike the phaseportrait command, DEplot mayalsobeusedtoproduce<br />

solution curves, but not tangent ¯elds, for single higher-order ODEs.<br />

Taking, say, ¯ = b2 =0:2, Vectoria now uses DEplot to generate the x(t)<br />

solution curve shown in Figure 1.9 for the second-order ODE de, giventhe<br />

initial condition 3 x(0) = 1, _x(0)=0. Thetimerangeisfromt =0to50,and<br />

the time step size in the underlying numerical scheme is taken to be 0:05.<br />

> beta:=b[2]:<br />

> DEplot(de,x(t),t=0..50,[[x(0)=1,D(x)(0)=0]],stepsize=0.05);<br />

The numerically derived solution curve in Figure 1.9 decreases in amplitude in<br />

an oscillatory manner, again characteristic of the underdamped SHO.<br />

Finally, since the SHO equation de is linear with constant coe±cients, an<br />

analytic solution can be easily obtained for x(t) usingthedsolve command.<br />

> dsolve(fde,x(0)=1,D(x)(0)=0g,x(t));<br />

x (t) = 1 p<br />

11 e<br />

(¡<br />

33<br />

t<br />

10 ) sin<br />

Ã<br />

3 p 11 t<br />

10<br />

!<br />

t<br />

+ e<br />

(¡ 10 ) cos<br />

Ã<br />

3 p !<br />

11 t<br />

10<br />

3 Note that the derivative condition _x(0) = 0 is entered as D(x)(0)=0, where D is the<br />

di®erential operator. The di®erential operator D is more general than diff. It can represent<br />

derivatives evaluated at a point and can di®erentiate procedures.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!