Home Page

   Introduction

   Topics with
Brief Descriptions

1 Numerical Calculations and Approximations
2 Algebraic Calculations
3 Graphing
4 Solving Equations
5 Functions
6 More on Graphing
7 Problems

MAPLE Learning
Exercises

 

Topic 1  - Numerical Calculations and Approximations

Material originated in 2000 by Seattle Central Community College
 and available for general usage.
Liberally edited by Anita Johnston
, 2002 

Using Maple to do numerical computations is very straightforward. Just enter the numerical expression and end the line with a semicolon.  Pressing [Enter] will then execute the line and the result will be displayed in blue in the center of the screen. 

With Maple loaded and running simply cut and paste the “red” commands into Maple and press [Enter]. 

Arithemtic Operations
> 2+4;
> 12*34567890;

In the problem above change the "3" in the line above to an "8" and press [Enter].  Notice how the blue output is automatically updated to display the new result.  

Exponents
Calculate math problem. 
> 134^39;

Unlike your calculator, Maple gives you the exact answer to this problem, all 83 digits worth!  You can control the number of digits.   

Fractions
M
aple can calculate with fractions without converting to decimals:
> 3/5 + 5/9 + 7/12;

Maple returns a fractional value.  To find a decimal value use
> evalf(3/5+5/9+7/12);
O
r, put a decimal somewhere in the problem.  The following will also return a decimal value.
> 3/5. + 5/9 + 7/12;

You can use the percent sign ( % ) as a handy shortcut.  It refers to the last expression computed by Maple.  So, in place of > evalf(3/5+5/9+7/12); we could have used  > evalf(%);  If you are going to several calculations with the problem then it is better to name it rather than use the (%) shortcut.  To assign a name use a colon followed by an equal sign.  Remember that Maple is case sensitive so k and K are different variables.  You can use up to 8 letter words for a name.  So, we now have
> k:=3/5+5/9+7/12;
> evalf(k); 

Square roots
To enter the square root of a number use sqrt(  ) :
> sqrt(24);
Notice that Maple has simplified  math problem but has left the answer in exact form.  To find the decimal value use
>
sqrt(24);
> evalf(%); 

Pi and evaluating trig functions
To enter math problem  type  Pi.  Note you cannot use a small p in pi.  Maple is case sensitive.

Also, notice that an asterisk * is required to indicate multiplication.  Maple does not understand implicit multiplication.
> 4*(3+Pi);

If we want fewer or more digits of accuracy than the default number which is 10 digits we can add an extra argument to the evalf(  ) command as shown below.
> w:=4*(3+Pi);
> evalf(w);
> evalf(w,4);
> evalf(w,45);

Here are some trig functions evaluated at specific angles.  Note angles are in radian measure.
> sin(5*Pi/3);
> sec(Pi/4);

To get the inverse sine of a number use the arcsin( ) function:
> arcsin(-1);

If you ask Maple to calculate a value that is undefined it will respond with an error message:
> tan(Pi/2);

 Natural exponentional function:

To enter the natural exponential function  math problem  in Maple type:  exp(x) .
> exp(x);

And to get the number e by itself type:  exp(1) .
> exp(1);

 Absolute value function:
To enter the absolute value function math problem in Maple type:  abs(x).  Note that Maple gives the correct, exact answer for the third line since:  math problem
> abs(x);
> abs(-3);
>
abs(exp(1)-Pi); 

Prime factorization
Maple has many special purpose commands for working with numbers. You will learn these as you need them in your math course. Here is one last example for now. If we have an integer and want to factor it into primes we can use Maple's  ifactor(  ) command. Feel free to experiment by changing the number. 
> ifactor(31722722304); 

Sequence of Numbers
To calculate and display a sequence of numbers use the seq(..) command. Here we calculate the squares of the first 100 natural numbers.
>
seq(k^2,k=1..100);

Practice problem 1:  Use Maple to calculate a 10-digit approximation for the number  math problem
Solution: 
> t:=37^43:
> evalf(t,10);

math problem

Practice problem 2: Find a numerical approximation for the expression :   math problem

Solution: 
> (3+Pi)/(7-sqrt(13)):
> evalf(%);

                                             math problem