The Ten Things Everyone Should Know About Maple

Joseph D. Fehribach
Department of Mathematical Sciences
Worcester Polytechnic Institute
Worcester, MA 01609
E-mail: bach@math.wpi.edu

What follows is not a how-to page for Maple, nor is it a list of the short-comings in Maple. Rather it is a list of several key issues which many beginning Maple users are not sufficiently aware. In my view, most of the frustrations of new users result from misunderstanding something on this list.
• You probably think 0.5 = 1/2; Maple doesn't. Writing any number in decimal form causes Maple to compute numerically rather than using exact arithmetic. After introducing a decimal, all computations are approximate. This is largely unavoidable because most real numbers (e.g., 1/3) can not be written as exact (terminating) decimals.

• ``='' is not the same as ``:='', and ``2x'' is not the same as ``2*x''. Nor can you write ``pi'' if what you mean is ``Pi := 3.14159...'', or ``e^x'' if you mean ``exp(x)''. Maple is case-sensitive. Capitalizing a command may cause it to be inert. Also Maple distinguishes between ``expressions'' and ``functions''. So f:=x^2 is very much not the same as f:=x->x^2. In casual use, people rarely make these distinctions; Maple, like most computer software, has difficulty being casual. Some of the error messages resulting from these distinctions may be unclear or even cryptic, and may not appear until later in the Maple session; one has to think broadly when one gets a message which seems to be misleading.

• You probably know that not all functions are continuous; Maple sometimes has problems with this. Piecewise-defined functions in particular may incorrectly appear continuous.

• Sometimes Maple needs to get real! Every user must understand the difference between, for example, the commands root(x,3) and surd(x,3).

• Maple may give you the right answer, but not in the form you want. Everyone using Maple should learn the significance of eval, evalf, evalm, evalc, simplify, factor, expand, etc. In addition, everyone should become comfortable looking up in help new terms that may appear in Maple solutions (e.g., signum).

• Sometimes Maple just dies. Historically the easiest way to cause this was to enter a recursive definition, e.g., ``p:=p+1; p; '' Maple now successfully blocks this entry, but in previous versions such a command would lead to ``The Maple Computation Engine is no longer executing.'' Keep in mind that it is still possible to save the worksheet before you restart Maple. And the ancient adage of computer users still holds: Save frequently, and keep separate copies of important worksheets. Autosave may also be helpful.

• In Maple, commands which have previously been entered can always be edited and re-entered. Also lines of code can always be copied and pasted, rather than retyped. There is never any reason for retyping an entire line of code, particularly because of typographic errors.

• Sometimes what Maple sees is not what you see. It is sometime necessary to restart Maple and re-execute the worksheet, after fixing whatever problem confused Maple.

• Sometimes Maple replies with what appears to be exactly the same command you entered. So for example if you type "innerprod(a,b);" and Maple replies with "innerprod(a,b);" you may be left wondering what has happened. Sometimes Maple is simply expressing a result in the most compact form, but often this means that something has not been defined, or you have not loaded a package. In the example above, the issue is probably that the command "with(linalg)" is needed.

• One well-written line in Maple is worth as much as 1000 keystrokes on a hand-held calculator.

If anyone has nominations for other entries or if you disagree with any of my list, please send comments to Joseph D. Fehribach (bach@wpi.edu). Many thanks to Bill Farr, Nathan Gibson, Glenn Ledder, Alan Struthers, Doug Meade and Monica Brodzik for their comments and pointers.

For more information on Maple, try Introduction to Maple by William W. Farr.

Written by: JDF (E-Mail: bach@wpi.edu)
Last Updated: Monday, 12 February 2007