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.

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

1.1.1 Romeo and Juliet<br />

I am convinced we do not only love ourselves in others<br />

but hate ourselves in others too.<br />

G. C. Lichtenberg, German physicist, philosopher (1742{1799)<br />

The mathematician Steven Strogatz [Str88] [Str94] has suggested a simple dynamic<br />

model to create di®erent scenarios for the love a®air between Romeo and<br />

Juliet. In his model, R(t) andJ(t) represents Romeo's love/hate for Juliet and<br />

Juliet's love/hate for Romeo, respectively, at time t. Positive values of R and<br />

J indicate love, while negative values indicate hate. The love a®air equations<br />

take the form<br />

_R(t) =aR+ bJ; J(t) _ =cR+ dJ;<br />

where a, b, c, anddarereal coe±cients that may have either sign. For the sake<br />

of de¯niteness, let's take a =2,b =1,c = ¡1, and d = ¡2 in the following<br />

problem, leaving other coe±cient values for you to explore.<br />

(a) Is the ODE system linear or nonlinear? Locate the ¯xed point(s).<br />

(b) Create a tangent ¯eld plot and identify the nature of the ¯xed point(s).<br />

(c) Create a phase-plane portrait that contains the four trajectories corresponding<br />

to the following initial conditions: (i) R(0) = ¡0:25, J(0) = 1,<br />

(ii) R(0) = ¡0:27, J(0) = 1, (iii) R(0) = 0:27, J(0) = ¡1, and ¯nally<br />

(iv) R(0) = 0:25, J(0) = ¡1. Consider t =0to4timeunits.<br />

(d) Plot R versus t over the interval t = 0 to 2 for initial condition (i).<br />

(e) Derive analytic solutions for R(t) andJ(t) for initial condition (i).<br />

To plot the tangent ¯eld and create the phase-plane portrait, the dfieldplot<br />

and phaseportrait commands, respectively, will be used. These specialized<br />

di®erential equation plotting tools are contained in the DEtools library package,<br />

which is now loaded. The colon may be replaced with a semicolon to<br />

display the complete list of available commands in this package.<br />

> restart: with(DEtools):<br />

The general love a®air di®erential equations are entered in de1 and de2, each<br />

¯rst-order derivative with respect to t being entered with the diff command.<br />

> de1:=diff(R(t),t)=a*R(t)+b*J(t);<br />

de1 := d<br />

R(t) =a R(t)+b J (t)<br />

dt<br />

> de2:=diff(J(t),t)=c*R(t)+d*J(t);<br />

de2 := d<br />

J (t) =c R(t)+d J (t)<br />

dt<br />

Before proceeding further with solving our problem, a few words should<br />

be said about Maple's derivative command. Using exp, ln, andsin to enter<br />

the exponential, natural logarithm, and sine functions, suppose that Romeo's<br />

love/hate for Juliet depended on time in the following way.

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

Saved successfully!

Ooh no, something went wrong!