\font\largerbold = cmbx10 scaled \magstep1
\font\largerrm =cmr10 scaled \magstep1
\def\map{{\tt Maple}}
\font\largertt = cmtt10 scaled \magstep2
\def\H{\char `\^}
\def\R{{\sevenbf RET}}
\def\Q{\hskip 1in}
\def\QQ{\%}
\nopagenumbers
\font\sc=cmcsc10.tfm
%\magnification=\magstep1
%\parindent 0pt
\rightline{\sevenrm January 24, 2000}
\centerline{\bf Math 103:99 Meeting \map}
\smallskip
 
Each student should find the answers to the two questions below and
e-mail them to me. Each student must send me a \underbar{separate}
e-mail message before the next class. Students may work together. If
they work together each student's e-mail message should acknowledge
any help they have gotten, either from other students in the course or
from other people.  %\smallskip

{\parindent=.5in\narrower
\smallskip
\noindent Question \#1: How many
digits does $13^{13}$ have and what is the middle digit?
%\smallskip

\noindent Question \#2: $2634^8$ has a bunch of 0's in it. How many?
\smallskip
}

%\smallskip
%\centerline{\vrule height 2pt depth 0pt width 3truein}
%\smallskip

People should \underbar{not} even attempt to answer either of these
questions by hand, or even with a standard calculator. A standard
calculator can't answer these questions because \underbar{exact}
answers are requested, not approximations. Standard calculators
can't deal with large enough integers. Something stronger is
necessary: I suggest the program, \map, which is available on most
Rutgers computer systems, including {\tt eden}.

\smallskip

\parindent=0pt

\noindent {\bf Step 0} In order to effectively use \map\ with the {\tt
xmaple} interface students need to get {\it out} of the menu system
which they have with their default {\tt eden} login. To do this they
need to find the command {\tt revert} on their menu system, enable
this command, and logoff and logon again. They will then get a
{\tt unix} prompt and will be able to begin the sequence of exercises
described here which will familiarize them with \map.


\noindent{\bf Now begin} What I'd like you to type at the terminal
will be in {\sl this typeface} with numbers that look like this {\sl 1
4 7 9} and these suggestions will be indented about an inch. I'll ask
you to hit the ``enter'' key (new line) with the request \R . Now,
please, log in to {\tt eden} and get a prompt in an x-window. Then
type

\Q {\sl xmaple \&} \R
 
The system should respond with a \map\ screen
on your display. There are standard ways for you to move or resize the
screen, and various \map-specific command possibilities. \map\ is a huge
program with a great many capabilities. We'll just explore a few of
them. Right now I'd like you to move your mouse into the \map\ window. 
You'll see this, which is the ``command line'':

\Q $ >|$

The symbol for your cursor is $|$ and it is currently at an input
line, indicated by the $>$ sign. Please type

\Q {\sl 3+2;} \R

Something should happen. You should get 5 and a new input
line. You can move your cursor up and down. Do this, and see the word
``Input'' on the \map\ screen change in succession to
``Separator'' and then to ``Output'' and then to ``Input'' when your
cursor gets back to the original line. 

Now move your cursor back to your \underbar{new} input line. Type

\Q {\sl 17*3;} \R

and see what the result is. At the next input line type

\Q {\sl \QQ+5;} \R 

and explain the result. What do you think the meaning of the symbol
{\sl \QQ} is?

Now type the following to learn what \H\ means.

\Q {\sl 2\H 3;} \R

But $\ldots$ I made a mistake! I wanted you to calculate the 300$^{\rm
th}$ power of 2! Please do the following: move your cursor back to the
input line with $2\H 3$ and position it in the following place: $>2\H
3|;$ and now type {\sl 00} and immediately hit \R . What happened?
Please compute $3^{300}$ in the same fashion by moving your cursor to
a new input line. What are the first 5 and last 5 decimal
digits of this number? {\sevenrm 13689 and 66001}

A little more: please type (look carefully here -- I'm asking for a
{\bf colon}, {\sl not} a {semicolon}!)

\Q {\sl 5+6:} \R

You should immediately get another input line. Type (for example)

\Q {\sl \QQ +7;}

and deduce what \map\ does when an input line ends with a {\sl :}
(that is, a colon). Note that computations might and do occur which
have results that are huge and silly to print out if you don't need
them --- 2\H (2\H (2\H (2\H 2))), for example. Try that sometime on
your own, please, with ``;'' rather than a ``:'' and see what
happens. {\sevenrm 19,729 digits, I think!} Onward: please type

\Q {\sl 20;} \R

and see the result. Go back with your cursor and put a space between
the 2 and the 0 and hit \R . What's the result? \underbar{You haven't
broken anything -- just go on!}

Now let's try

\Q {\sl 2*3+7;} \R

and observe that \map\ follows the usual rules of precedence. Can you
put parentheses in so that \map\ will compute two times the sum of
three plus seven instead? Remember to hit \R\ after you make the
alterations. You should have gotten 20 as your answer, of course. If
you did {\bf not} make an error inserting the parentheses, go back and
take one out (create an intentional {\bf error}!) and then hit \R
. What happens? \underbar{You haven't broken anything}. Let's keep
exploring. Please get a new input line and try these commands in
succession to learn how to do more arithmetic and to explore more
features of \map .

%\medskip
%\rightline{\bf OVER}
%\vfil\eject
\Q {\sl 2/3;} \R

\map\ computes ``exactly'' and can do some (fourth grade?) arithmetic:

\Q {\sl \QQ *300;} \R

Now try 

\Q {\sl{sqrt}(2);} \R

and now

\Q {\sl \QQ \H 2;} \R

so \map\ knows the ``meaning'' of fractions and square roots -- or at
least how to manipulate them. And now try (remember, if you mess up
with a parenthesis or something else, just go back and do it again --
nothing is broken!):

\Q {\sl({sqrt}(2)-1)\H 5;} \R

This result is puzzling. Sometimes \map\ is lazy. Let's urge it to
work by writing

\Q {\sl expand(\QQ);} \R

That's better. But what if we want or need decimal approximations? Try

\Q {\sl evalf(sqrt(2));} \R

Parentheses need to be matched -- always a source of anxiety as more
and more complex expressions and commands are typed.

What if we want more digits of $\sqrt{2}$? We can coax {\sl evalf} to do
this with informed use. To see how, type

\Q {\sl help(evalf);} \R

Another screen should pop up. When I use \map\ I tend to need a lot of
help so the help screens accumulate on my display. You can ``click''
them on and off, and eliminate them entirely if you like. Read the
evalf screen (I usually skip to the examples on any help screen
first!) until you can figure out how to get the first 100 digits of
$\sqrt{2}$. What is the one-hundredth digit \underbar{after} the decimal point?
{\sevenrm It is 7 -- be slightly careful since that second number in evalf
gives the total number of digits, and the 1 before the decimal point
counts as one of the digits!}  Can you tell me the three-hundredth
digit after the decimal point of $17^{1/3}$? {\sevenrm This should be
5.} Use lots of parentheses, even in exponents, to inform \map\
clearly what you want.

Now try

\Q {\sl 1400/24;} \R

and we learn that \map\ knows how to factor integers
automatically. Can you get \map\ to factor your social security
number? How would you find a factoring command in \map ? If the first
thing you try with the {\sl help} command doesn't work, look at
the references on the SEE ALSO line and check one of them.

You can stop your \map\ session at any time in a variety of ways. One
way that is polite to the system and also simple for you is to type

\Q {\sl quit} \R
 
and your \map\ window will disappear after you answer the question
about storing your work. {\sevenrm That's probably not necessary right
now!}

%\smallskip
%\centerline{\vrule height 2pt depth 0pt width 3truein}
%\medskip


\noindent {\bf Important assertion} You \underbar{can't} break the
program. \map\ will, however, compute exactly what you type, not what
you think you've typed!

\noindent {\bf Honest admission} Almost every time I work with \map\ I
forget to type the darn {\it ;}\/ so I sit and watch the screen,
wondering why my computation doesn't work. The semicolon signals the
program that you've finished typing and that it should start
computing.

\noindent {\bf Irritating note} All \map\ programs \underbar{should}
behave the same way, but the \map\ versions I have at home and in the
Math Department use \negthinspace{\sl ``}\ instead of {\sl \QQ} for
``the previous expression''. So I may forget and confuse the symbols
sometimes when I talk to you or respond to e-mail questions.

\vfil\eject\end
