16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

294 CHAPTER 7. THE HUNT FOR SOLITONS<br />

> ode2:=simplify(2*ode/exp(I*b*x));<br />

μ <br />

2 d<br />

ode2 := ¡2 U (t) b + U (t) +2U (t)<br />

dt2 3 =0<br />

The second-order ODE is cast into two ¯rst-order ODEs by setting dU=dt = Y<br />

in ode3 , and substituting this expression into ode2 .<br />

> ode3:=diff(U(t),t)=Y(t); ode4:=subs(ode3,ode2);<br />

ode3 := d<br />

U (t) =Y(t)<br />

dt<br />

μ <br />

d<br />

ode4 := ¡2 U (t) b + Y (t) +2U (t)<br />

dt 3 =0<br />

Two phase-plane trajectories will be plotted for initial conditions very close to<br />

the origin. The origin will be revealed to be a saddle point.<br />

> ic:=[[U(0)=.01,Y(0)=0],[U(0)=-.01,Y(0)=0]]:<br />

Taking b =1,anoperatorFis formed to apply the phaseportrait command<br />

to ode3 and ode4 for speci¯ed scene parameters A and B.<br />

> F:=(A,B)->phaseportrait([ode3,eval(ode4,b=1)],[U(t),Y(t)],<br />

t=0..9,ic,scene=[A,B],U=-2..2,Y=-2..2,stepsize=0.05,<br />

dirgrid=[20,20],color=red,linecolor=blue,arrows=MEDIUM):<br />

The phase-plane portrait results on entering F(U,Y),<br />

> F(U,Y);<br />

the result being shown in Figure 7.5.<br />

Y<br />

2<br />

1<br />

–2 –1 0 1 2<br />

U<br />

–1<br />

–2<br />

Figure 7.5: Separatrixes correspond to bright solitary waves.<br />

The arrows indicate the direction of increasing t, while the solid curves to the<br />

left and right of the origin are the two separatrixes. There are vortex points at<br />

(U = § 1, Y =0)andasaddlepointattheorigin. Theseparatrixlinetothe<br />

right of the origin starts at U =0 for t !¡1,growstoamaximumpositive

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

Saved successfully!

Ooh no, something went wrong!