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.

252 CHAPTER 6. LINEAR PDE MODELS. PART 2<br />

> F[m,n]:=subs(fp=m*Pi/a,q=n*Pi/(2*a),_C1=1,_C2=1g,sol2);;<br />

Fm; n := sin<br />

à r<br />

³<br />

m¼x<br />

´ ³<br />

n¼y<br />

´<br />

2 2 m ¼<br />

sin cos c<br />

a 2 a<br />

a2 + n2 ¼2 !<br />

t<br />

4 a2 Since she will need it for determining the coe±cients, Vectoria evaluates Fm;n<br />

at t = 0, labeling the result gm;n.<br />

> g[m,n]:=eval(F[m,n],t=0);<br />

³<br />

m¼x<br />

´ ³<br />

n¼y<br />

´<br />

gm;n := sin sin<br />

a 2 a<br />

The initial pro¯le of the rectangular membrane is entered.<br />

> f:=4*h*x^2*(a-x)*y^3*(2*a-y)/a^7;<br />

f := 4 hx2 (a ¡ x) y3 (2 a ¡ y)<br />

a7 Now, the general form of the transverse displacement at time t will be given by<br />

the following linear superposition,<br />

1X 1X<br />

1X 1X<br />

Ã(x; y; t) = Am;n Fm;n ´ Ãm;n; (6.3)<br />

m=1 n=1<br />

m=1 n=1<br />

with the coe±cients Am;n determined by the initial pro¯le f. Setting t =0in<br />

(6.3) yields<br />

X1<br />

1X<br />

Am;n gm;n = f:<br />

m=1 n=1<br />

Multiplying both sides by sin(m 0¼x=a)sin(n0¼y=(2 a)), integrating over x from<br />

0toa and over y from0to2a, and taking the double sum will yield zero unless<br />

m = m 0 =andn = n 0 . Removing the primes and solving for Am;n yields<br />

Z 2 a Z a<br />

Á Z 2 a Z a<br />

Am;n = fgm;n dx dy<br />

g<br />

0 0<br />

0 0<br />

2 m;n dx dy:<br />

Using this relation, we calculate Am;n in the next command line.<br />

> A[m,n]:=int(int(f*g[m,n],x=0..a),y=0..2*a)/int(int(g[m,n]^2,<br />

x=0..a),y=0..2*a):<br />

Then, the general Fourier term Ãm;n = Am;n Fm;n is determined, the result<br />

being simpli¯ed assuming that m and n are integers and a>0.<br />

> psi[m,n]:=simplify(A[m,n]*F[m,n]) assuming m::integer,<br />

n::integer,a>0;<br />

Ãm; n := 3072 h ¡ 4+8(¡1) m + ¼2 n2 (¡1) n +2(¡1) (m+n) ¼2 n2 +8 (¡1) (1+m+n) +4(¡1) (1+n)¢ ³<br />

m¼x<br />

´ ³<br />

n¼y<br />

´<br />

sin sin<br />

Ã<br />

a 2 a<br />

c¼<br />

cos<br />

p 4 m2 + n2 !<br />

t<br />

.<br />

(m<br />

2 a<br />

3 ¼8 n5 )<br />

Given the mathematical form of f, Vectoria is not surprised at how complicated<br />

the coe±cient turns out to be in Ãm;n.

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

Saved successfully!

Ooh no, something went wrong!