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.

60 CHAPTER 2. PHASE-PLANE ANALYSIS<br />

Thevariabletransformationofeq2 is implemented in eq3 with the dchange<br />

command. The ¯rst argument is the variable transformation tr, the second<br />

argument the equation to be transformed, the third argument the new variables,<br />

and the last optional argument is to simplify the result.<br />

> eq3:=dchange(tr,eq2,[Theta(tau),tau],simplify);<br />

eq3 := d2<br />

μ<br />

d<br />

sin(£(¿)) mg+¡<br />

d¿<br />

£(¿) =¡<br />

d¿ 2 £(¿)<br />

r<br />

g<br />

L<br />

mg<br />

The equation is further simpli¯ed by de¯ning a dimensionless damping coef-<br />

¯cient ° through the relation ¡ = 2 °mg=!. Inclusion of the factor 2 is a<br />

matter of taste, a choice often made for damped harmonic oscillator systems.<br />

Substituting this expression for ¡ into eq3 and expanding,<br />

> eq4:=expand(subs(Gamma=2*gamma*m*g/omega,eq3));<br />

eq4 := d2<br />

μ<br />

d<br />

£(¿) =¡sin(£(¿)) ¡ 2 °<br />

d¿ 2 d¿ £(¿)<br />

<br />

yields eq4 , the dimensionless equation of motion for the plane pendulum.<br />

To make a phase-plane portrait, this second-order nonlinear ODE is reexpressed<br />

as two coupled ¯rst-order equations by setting the angular velocity<br />

d£=d¿ = V (¿) ineq5 , and substituting eq5 into eq4 .<br />

> eq5:=diff(Theta(tau),tau)=V(tau);<br />

> eq6:=subs(eq5,eq4);<br />

eq5 := d<br />

£(¿) =V (¿)<br />

d¿<br />

eq6 := d<br />

V (¿) =¡sin(£(¿)) ¡ 2 °V (¿)<br />

d¿<br />

From the right-hand sides of eq5 and eq6 ,theformsofPand Q needed to<br />

analyze the possible stationary points are easily identi¯ed and now entered.<br />

> P:=V; Q:=-sin(Theta)-2*gamma*V;<br />

P := V Q := ¡sin(£) ¡ 2 °V<br />

The derivatives @P=@£, @P=@V , @Q=@£, @Q=@V are calculated in a, b, c, d.<br />

> a:=diff(P,Theta): b:=diff(P,V): c:=diff(Q,Theta): d:=diff(Q,V):<br />

The quantities a, b, c, andd still have to be evaluated at the stationary points,<br />

which are found by solving P =0,Q = 0 for the unknowns £ and V .<br />

> sol:=solve(fP,Qg,fTheta,Vg);<br />

sol := f£ =0;V =0g<br />

There is a ¯xed point at the origin of the phase plane, corresponding to the<br />

pendulum at rest with the supporting rod oriented vertically downward (μ =0<br />

in Figure 2.7). This is obvious on physical grounds, since the ¯xed point arises<br />

because there is a zero net force on the mass m in this position. The downward<br />

pull of gravity on m is balanced by the upward tension in the supporting rod.

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

Saved successfully!

Ooh no, something went wrong!