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.

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

J<br />

1<br />

0.5<br />

–1 –0.5 0.5 1<br />

R<br />

–0.5<br />

–1<br />

Figure 1.3: Tangent ¯eld for Romeo and Juliet's love a®air.<br />

The tangent ¯eld for Romeo and Juliet's love a®air is shown in Figure 1.3. Inspecting<br />

the graph and comparing with Figure 1.1, it is seen that the stationary<br />

point at the origin is a saddle point. By changing the coe±cient values, the<br />

nature of the stationary point and therefore the nature of the love a®air can be<br />

altered. This is left as a problem at the end of the section for you to explore.<br />

The four initial conditions are now entered,<br />

> ic1:=(R(0)=-0.25,J(0)=1): ic2:=(R(0)=-0.27,J(0)=1):<br />

ic3:=(R(0)=0.27,J(0)=-1): ic4:=(R(0)=0.25,J(0)=-1):<br />

and the phaseportrait command is used to create the phase-plane portrait for<br />

the four initial conditions. These conditions are entered as a list of lists. The<br />

time step size is taken to be 0.05. The default is to divide the time range into 20<br />

equal steps. So the default step size here would be 4=20 = 0:2. Again MEDIUM<br />

arrows are chosen, which are colored red. The trajectories are colored blue using<br />

the linecolor option. A complete list of options may be found under DEplot,<br />

whose Help page may be accessed though the topic search.<br />

> phaseportrait([de1,de2],[R(t),J(t)],t=0..4,[[ic1],[ic2],<br />

[ic3],[ic4]],stepsize=0.05,dirgrid=[30,30],R=-1..1,J=-1..1,<br />

arrows=MEDIUM,color=red,linecolor=blue);<br />

The phase-plane portrait for Romeo and Juliet's love a®air is reproduced in<br />

Figure 1.4. Asymptotically, the trajectories approach the separatrixes of the<br />

saddle point at the origin, the separatrixes dividing the phase plane into four<br />

di®erent \°ow" regions for the tangent arrows. Thus, for example, one can see<br />

that for any initial condition in the lower right region, R will remain positive<br />

and J negative. Romeo's love for Juliet is unrequited!

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

Saved successfully!

Ooh no, something went wrong!