|
| Quick Study #33 |
October 2002 |
Maple
Introduction
Maple is a symbolic mathematical
calculation language that can simplify algebraic expressions, solve
equations, differentiate and integrate functions, evaluate series and
limits, plot graphs, and perform other mathematical operations. Maple
is available on Rensselaer laptops, public PCs, and UNIX workstations.
Maple for the PC (and upgrades) are for sale at the Campus Computer
Store in the VCC.
Running Maple
Starting Maple on a PC:
Double-click the Maple icon on the desktop. If there isn't an icon, pull
down the Start menu, and select the Maple program.
Starting Maple on a
UNIX workstation:
Left-click (once) on the Maple: Symbolic Math Package option
on the RCS Applications menu, or enter the command maple &
at a UNIX prompt.
After a brief interval,
the Maple window will appear, with a smaller, separate Untitled window
inside it. (If the Introduction window opens, you may either iconify
or close it, if you do not need any additional Maple help.) Make sure
the mouse pointer is inside the Maple window before you start to enter
commands.
Quitting Maple:
Save your work. To quit Maple, pull down the File menu and select
the Exit option.
Getting Started
Maple has an on-line Introduction
and a New User's Tour which can be accessed from the Help
menu at the top right of the main Maple window.
We have also created an on-line
tutorial at http://www.rpi.edu/computing/software/maple/RPItutorial8.mws.
To run it, download the file to the PC you are using and
double-click the local copy to start Maple.
It is an excellent
introduction to Maple and we suggest you work through this tutorial first.
Additional Help
Check out the ARC Maple
page at http://helpdesk.rpi.edu/update.do?catcenterkey=164.
It includes:
- a link to the Maple
tutorial described above
- a
link to an FAQ
- links to several Waterloo
Maple on-line resources
- information about using
Maple remotely
Maple also has extensive
on-line help. Click on the Help menu at the top right of the
main Maple window. You may also enter ? at the > Maple prompt.
If you know the topic or command on which you would like help, you can
enter ?topic; or help(`topic`)
to see a help window on a particular topic. For example, for help with
the diff command, you would enter ?diff;.
The consultants at the
ARC Help Desks can also help with using Maple as well as the installation
of Maple (and upgrades) on laptops.
Entering Commands
Enter all Maple commands
at the > prompt, and be sure to end each Maple statement with a semicolon
(or a colon, if you do not wish to have Maple display the result). If
you forget to include the (semi)colon at the end of a command, a warning
message will appear, and no further commands will work until you enter
the required (semi)colon.
If the command you just
entered generates an error message, instead of retyping the command,
you can click in the command, make the appropriate changes, and press
Enter. The error message will disappear.
Using the Palettes
There are three palettes which
you can use to simplify building mathematical expressions: Symbol
Palette - to enter symbols and Greek letters in expressions, Expression
Palette - to enter integrals, derivatives, sums, and products, and
Matrix Palette - to build matrices. To open a palette, pull
down the View menu, select Palettes, and then the appropriate
palette. For more information on using these palettes, please refer to
Maple's built-in on-line help.
Saving and Resuming Your Maple Session
If you would like to be
able to continue your Maple session at a later time, using the same
environment and variables as in your current session, pull down the
File menu and select Save or click on the icon of a diskette.
In the Save Session
window that appears, enter the desired filename, being sure the proper
directory is chosen. The filetype should be Maple Worksheet and the
filename should have an .msw extension. You can also choose to save
the file as Maple Text, plain text, HTML Source, or LATEX Source. Click
OK to finish saving the file.
When you are ready to resume
your Maple session, start up Maple as usual, then pull down the File
menu and select the Open... option or click the icon of an open
file folder. If the name of the desired file exists (e.g., filename.msw)
in the Files field of the window that appears, click on that filename
to select it; otherwise, type the desired filename in the Selection
field. Click OK to open the specified Maple session.
Printing Your Maple Session or Saving It to a File
The Print command
is used both to print your Maple session or save it to a PostScript
file. Pull down the File menu in the upper left-hand corner of
the main Maple window and select Print... or click on the icon
of a printer.
Note: Never print the file filename.msw,
which gets created when you save a Maple file. Printing this file will
only produce many pages of garbage.
On a PC: A
Print window opens. If the desired printer name doesn't appear in the
Name: field, select another printer from the pull-down list.
There are also other options you can select, e.g., number of copies.
Click OK.
To save your session to
a PostScript file, click the box to the left of Print to file.
Enter the desired filename in the dialog box which appears, and click
OK.
On a UNIX workstation: In the Printer Setup window, make sure that the button to
the left of the PrintCommand: field is selected, then click the Print
button. Your Maple session will print on the default printer. Or, you
can specify a particular printer by appending -Pprintername
to the lpr command in the Print Command field, replacing printername
with the name of the desired printer. There are other options you can
select.
To save your session to
a file, select the button to the left of the Output to File:
field. You can then either accept the default filename shown (untitled.ps),
or enter a new name. Click on Print at the bottom of the window.
This creates a PostScript file which you can print at any time, using
the lpr command from a UNIX prompt.
Maple Hints
- To
enter a comment, click on the T icon on the Tool Bar. Type text as
usual. To return to entering Maple commands, click on the [> icon.
- To assign a value to
a variable, use the assignment operator (:=), e.g., x:=y+2.
- To unassign a variable,
use a command of the form x:='x';
- If
you would like to refer to previous results, use the percent sign
( % refers to the most recent result, %% refers to the next to last
result, and %%% refers to the one before that). Of course, if you
assign a name to a result, it is very simple to refer to it again.
- To refer to an item
in a list, use the notation [k], where k picks out the kth
item in a list. For example, %[2]; refers to the second item in the
most recent result.
- Use the notation Pi
(note the capital P) to refer to the constant p.
|