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.

7.2. ANALYTIC SOLITON SOLUTIONS 305<br />

The positive square root is chosen (the negative square root yields an antikink)<br />

and the trig identity cos U =1¡ 2sin 2 (U=2) substituted,<br />

> sol1:=subs(cos(U)=1-2*sin(U/2)^2,sol[1]);<br />

sol1 := V (U) = 4<br />

s<br />

μ 2<br />

p U<br />

60 sin<br />

15<br />

2<br />

and the result simpli¯ed using the square root and symbolic options.<br />

> sol1:=simplify(sol1,sqrt,symbolic);<br />

sol1 := V (U) = 8<br />

μ <br />

p U<br />

15 sin<br />

15 2<br />

Since V = dU=dz, thenz ´ x ¡ ct is equal to the integral with respect to U of<br />

the reciprocal of the right-hand side of sol1 .<br />

> z:=x-c*t=int(1/rhs(sol1),U);<br />

z := x ¡ t<br />

μ μ μ <br />

1 p U U<br />

= 15 ln csc ¡ cot<br />

4 4<br />

2 2<br />

Then, solving for U and recalling that U(z) ´ Ã(x ¡ ct),<br />

> solwave:=psi(x,t)=solve(z,U);<br />

solwave := Ã(x; t) =<br />

0<br />

B<br />

2arctanB<br />

Ã<br />

B<br />

@<br />

1+<br />

2 e ( (4 x¡t) p 15<br />

15<br />

e ( (4 x¡t) p 15<br />

15<br />

Ã<br />

)<br />

! 2 ; ¡ Ã<br />

)<br />

1+<br />

e ( (4 x¡t) p 15<br />

15<br />

! 2<br />

)<br />

e ( (4 x¡t) p 15<br />

15<br />

1<br />

¡ 1 C<br />

! 2 C<br />

) A<br />

yields the analytic solitary-wave solution shown in solwave. The arctan function<br />

is expressed in terms of two arguments separated by a comma. The term to the<br />

left (right) of the comma is the numerator (denominator) of arctan.<br />

The common denominators in the arguments can be removed and the numerator<br />

of the second argument simpli¯ed with the following assumption:<br />

> solwave:=simplify(solwave,assume=real);<br />

solwave := Ã(x; t) =2arctan(2e ( (4 x¡t) p 15<br />

15<br />

)<br />

; ¡e<br />

( 2(4x¡t) p 15<br />

) 15 +1)<br />

If you can't instantly see that this still complicated-appearing result is a kink<br />

solitary-wave solution of the SGE, you can be excused. However, that it is a<br />

solution can be con¯rmed by applying the following pdetest command.<br />

> pdetest(solwave,SGE);<br />

0<br />

To see that it is a kink solitary wave, let's animate the rhs of solwave.<br />

> animate(plot,[rhs(solwave),x=-10..50],t=0..200,frames=50,<br />

thickness=2,axes=framed);<br />

On running the animation, we observe that a kink solitary wave travels to the

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

Saved successfully!

Ooh no, something went wrong!