Basic arithmetic operators and creating mathematical expressions
Maple solves algebra and calculus problems the same way that you do with pencil and paper. It knows all the rules of arithmetic, algebra, trigonometry and calculus (and much more) and it never makes a mistake! But because Maple is a computer program you need to learn some commands that let you tell Maple what you want it to do for you.
You use Maple by preparing a Maple worksheet (or document -- in CS 310, you will always use Maple worksheets). When you launch the Maple program, select New Worksheet and a blank worksheet appears on the screen as a white page with a command prompt ( [> ) in the upper left corner. You can think of a Maple worksheet like a Microsoft Word document, EXCEPT that instead of the text simply representing your thoughts, the mathematical expressions in the text are evaluated by Maple and mathematical results are obtained. So Maple worksheets have two kinds of text: there is regular ‘text’ mode and there is ‘math’ mode. The regular text allows you to describe the mathematical steps that you are taking to solve a problem and thus allows a reader of your worksheet to follow along. The ‘math’ text is the part that actually gets the work done. It is important to know what mode (text or math) that you are typing in. In the top left of the Maple window there are two buttons, Math and Text. Whichever is highlighted is the mode being used currently. Switch modes by clicking the other button.
Maple uses standard arithmetic operators. The arithmetic operators have the standard order of precedence that you find on an electronic calculator.
Operator | Precedence |
---|---|
Unary negative (- ) and positive (+ ) |
Greatest |
Exponentiation (^ ) |
|
Multiplication (* ) and division (/) |
|
Addition (+ ) and subtraction (- ) |
Least |
Operators of equal precedence are evaluated from left to right. Precedence is overridden with parentheses.
When typing arithmetic expressions into a Maple worksheet,
Maple will change the symbol of some operators on the screen to make the expression
look like it would if you were to write it with pencil and paper.
When you strike the (*
) to do multiplication,
Maple changes it to a dot (like in math books).
When you strike the (^
) to create an exponent,
the cursor moves to a superscript position so it looks on the screen like an exponent.
Pressing the right arrow key ( → ) will exit the superscript mode and allow you to continue the expression.
When you strike the (/
) for division,
the cursor moves to the denominator of a fraction.
Whatever you type after that is put in the denominator.
Striking the up arrow key puts the cursor in the numerator of the fraction and
striking the right arrow key ( → ) will exit the fraction.
Some practice is necessary to get good at making Maple create the mathematical expression that you intend.