Visit Atarimax Store


Free-Net Logo
The Atari SIG Historical Archive
Created and hosted by: atarimax.com
[ HOME | GO ATARI | 8-BIT | ST/TT | PORTFOLIO | LYNX | JAGUAR | LIBRARY ]


Article #13 (29 is last):
Newsgroups: freenet.sci.comp.atari.product.16-32bit.reviews
From: aa399@cleveland.Freenet.Edu (Len Stys)
Subject: Maple/Symbolic Math Package/Commercial
Posted-By: xx004 (aa399 - Len Stys)
Reply-To: sytang@lamar.ColoState.EDU (Shoou-yu tang)
Edited-By: xx004 (aa399 - Len Stys)
Date: Thu Jul 25 10:58:24 1991

Contributed by: sytang@lamar.ColoState.EDU (Shoou-yu tang)

This review was obtained by using FTP at: atari.archive.umich.edu (reviews)
 
 
Maple and Me
Leroy J. (Lee) Dickey
1989 12 07
 
My first encounter with Maple came after someone put a
mathematical question to me that question involved an
equation with all sorts of wonderful mathematical objects:
 
        the square root function,
        the sine function,
        the tangent function,
        the number pi, multiplication, addition, division,
        and the whole numbers 2, 3, 4, and  11.
 
The person who asked had already done some calculations on
their microcomputer and discovered that two expressions, when
evaluated, gave more or less the same value.
 
The question was whether this was because the two expressions
represented real numbers that were equal, or whether the
apparent equality was it just a lucky coincidence.
That is, "Was it an identity or was it an accident?"
 
Here is the mathematical statement:
 
        tan (3*theta) + 4 * sin ( 2*theta) = sqrt (11)
 
What had been done was the calculation of the left side
 
        tan (3*theta) + 4 * sin ( 2*theta)
 
and the calculation of right side
 
        sqrt (11)
 
separately.  When the value of these two expressions were printed, the
same number was shown on the screen.  It looked pretty nice, but there
was still some doubt, because only 10 decimal places were showing.
Maybe the sides agree up to 10 places, and yet they differ somewhere
further down the line, maybe in the 100th place, or in the 1000th
place.
 
We know that whether using BASIC or some other programming language
like C, FORTRAN, or APL, there is always a round-off error when
calculating a number like the square root of 11.  This is because
numbers like the square root of 11 have infinite decimal
representations and when these languages store any number, (including
the square root of 11), they are restricted to some pre-determined
maximum number of digits, depending on how big the number is and how
that particular computer language stores its numbers.  (Not all
computers store numbers the same way.  But that is another story.)
What happens in these cases is that the number gets ``truncated'',
or chopped off, and what we see is an approximation to our number.
 
Well, for many practical purposes, this may be OK, and in fact, a lot
of useful computing has been done in those languages and others of
their types.  Much good scientific work, many practical business
problems, and a lot of fun games.
 
But in this case, our question has not been answered!  We had an
approximation, and this was not good enough.  If the two numbers were
close, but not equal, maybe we could prove that they were not equal by
working with the difference or something.  We wanted some more evidence
before we wasted too much trying to prove the result.
 
Any computing language that gives us an approximation to the right
answer instead of the exact answer is giving us just that, an
approximation.  We would like to control the number of digits.
 
And this brings us to Maple.  Maple is an example of a "Symbolic
Algebraic Manipulator''.  When Maple works with the square root of 11,
it works with a symbol standing for the square root of 11, and it has
the property that the square of that symbol is 11, not 10.99999 or
11.000001.  It is 11, exactly.  Does that mean that I can see thousands
of digits for sqrt(11)?  Yes, if I choose to.  The number of digits is
controlled by a variable that shows printing precision.  In any case,
the number sqrt(11) is the same symbol internally; When I ask to have
it displayed, Maple cranks out as many decimal places as I ask for.
 
What was my plan?
 
My idea was to repeat the calculations with some large number of digits.
If I found left side and right side agreed, I would be willing to
spend a little more time trying to prove the result.
So, I decided to try for 50 digits of printing precision.  I wanted
to have a variable for the angle that was Pi/11, because the expressions
(3*Pi)/11 and (4*Pi)/11 appeared in the left side.
So here, exactly, is the Maple program that I wrote:
 
        theta := Pi / 11;
        rs := sqrt (11);
        ls := tan (3*theta) + 4 * sin ( 2*theta) ;
        lv := evalf (ls,50);
        rv := evalf (rs,50);
        lv-rv;
 
What is "evalf"?  The "ls" stands for the exact value of the
left side of my equation.  The "lv" gives the value of the
expression "ls" to 50 digits.
 
What did I see as a result?  Here is a listing of my output:
 
theta := Pi / 11;
                                theta := 1/11 Pi
 
rs := sqrt (11);
                                          1/2
                                  rs := 11
 
ls := tan (3*theta) + 4 * sin ( 2*theta) ;
                      ls := tan(3/11 Pi) + 4 sin(2/11 Pi)
 
lv := evalf (ls,50);
           lv := 3.3166247903553998491149327366706866839270885455893
 
rv := evalf (rs,50);
           rv := 3.3166247903553998491149327366706866839270885455894
 
lv-rv;
                                         -48
                                   -.1*10
 
 
lv := evalf (ls,250);
lv :=
 
3.3166247903553998491149327366706866839270885455893535970586821461164846426090\
438467088433991282906509070125578495274565922754397848575474797793249330447288\
473028739748286556825773944446120980444771931123571441329715210988326604957100\
37248520738106820
 
rv := evalf (rs,250);
rv :=
 
3.3166247903553998491149327366706866839270885455893535970586821461164846426090\
438467088433991282906509070125578495274565922754397848575474797793249330447288\
473028739748286556825773944446120980444771931123571441329715210988326604957100\
37248520738106821
 
lv-rv;
                                         -248
                                   -.1*10
 
quit;
 
Wow, what accuracy!   That was enough to convince me that I
should look for a proof.  I could imagine numbers being equal,
say up to the 12 or 13 place and then differing after that.
But accuracy to 249 decimal places convinced me that we had
an identity here, and that I sould look for a proof.
A proof is possible, and it is known, and Maple can help,
but that is another story.
 
What else can Maple do, besides producing screens full of numbers?
The answer is just about every sort of mathematical computation.
As an example, one exciting application is differentiation
and integration of elementary functions:  it is not to hard to
imagine how differentiation can be done, but the exciting news
is that integration can be done to.  Here is a very simple example
of a maple statement and its result:
 
integrate (x^2,x);
                                          3
                                     1/3 x
 
This is the famous "anti-derivative" operator at work.  You put
in the function "x squared" and you get back a function whose
derivative is "x squared".
 
Of course, there is much more that Maple does.  My most recent
experiments have been with three dimensional Euclidean Geometry,
calculating formulae for the angle between two circles on the
sphere.  In coming to my final result, I passed through some
incredible output that has to be measured, not just by the number
of digits or the number of terms, but by the number of screens
required to show the result.
 
What is the minimum you need to run Maple on your Atari ST?
You should have a 1 Meg machine, such as the 1040ST, and you
should have a hard disk to hold the tons of software in the
6 Megabytes or so of files in the Maple library.
 
To find out more about the latest release of Maple, contact:
 
        Waterloo Maple Software
        160 Columbia St. West
        Waterloo, Ontario
        CANADA  N2L 3L3
        Tel:  (519) 747-2373            wmsi@daisy.waterloo.edu
        Fax:  (519) 747-5284            wmsi@daisy.uwaterloo.ca


-- 
 





Visit Atarimax Store