Maple is a computer application that does mathematics. It
is also a text processor so comments can be entered
to accompany math calculations. Class demonstrations will show you how it works.
Handouts like this one will expand upon the information in
class demonstrations. Please bring them to each
lab session.
Lab assignments will also be distributed in a collection
of separate handouts. All handouts will be produced
and printed using Maple, in Document Mode.
Section 1. Document Mode and Worksheet Mode
Maple can be used on one of two modes , Document Mode and
Worksheet Mode. Document Mode is the
default. It is characterized by a blank work sheet in which the user can enter
text (like what you see above)
or mathematics (like what you see below).

As you can see, mathematics entries appear as they would
in a textbook. Special math symbols like integrals
can be entered in templates chosen from a pop-up menu. For example, to enter an
integral, one types the
word int and then presses the escape key. This brings up a menu containing
several integral templates. The
template is entered into the document by selecting it (use the arrow keys) and
pressing the return key (or,
using the mouse, click on the template).
Section 2. Maple in Document Mode
Basic Rules for Document Mode
1.To enter text press the key combination Command-T . The
input cursor will then be vertical
indicating that a text entry can be made. Press the [return] key to move to a
new paragraph. Press
[shift]-[return] to move to a new line in the same paragraph. Text para graphs
can be styled by
selecting the desired style from the pull-down menu.
2.To enter mathematics for processing press the key
combination Command-R . The input cursor
will then be slanted indicating that a math entry can be made. Press the
[return] key to send the entry
to the Maple kernel for processing. The output will appear below, with a label.
More than one
command or procedure can be entered for processing. Type a semi-colon or a colon
to terminate one
procedure and begin another in the same math entry. Press [shift]-[return] to
move the input cursor
to a new line in the math entry. If a procedure or a command is terminated with
a semi-colon, then
the corresponding output is shown below. If the terminator is a colon, then the
output is suppressed.
If there are several outputs for a single math entry, then only the last one
gets a label for future
reference.
Some examples involving simple arithmetic calculations are
shown below.
In-line Evaluation
Each of the fol lowing math entries was processed by pressing Command-equals
When this is done the entry is sent to the kernel for processing and/or
simplification
and the output appears on the same line after an equals sign. This is
referred to as
in-line evaluation |
Arithmetic
Addition, subtraction , multiplication and division are indicated with
and / , respectively. The
dot for multiplication is entered by pressing the asterisk key, [shift]-8.

Output to an arithmetic evaluation is in exact form,
unless the expression to be evaluated contains a decimal
number. In this case the output is also a decimal, defaulting to 10-digit
accuracy.

Maple simplifies an exact entry as much as it can.

A complicated expression like the one above can be copied
and then pasted into another math entry, then
edited.

Regarding Division
When the division key / is pressed Maple automatically forms a stacked
fraction like
this :1/2. If you want an "in-line" fraction like this: 1 / 2 , then
press the backslash key,
\ , and then press the division key, / . |
Parentheses will be required for expressions like two
shown above.

When multiplying terms that are inside parentheses use an
explicit multiplication symbol.

Multiplication can also be indicated by typing a space
between the parentheses, as shown below.

Square Roots
To apply the square root function type sqrt.
sqrt (144) = 12
The square root symbol can be obtained by typing sqrt, then pressing the escape
key [esc] to bring up a popup
menu. Press [return] to choose the first entry in the menu.

Square roots are automatically simplified, if possible.

When a decimal number is entered, the square root is
automatically approximated to 10 digits.

The square root of -1 is denoted as I .

Other roots can be obtained using fractional exponents.
However fractional exponents are not always
simplified as one might expect. See the next example where 81 /3 does not
simplify at all. However, by right-clicking
on the "output" and choosing Simplify/Power from a contextual menu it simplifies
to 2.

Section 3. Contextual and Pop-up Menus
In Document Mode procedures can be applied to math
entries, and their
outputs, by right-clicking on the expression and choosing a command from
a contextual menu. The menu that appears after right-clicking on the
expression
is displayed on the right.
This is especially useful for new and casual users who are
not familiar with
Maple commands. It is also handy when a decimal approximation is desired.
See the following entry. The initial output is an exact simplification. A
contextual menu command yields the approximation.

The approximation was obtained by right-clicking on the
exact output and
choosing Approximate/5 on the menu shown on the right.
Contextual menus are also available in Worksheet Mode.

A Contextual Menu
Pop-up menus can be used to enter math expressions and
special symbols. For example, the following limit
calculation was made by typing the word limit, pressing the escape key, and
choosing the first template on a
pop-up menu.

The pop-up menu for the word "limit" is shown below.

The pop-up menu for "limit".
The following integral calculation was made by choosing a
template from a pop-up menu that was obtained
by typing the word int (and pressing the escape key). The numerical
approximation was then generated by
right-clicking on the exact output formula and choosing Approximate/5 on the
contextual menu.

The evalf procedure
Decimal approximations can also be obtained by applying a procedure named evalf
(read this as "evaluate as
a floating point number"). The next entry illustrates one way to do this.
0.9513426804
(1)
Referring to the last math entry, the semi-colon
terminatintg the integral calculation signals that another
command, evalf , follows. The percent sign in evalf refers to the previous
output, the evaluated integral.
When evalf is applied the default accuracy of the approximation is 10 digits. To
get more digits add the
desired number right after the expression to be evaluated, as shown below.

This is 20 digit approximation to π .
The constant π
To enter the constant p type pi and then press escape,
return. Rules for entering other special constants,
elementary functions, and fundamental math symbols are discussed in the next
section.
Section 4. Math Entries in Document Mode
The Elementary Functions of Calculus
The elementary calculus functions are entered just as they appear in most
textbooks. See the following list.
 |
the exponential function
the natural log function
the natural log function
the base b log function(go to the subscript position by
pressing the underscore key) |
Entering Math Constants (Math entry mode: Command-R)
| To enter |
Type |
To obtain |
| The constant π |
pi [esc] [return] |
π |
| The constant e |
e [esc] [return] |
e |
The exponential function
in the form ex |
exp [esc] [return] |
ex |
The following table contains examples illustrating how to
enter various mathematical expressions.
Entering Math Expressions (Math entry mode: Command-R)
In-line evaluation (Command-equals) of the derivatives and integrals in the
table have the following outputs.

and

and
