Introduction to Maple Versions 7 to 15

Information in this document was compiled and updated by Angie Gardiner from:
Multivariate Mathematics with Maple by James A. Carlson and Jennifer M. Johnson, copyright 1996
Introduction to Maple V.4 in the Undergraduate Computer Lab by James A. Carlson and Jennifer M. Johnson, 1993
Math 2250 Maple Tutorial by Nick Korevaar
Math 2250, 2270, 2280 Maple Tutorial by Grant Gustafson, 2012

What is Maple?

 Maple is a software package called a computer algebra system. It does
symbolic computations, such as derivatives and integrals. In addition, it
is a numerical laboratory, suited for numerical computation, simulations,
and what-if experiments in science and engineering. The graphics features of Maple are useful for geometrical visualization of
ideas, understanding definitions and exploring techniques. Use the graphical
interface to develop your intuition while learning new topics.
The Math Center Lab
Before you start learning Maple, it is helpful to familiarize yourself with the facilities in the computer lab in the T. Benny Rushing Mathematics Student Center. Please ask in the Math Center for a printed
copy of the document

Introduction to the Computer Lab Campus departments with computer facilities have installed maple under
a campus-wide site license. It may be convenient to do xmaple sessions
in your own department, or 24/7 from home with maple, a non-graphical
interface running in an xterm window. Starting Maple
Unix Terminal Instructions. If you are using a UNIX station in our lab, either move the cursor into the local window and type xmaple &, use the middle mouse button on the background to get a menu from which you can select X Maple V12 (or another version), or click on the maple leaf icon at the bottom of the screen. Soon a new window will appear. Click and hold the mouse, then move the window. When satisfied, release the mouse button. MacLab Instructions. If you are using a Mac in our lab, click on the icon at the upper right corner of your screen labeled /. This will open a new window. Click on the Applications button in this window, and then select XDarwin from the applications and run it rootless. After a couple of minutes, you will get a terminal window . In this window, type ssh sunfire. Now you can type xmaple at the prompt to start Maple. Once Maple opens, you can use the buttons in the upper right corner of each window to resize the windows if you like. Saving a file To save a Maple session that you have been working on and give it a name, choose File -> Save As from the menus at the top of the screen. A Save As window will appear. If you want to save your file under the name hwk1 (for example), enter hwk1 in the Filename box. If there is already a *.mws in the box, make sure that you delete the *. Then hit the Return (Macs) or Enter (UNIX) key, or click on OK. It is best to keep file names simple , using only letters and numbers, without any special symbols. In particular, it is a good idea to avoid using spaces or periods. Maple will add the .mws or .mw extension to identify the saved file as a Maple worksheet. Be careful about reusing a file name from a previous session. For example, if last week you made a file named Lines.mws and this week you open a new Maple session and call it Lines.mws also, this will ERASE the file you created last week. Notice that the Save As window lists the Maple files in your current directory, so you can see which names you have already used. Once you have given your file a name, you can do File -> Save, or use the save icon at the top of the window. Crashed Maple Recovery After a crash of maple, there is a file in the same directory with extension _MAS.BAK which contains all recent typing since the last save. Load the file that crashed and also this _MAS.BAK file with matching file name. Mouse-copy from the save-file into the crashed file, to get back whatever typing is possible. Be selective, then save the file in case of another crash event. Copy/Paste Maple rookies can avoid typing errors by copying known valid code with the mouse (highlight, then ctrl-C ), followed by paste onto a new line (mouse click at target location, then ctrl-V). Copy works from text documents and also PDF documents (copy requires adobe reader ). To paste, try the menu item PASTE. Then ctrl-V. Then RIGHT MOUSE BUTTON. Then MIDDLE MOUSE BUTTON . If none of that works, then hold down the SHIFT KEY and try the mouse buttons again. Mac Workstation. If you are using a Mac, use the mouse to highlight the command(s) you want to copy, then choose Edit -> Copy from the menus. Move the cursor to where you want to paste the text , then choose Edit -> Paste. Unix Workstation. Press and hold down the left mouse button at the beginning of the text you want to copy. Still holding the button down, drag the mouse until you have highlighted the desired text. Release the mouse button. Move the cursor to the position where you want to paste. Click the left mouse button to mark this spot. Click the middle mouse button to paste. Repeat Paste Copied text stays in memory and anytime you press the middle mouse button (or choose Paste from the Edit menu) it will be pasted at the current cursor position. This can cause surprises, if you accidentally hit the middle mouse button. An immediate ctrl-z will undo the error. For safety, mouse-copy some blank space to clear the copied text. Editing a Saved Maple file It may take more than one session at the computer to complete your analysis. Save your work on disk, and come back to the lab and open your Maple file again to continue working. Often it will be useful to take with you a printed copy of your Maple session so you can think about what you have done so far, and how you want to continue when you come back to the lab, or so that you can get help from a lab instructor, a friend, or the instructor. Cleaning Up. You can also delete text or commands by using the mouse to highlight the area you want to delete , then hitting the Delete key. To delete an entire computation or a plot, move the cursor into the command block (square left bracket on the left screen edge) that produced the computation or click on the plot. Hold down the Control key and press the Delete key. The Edit menu has a duplicate. Accelerate typing by learning key shortcuts from the menus. Comments In any command line, Maple ignores anything typed after the # symbol to the end of that line. An example: solve ( 3*x + 2*y - 5*z, z); # Solve for z in terms of symbols x and y Block Comments If you want to add comments between commands, move the cursor into the first command. Then click on the icon T at the top of the screen (left of [>) . A new text block appears below and the cursor moves into the block. The pull-down menus and buttons at the top of the Maple window allow you to control the size and style of the text you enter. Default text is black at 12 points. Printing To print your Maple session directly from Maple, choose Print from the File menu (or click on the Printer icon ). In the Printer Setup window that appears, check that Print Command is selected, rather than Output to File, and click Print. Alternatively, you can save your Maple session to a PDF file, then then print it from acroread (adobe reader). Choose File --> Export
 and save the worksheet as a PDF file, like hwk1.pdf. To send this
file to the printer, choose Print on the adobe reader (acroread) menu.

If you are looking for a simple way to email your worksheet, then try
the easiest solution: copy with the mouse and paste it into the email
program.

 The file type .mws can only be printed from xmaple. Print PDF files from acroread (adobe reader). Don't use lpr on PDF files, because of printer filters that silently change the print file contents.

The print dialog box may offer to print to a file. Some maple versions
don't have the feature. Don't print to a file. Use the Export command
to output the worksheet to PDF, which is a portable format.

The dialog box inside Maple for the printer may have a default print
command (lpr). It may be changed to lpr -l or to lpr - oraw in order
to solve printing problems. **If you are having trouble printing, please ask the lab assistant for help.** Coming back for more When you come back to work on a Maple file that you've already started, your task now is to reopen that file and get back to where you left off. To open a file, choose File -> Open. An Open File window will appear . In this window you will see a list of Maple files. Click on the file that you want to open , then press the Enter key or click OK. It is not enough to just OPEN the saved file! Although Maple displays a record of your last session, it unloads variables. One way to get Maple to reload variables from last time is to go to the beginning of your file and hit the Return key until you get to the last line of the file. (You might want to use the arrow keys to skip the lines that displayed plots or requests for help files). This will ensure that Maple's memory of your last session is restored. A shortcut for executing the entire worksheet is to click the icon !!! at the top of the window. Inserting a #-sign at the front of plot or help lines will quiet down the worksheet re-execute. Using Maple The best way to learn Maple is by using it. But first, a few remarks about Maple. The symbol > ; is the command prompt, which Maple uses to signal you that it awaits your command. Commands normally end with a semicolon (;) if you want to see the output or a colon (:) if you don't want to see the output. Maple is a programming language. It has strict rules of punctuation, grammar, and spelling. If something is not working right, check to see if you are following the rules. For example, the Mapleengine will get confused if you write 2x instead of 2*x. Check for things like misspelled names or extra or missing parentheses . If further thought doesn't clear things up, ask a human for help. You will soon become an expert troubleshooter. While learning Maple, you will often have questions about how a particular command or function is used. Fortunately, Maple can help . To ask about a command whose name you know, just type a question mark, followed by the name of the command. Thus ?solve gives information on the solve command. Scroll forward to the examples at the end. Most questions are answered by the examples. If not answered, then use the technical information at the beginning of the help file. For specific help on how to do something in maple, use a google search in a browser - it is faster than sorting through maple's help system. The help system in maple supports full text search or topic search of Maple's help files. You will find these options under the Help menu in the upper right corner of the Maple window. You will also find other handy things , such as Introduction, New User's Tour, and Using Help. Rookies are frustrated by the help system, but encouraged by google searches, which can answer a specific question. Next: Hand Calculator Examples.