Appendix
Section A-2: Arithmetic Calculations
Introduction
Table A-2.1 demonstrates how to implement the arithmetic operations of addition, subtraction, multiplication, division, and exponentiation in Maple. A number of the examples in the table have been computed "live" by means of the Context Panel option "Evaluate and Display Inline." This option evaluates the live math, and places the evaluation inline and to the right.
Addition
2+3 = 5
Subtraction
7−3 = 4
Multiplication
(Math mode)
2⋅3 = 6 (The explicit asterisk appears as the centered dot.)
x y (The space character is interpreted as the multiplication operator.)
(Text mode)
2*3;
6
Division (Math mode)
23 (The slash "/" automatically sets the fraction with numerator and denominator.)
2/3 (This style of setting a fraction is called "shilling" and is set by preceding the forward slash "/" with the backward slash "\", which serves as an escape character.)
Exponentiation
x2 (Attempting to insert the caret ^ for exponentiation simply raises the cursor.)
x^2;
x2
The Exponential e
ⅇx
Select the ⅇ from a palette (Constants and Symbols, or Common Symbols) or type the character "e" and bring up the command-completion table (Figure A-2.1) from which the exponential e can be selected. Command completion can be selected from the Tools menu, or implemented by pressing the Escape key (Esc).
Figure A-2.1 The command-completion table for "e"
exp(1);
ⅇ
exp(x);
Table A-2.1 Arithmetic operators in Maple
Tables such as Table A-2.1 are used extensively in this work to organize the on-screen display of calculations. A default setting for tables is to add expression labels automatically for each displayed calculation. It is possible to change this default so that no equation labels are displayed within a table.
Enter some live math and press the Enter key. Note the display of the expression label.
x+y
Launch Table Properties from the Format menu.
In the Table Properties dialog, uncheck "Show expression labels" See Figure A-2.1.
Figure A-2.1 Lower part of Table Properties dialog
Enter some live math and press the Enter key. Note the suppression of the expression label.
Examples
Example A-2.1
Evaluate 23+57 both exactly and as a floating-point (decimal) number.
Example A-2.2
Evaluate 2+42 3−1.
Example A-2.3
Determine if 29−1 is a composite number or a prime. If it is composite, find its integer factors.
Example A-2.4
Explore each of the following: 2/3, |-5|, e−3, ln4, log28.
Example A-2.5
Find exact and floating-point (decimal) values for each of the following:
sinπ/4, cos1, tanπ/12, sec−12/3
<< Previous Section of Appendix Table of Contents Next Section of Appendix >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document