Introduction to MAPLE at UMBC


Contents

  1. Getting To MAPLE at UMBC
  2. General Use of MAPLE
  3. Linear Algebra Commands
  4. Number Theory Commands

[Prev] [MAPLE Intro] [Next]

MAPLE is a commercial symbolic algebra system which allows computations in many fields of mathematics and engineering. Packages can be used to extend the MAPLE language in areas where the basic language is weak.

Getting To MAPLE at UMBC

At UMBC you may either purchase a personal copy of MAPLE, using the site license, or use the MAPLE installation on the UMBC machines.

UMBC has a site license for MAPLE which allows students to install it on the own PCs or Macs. The bookstore will sell you copies for about $10. Details of the site license can be read by logging into my.umbc.edu and selecting the Business Services tab.

MAPLE is available at UMBC in the microcomputer labs in the Computer Science and Engineering building. It is also available on UMBC servers which are accessible across the internet or by dial-in access. Access to either set of machines is available to any UMBC student using the account name and password they use for e-mail. Account names and passwords are available from the help desk in the CS & Eng building.

2. General Use of MAPLE

The Basics

At the MAPLE command prompt (which usually is a "greater than" sign, ">") type the command to be run, ending with a semicolon, and then press the Return key to have MAPLE evaluate the command. As a simple example, if you want to add two integers type:

3 + 12;

Intermediate values can be saved by giving them a name and assigning them a value with the ":=" operator. If the following two commands are run the second output will be 1:

thesum := 3 + 12;
thesum - 14;

Maple is very careful about exact values. Exact values are things like symbols and integers. Thus sin(3) is an exact value and when you evaluate sin(3) you get sin(3) back as an answer. Contrast this with the fact that 3.0 is an approximate value and thus sin(3) evaluates to the approximate value 0.14122. The evalf() operator will force a numerical evaluation.

> sin(3);
                                    sin(3)

> sin(3.0);
                                  .1411200081

> evalf(sin(3));
                                  .1411200081

When you are done with MAPLE, type the command quit; (remembering to include the semicolon) and press the return key.

A more extensive MAPLE tutorial is available at www.mapleapps.com.

Help on MAPLE Commands

There are several ways to find help in MAPLE. You can search by topic or by the specific MAPLE command (if you know it). In each case the basic command used is
?topic.
This always works if the topic is an actual MAPLE command and sometimes works if it is a general topic.

> ?matrix

HELP FOR: matrices
   
SYNOPSIS:   
- A matrix in Maple is represented as a two dimensional array with row and
  column indices indexed from 1.
   
- Matrices can be input either directly, as a two dimensional array, or using
  the matrix command in the linear algebra package.  For example,
  array(1..m,1..n); creates an empty m by n matrix.  See array and
  linalg[matrix] for further details.
etc...

This way of getting help will return the entire help entry for the topic. If you are only interested in part of the entry you may use one of the commands info, example or related:



> example(matrix);
Examples:
> linalg[matrix](2,3,[x,y,z,a,b,c]);
                                [x    y    z]
                                [           ]
                                [a    b    c]
  etc ...
> related(matrix);
See Also: linalg[matrix], linalg, array, vector, evalm, print, map, type  

Editing Command Lines

Maple allows you to edit a command line you are working on. This is simple on the Windows/Mac interface, as you can simply move the mouse, click and type. You may also edit lines if you are working across a network connection. You can move forward or backward within the line by using the left and right arrow keys. The up and down arrows allow you to review and edit previously executed commands.

Command lines may also be edited with a subset of the emacs/pine/bash command set. Some of the recognized commands are listed here.

Maple allows you to to refer to a previous expression with the percent sign, '%'. Thus, when these two commands are run the output of the second command will be 21:

4 + 10;
% + 7;

Older versions of Maple used the double quote, rather than the percent sign, for this operator.

Referring to expressions two or three back can be done with the operators '%%' and '%%%'.


[Prev] [MAPLE Intro] [Next]
Robert Campbell
17 April, 1999