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.

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

Professor Simon Legree, 1 who is teaching the course, has a reputation for<br />

assigning large numbers of often di±cult problems, so Vectoria decides once<br />

again to let Maple help her in deriving the solutions. Although she could do<br />

the problems by hand, it seems smarter in the long run to develop a computer<br />

algebra approach to lighten the workload and to avoid mathematical mistakes.<br />

On talking to the professor, she ¯nds out that, surprisingly, Legree not only<br />

agrees but suggests that it might be wise to start with a relatively simple<br />

problem, before tackling the more di±cult ones. Amazed that Legree, despite<br />

his hard-nosed reputation, has been so helpful, Vectoria decides to follow his<br />

advice and selects a problem involving the transverse motion of a string that<br />

has been plucked and released from rest.<br />

Since she doesn't yet know how to include sti®ness in the string, she opts<br />

to make use of the linear wave equation that neglects sti®ness. The horizontal<br />

string is ¯xed at its endpoints, x =0andx = L>0, and is given an initial<br />

transverse displacement Ã(x; t =0)=2hx=L for 0 · x · L=2 andÃ(x; 0) =<br />

2 h (L ¡ x)=L for L=2 · x · L. Vectoria recognizes that this is a triangular<br />

pro¯le with a maximum displacement h at the center (x = L=2) of the string.<br />

Professor Legree has also stressed that his marking assistant has been instructed<br />

not to give full credit for a problem solution unless it is accompanied by some<br />

sort of meaningful plot as well as some pertinent discussion.<br />

So Vectoria, anticipating that she will animate the vibrational motion of the<br />

string, begins her recipe with a call to the plots package, and enters the wave<br />

equation WE for the tranverse displacement Ã(x; t) ofthestringattimet.<br />

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

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

WE := @2<br />

@<br />

Ã(x; t) =<br />

@x2 2<br />

Ã(x; t)<br />

@t2 c2 On applying the pdsolve command to WE without any options,<br />

> pdsolve(WE);<br />

Ã(x; t) = F1 (ct+ x)+ F2 (ct¡ x)<br />

Vectoria ¯nds that the solution is given by Ã(x; t) = F 1(ct+ x)+ F 2(ct¡ x),<br />

where F 1and F 2 are arbitrary functions. This is the well-known general<br />

solution of the wave equation, which is not too useful for solving the present<br />

problem with speci¯ed boundary and initial conditions. Clearly, a hint should<br />

be provided. She could be quite general and enter HINT=f(x)*g(t), butshe<br />

realizes that sine and cosine functions clearly satisfy the wave equation. Since<br />

sin(kx), where k is an undetermined constant, is equal to zero at x =0andthus<br />

satis¯es the boundary condition there, she provides the HINT=sin(k*x)*g(t)<br />

and integrates and builds up the solution.<br />

1 Unfortunately, Mrs. Legree, when naming her newborn son, chose Simon as a ¯rst name.<br />

She was unaware that Simon Legree was the cruel plantation owner in Harriet Beecher Stowe's<br />

novel, Uncle Tom's Cabin.

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

Saved successfully!

Ooh no, something went wrong!