Innhold

Maple

Maple is a powerful mathematics tool, especially suited for symbolic calculations.

There are several things you can use Maple for:

Starting and closing Maple

Maple introduced a graphical user-interface with version 9 which is easier and more user-friendly to use than previous versions. You can choose to use the old worksheet by choosing Classic Worksheet from the Start-menu. In addition to this, the Windows version of Maple offers a text-based interface for Maple which you can open by Start - Maple - Command Line Maple or writing cmaple_version_number in the Run-field which you can access from the Start-menu.

Starting Maple on a UNIX system is pretty easy. You can either start it by typing xmaple and get an X Windows interface with windows, buttons, etc. If you want the text-based version instead, you start Maple with maple.

To close the text-based interface, you use the command quit. Other interfaces are closed with File - Exit or Alt+F4. This article will focus on the graphical user-interface of Maple.

The first thing you see when starting Maple is a worksheet. This is where you can type your commands and texts and where results of calculations and graphics are displayed. You can open several worksheets at the same time by choosing File - New. The graphics can also be displayed in a dedicated window instead of the worksheet by going to Tools - Options, choose the tab Plotting and check for Window in Plot display.

Getting help

Maple's own help-function is very good. You can among several alternatives choose whether you want Full Text or Topic-search in the Help drop down menu.

It is also possible to get help in the worksheet by using the command ?what_you_want_to_know. For example, with, ?intro you'll get a short description of the program. By just typing ? you will get an explanation on how to use the help-system. In addition to this, you can use ??command for which parameters you can use with that function, and ???command will give you examples on how to use it.

The Help-menu also offers "New User's Tour" which gives a short introduction to syntax and examples on how to use them.

Maple and mathematics with text

As we mentioned earlier, it is possible to make documents with mathematical expressions, graphics and text combined.

You can turn normal text by choosing Insert - Text, pressing CTRL+T or the button T. It is possible to choose fonts and other ways of formatting and define styles. Maple have several styles you can choose from that are already configured.

To switch back to mathematics mode, you can choose Insert - Maple Input, CTRL+M or this button: [>a. As you see, you'll get a left angle bracket ( > ) which means you're ready to start using mathematical functions again.

You can choose between to ways of displayed mathematical formulas; either the way you type it or with standard notation. You can choose between these two options by going into the Tools - Options, tab I/O Display and edit Input Display.

The answer to a calculation can also be shown different ways. By choosing Tools - Options and then the tab I/O Display you will find Maple Notation, Character notation, Typeset Notation and Standard Math Notation in the option Output Display.

Maple views a command with text and results as a group. The start of each group is shown with a left angle bracket. You can choose if you want Maple to display this or not with View - Show/Hide Contents... - Ranges, and uncheck Sections and/or Execution groups depending on which brackets you want to display. You can also remove the right angle bracket in front of each command-line by converting the line to text with F5.

You can export a worksheet from Maple as both LaTeX and HTML, plain text and in Microsoft's-RTF. You can also use Maple Text which allows for exporting and editing.

Numerical calculations

Support for numerical calculation has been much improved from version 6/7, and linear algebra functions from NAG have been integrated.

As default, Maple uses exact algebra for integers. If you want your answers as decimal numerals instead, you have to ask for it with evalf. For that function, the default is giving the answer to 10 decimal places. If you want to change this, use Digits:=n:, where n denotes the number of digits.

Maple Share (Code) Library

As with many other mathematical programs, it is possible for users to make their own functions for Maple. Maple has its own language for functions, and you can look at the code for their functions to better understand how they work.

You're encouraged to share your functions at "Maple Code Library". It will include both functions and worksheets for solving problems. For more information concerning this type ?share. Unfortunately, this library is not available in version newer than 8.

Graphics in Maple

A plot will automatically be inserted into the worksheet as an 'inline plot' unless you tell Maple otherwise. You can choose to force it to open plots in separate windows with Options - Plot Display. You can also use plotsetup this way plotsetup(window); and plotsetup(inline); to turn inline/window on/off.

You can export graphics from a graphics window to another program by Right-clicking on the image, Copy and then Paste it where you want to put it. When the plot is in your worksheet, you can Right-click the plot, choose Export and which file type we want - DXF, EPS, GIF, JPG, POV, BMP or WMF. You can also export the whole worksheet by choosing File - Export as.

In addition to this, you can choose to save graphics to a file. You use the command plotsetup to do this. As an example, you can choose to save for PostScript: plotsetup(ps,plotoutput="plot.ps");. If you use the option cps instead of ps, you'll get a colored picture. You can do the same with GIF/JPEG too. If you're running your version of Maple in Windows, the file will be saved in the Maple-catalog as default.

For more information, see ?plotsetup.

You can also choose which file format you want to save the graphics in, you do this with the command interface. Saving a file in JPEG format: interface(plotdevice=jpeg); and interface(plotoutput="filename.jpg"); . With interface(plotdevice=inline); you get the plot back on the worksheet, and with the command interface(plotdevice=window); the plot will show up in a dedicated window.

Earlier versions than 9

The earlier versions of Maple are fundamentally different from the versions that have been distributed after 9. But it is still possible to open old worksheets.

How to open worksheets made in new versions with Maple 7 or 8

In all versions of Maple since 9 you have something called Maple Classic Worksheet. If you choose to save your file in this format you can open it in earlier versions and have it work properly. Although, if you have added functions that are not available in early versions, they will not work.

You can choose if you want to start Maple with classic worksheets prior to using its functions: Start - Programs - Maple - Maple Classic Worksheet. Any files created during that sessions will then be compatible with earlier versions of Maple.

A second alternative is saving an already worked on document as Maple Classic Worksheet. This is how:

  1. Choose File - Save as....
  2. You will see Files of type: where you can choose Maple Classic Worksheet (.mws)
  3. It is now possible to open the file in earlier versions of Maple