next up previous contents
Next: FRACTINT Up: Computational aids Previous: Netscape

MAPLE

 

It is extremely helpful to have the aid of a general purpose symbolic-manipulation and computational mathematics program. One of the best and most widely available is MAPLE, and that is primarily the source of our computational aids in this course.

There is a lot of online documentation for MAPLE. Some useful resources are listed below.

For now we give a brief example of some Maple commands used for the calculations in our introduction to interval self-mappings. The > is the MAPLE prompt in the examples shown below.

> f:= x-> 2*x*(1-x);
The above is the MAPLE definition of the function f(x)=2x(1-x). The operator := is the means for naming mathematical constructions: variables, functions, etc. Multiplication is represented as an asterisk. Finally, we explicitly state the independent variable x and write the functional relation by an ``arrow'' ->.

We may now evaluate the function f(x) at successive values of x.

> f(.1);
.18
------------------
> f(");
.2952
------------------
> f(");
.41611392
------------------
Notice the use of f("); the double-quote is a MAPLE abbreviation for the last result. This makes it particularly easy to iterate a function.

MAPLE also includes a wide variety of programming commands, making it possible, for instance, to compute a lot of iterates at once.

> x:=.1;
x := .1
------------------
> for i from 1 to 10 do x:=f(x) od;
x := .18
x := .2952
x := .41611392
x := .4859262512
x := .4996038592
x := .4999996862
x := .5000000000
x := .5000000000
x := .5000000000
x := .5000000000
The first MAPLE command x:=.1 initializes the variable x to be 0.1. The second command runs a loop over ten iterations of f(x). The command to execute in the loop is between do and od. The variable i is a counter running from 1 to 10.

Plots may also be easily constructed in MAPLE. The parabola plot was generated by the plot command

> plot(f(z),z=0..1,y=0..1,scaling=CONSTRAINED);
The independent variable is identified as z, while the dependent variable y varies from 0 to 1. The option scaling=CONSTRAINED informs the plotting command that the same scale should be used for both dependent and independent variables. The following command displays the graph of the third iterate.
> plot(f(f(f(z))),z=0..1,y=0..1,scaling=CONSTRAINED);
The result is

   figure216
Figure 2: Graph of third iterate of f(x)=2x(1-x)

MAPLE's help system makes it very easy to plunge right into MAPLE computations. Double-click on the ``Help'' button on the menu bar to bring up the help browser. By working your way through the help topics, you may find the commands you need to study. At the end of each Help topic is a set of examples of the use of the command. You may cut-and-paste these commands into your MAPLE session. Then by tailoring the command to your needs, you may complete the calculation you desire. This method-of-operation avoids many syntax errors.


next up previous contents
Next: FRACTINT Up: Computational aids Previous: Netscape

David J. Wright
Mon Aug 19 17:21:15 CDT 1996