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.

320 CHAPTER 8. NONLINEAR DIAGNOSTIC TOOLS<br />

8.1.1 A Rattler Signals Chaos<br />

Humor is emotional chaos remembered in tranquility.<br />

James Thurber, American writer, humorist, and cartoonist (1894{1961)<br />

As an illustrative example of how a Poincare section is produced and how it<br />

changes character as a control parameter is varied, let's consider Du±ng's ODE<br />

describing the force oscillations of a nonlinear spring system,<br />

Äx +2g _x + ®x+ ¯x 3 = F cos(!t): (8.1)<br />

Here x is the displacement, g the damping coe±cient, ® and ¯ real parameters,<br />

F the force amplitude, and ! the driving frequency.<br />

The solutions of Du±ng's equation were examined in some detail in Section<br />

1.2.1 as the control parameter F was varied, all other parameters being<br />

held ¯xed. In this recipe, we shall use exactly the same coe±cient values and<br />

initial conditions as in the earlier treatment, including the same F values. This<br />

will allow us to compare the results of the Poincare treatmentwiththeconclusions<br />

reached previously on the response of the forced Du±ng oscillator.<br />

The number of F values is taken to be N1 = 4, and the maximum number<br />

of multiples of the driving period T0 =2¼=! considered is N2 =250.<br />

> restart: with(plots): N1:=4: N2:=250:<br />

The coe±cient values are entered and the driving period calculated.<br />

> g:=0.25: alpha:=-1: beta:=1: omega:=1: T[0]:=2*Pi/omega;<br />

T0 := 2 ¼<br />

The force amplitudes are F1 =0:325, F2 =0:35, F3 =0:356, and F4 =0:42.<br />

> F[1]:=0.325: F[2]:=0.35: F[3]:=0.356: F[4]:=0.42:<br />

Du±ng's equation can be rewritten as a coupled set of ¯rst-order ODEs,<br />

_x = y; _y = ¡2 gy¡ ®x¡ ¯x 3 + Fi cos(!t);<br />

which will be numerically solved with the initial conditions x(0)=0:09, y(0)=0.<br />

> ic:=x(0)=0.09,y(0)=0:<br />

The coupled ¯rst-order di®erential equations are entered, an operator being<br />

used for the second one, the subscript i of the force amplitude Fi to be given.<br />

> de1:=diff(x(t),t)=y(t):<br />

> de2:=i->diff(y(t),t)=-2*g*y(t)-alpha*x(t)-beta*x(t)^3<br />

+F[i]*cos(omega*t):<br />

An operator sol is introduced to numerically solve de1 and de2 (i), subject to<br />

the initial conditions, for a given value of i. The option maxfun=0 overrules any<br />

limit on the maximum number of function evaluations in Maple's numerical<br />

algorithm. The output is given as a listprocedure.<br />

> sol:=i->dsolve(fde1,de2(i),icg,fx(t),y(t)g,type=numeric,<br />

maxfun=0,output=listprocedure):<br />

Operators X and Y are formed to evaluate x(t) andy(t)<br />

> X:=i->eval(x(t),sol(i)): Y:=i->eval(y(t),sol(i)):

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

Saved successfully!

Ooh no, something went wrong!