\documentclass[12pt]{article}
\usepackage{latexsym,amsmath,epic,eepic}

\pagestyle{empty}
\setlength{\topmargin}{0in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9in}

\begin{document}
\begin{center}
\textbf{Holy Cross College, Fall Semester, 2003} \\
\textbf{Math 131, Lab \#1, Wednesday, September 17} \\
Professor Hwang \\
\end{center}

\paragraph{Introduction} 

Maple is a powerful symbolic manipulation and graphing program that is
available on the PCs in Haberlin~408 and on the campus Unix machines.
This lab will introduce you to some of Maple's basic graphing
capabilities and help you visualize some of the properties of
functions we've seen so far.

Maple has a built-in programming language, and is largely interactive
via a \emph{prompt}; you type commands into Maple and it performs some
task in response. To save you the trouble of typing many commands
(whose syntax can seem strange at first), there is a Maple
``worksheet'' at
\begin{center}
\verb+  http://mathcs.holycross.edu/~ahwang/teach/131/lab01.mws+
\end{center}

Begin by logging on to one of the PCs in the lab and clicking on the
Maple icon. Maple will open a browser-like window when it starts up.
Click on the ``file'' button to get a drop-down menu, and select
``open URL''. Use the URL of the worksheet.

Each line of the worksheet is either a function definition or a
plotting command. Place the cursor on the first line and hit
\texttt{return} to load the function definitions. Place the cursor on
a \texttt{plot} command and hit \texttt{return} to plot the given
functions. 

\paragraph{Maple Grammar}

Maple, unlike some popular software, is \emph{case sensitive}, meaning
capital letters are not the same as lower-case letters;
\texttt{Pi}~and \texttt{pi} are not the same thing. Maple uses commas
to separate items in a list, a pair of periods to specify domains for
plotting, round parentheses to group arguments of functions, and
semicolons to end its sentences. It is best to put at most one command
per line, to avoid the possibility of a ``run-on'' sentence, where you
type a comma instead of a semicolon.

Maple requires an explicit~``$*$'' to denote multiplication; a common
error is to type~\texttt{2x} instead of~\texttt{2*x}. Aside from this,
Maple handles algebraic expression pretty much as you learned in
elementary school: Exponents are evaluated first, then multiplication
and division (read left to right), and finally addition and
subtraction (again read left to right).

\paragraph{Defining Functions in Maple}

Mathematicians use the symbol ``$:=$'' to mean ``is defined to be''.
For example,
\begin{verbatim}
  f := x -> x^2;
\end{verbatim}
is a Maple sentence that defines~\texttt{f} to be the squaring
function. Once you have made this definition, you may use~\texttt{f}
anywhere you want to refer to the squaring function. For example, to
define $g(x)=(1+x^2)^2$ in Maple, you could type
\begin{verbatim}
  g := x -> f(1+f(x));
\end{verbatim}
As you may have noticed, if you then change the definition
of~\texttt{f}, the definition of~\texttt{g} \emph{does not} automatically
change; you must go back to the line defining~\texttt{g} and type
\texttt{return} again. (Note, that the cursor need not be at
the end of the line when you type \texttt{return}.)

Maple already knows many functions by name; you may type
\begin{verbatim}
  f := cos;  g := exp;  L := ln;
\end{verbatim}
instead of the longer (but equivalent)
\begin{verbatim}
  f := x -> cos(x); g := x -> exp(x);  L := x -> ln(x);
\end{verbatim}

\paragraph{Plotting}

Plotting will be our main use of Maple, so it is worth saying a bit
about plotting syntax. A simple \texttt{plot} command is
\begin{verbatim}
  plot(sin, -0.001 .. 0.001);
\end{verbatim}
which plots the sine function over the interval $[-0.001,0.001]$. Note
that no~\texttt{x} has been used, as the name of the variable is
immaterial. If you prefer, you can type
\begin{verbatim}
  plot(sin(x), x = -0.001 .. 0.001);
\end{verbatim}
with the same result.  Pick the form you like and stick with
it.

If the vertical scale of a plot is not to your liking, you can force
Maple to use a particular interval, as in
\begin{verbatim}
  plot(sin(x), x = -0.001 .. 0.001, y = 0 .. 0.001);
\end{verbatim}
For safety, write decimal fractions as $0.001$ rather than $.001$; the
leading~0 will help prevent both you and Maple from becoming confused.

\eject

\end{document}