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.

5.2. DIFFUSION AND LAPLACE'S EQUATION MODELS 231<br />

5.2.3 Benny's Solution<br />

A good scientist is a person with original ideas. A good engineer is<br />

a person who makes a design that works with as few original ideas<br />

as possible. There are no prima donnas in engineering.<br />

Freeman Dyson, British-born U.S. physicist (1923{)<br />

Greg Arious Nerd is currently teaching the mathematical physics course to a<br />

mixture of future engineers and physicists at Erehwon's most famous academic<br />

institution, EIT (Erehwon Institute of Technology). The students are being<br />

instructed in the use of the Elpam computer algebra system in solving their<br />

mathematical physics problems. As a classroom example, Greg selects a somewhat<br />

arti¯cial, but pedagogically useful, two-dimensional static potential problem.<br />

A circular annulus has an angular potential distribution Á(10;μ)=15cosμ<br />

speci¯ed on the inner radius r1 =10cmandapotentialÁ(20;μ)=30sinμ on<br />

the outer radius r2 = 20 cm. The question to be answered is, \What is the<br />

potential distribution in the annular region, and what do the equipotentials<br />

look like in this region?"<br />

The following recipe for solving this problem has been submitted by one of<br />

Greg's engineering students, Benjamin Beetlebrox III. Although, as a descendent<br />

of one of the founding families on Erehwon, he doesn't like his ¯rst name<br />

shortened, we shall take Freeman Dyson's words to heart and call him Benny.<br />

In addition to the plots package needed for plotting the equipotentials,<br />

Benny loads the VectorCalculus package, because it contains the Laplacian<br />

command, which will enable him to easily generate Laplace's equation for the<br />

potential Á(r; μ) in polar coordinates. The radial (r) and angular (μ) polarcoordinates<br />

are related to the Cartesian coordinates (x; y) through the relations<br />

x = r cos μ, y = r sin μ.<br />

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

Curious about the coordinate systems that the Elpam system supports, Benny<br />

enters the following command line. On executing this line, a list of the available<br />

two- and three-dimensional coordinate systems appears in a Help page.<br />

> ?coords;<br />

Through the hyperlinks at the bottom of the Help page, Benny is led to the<br />

coordplot and coordplot3d commands for plotting representative curves and<br />

surfaces in two and three dimensions, corresponding to holding each coordinate<br />

equal to a constant value. Closing the Help window, Benny uses coordplot<br />

to plot the lines r =constantandμ = constant in polar coordinates. The<br />

grid option is used to control the number of constant values and therefore<br />

the number of lines drawn. The default is grid=[12,12]. The values of the<br />

constants are added to the graph by including labeling=true. More detailed<br />

explanations and other options may be found on the coordplot Help page.<br />

> coordplot(polar,grid=[5,7],labelling=true,<br />

scaling=constrained);

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

Saved successfully!

Ooh no, something went wrong!