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.

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

> phi:=subs(fr=sqrt(x^2+y^2),cos(theta)=x/sqrt(x^2+y^2),<br />

sin(theta)=y/sqrt(x^2+y^2)g,phi):<br />

He then creates a piecewise potential function © equal to Á for 100 · x2 + y2 ·<br />

400 and zero otherwise. (The © output is suppressed here.)<br />

> Phi:=piecewise(100implicitplot(fPhi=5*ig,x=-20..20,y=-20..20,<br />

scaling=constrained,grid=[100,100]):<br />

The sequence of constant-potential plots is then displayed for i = ¡6 to+6,<br />

the result being shown in Figure 5.8.<br />

> display(fseq(F(i),i=-6..6)g);<br />

20<br />

y<br />

10<br />

–20 –10 10 20<br />

x<br />

–10<br />

–20<br />

Figure 5.8: Equipotential lines for the circular annulus.<br />

Although, he hasn't bothered to label the equipotential lines, Benny feels that<br />

the plot already conveys a better sense of the equipotentials than could be<br />

gained by staring at the formula, simple as it is. He has left the labeling of the<br />

equipotentials for you to carry out as a problem.<br />

PROBLEMS:<br />

Problem 5-15: Labeling of equipotential lines<br />

Using the textplot command, add appropriate potential values to Figure 5.8<br />

so that the equipotential lines are clearly identi¯ed.

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

Saved successfully!

Ooh no, something went wrong!