0101.mws
Module 1 : Algebra
101 Numbers - Big & Small
______________________________________________________________________
A. Arithmetic Operations
__________________________________________________________________________________
In Maple, you can perform all of the usual mathematical operations - however with far more accuracy and control. The basic format of a Maple command is a mathematical statement terminated with a semicolon.The > symbol is Maple's prompt for a new statement. That's where you type your statement.
The star key "*" is used for multiplication The slash "/" key is used for division
>
1234 - 56789; 1234 * 5678; 123456 / 2572;
Don't use commas when typing large numbers in Maple
A1. Compute the product 123,456,789*987,654,321
A. on a handheld calculator
B. using Maple
>
123456789*987654321;
C. are the answers the same?
Maple also allows you to compute exponents using the ^ key (shift 6).
>
3^4;
>
3^40;
>
3^400;
>
3^4000;
>
2^(-9);
>
6^(-14);
You are not limited to find integer powers of whole numbers. You can also use real numbers for both the base and the exponent.
>
3.417 ^ 5.338;
A2. Compute
A. on a handheld calculator
B. using Maple
>
5^100;
C.are the answers the same?
A3. What is the number in the 100's place of
?
>
123^456;
Even with a calculator or computer, it can be somewhat laborious to completely factor an integer into primes. However, Maple can do that automatically.
>
ifactor( 48 );
>
ifactor( 2^10 - 1);
A4. Find the prime factorizations for each number
A.4.800
>
ifactor( 4800);
B. 16,371
>
ifactor(16371);
C. 98,800,271
>
ifactor(98800271);
D.
>
ifactor(2^64-1);
E.
>
ifactor(10^64-1);
(Note : Part C os this problem would be rather difficult to do by hand since the smnallest prime that divides this number is greater than 1,000)
______________________________________________________________________
B. Order Of Operations
__________________________________________________________________________________
Maple adheres to the same order of operations that we use in mathematics.
>
2 + 3 * 4 - 5 * 6;
By inserting parentheses, we force the operations within them to take place sooner, thus rendering different overall results.
>
2+ ( 3* 4 - 5) * 6;
You can enter various complicated expression by using parentheses carefully. Here is how to enter some rational expressions.
>
29 /(100 - 11*3^2);
>
(3^4 - 2^6) / ( 3^2 - 2^3);
B1. Compute
A. 12345672 12345662 B. 5566 6655 C.
______________________________________________________________________
C. Shortcut To Retyping
__________________________________________________________________________________
One shortcut that we use often in Maple is the % key. This refers to most recently executed result.
>
13*23 + 1;
>
%/5;
>
%/5;
>
29^2; 4727 - 29*137;
>
(% + %%) / 29;
LENGTH OF A NUMBER
Recall when computed 3^400 earlier, we got quite a large number. But exactly how large?
>
3^400;
>
length(3^400);
>
3^4000; length(%);
C1. How many digits are in the following numbers?
A. 1234567 B. 55566 C. 2(36)
______________________________________________________________________
D. Fractions
__________________________________________________________________________________
By simply entering a fraction, Maple automatically reduces it.
>
56628377 / 63290539;
Maple is also able to compute problems with fractions without converting to decimals.
>
5/12 + 7/24;
You can also subtract, multiply, and divide fractions.
>
1/72 + 1/48 - 1/18 + 1/27;
>
517/689 * 583/611;
When dividing fractions, its important to be a little careful. Are the following two double decker fractions equivalent? execute the statements and find out!
>
517/689 / 583/611;
>
(517/689) / (583/611);
Using parentheses judiciously, we can perform more complex problems. For example, the expression would be entered in this way :
>
1/ ( 3/4 - 2/3);
D1. Compute
A. on a hand-held calculator, and B. using Maple C. Are the answers the same?
D2. Compute
__________________________________________________________________________________
E. Decimals
__________________________________________________________________________________
Maple is also capable of working with decimal numbers. However, unlike a hand-held calculator which has a limited number of decimal places, Maple can do more precise computations with a virtually unlimited number of places. Maples super-calculator features are useful for working with both rational and irrational numbers.
>
1.37^42.19;
THE NUMBER
The number is a constant in mathematics and is recognized by Maple and typed as Pi (note the capitalization of P but not i). Normally displayed as a symbol. To view in a decimal form, use the evalf command.
>
Pi;
>
evalf(Pi);
>
evalf( Pi, 1000);
>
Pi * 173.28^2;
E1. Compute /2 to 2,000 decimal places.
E2. Compute the area and circumference of a circle with radius 3,429.2 meters.
E3. Compute the area of an annulus (ring shaped figure) of inner radius 395 and thickness 4.5
(Hint compute the area of the outer circle, then subtract the area of the smaller circle inside).
ROOTS
To compute square roots, you can use the sqrt command. Notice that Maple is smart enough to simplify square roots as much as possible without converting to decimals, just as you would do by hand.
>
sqrt(30); sqrt(441); sqrt(24);
Of course, we can use the evalf command to express these numbers in decimal form also.
>
evalf( sqrt(2) );
>
11 + sqrt(31); evalf(%);
You can compute other roots using fractional exponents. For example, finding the cube root of a number is the same as raising the number to the 1/3 power. You can also compute other rational and irrational powers!
>
64^(1/3);
>
10^(1/4); evalf(%);
>
7^ (3/5); evalf(%);
>
sqrt(2)^sqrt(3); evalf(%);
E2. Compute in exact (non-decimal form) and decimal form with 100 decimal place accuracy
A.
B.
C.
D.
E.
F.
E3. Compute
A. using a hand-held calculator, B. using Maple C. are the answers the same?.
RATIONAL NUMBERS
Maple usually leaves fractions in fraction form. However, we can force it to express fractions in decimal form using the evalf command once again.
>
1/7;
>
evalf(%);
Maple displays 10 decimal places or so as a default. If this is not enough accuracy and you would like greater precision, you can specify the exact number of decimal places as a second parameter to the evalf command.
>
evalf( 1/7, 200);
Fractions are also called rational numbers because their decimal expansions always have repeating blocks of digits. By looking at the decimal representation of a rational number you can see the repeating cycle of digits. For example, you might notice the repeating pattern of 6 digits in the decimal expansion of 1/7 above. Some numbers have greater periods which can only be seen when greater numbers of digits are displayed.
>
12/31 ;
>
evalf( % );
>
evalf( %, 100 );
E1. How many digits repeat in each of these rational numbers?
A.
B.
Note : There is no special Maple function that computes the number of repeating decimal
places. Just evaluate these numbers, count the period of repeating digits, and then type
the answer (insert paragraph).
>