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.

6.1. WAVE EQUATION MODELS 251<br />

6.1.2 Homer's Jiggle Test<br />

The fundamental cause of trouble in the world today is that the stupid<br />

are cocksure while the intelligent are full of doubt.<br />

Bertrand Russell, British mathematician and philosopher (1872{1970)<br />

Having successfully used Maple to solve the plucked string problem, Vectoria<br />

now tackles the ¯rst problem on Professor Legree's wave equation assignment.<br />

She is asked to determine the transverse displacement Ã(x; y; t) of a light, horizontal,<br />

rectangular elastic membrane having sides of length a and 2 a that<br />

is held ¯xed along all four edges. Speci¯cally, the boundary conditions are<br />

Ã(0;y;t)=Ã(a; y; t) =0for0· y · 2 a and Ã(x; 0;t)=Ã(x; 2 a; t) =0for<br />

0 · x · a. The membrane is given an initial displacement<br />

Ã(x; y; 0) ´ f = 4 hx2 (a ¡ x) y3 (2 a ¡ y)<br />

a7 and is released from rest. Professor Legree also requests that the membrane<br />

displacement be animated for a =1,h = 1, and wave velocity c =1.<br />

Vectoria realizes that this membrane problem is mathematically equivalent<br />

to two ¯xed-ends string problems in the x and y directions. So her \shortcut"<br />

approach to separating variables in the last recipe can be easily extended.<br />

After loading the plots package, she enters the wave equation WE in two<br />

dimensions.<br />

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

> WE:=diff(psi(x,y,t),x,x)+diff(psi(x,y,t),y,y)<br />

=(1/c^2)*diff(psi(x,y,t),t,t);<br />

μ μ @<br />

2<br />

2<br />

@ @<br />

WE := Ã(x; y; t) + Ã(x; y; t) =<br />

@x2 @y2 2<br />

Ã(x; y; t)<br />

@t2 c2 The pdsolve command is applied to WE with HINT=sin(p*x)*sin(q*y)*T(t),<br />

where p and q are constants. The assumed form satis¯es the boundary conditions<br />

along the ¯xed edges x =0andy =0.<br />

> sol:=pdsolve(WE,HINT=sin(p*x)*sin(q*y)*T(t),INTEGRATE,build);<br />

sol := Ã(x; y; t) =sin(px)sin(qy) C1 sin(c p p2 + q2 t)<br />

+sin(px)sin(qy) C2 cos(c p p2 + q2 t)<br />

The initial transverse velocity is zero, so once again only the term involving<br />

cos(c p p2 + q2 t)iskept.<br />

> sol2:=select(has,rhs(sol),cos);<br />

sol2 := sin(px)sin(qy) C2 cos(c p p 2 + q 2 t)<br />

At x = a, sin(pa)=0,sop = m¼=a,wherem is a positive integer. Similarly,<br />

at y =2a, sin(q 2 a) =0,soq = n¼=(2 a), n being a positive integer. Vectoria<br />

substitutes the p and q relations into sol2 , and temporarily removes all<br />

coe±cients by setting C1 = C2 =1.

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

Saved successfully!

Ooh no, something went wrong!