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.

7.1. THE GRAPHICAL HUNT FOR SOLITONS 297<br />

@Á1 @Á1<br />

+ v1<br />

@t @x = ¡¯1 Á2 Á3;<br />

@Á2 @Á2<br />

+ v2<br />

@t @x = ¯2 Á1 Á3;<br />

@Á3 @Á3<br />

+ v3<br />

@t @x = ¡¯3 Á1 Á2:<br />

(7.1)<br />

Here, x is the direction of wave propagation, t is the time, and the coupling<br />

parameters ¯1, ¯2, and¯3 are real and positive. Our goal is to show graphically<br />

that there exists a set of three solitary waves, one for each equation, which will<br />

propagate along together at a common velocity c.<br />

The DEtools and PDEtools library packages are loaded,<br />

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

and the parameter °, which will shortly be introduced, is unprotected from its<br />

Maple assignment as Euler's constant. To generate the N = 3 PDEs<br />

> unprotect(gamma): N:=3:<br />

with a do loop, let's set Á4 = Á1 and Á5 = Á2.<br />

> phi[4](x,t):=phi[1](x,t): phi[5](x,t):=phi[2](x,t):<br />

The following do loop then generates the three relevant PDEs.<br />

> for j from 1 to N do<br />

> pde[j]:=diff(phi[j](x,t),t)+v[j]*diff(phi[j](x,t),x)<br />

=(-1)^j*beta[j]*phi[j+1](x,t)*phi[j+2](x,t);<br />

> end do;<br />

³ ´ ³ ´<br />

pde 1 := @@t Á1(x; t) + @ v1 Á1(x; t) = ¡¯1 Á2(x; t) Á3(x; t)<br />

@x<br />

³ ´ ³ ´<br />

pde 2 := @@t Á2(x; t) + @ v2 Á2(x; t) = ¯2 Á3(x; t) Á1(x; t)<br />

@x<br />

³ ´ ³ ´<br />

pde 3 := @@t Á3(x; t) + @ v3 Á3(x; t) = ¡¯3 Á1(x; t) Á2(x; t)<br />

@x<br />

Solitary-wave solutions are sought that are functions of the single \new" independent<br />

\spatial" variable z = x ¡ ct, c being an arbitrary velocity for the<br />

moment. The relevant variable transformation is entered, with t = ¿ and new<br />

amplitudes U1(z), U2(z), and U3(z).<br />

> tr:=fx=z+c*tau,t=tau,phi[1](x,t)=U[1](z),<br />

phi[2](x,t)=U[2](z),phi[3](x,t)=U[3](z)g;<br />

tr := fx = z+c¿; t= ¿; Á1(x; t) =U1(z); Á2(x; t) =U2(z); Á3(x; t) =U3(z)g<br />

and the dchange command applied to each PDE in the following do loop.<br />

> for j from 1 to N do<br />

> ode[j]:=dchange(tr,pde[j],[z,tau,U[1](z),U[2](z),U[3](z)]);<br />

To simplify the output, the substitution ¯j = °j (vj ¡ c) ismadeinthejth<br />

ODE and each equation divided by (vj ¡ c) and simpli¯ed.<br />

> ode[j]:=subs(beta[j]=gamma[j]*(v[j]-c),ode[j]):

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

Saved successfully!

Ooh no, something went wrong!