To use Maple, you type in a command (which you should think of as a question)
and Maple prints out the answer. Let's begin with some simple arithmetic. To
solve the problem at hand, we need to calculate the surface area of the earth.
Given that the earth's radius is approximately 4000 miles, and that the surface
area of a sphere is given by the formula
it is quite straightforward to ask Maple to do the computation:
| 4 * 3.14 * 4000. * 4000.; |
When you type in an arithmetic expression, followed by a semicolon, followed by
the Enter key, Maple prints back the expression's value. You should
have just discovered that the earth's surface area is 200,960,000 square miles.
When you type a command to Maple, don't forget the semicolon--it is a crucial
piece of punctuation. Maple will not answer your command until it knows you
are through asking it. For example, if you type
| 4 * 3.14 * 4000. * 4000. |
nothing will happen until you type a semicolon and press the Enter key.
| ; |
What all of this implies is that you don't have to type a command on a single
line. You could, if you felt like it, type every piece of a command on a
separate line. Maple will patiently wait until you type the semicolon. Try it
out with the command above.
Naturally, Maple knows about more than multiplication. Among other things, it
knows about addition (+), subtraction (-), multiplication (
*), division (/), and exponentiation (^). We could, for
example, write the surface area computation using the exponentiation operator
| 4 * 3.14 * 4000.^2; |
and get exactly the same answer as before.
Joseph L. Zachary
Hamlet Project
Department of Computer Science
University of Utah