Welcome to the Rutgers Maple Help Pages!


 

Why learn Maple? Beginning Maple Common
Maple errors
More about
Maple
Using
Maple files
Other links
about Maple


In this Section: How to open a Maple file | Maple syntax | How to save a Maple worksheet | Opening Maple packages | Opening a saved Maple worksheet | How to exit Maple


Using Maple Files

How to open a Maple file

Most computers in Rutgers computer labs are equipped with Maple 10. To open Maple 10 on a Windows computer, go to the computer Start Menu. Choose All Programs > Class Software > Maple 10 > Maple 10. A Maple window will open.

For Maple 10, your screen should look like

Feel free to close the “helpful hint” in the middle of the screen.

Check: If you do not see a window that looks like this, did you choose Classic Worksheet or Command Line Maple 10?

Now, let’s open a new Maple worksheet. Go to the top of the screen and choose File > New > Worksheet Mode.

Your Screen should now look like this:

Several of the buttons at the top of the screen should look familiar for new file, open, save, print, cut, copy, paste, etc. These work as you expect them to.

You should notice a red command prompt near the top of the screen. See the next section for your first Maple commands.

[Back to the Top | How to open a Maple file | Maple syntax | How to save a Maple worksheet | Opening Maple packages | Opening a saved Maple worksheet | How to exit Maple]




Maple syntax

BASIC COMMANDS; COLON vs. SEMICOLON

In Maple, you will type mathematics commands, followed by the ENTER key.

Maple 10 is different from older versions of Maple. In previous versions, every Maple command needed to end with a semicolon (;) or a colon (: ). In Maple 10 this is no longer necessary, but if you use computers with older versions of Maple, it is necessary.

Let’s start with addition. Tell Maple to compute 2+2

and now press ENTER. What happened? Notice that the answer “4” is in blue at the center of the screen and Maple gave you a new command prompt.

Now let’s try 2+2; and press ENTER. Did Maple do what you expected it to do?

Finally, let’s try 2+2: and press ENTER. What is different this time?

Your screen should look like

Notice that when you end a Maple command with a colon, Maple still does the computation you asked it to do, but it does not show the answer. This may not seem useful now, but in the future, when you do more complicated computations, you may not be interested in seeing a very long answer, and just want Maple to save it.



GENERAL MAPLE FUNCTIONS

In addition to doing basic calculator arithmetic, Maple is a powerful tool for doing many other computations. To see a basic Maple function, let’s factor a large number. At the new command prompt, tell Maple:
> ifactor(203490);

ifactor is the Maple command for “factor an integer”. Like most Maple commands, Maple expects the command followed by an open parenthesis, then the input, and then a closed parenthesis.

Throughout this tutorial, you will see many more examples of Maple functions with the format functionname(input1, input2,…);



THE HELP FUNCTION

Maple has a very large and useful help menu. If you come across something you do not know how to do, there are two ways to access it.

For example, let’s pretend we did not already know how to factor integers.

Help Access 1: Type:

> ?factor

Wait a minute, and a new window should appear to tell you about the factor functions in Maple. You can type ?(any math word) and if Maple knows how to do it, a new window will appear.



Help Access 2: Type:

> help(factor);

Notice that the exact same thing happened as before. You can decide which way of accessing Maple help is most comfortable for you.



A FINAL WARNING ON SPELLING/MISTAKES

Maple is a very useful tool, but it is a computer. Maple will do exactly what you tell it to. If you type a word that Maple does not know (or if you misspell a word), Maple will give you an error. Good News! You can always go back and edit your mistakes. You have NOT broken Maple. Maple is just telling you that it didn’t understand and you should try again. Maple is case sensitive, so even correctly spelled commands with incorrect capitalization with cause problems. Let’s make a mistake on purpose and see this in action.

Try to factor the number above with

> ifctor(230490);

Your output should look like

Notice that Maple just repeated what you told it to do. That is because maple does not recognize the word “ifctor”.

Now, move the blinking cursor back to the line where you typed ifctor(230490); (you can use the mouse or the arrow keys on your keyboard), and fix the spelling. Maple fixed the error and factored the number, just as we wanted it to!

If Maple does not do what you expected it to, make sure to first check your spelling carefully (capital/lower case letters count!)!



[Back to the Top | How to open a Maple file | Maple syntax | How to save a Maple worksheet | Opening Maple packages | Opening a saved Maple worksheet | How to exit Maple]




How to save a Maple worksheet

Maple worksheets are saved as .mw files. (Some older versions of Maple save worksheets as .mws files as well.) To save a Maple worksheet, go to File > Save As, and in the new window, Save your file in a useful place.

WARNING: If you are working in a computer lab, BEFORE you close Maple, make sure your saved file is in a place where you will be able to find it again. It is also a good idea to email a copy of the saved Maple worksheet to yourself. Rutgers computer labs tend to erase all documents sitting on the computer when you log out, and you don’t want to lose all your hard work!



[Back to the Top | How to open a Maple file | Maple syntax | How to save a Maple worksheet | Opening Maple packages | Opening a saved Maple worksheet | How to exit Maple]




Opening Maple packages

Maple is a very large program. To save time and memory, Maple only opens the most commonly used functions when you start a new Maple session. However, there are MANY more functions you might want to use. These are saved in Maple packages. For example, the Maple package “plots” has many useful tools for graphing in Maple. To open a Maple package type

>with(package_name);

When you hit enter, Maple will give a list of all the new functions you can use in the package called package_name. Try

>with(plots);

and see what happens.



[Back to the Top | How to open a Maple file | Maple syntax | How to save a Maple worksheet | Opening Maple packages | Opening a saved Maple worksheet | How to exit Maple]




Opening a saved Maple worksheet

When you are working on a Maple lab, you may save a Maple worksheet, and want to work on it later. To open a saved worksheet, open Maple as before. Then, either choose the “open” file button at the top of the screen , or go to File > Open. Find your file in the open window.

WARNING: When you open a saved Maple worksheet you will see all the Maple commands and results you had computed in your previous Maple session. However, THESE VALUES ARE NOT IN MAPLE’S MEMORY YET. To make Maple remember all its previous computations, it is wise to press the “execute all” button at the top of the screen. It looks like 3 blue exclamation points in a row.

This will help prevent errors when you do more complicated Maple exercises with variables and graphs.



[Back to the Top | How to open a Maple file | Maple syntax | How to save a Maple worksheet | Opening Maple packages | Opening a saved Maple worksheet | How to exit Maple]




How to exit Maple

Make sure you’ve saved all your work and emailed it to yourself first. Then, you may leave Maple by clicking the X in the top right corner of the Maple window.



[Back to the Top | How to open a Maple file | Maple syntax | How to save a Maple worksheet | Opening Maple packages | Opening a saved Maple worksheet | How to exit Maple]


Maintained by Last modified 9/5/2006. Address questions to the Undergraduate Office of the Department of Mathematics.