Examples
- Open a new document in Maple and complete each example.
Enter the expression in Maple by entering the following keystrokes in Maple. Watch the results of each keystroke.
3 + 7 / 2
The [↵ Enter] key must be pressed to reexcute any command that you edit in your Maple document. This step will often be assumed, but is included in this lesson to help you get started with Maple.
Comment: Note that the result is left in the form of a rational fraction and is not displayed as 6.5. Maple leaves results in this form unless a decimal value is included in the expression. This emphasizes the symbolic nature of its computations.
Use your mouse to position the Maple pointer (looks like an "I") between the character
3
and the+
sign in the command you just executed. Click the left mouse button to position a blinking cursor at that point.Type
^2
and press [ ↵ Enter ] to see the value of the edited expression.On a new line, enter
3^2 → +7/2 [ ↵ Enter ]
and watch the results of each keystroke in your document.The → symbol indicates that you must type the right arrow keyboard key to exit the current positioning in the expression. This is necessary to continue with the remaining portion of many expressions.
Both the edited expression and the newly typed expression evaluate to the same symbolic value. Note the effect of operator precedence on the result.
- Enter
3^(2+7/2) [ ↵ Enter ]
Comment: Note the effect of the parentheses to override the default operator precedence.
x^2 → +x-6 [ ↵ Enter ]
Comment: Note that you had to use → to get out of exponent mode to complete the expression.
(-b+sqrt(b^2 → -4*a*c))/2*a [ ↵ Enter ]
Comment: Note that the divide character (/) creates a fraction and you have to use the right arrow key to move out of (escape) the denominator of the fraction. Also note the use of the square root function and that Maple displays this as the standard square root symbol when it displays the result.
(A-1)^2 → / (A+1)^2 [ ↵ Enter ]
Comment: This example gives you more practice in entering and escaping the exponent and fraction modes.
exp(-h*v/k*T) [ ↵ Enter ]
Comment: Note the use of the exponential function
exp()
. Maple contains all standard functions including exp, ln, cos, sin, abs, etc. It displays the exponential function in the standard math notation as e.