maple_as_calculator.mws

Maple as a calculator


Copyright 2000-2005, SUNY Buffalo.

If you are unfamiliar with Maple, work through this introduction and make sure you understand everything in it.

Addition, subtraction, multiplication and division operators (+,-,*,/):

> 2*(5-8)/(1+16);

(-6)/17

Note that all commands end with a semi-colon (;) (or colon: see below).
Hit the Enter key to execute your command. The cursor does NOT have to be at the end of the line.

Obtaining approximate decimal expansions of numbers with evalf

> evalf(-6/17);

-.3529411765

> Pi;
evalf(Pi);

Pi

3.141592654

Note: to continue an execution group on a new line, use Shift-Enter instead of just Enter.

Powers, trig functions, etc.:

> 7^2;

49

> sqrt(36);

6

> evalf( exp(1) );

2.718281828

> cos(Pi);

-1

> arctan(1);

1/4*Pi

Getting information about a command

> ?arctan

A help window will open. Information on arctan and related functions will be accessible.


Changing the precision of Maple's approximate "floating point" arithmetic:

> Digits:=50;
evalf(Pi);

Digits := 50

3.1415926535897932384626433832795028841971693993751

Assignment (giving names to expressions):

> a:=-16/7;
b:=Pi+a;

d:=b^2+c;

evalf(d);

a := (-16)/7

b := Pi-16/7

d := 2*(Pi-16/7)^2

1.4650555611944851798880792301764391661308296120316

Restarting the Maple kernel (to clear all assignments):

> a:=77;
a;

restart:

a;

a := 77

77

a

Suppressing output of assignments with the colon (:) expression terminator:

> a:=33;

a := 33

> a:=34:

> a;

34

You can clear assignments more selectively than with restart, using unassign:

> a:=99:
a;

unassign('a');

a;

99

a

Note that the forward quote has to be used in the above.

An example of a real calculation with Maple:

> w:=300.0;
T[2]:=w/2;

magT:=500.0;

T[1]:=sqrt(magT^2-T[2]^2);

theta_radians:=arctan(T[2]/T[1]);

degrees_per_radian:=evalf(180/Pi);

theta_degrees:=theta_radians*degrees_per_radian;

w := 300.0

T[2] := 150.0000000

magT := 500.0

T[1] := 476.9696007

theta_radians := .3046926540

degrees_per_radian := 57.29577950

theta_degrees := 17.45760312

An advantage of the Maple worksheet over a  calculator is that you have an easily editable record of what you have done.

Be sure to Save your worksheet frequently: Maple crashes more often than we'd like, and you can lose all your work.

Whenever  you turn in hard copy of a Maple worksheet, please use View->Zoom Factor 75% to conserve paper.

>