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.

216 CHAPTER 5. LINEAR PDE MODELS. PART 1<br />

The plane wave is assumed to be traveling in the positive x-direction, its time<br />

part being e ¡I!t ,whereI = p ¡1. In the ¯rst region, x psi[1]:=exp(I*k[1]*x)+a*exp(-I*k[1]*x);<br />

Ã1 := e (KxI) (¡I Kx)<br />

+ ae<br />

The ¯rst term is the incident plane wave, while the second term is the re°ected<br />

wave with amplitude a. Since the transmission and re°ection coe±cients involve<br />

ratios of squared amplitudes, the amplitude of the incident wave has been set<br />

equal to one without loss of generality. The energy re°ection coe±cient then is<br />

given by R = jaj2 =1=jaj2 .<br />

In region 2 (0 · x · L), the wave form must be made up of waves traveling<br />

in the positive and negative x-directions, viz., Ã2 = beIk2x + ce ¡Ik2x ,with<br />

undetermined amplitudes b and c.<br />

> psi[2]:=b*exp(I*k[2]*x)+c*exp(-I*k[2]*x);<br />

Ã2 := be (3 IKx) (¡3 IKx)<br />

+ ce<br />

In the third region, x>L, there will be only a transmitted plane wave, with<br />

spatial part Ã3 = deIk1x ,thewavenumberbeingk1 = K since the string<br />

density is the same as in the ¯rst region. The fraction of the energy incident in<br />

region 1 that is transmitted into region 3 is given by the transmission coe±cient<br />

T = jdj2 =1=jdj2 .<br />

> psi[3]:=d*exp(I*k[1]*x);<br />

Ã3 := de (KxI)<br />

To evaluate the four unknown coe±cients a, b, c, and d, four independent<br />

equations are needed. The ¯rst two equations, eq1 and eq2 ,followfromthe<br />

physical continuity of the string. The string segment in region 2 is joined to<br />

the segment in region 1 at x =0andtothesegmentinregion3atx = L.<br />

> eq1:=eval(psi[1]=psi[2],x=0);<br />

eq1 := 1 + a = b + c<br />

> eq2:=eval(psi[2]=psi[3],x=L);<br />

eq2 := be (3 IKL) + ce (¡3 IKL) = de (KLI)<br />

Since the wave equation, and therefore the second spatial derivative, remains<br />

¯nite everywhere along the string, the ¯rst derivative of à with respect to x<br />

must be continuous. So, continuity of the slope at x =0andx = L yields the<br />

third and fourth equations.<br />

> eq3:=eval(diff(psi[1],x)=diff(psi[2],x),x=0);<br />

eq3 := KI¡ aKI =3IbK¡ 3 IcK<br />

> eq4:=eval(diff(psi[2],x)=diff(psi[3],x),x=L);<br />

eq4 := 3 IbKe (3 IKL) ¡ 3 IcKe (¡3 IKL) = dKe (KLI) I<br />

The system of four equations is now solved for the four unknown amplitudes,<br />

and the solution is assigned.

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

Saved successfully!

Ooh no, something went wrong!