%% Created by Maple 14.01, Linux
%% Source Worksheet: Intro-maple2012b.mws
%% Generated: Thu Dec 29 22:11:35 CET 2011
\documentclass{article}
\usepackage{maplestd2e}
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{0pt}
\setlength{\headheight}{0in}
\setlength{\topsep}{0in}
\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{0pt}
\setlength{\marginparwidth}{0in}
\setlength{\marginparsep}{0in}
\setlength{\footskip}{0in}
%\setlength{\footheight}{0in}
\def\emptyline{\vspace{12pt}}
\begin{document}
\pagestyle{empty}
\DefineParaStyle{Maple Heading 1}
\DefineParaStyle{Maple Text Output}
\DefineParaStyle{Maple Dash Item}
\DefineParaStyle{Maple Bullet Item}
\DefineParaStyle{Maple Normal}
\DefineParaStyle{Maple Heading 4}
\DefineParaStyle{Maple Heading 3}
\DefineParaStyle{Maple Heading 2}
\DefineParaStyle{Maple Warning}
\DefineParaStyle{Maple Title}
\DefineParaStyle{Maple Error}
\DefineCharStyle{Maple Hyperlink}
\DefineCharStyle{Maple 2D Math}
\DefineCharStyle{Maple Maple Input}
\DefineCharStyle{Maple 2D Output}
\DefineCharStyle{Maple 2D Input}

\begin{center}
\textbf{Introduction to Maple Versions 7 to 15}\end{center}
\begin{center}\footnotesize\rm
Information in this document was compiled and updated by Angie Gardiner from:
\\
Multivariate Mathematics with Maple by James A. Carlson and Jennifer M. Johnson, copyright 1996
\\
Introduction to Maple V.4 in the Undergraduate Computer Lab by James A. Carlson and Jennifer M. Johnson, 1993
\\
Math 2250 Maple Tutorial by Nick Korevaar
\\
Math 2250, 2270, 2280 Maple Tutorial edits  by Grant Gustafson, 2012\end{center}

\begin{maplegroup}
\begin{Maple Normal}{
What is Maple?}\end{Maple Normal}

Maple is a general purpose software package containing tools useful in the study of a wide variety of problems.  We can use Maple like a calculator to carry out numerical computation, or we can use the programming features of Maple to produce a more complicated sequence of computations.  In addition to numerical computation, we can do symbolic or algebraic computations in Maple.  This software package has built-in functions for solving many kinds of equations, for working with matrices and vectors, and for differentiation and integration.  It also contains functions which allow us to create visual representations of curves and surfaces from their mathematical descriptions.
Using a software package like Maple gives new ways to think about problems.  For example, we can use the computer to run numerical experiments.  This means that we can not only look at more realistic versions of standard problems, but we can easily look at many more examples, in the process developing a better intuitive feel for the essential features of a general problem and its solutions.  Often these experiments suggest further questions or interpretations that might otherwise go unnoticed.  Patterns that appear in these experiments give insight into and motivation for the standard approaches to these problems - and frequently highlight the limitations of these methods.
In many situations the graphics features of Maple are a useful tool for geometrical visualization of  ideas, understanding definitions and exploring techniques.  Use the graphical interface to develop your intuition while learning new topics.
Before you start learning Maple, it is  helpful to familiarize yourself with the facilities in the computer lab in the T. Benny Rushing Mathematics Student Center. Please refer to "Introduction to the Computer Lab" for this information. Campus departments with computer facilities have installed maple under a campus-wide site license. It may be convenient to do\textbf{xmaple}sessions in your own department, or 24/7 from home with\textbf{maple}, a non-graphical interface running in an xterm window.
\textbf{The Basics}
\textbf{Starting Maple.}
\textbf{Unix Terminal Instructions}. If you are using a UNIX station in our lab, either move the cursor into the local window and type\textbf{xmaple \&}, use the middle mouse button on the background to get a menu from which you can select\textbf{X Maple V12}(or another version), or click on the maple leaf icon at the bottom of the screen.  Soon a new window will appear.  Click and hold the mouse, then move the window. When satisfied, release the mouse button.
\textbf{MacLab Instructions}. If you are using a Mac in our lab, click on the icon at the upper right corner of your screen labeled\textbf{/}.  This will open a new window.  Click on the\textbf{Applications}button in this window, and then select\textbf{XDarwin}from the applications and run it\textbf{rootless}.  After a couple of minutes, you will get a terminal window.  In this window, type\textbf{ssh sunfire}.  Now you can type\textbf{xmaple}at the prompt to start Maple.  Once Maple opens, you can use the buttons in the upper right corner of each window to resize the windows if you like.\end{maplegroup}
\begin{maplegroup}
\textbf{Saving a file.}To save a Maple session that you have been working on and give it a name, choose\textbf{File -> Save As}from the menus at the top of the screen.  A\textbf{Save As}window will appear.  If you want to save your file under the name\textbf{hwk1}(for example), enter\textbf{hwk1}in the\textbf{Filename}box.  If there is already a\textbf{*.mws}in the box, make sure that you delete the\textbf{*}.  Then hit the\textbf{Return}(Macs) or\textbf{Enter}(UNIX) key, or click on\textbf{OK}.  It is best to keep file names simple, using only letters and numbers, without any special symbols.  In particular, it is a good idea to\textbf{avoid using spaces or periods}.  Maple will add the\textbf{.mws}or\textbf{.mw}extension to identify the saved file as a\textbf{M}aple\textbf{w}ork\textbf{s}heet.  Be careful about reusing a file name from a previous session.  For example, if last week you made a file named\textbf{Lines.mws}and this week you open a new Maple session and call it\textbf{Lines.mws}also, this will ERASE the file you created last week.  Notice that the\textbf{Save As}window lists the Maple files in your current directory, so you can see which names you have already used.  Once you have given your file a name, you can do\textbf{File -> Save}, or use the save icon at the top of the window.
\textbf{Crashed Maple Recovery.}After a crash of maple, there is a file in the same directory with extension\textbf{\_MAS.BAK}which contains all recent typing since the last save. Load the file that crashed and also this\textbf{\_MAS.BAK}file with matching file name. Mouse-copy from the save-file into the crashed file, to get back whatever typing is possible. Be selective, then save the file in case of another crash event.\textbf{}\textbf{Copy/Paste}.  Maple rookies can avoid typing errors by copying known valid code with the mouse (highlight, then\textbf{ctrl-C}), followed by paste onto a new line (mouse click at target location, then\textbf{ctrl-V}).  Copy works from text documents and also PDF documents (copy requires adobe reader). To paste, try the menu item PASTE. Then ctrl-V. Then RIGHT MOUSE BUTTON. Then MIDDLE MOUSE BUTTON. If none of that works, then hold down the SHIFT KEY and try the mouse buttons again.
\textbf{Mac Workstation}. If you are using a Mac, use the mouse to highlight the command(s) you want to copy, then choose\textbf{Edit -> Copy}from the menus.
Move the cursor to where you want to paste the text, then choose\textbf{Edit -> Paste}.
\textbf{Unix Workstation}. Press and hold down the left mouse button at the beginning of the text you want to copy.  Still holding the button down, drag the mouse
until you have highlighted the desired text.  Release the mouse button.  Move the cursor to the position where you want to paste.  Click the left mouse button
to mark this spot.  Click the middle mouse button to paste.
\textbf{Repeat Paste}. Copied text stays in memory and anytime you press the middle mouse button (or choose\textbf{Paste}from the\textbf{Edit}menu) it will be pasted at the
current cursor position.  This can cause surprises, if you accidentally hit the middle mouse button. An immediate ctrl-z will\textbf{undo}the error. For safety,
mouse-copy some blank space to clear the copied text.
\textbf{Editing your Maple file}.  It may take more than one session at the computer to complete your analysis.  Save your work on disk, and come back to the lab and open your Maple file again to continue working.  Often it will be useful to take with you a printed copy of your Maple session so you can think about what you have done so far, and how you want to continue when you come back to the lab, or so that you can get help from a lab instructor, a friend, or the instructor.
\textbf{Cleaning Up}.You can also delete text or commands by using the mouse to highlight the area you want to delete, then hitting the\textbf{Delete}key.To delete an entire computation or a plot, move the cursor into the command block (square left bracket on the left screen edge)  that produced the computation or click on the plot.  Hold down the\textbf{Control}key and press the\textbf{Delete}key.  The\textbf{Edit menu}has a duplicate. Accelerate typing by learning key shortcuts from the menus.
\textbf{Comments}. In any command line, Maple ignores anything typed after the\textbf{\#}symbol to the end of that line.  An example:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve ( 3*x + 2*y - 5*z, z);  # Solve for z in terms of symbols x and y
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(3/5)*x+(2/5)*y}{\[\displaystyle 3/5\,x+2/5\,y\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{Block Comments}. If you want to add comments between commands, move the cursor into the first command.  Then click on the icon\textbf{}\textbf{T}at the top of the screen (left of\textbf{[>}).  A new text block appears below and the cursor moves into the block. The pull-down menus and buttons at the top of the Maple window allow you to control the size and style of the text you enter. Default text is black at 12 points.
\textbf{Printing.}To print your Maple session directly from Maple, choose\textbf{Print}from the\textbf{File}menu (or click on the Printer icon).  In the Printer Setup window that appears, check that\textbf{Print Command}is selected, rather than Output to File, and click\textbf{Print}.  If the default output is the printer, then to print to a file, choose the box marked\textbf{Print To File}on the General tab of the print dialog box. Some maple versions don't have the feature.) The default print command (\textbf{lpr}) should send a printout of your Maple worksheet to the printer.  If only part of your worksheet is printing, try changing the default print command (inside maple) to\textbf{lpr -l}or\textbf{lpr -oraw}.
Alternatively, you can save your Maple session to a postscript file, then print that file from a local terminall window.  To do this, in the Printer Setup window choose\textbf{Output to File}and click\textbf{Print}.  This will create a postscript file from your Maple worksheet and will store it with some name, like\textbf{hwk1.ps}.  To send this file to the printer, go to the local window and type\textbf{lpr hwk1.ps}, then press Enter.  If you are printing from the local window, make sure that you are printing a\textbf{.ps}file. The file type\textbf{.mws}can only be printed from xmaple. Print PDF files from acroread (adobe reader). Don't use lpr on PDF files, because of printer filters that silently change the print file contents.
**\textit{If you are having trouble printing, please ask the lab assistant for help}\textit{.}**
\textbf{Coming back for more.}When you come back to work on a Maple file that you've already started, your task now is to reopen that file and get back to where you left off.  To open a file, choose\textbf{File -> Open}.  An\textbf{Open File}window will appear.  In this window you will see a list of Maple files.  Click on the file that you want to open, then press the\textbf{Enter}key or click\textbf{OK}.
\begin{Maple Normal}{
It is not enough to just OPEN the saved file!}\end{Maple Normal}

Although Maple displays a record of your last session, it unloads variables.  One way to get Maple to reload variables from last time is to go to the beginning of your file and hit the\textbf{Return}key until you get to the last line of the file.  (You might want to use the arrow keys to skip the lines that displayed plots or requests for help files).  This will ensure that Maple's memory of your last session is restored.  A shortcut for executing the entire worksheet is to\textbf{click the icon}\textbf{!!!}at the top of the window. Inserting a\textbf{\#}\textbf{-sign}at the front of plot or help lines will quiet down the worksheet re-execute.

\textbf{Using Maple}
The best way to learn Maple is by using it.  But first, a few remarks about Maple.  The symbol\textbf{>}is the command prompt, which Maple uses to signal you that it awaits your command.  Commands normally end with a semicolon(;)if you want to see the output or a colon(:)if you don't want to see the output.  Maple is a programming language. It has strict rules of punctuation, grammar, and spelling.  If something is not working right, check to see if you are following the rules.  For example, the Mapleengine will get confused if you write\textbf{2x}instead of\textbf{2*x}.  Check for things like misspelled names or extra or missing parentheses.  If further thought doesn't clear things up, ask a human for help.  You will soon become an expert troubleshooter.
While learning Maple, you will often have questions about how a particular command or function is used.  Fortunately, Maple can help.  To ask about a command whose name you know, just type a question mark, followed by the name of the command.  Thus
\textbf{?solve}
gives information on the\textbf{solve}command.  Scroll forward to the examples at the end. Most questions are answered by the examples. If not answered, then use the technical information at the beginning of the help file.For specific help on how to do something in maple, use a google search in a browser - it is faster than sorting through maple's help system.
The help system in maple supports full text search or topic search of Maple's help files.  You will find these options under the\textbf{Help}menu in the upper right corner of the Maple window.  You will also find other handy things, such as\textbf{Introduction},\textbf{New User's Tour}, and\textbf{Using Help}. Rookies are frustrated by the help system, but encouraged by google searches, which can answer a specific question.\end{maplegroup}
\begin{maplegroup}
\textbf{Hand Calculator Examples}. Let's get started!  Go ahead and type along with these examples.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{2 + 2; 3*5; 6-2:
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{4}{\[\displaystyle 4\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{15}{\[\displaystyle 15\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
All three computations were done, although only two results are shown (the colon:at the end of a command suppresses the output).  If you forget the semicolon, go ahead and put it on the next line:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{3*5
;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{15}{\[\displaystyle 15\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Addition +, subtraction -, and division / are standard, and parentheses are used as in algebra.  An asterisk * indicates multiplication and a caret \symbol{94} is used for powers:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{( 1 + 2) * (6 + 7) - 12 / 7;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{261/7}{\[\displaystyle {\frac {261}{7}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{3\symbol{94}(2.1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{10.04510857}{\[\displaystyle  10.04510857\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Whenever possible, Maple tries to compute exact quantities.  Our first command gives its answer as a fraction, rather than as a decimal, contrary to what you might expect.  The second command gives a decimal, or "floating point" answer because we used this form in our question.  To force Maple to give results in floating point (decimal) form, use\textbf{evalf}:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{Pi; # The constant 3.1415727... prints as a greek letter
pi; # Symbol PI, prints as a greek letter (confusing isn't it?)
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Pi}{\[\displaystyle \pi \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Pi}{\[\displaystyle \pi \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf(Pi); # Print PI to 10 digits default
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{3.141592654}{\[\displaystyle  3.141592654\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{exp(1);   # the number e=2.818... prints as lowercase italic e
evalf(%);  # The % sign stands for the most recently computed quantity.
e;        # symbol e prints as lowercase italic e
evalf(%);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{exp(1)}{\[\displaystyle {{\rm e}^{1}}\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2.718281828}{\[\displaystyle  2.718281828\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{e}{\[\displaystyle e\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{e}{\[\displaystyle e\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
Upper and Lower Case Madness.}\end{Maple Normal}

Maple code distinguishes upper-case letters from lower-case.  Thus\textbf{evalf(pi)}is not the same as\textbf{evalf(Pi)}.
The function\textbf{evalf}can take a second (optional) argument which determines the precision of the output.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf(Pi, 50); # Compute Pi to 50 digits.
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{3.1415926535897932384626433832795028841971693993751}{\[\displaystyle  3.1415926535897932384626433832795028841971693993751\\
\mbox{}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{Spacing}.
For the most part, spacing is unimportant in Maple.  In the code line above, spaces could be omitted or added without causing any problems.
Thoughtful use of spacing makes Maple code easier to read, easier to understand, and easier to edit.
Standard mathematical functions can be used in Maple so long as we know their names.
\end{maplegroup}
\begin{maplegroup}
\mapleinline{inert}{2d}{(diff(Let(x), x))*s*compute*abs(-14)+sin(1)-sqrt(2)+e^cos(1.6*Pi)+arctan(3)}{\[\displaystyle  \left( {\frac {d}{dx}}{\it Let} \left( x \right)  \right) s{\it compute}\, \left| -14 \right| +\sin \left( 1 \right) - \sqrt{2}\\
\mbox{}+{e}^{\cos \left(  1.6\,\pi  \right) }+\arctan \left( 3 \right) \]}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{abs(-14) + sin(1) - sqrt(2) + exp( cos(1.6*Pi) ) + arctan(3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{14+sin(1)-sqrt(2)+exp(cos(1.6*Pi))+arctan(3)}{\[\displaystyle 14+\sin \left( 1 \right) - \sqrt{2}+{{\rm e}^{\cos \left(  1.6\,\pi  \right) }}+\arctan \left( 3 \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf(%);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{16.03838871}{\[\displaystyle  16.03838871\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Maple expression syntax can often be found by intelligent guessing.  Thus\textbf{tan(45)}does indeed compute the tangent, and\textbf{20!}computes a factorial.
If your first guess doesn't work, then use Maple help or switch to a browser search engine, looking for sample code.
\end{maplegroup}
\begin{maplegroup}
\textbf{Packages}.
In addition to the functions in the Maple library, there are specialized packages (libraries) of functions that can be loaded using the command\textbf{with}.
For example, to do certain work with matrices and vectors requires the linear algebra package.  You do this by typing
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with (LinearAlgebra); # This package is recommended for differential equation and linear algebra courses
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{[`&x`, Add, Adjoint, BackwardSubstitute, BandMatrix, Basis, BezoutMatrix, BidiagonalForm, BilinearForm, CARE, CharacteristicMatrix, CharacteristicPolynomial, Column, ColumnDimension, ColumnOperation, ColumnSpace, CompanionMatrix, ConditionNumber, ConstantMatrix, ConstantVector, Copy, CreatePermutation, CrossProduct, DARE, DeleteColumn, DeleteRow, Determinant, Diagonal, DiagonalMatrix, Dimension, Dimensions, DotProduct, EigenConditionNumbers, Eigenvalues, Eigenvectors, Equal, ForwardSubstitute, FrobeniusForm, GaussianElimination, GenerateEquations, GenerateMatrix, Generic, GetResultDataType, GetResultShape, GivensRotationMatrix, GramSchmidt, HankelMatrix, HermiteForm, HermitianTranspose, HessenbergForm, HilbertMatrix, HouseholderMatrix, IdentityMatrix, IntersectionBasis, IsDefinite, IsOrthogonal, IsSimilar, IsUnitary, JordanBlockMatrix, JordanForm, KroneckerProduct, LA_Main, LUDecomposition, LeastSquares, LinearSolve, LyapunovSolve, Map, Map2, MatrixAdd, MatrixExponential, MatrixFunction, MatrixInverse, MatrixMatrixMultiply, MatrixNorm, MatrixPower, MatrixScalarMultiply, MatrixVectorMultiply, MinimalPolynomial, Minor, Modular, Multiply, NoUserValue, Norm, Normalize, NullSpace, OuterProductMatrix, Permanent, Pivot, PopovForm, QRDecomposition, RandomMatrix, RandomVector, Rank, RationalCanonicalForm, ReducedRowEchelonForm, Row, RowDimension, RowOperation, RowSpace, ScalarMatrix, ScalarMultiply, ScalarVector, SchurForm, SingularValues, SmithForm, StronglyConnectedBlocks, SubMatrix, SubVector, SumBasis, SylvesterMatrix, SylvesterSolve, ToeplitzMatrix, Trace, Transpose, TridiagonalForm, UnitVector, VandermondeMatrix, VectorAdd, VectorAngle, VectorMatrixMultiply, VectorNorm, VectorScalarMultiply, ZeroMatrix, ZeroVector, Zip]}{\[\displaystyle [\mbox {{\tt `\&x`}},{\it Add},{\it Adjoint},{\it BackwardSubstitute}\\
\mbox{},{\it BandMatrix},{\it Basis},{\it BezoutMatrix},{\it BidiagonalForm}\\
\mbox{},{\it BilinearForm},{\it CARE},{\it CharacteristicMatrix}\\
\mbox{},{\it CharacteristicPolynomial},{\it Column},{\it ColumnDimension}\\
\mbox{},{\it ColumnOperation},{\it ColumnSpace},{\it CompanionMatrix}\\
\mbox{},{\it ConditionNumber},{\it ConstantMatrix},{\it ConstantVector}\\
\mbox{},{\it Copy},{\it CreatePermutation},{\it CrossProduct}\\
\mbox{},{\it DARE},{\it DeleteColumn},{\it DeleteRow},{\it Determinant}\\
\mbox{},{\it Diagonal},{\it DiagonalMatrix},{\it Dimension}\\
\mbox{},{\it Dimensions},{\it DotProduct},{\it EigenConditionNumbers}\\
\mbox{},{\it Eigenvalues},{\it Eigenvectors},{\it Equal}\\
\mbox{},{\it ForwardSubstitute},{\it FrobeniusForm},{\it GaussianElimination}\\
\mbox{},{\it GenerateEquations},{\it GenerateMatrix},{\it Generic}\\
\mbox{},{\it GetResultDataType},{\it GetResultShape},{\it GivensRotationMatrix}\\
\mbox{},{\it GramSchmidt},{\it HankelMatrix},{\it HermiteForm}\\
\mbox{},{\it HermitianTranspose},{\it HessenbergForm},{\it HilbertMatrix}\\
\mbox{},{\it HouseholderMatrix},{\it IdentityMatrix},{\it IntersectionBasis}\\
\mbox{},{\it IsDefinite},{\it IsOrthogonal},{\it IsSimilar}\\
\mbox{},{\it IsUnitary},{\it JordanBlockMatrix},{\it JordanForm}\\
\mbox{},{\it KroneckerProduct},{\it LA\_Main},{\it LUDecomposition}\\
\mbox{},{\it LeastSquares},{\it LinearSolve},{\it LyapunovSolve}\\
\mbox{},{\it Map},{\it Map2},{\it MatrixAdd},{\it MatrixExponential}\\
\mbox{},{\it MatrixFunction},{\it MatrixInverse},{\it MatrixMatrixMultiply}\\
\mbox{},{\it MatrixNorm},{\it MatrixPower},{\it MatrixScalarMultiply}\\
\mbox{},{\it MatrixVectorMultiply},{\it MinimalPolynomial}\\
\mbox{},{\it Minor},{\it Modular},{\it Multiply},{\it NoUserValue}\\
\mbox{},{\it Norm},{\it Normalize},{\it NullSpace},{\it OuterProductMatrix}\\
\mbox{},{\it Permanent},{\it Pivot},{\it PopovForm},{\it QRDecomposition}\\
\mbox{},{\it RandomMatrix},{\it RandomVector},{\it Rank}\\
\mbox{},{\it RationalCanonicalForm},{\it ReducedRowEchelonForm}\\
\mbox{},{\it Row},{\it RowDimension},{\it RowOperation},{\it RowSpace}\\
\mbox{},{\it ScalarMatrix},{\it ScalarMultiply},{\it ScalarVector}\\
\mbox{},{\it SchurForm},{\it SingularValues},{\it SmithForm}\\
\mbox{},{\it StronglyConnectedBlocks},{\it SubMatrix},{\it SubVector}\\
\mbox{},{\it SumBasis},{\it SylvesterMatrix},{\it SylvesterSolve}\\
\mbox{},{\it ToeplitzMatrix},{\it Trace},{\it Transpose}\\
\mbox{},{\it TridiagonalForm},{\it UnitVector},{\it VandermondeMatrix}\\
\mbox{},{\it VectorAdd},{\it VectorAngle},{\it VectorMatrixMultiply}\\
\mbox{},{\it VectorNorm},{\it VectorScalarMultiply},{\it ZeroMatrix}\\
\mbox{},{\it ZeroVector},{\it Zip}]\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
This command produces a list of all the functions in this package and gives you access to them in your current Maple session.
If you close Maple and reopen it later, you must reload any special packages you want to use.
Once familiar with a package, load it silently using a colon.(:)instead of a semicolon(;).
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with (linalg): # Silence output. Old package, support being removed by maplesoft.
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\textbf{Other Packages}. Some packages of interest are\textbf{plots},\textbf{DEtools}, and\textbf{student.}
\end{maplegroup}
\begin{maplegroup}
\textbf{Algebra.}Maple code uses variables and algebra.  Consider, for example, the expression\mapleinline{inert}{2d}{(a+b)^2}{$\displaystyle  \left( a+b \right) ^{2}$}
with variables a,b.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{(a + b)\symbol{94}2;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(a+b)^2}{\[\displaystyle  \left( a+b \right) ^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{expand (%);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{a^2+2*a*b+b^2}{\[\displaystyle {a}^{2}+2\,ab+{b}^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
give the expanded form, and
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{factor (%);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(a+b)^2}{\[\displaystyle  \left( a+b \right) ^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
brings us back to our starting point.  To make long computations easier and more intelligible, we can assign values to variables using "\textbf{:=}"
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p := (a + b)\symbol{94}2; b := 1; p;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{p := (a+b)^2}{\[\displaystyle p\, := \, \left( a+b \right) ^{2}\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{b := 1}{\[\displaystyle b\, := \,1\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(a+1)^2}{\[\displaystyle  \left( a+1 \right) ^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
In these examples, variables store an expression or a number.  Variables can store almost anything, for example, a list of points, an equation, a set, a piece of text, or a function definition:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{pts := [ [1,2], [3,4] ]; # a double-list or list-of-lists
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{pts := [[1, 2], [3, 4]]}{\[\displaystyle {\it pts}\, := \,[[1,2],[3,4]]\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{eqn := 2*x - 3*y = 5;    # eqn abbreviates equation 2x+3y=5
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{eqn := 2*x-3*y = 5}{\[\displaystyle {\it eqn}\, := \,2\,x-3\,y=5\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{eqns := \{ 2*x - 3*y = 5, 5*x - 3*y = 1 \}; # A set of two equations
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{eqns := {2*x-3*y = 5, 5*x-3*y = 1}}{\[\displaystyle {\it eqns}\, := \, \left\{ 2\,x-3\,y=5,5\,x-3\,y=1 \right\} \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{tag := "The nth partial sum is";  # strings are delimited by double quotes
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{tag := "The nth partial sum is"}{\[\displaystyle {\it tag}\, := \,``The nth partial sum is''\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{print (pts, eqn, eqns, tag);   #checks our assignments
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{[[1, 2], [3, 4]], 2*x-3*y = 5, {2*x-3*y = 5, 5*x-3*y = 1}, "The nth partial sum is"}{\[\displaystyle [[1,2],[3,4]],\,2\,x-3\,y=5,\, \left\{ 2\,x-3\,y=5,5\,x-3\,y=1 \right\} ,\,``The nth partial sum is''\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f := x -> x\symbol{94}2;          # defines a function. Use 2 symbols, MINUS and GREATER-THAN
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{f := proc (x) options operator, arrow; x^2 end proc}{\[\displaystyle f\, := \,x\mapsto {x}^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{g:=unapply(x\symbol{94}2,x);      # defines a function, with recusive symbol evaluation
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{g := proc (x) options operator, arrow; x^2 end proc}{\[\displaystyle g\, := \,x\mapsto {x}^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f(2);  f(3); g(2); g(3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{4}{\[\displaystyle 4\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{9}{\[\displaystyle 9\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{4}{\[\displaystyle 4\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{9}{\[\displaystyle 9\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{Assignment}. Anything we can define or compute in Maple can be assigned to a variable for future reference using  "\textbf{:=}".  The symbol\textbf{=}by itself is used to test equality.
A space is NOT allowed between the\textbf{:}and the\textbf{=}in an assignment statement. Beware of using equal only when you meant colon-equal. Such typos are maddening to discover
and the typo generates no maple error message.
Variables can be returned to their original symbolic (unassigned) state.  The commands
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{b := 'b'; # same as unassign('b');  Removes b:=1; assignment made above to symbol b.
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{b := b}{\[\displaystyle b\, := \,b\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p;        # re-execute formula for p, with b:=1 replaced by symbol b
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(a+b)^2}{\[\displaystyle  \left( a+b \right) ^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Similarly,clears the variables assigned above usingunassign():
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{unassign ( 'pts', 'eqn', 'eqns', 'tag');
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{print (pts, eqn, eqns, tag);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{pts, eqn, eqns, tag}{\[\displaystyle {\it pts},\,{\it eqn},\,{\it eqns},\,{\it tag}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Therestartcommand clears ALL variables and unloads all packages.  So, if you need one later, you must reload it using\textbf{with}.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{restart; # A drastic way to clear variables and computer memory
# Also got rid of library loads for linalg and LinearAlgebra which were done above.
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
Pay special attention to the kind of quotes used in examples.  The possibilities are the single quote\textbf{'}, the backquote\textbf{`}, and the double quote\textbf{"}.  They all play different roles.
Here is an extended example of how to use variables and assignment statements:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{F := m*a;               # Newton's formula for force
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{F := m*a}{\[\displaystyle F\, := \,ma\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{m := 2.1;  a := 5;      # set the mass and acceleration
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{m := 2.1}{\[\displaystyle m\, := \, 2.1\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{a := 5}{\[\displaystyle a\, := \,5\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{F;                      # compute the force
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{10.5}{\[\displaystyle  10.5\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{a := 21.9;              # reset the acceleration
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{a := 21.9}{\[\displaystyle a\, := \, 21.9\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{F;                      # recompute force
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{45.99}{\[\displaystyle  45.99\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{a := 'a';               # clear a with single quotes
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{a := a}{\[\displaystyle a\, := \,a\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{s:="a";                 # make a one-character string, no substitution of symbol a
s:="m";                 # one-character string, again no substitution of symbol m (m equals 2.1)
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{s := "a"}{\[\displaystyle s\, := \,``a''\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{s := "m"}{\[\displaystyle s\, := \,``m''\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{F;                      # recompute F, symbol a was restored
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2.1*a}{\[\displaystyle  2.1\,a\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
The\textbf{subs}command lets us make temporary substitutions in an expression as opposed to assigning values.  For example, try this:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{g := (a+1)\symbol{94}2 / (b-1)\symbol{94}3 + a / (b-1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{g := (a+1)^2/(b-1)^3+a/(b-1)}{\[\displaystyle g\, := \,{\frac { \left( a+1 \right) ^{2}}{ \left( b-1 \right) ^{3}}}+{\frac {a}{b-1}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{simplify (g);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(a^2+3*a+1+a*b^2-2*a*b)/(b-1)^3}{\[\displaystyle {\frac {{a}^{2}+3\,a+1+a{b}^{2}-2\,ab}{ \left( b-1 \right) ^{3}}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{subs( a=3, b=2, g);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{19}{\[\displaystyle 19\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
or this
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{subs( a = x+y, b = x+1, g); # x,y can be symbols or := assigned values or constants
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(x+y+1)^2/x^3+(x+y)/x}{\[\displaystyle {\frac { \left( x+y+1 \right) ^{2}}{{x}^{3}}}+{\frac {x+y}{x}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{simplify(%); a; b;          # The symbol % means the answer of the previous computation
                            # The variables a and b were not permanently assigned a value.
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(x^2+2*x*y+2*x+y^2+2*y+1+x^3+x^2*y)/x^3}{\[\displaystyle {\frac {{x}^{2}+2\,xy+2\,x+{y}^{2}+2\,y+1+{x}^{3}+{x}^{2}y}{{x}^{3}}}\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{a}{\[\displaystyle a\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{b}{\[\displaystyle b\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
Graphing}\end{Maple Normal}

\textbf{Standard Coordinates.}Maple can construct many kinds of graphs, a feature that you can use to visualize mathematical objects and processes.
The command\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( sin(3*x), x = -Pi..Pi );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d1.eps}
\end{maplegroup}
\begin{maplegroup}
produces a plot containing the curve\mapleinline{inert}{2d}{y = sin(3*x)}{$\displaystyle y=\sin \left( 3\,x \right) $}
for\mapleinline{inert}{2d}{x}{$\displaystyle x$}
in the interval from\mapleinline{inert}{2d}{-Pi}{$\displaystyle -\pi $}
to\mapleinline{inert}{2d}{Pi}{$\displaystyle \pi $}
.  No space is allowed between the double-dots in a plot command.
Scales on the x-axis and y-axis are chosen in the maple engine.  To change this behavior:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( sin(3*x), x = -Pi..Pi, scaling = constrained );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d2.eps}
\end{maplegroup}
\begin{maplegroup}
Sometimes it is useful to restrict the range over which\mapleinline{inert}{2d}{y}{$\displaystyle y$}
varies.  We get a misleading graph from
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( tan(x), x = -5..5 );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d3.eps}
\end{maplegroup}
\begin{maplegroup}
It does not accurately represent the vertical asymptotes of\mapleinline{inert}{2d}{y = tan(x)}{$\displaystyle y=\tan \left( x \right) $}
.  Better results are obtained with
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( tan(x), x = -5..5, y = -5..5 );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d4.eps}
\end{maplegroup}
\begin{maplegroup}
We can plot several curves at once.  To plot\mapleinline{inert}{2d}{y = sin(x)}{$\displaystyle y=\sin \left( x \right) $}
and\mapleinline{inert}{2d}{y = sin(3*x)}{$\displaystyle y=\sin \left( 3\,x \right) $}
together we say
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( \{ sin(x), sin(3*x) \}, x = -Pi..Pi ); # The curve equations are inside set-delimiters of curly braces
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d5.eps}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot(1+x\symbol{94}2,x=0.1 .. 0.8); # Decimal points can conflict with double-dot range parsing [compare x=.1...8]
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d6.eps}
\end{maplegroup}
\begin{maplegroup}
Now the first argument of\textbf{plot}is a set of expressions to be graphed.  Sets are enclosed in curly braces and individual items are separated by commas.
We could also use the\textbf{display}command found in the\textbf{plots}package:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(plots):
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot1 := plot( x\symbol{94}2, x = 0..4 ): # Don't display plot data, use colon
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot2 := plot( 3*x\symbol{94}2 - 2, x = 0..4 ):
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{display( [ plot1, plot2 ] );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d7.eps}
\end{maplegroup}
\begin{maplegroup}
\textbf{Parametric Equations}
A curve in the plane can be described as the graph of a function, as in the graph of\mapleinline{inert}{2d}{y = (1/2)*sqrt(4-x^2)}{$\displaystyle y=1/2\, \sqrt{4-{x}^{2}}$}
for\mapleinline{inert}{2d}{x}{$\displaystyle x$}
in the interval from -1 to 1.
It can be given parametrically as in\mapleinline{inert}{2d}{(x(t), y(t)) = (2*cos(t), sin(t))}{$\displaystyle {x \left( t \right) ,y \left( t \right) }={2\,\cos \left( t \right) ,\sin \left( t \right) }$}
for\mapleinline{inert}{2d}{t}{$\displaystyle t$}
in the interval from\mapleinline{inert}{2d}{0}{$\displaystyle 0$}
to\mapleinline{inert}{2d}{Pi}{$\displaystyle \pi $}
.  Often we interpret such a curve as the path traced by a moving particle at time\mapleinline{inert}{2d}{t}{$\displaystyle t$}
.
Use the\textbf{plot}command to draw a curve from this parametric description:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( [2*cos(t), sin(t), t = 0..Pi] ); # unconstrained, distorted graphic
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d8.eps}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( [2*cos(t), sin(t), t = 0..Pi], scaling = constrained);  # constrained is not distorted
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d9.eps}
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Polar Coordinates}
Polar plots are a special kind of parametric plot.  The polar coordinates(\mapleinline{inert}{2d}{r, theta}{$\displaystyle r,\,\theta$}
)of points on a curve can be given as a function of some parameter\mapleinline{inert}{2d}{t}{$\displaystyle t$}
.  In many cases the parameter is just the angle\mapleinline{inert}{2d}{theta}{$\displaystyle \theta$}
.  Consider the ellipse defined in standard coordinates by\mapleinline{inert}{2d}{x^2+4*y^2 = 4}{$\displaystyle {x}^{2}+4\,{y}^{2}=4$}
.  To find an equation relating the polar coordinates\mapleinline{inert}{2d}{r}{$\displaystyle r$}
and\mapleinline{inert}{2d}{theta}{$\displaystyle \theta$}
of a typical point on this ellipse, we make the substitution\mapleinline{inert}{2d}{x = r*cos(t)}{$\displaystyle x=r\cos \left( t \right) $}
and\mapleinline{inert}{2d}{y = r*sin(t)}{$\displaystyle y=r\sin \left( t \right) $}
, where\mapleinline{inert}{2d}{t = theta}{$\displaystyle t=\theta$}
.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{subs( x = r*cos(t), y = r*sin(t), x\symbol{94}2 + 4*y\symbol{94}2 = 4);
simplify( % );
solve( %, r );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{r^2*cos(t)^2+4*r^2*sin(t)^2 = 4}{\[\displaystyle {r}^{2} \left( \cos \left( t \right)  \right) ^{2}+4\,{r}^{2} \left( \sin \left( t \right)  \right) ^{2}=4\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-r^2*(3*cos(t)^2-4) = 4}{\[\displaystyle -{r}^{2} \left( 3\, \left( \cos \left( t \right)  \right) ^{2}-4 \right) =4\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-2/sqrt(-3*cos(t)^2+4), 2/sqrt(-3*cos(t)^2+4)}{\[\displaystyle -2\, \left(  \sqrt{-3\, \left( \cos \left( t \right)  \right) ^{2}+4} \right) ^{-1},\,2\, \left(  \sqrt{-3\, \left( \cos \left( t \right)  \right) ^{2}+4} \right) ^{-1}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
We find that the ellipse is the collection of points whose polar coordinates (\mapleinline{inert}{2d}{r, theta}{$\displaystyle r,\,\theta$}
) satisfy\mapleinline{inert}{2d}{r^2 = 4/(4-3*cos(theta)^2)}{$\displaystyle {r}^{2}=4\, \left( 4-3\, \left( \cos \left( \theta \right)  \right) ^{2} \right) ^{-1}$}
, and the following commands draw the right half of the ellipse:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{r := 2/sqrt( 4 - 3*cos(t)\symbol{94}2 ):
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( [ r, t, t = -Pi/2..Pi/2 ], coords = polar );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d10.eps}
\end{maplegroup}
\begin{maplegroup}
Here are some more of examples of polar plots that you can try:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( [ 1, t, t = 0..2*Pi], coords=polar ):
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( [t, t, t = 0..2*Pi], coords=polar ):
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( [ sin(4*t), t, t = 0..2*Pi], coords=polar ): # a more realistic picture is obtained with scaling = constrained.
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Plotting Data}
Maple can plot data consisting of pairs of\mapleinline{inert}{2d}{x}{$\displaystyle x$}
and\mapleinline{inert}{2d}{y}{$\displaystyle y$}
values.  For example, if we say
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{data := [ [0, 0.53], [1, 1.14], [2, 1.84], [3, 4.12] ];
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{data := [[0, .53], [1, 1.14], [2, 1.84], [3, 4.12]]}{\[\displaystyle {\it data}\, := \,[[0, 0.53],[1, 1.14],[2, 1.84],[3\\
\mbox{}, 4.12]]\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
then\textbf{data}refers to a sequence of five points, (\mapleinline{inert}{2d}{x, y}{$\displaystyle x,\,y$}
) = (0, 0.53), etc.  The result is a double list:  something enclosed in square brackets, with comma-separatd elements in square brackets.
Lists are used for collections of objects where the order matters.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{data[1]; data[2]; data[3]; data[4]; # Individual items are accessed this way
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{[0, .53]}{\[\displaystyle [0, 0.53]\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{[1, 1.14]}{\[\displaystyle [1, 1.14]\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{[2, 1.84]}{\[\displaystyle [2, 1.84]\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{[3, 4.12]}{\[\displaystyle [3, 4.12]\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{data[3][2]; # To access the second coordinate of the third data point
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1.84}{\[\displaystyle  1.84\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
To plot the points in a double-list we use commands like
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( data, style = point, symbol = circle, color = black);
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d11.eps}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( data, style = line, view = [0..4, 0..5] );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d12.eps}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( data, style = line, title = "Experiment 1" ):
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
Here the double quoteis used to specify a plot title string.  See\textbf{?plot[options]}for more information, e.g., about symbols and line styles available.
You could also try\textbf{?readdata}and\textbf{?stats}to find out how to read a file of data points into a Maple session.
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Solving Equations}
Consider some examples:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( x\symbol{94}2 + 3*x = 2.1 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.5856653615, -3.585665361}{\[\displaystyle  0.5856653615,\,- 3.585665361\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( x\symbol{94}3 + x = 27 ):         #This gives a complicated answer!
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( x\symbol{94}3 + x = 27.0 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2.88894157222823, -1.44447078611412+2.69434362244525*I, -1.44447078611412-2.69434362244525*I}{\[\displaystyle  2.88894157222823,\,- 1.44447078611412\\
\mbox{}+ 2.69434362244525\,i,\,- 1.44447078611412\\
\mbox{}- 2.69434362244525\,i\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
The second command gives an exact, but complicated, answer.  Replacing 27 by 27.0 forces Maple to give decimal approximations instead, as do the commands
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{fsolve( x\symbol{94}3 + x = 27 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2.888941572}{\[\displaystyle  2.888941572\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{fsolve( x\symbol{94}3 + x=27, x, complex);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-1.44447078611412-2.69434362244525*I, -1.44447078611412+2.69434362244525*I, 2.88894157222823}{\[\displaystyle - 1.44447078611412\\
\mbox{}- 2.69434362244525\,i,\,- 1.44447078611412\\
\mbox{}+ 2.69434362244525\,i,\, 2.88894157222823\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
In general,\textbf{solve}looks for exact answers using algebraic methods, whereas\textbf{fsolve}uses numberical methods to find approximate solutions in floating-point form.  Compare
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( tan(x) - x = 2 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{RootOf(-tan(_Z)+_Z+2)}{\[\displaystyle {\it RootOf} \left( -\tan \left( {\it \_Z} \right) +{\it \_Z}+2 \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{fsolve( tan(x) - x = 2 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1.274392662}{\[\displaystyle  1.274392662\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Maple responds with an echo of the failed command, or a blank line, if it cannot find the solution you asked for.
Command\textbf{fsolve}may not find all solutions.  To understand why not, it is helpful to look at a graph
\end{maplegroup}
\begin{maplegroup}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( \{ tan(x) - x, 2 \}, x = 0..10, y = -10..10 );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d13.eps}
\end{maplegroup}
\begin{maplegroup}
This will give you an idea of how many solutions there are and what their approxmiate location is.  Then give\textbf{fsolve}a range of\mapleinline{inert}{2d}{x}{$\displaystyle x$}
-values in which to search:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{fsolve( tan(x) - x = 2, x = 4..5 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{4.561140431}{\[\displaystyle  4.561140431\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Often we need to use the solution of an equation in a later problem.  To do this, assign a name to it.  Here is one example.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{r := solve( x\symbol{94}2 + 3*x -2.1 = 0 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{r := .5856653615, -3.585665361}{\[\displaystyle r\, := \, 0.5856653615,\,- 3.585665361\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
The answer has the form r :=\mapleinline{inert}{2d}{r1}{$\displaystyle {\it r1}$}
,\mapleinline{inert}{2d}{r2}{$\displaystyle {\it r2}$}
, where\mapleinline{inert}{2d}{r1}{$\displaystyle {\it r1}$}
is the first root and\mapleinline{inert}{2d}{r2}{$\displaystyle {\it r2}$}
is the second.  Such an object - a bunch of items separated by commas, is called an expression sequence.  One picks out items of an expression sequence this way:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{r[1];
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.5856653615}{\[\displaystyle  0.5856653615\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{r[2];
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-3.585665361}{\[\displaystyle - 3.585665361\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Here are some computations with items from an expression sequence:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{r[1] + r[2];                # sum of the roots
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-3.000000000}{\[\displaystyle - 3.0\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{r[1]*r[2];                  # their product
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-2.100000000}{\[\displaystyle - 2.100000000\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{subs( x = r[1], 2*x + 3 );  # find 2(first solution) + 3
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{4.171330723}{\[\displaystyle  4.171330723\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
We can also solve systems of equations:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( \{ 2*x + 3*y = 1, 5*x + 7*y = 2 \},[x,y] );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{[[x = -1, y = 1]]}{\[\displaystyle [[x=-1,y=1]]\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{x; y; # Surprise: symbols x,y unassigned by solve()
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{x}{\[\displaystyle x\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{y}{\[\displaystyle y\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
A system of equations is given as a\mapleinline{inert}{2d}{set}{$\displaystyle {\it set}$}
- a bunch of items enclosed in curly brackets and separated by commas.  Sets are often used when the order of the objects is unimportant.  In reply to the\textbf{solve}command above, Maple tells us how to choose\mapleinline{inert}{2d}{x}{$\displaystyle x$}
and\mapleinline{inert}{2d}{y}{$\displaystyle y$}
to solve the system, but it does not give\mapleinline{inert}{2d}{x}{$\displaystyle x$}
and\mapleinline{inert}{2d}{y}{$\displaystyle y$}
these particular values.  To force it to assign these values, we use the\textbf{assign}function:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{s := solve( \{ 2*x + 3*y = 1, 5*x + 7*y = 2 \}, [x,y] );
assign( s );
x; y;      #check that it worked
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{s := [[x = -1, y = 1]]}{\[\displaystyle s\, := \,[[x=-1,y=1]]\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-1}{\[\displaystyle -1\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1}{\[\displaystyle 1\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textit{Important note}\textit{:}To type multiple line commands, as above, use Shift-Return instead of Return.\textit{And a warning:}You may have trouble later if you leave numerical values assigned to the variables\mapleinline{inert}{2d}{x}{$\displaystyle x$}
,\mapleinline{inert}{2d}{y}{$\displaystyle y$}
, and\mapleinline{inert}{2d}{r}{$\displaystyle r$}
.  Maple will not forget these assigned values, even though you have gone on to a new problem where\mapleinline{inert}{2d}{x}{$\displaystyle x$}
means something different.  It is a good idea to return variables to their unassigned state when you finish your problem.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{x := 'x'; y := 'y'; r := 'r'; # or, unassign('x','y','r'):
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{x := x}{\[\displaystyle x\, := \,x\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{y := y}{\[\displaystyle y\, := \,y\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{r := r}{\[\displaystyle r\, := \,r\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Recall that\textbf{restart}also clears all variables.
Finally, symbolic parameters are allowed in\textbf{solve}commands.  However, in that case we have to tell Maple which ones to solve for and which ones to treat as unspecified constants:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( a*x\symbol{94}2 + b*x + c, x );       # solve ax\symbol{94}2+bx+c=0 for x
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(1/2)*(-b+sqrt(b^2-4*a*c))/a, -(1/2)*(b+sqrt(b^2-4*a*c))/a}{\[\displaystyle 1/2\,{\frac {-b+ \sqrt{{b}^{2}-4\,ac}}{a}},\,-1/2\,{\frac {b+ \sqrt{{b}^{2}-4\,ac}}{a}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( a*x\symbol{94}3 + b*x\symbol{94}2 + c*x +d, x):

}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{solve( \{ a*x + b*y = h, c*x + d*y = k \}, [ x,y ] ):     # solving a system for x and y. Wrong answer for ad-bc=0. Maple engine
                                                        # makes undisclosed assumptions. Help ?solve explains why.
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\textbf{Functions}
Although Maple has a large library of standard functions, we often need to define new ones.  For example, to define
\begin{center}
\mapleinline{inert}{2d}{p(x) = 18*x^4+69*x^3-40*x^2-124*x-48}{\[\displaystyle p \left( x \right) =18\,{x}^{4}+69\,{x}^{3}-40\,{x}^{2}-124\,x-48\]}
\end{center}
we say
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p := x -> 18*x\symbol{94}4 + 69*x\symbol{94}3 - 40*x\symbol{94}2 - 124*x - 48;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{p := proc (x) options operator, arrow; 18*x^4+69*x^3-40*x^2-124*x-48 end proc}{\[\displaystyle p\, := \,x\mapsto 18\,{x}^{4}+69\,{x}^{3}-40\,{x}^{2}-124\,x-48\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Think of the symbol\textbf{->}as an arrow:  it tells what to do with the input\mapleinline{inert}{2d}{x}{$\displaystyle x$}
, namely, produce the output\textbf{18*x\symbol{94}4 + 69*x\symbol{94}3 - 40*x\symbol{94}2 -124*x - 48}.
To understand the historical origins of this notation, read about\textbf{lambda functions}, a subject of interest to computer science areas.
Once the function\textbf{p}is defined, we can do the usual computations with it, e.g.,
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p(-2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-224}{\[\displaystyle -224\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p( 1/2 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-441/4}{\[\displaystyle -{\frac {441}{4}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p( a+b );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{18*(a+b)^4+69*(a+b)^3-40*(a+b)^2-124*a-124*b-48}{\[\displaystyle 18\, \left( a+b \right) ^{4}+69\, \left( a+b \right) ^{3}-40\, \left( a+b \right) ^{2}-124\,a-124\,b-48\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{simplify(%);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{18*a^4+72*a^3*b+108*a^2*b^2+72*a*b^3+18*b^4+69*a^3+207*a^2*b+207*a*b^2+69*b^3-40*a^2-80*a*b-40*b^2-124*a-124*b-48}{\[\displaystyle 18\,{a}^{4}+72\,{a}^{3}b+108\,{a}^{2}{b}^{2}+72\,a{b}^{3}+18\,{b}^{4}+69\,{a}^{3}+207\,{a}^{2}b+207\,a{b}^{2}+69\,{b}^{3}-40\,{a}^{2}-80\,ab\\
\mbox{}-40\,{b}^{2}-124\,a-124\,b-48\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
It is important to keep in mind that functions and expressions are different kinds of mathematical objects.  Mathematicians know this, and so does Maple.  Compare the results of the following:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p;    # function
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{p}{\[\displaystyle p\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p(x); # expression
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{18*x^4+69*x^3-40*x^2-124*x-48}{\[\displaystyle 18\,{x}^{4}+69\,{x}^{3}-40\,{x}^{2}-124\,x-48\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p(y); # expression
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{18*y^4+69*y^3-40*y^2-124*y-48}{\[\displaystyle 18\,{y}^{4}+69\,{y}^{3}-40\,{y}^{2}-124\,y-48\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{p(3); # expression
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2541}{\[\displaystyle 2541\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
As further proof, try the following:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{factor(p);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{p}{\[\displaystyle p\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{factor( p(x) );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(x+4)*(2*x-3)*(2+3*x)^2}{\[\displaystyle  \left( x+4 \right)  \left( 2\,x-3 \right)  \left( 2+3\,x \right) ^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( p, -2..2 );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d14.eps}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{# plot( p(x), x = -2..2 ); # same result
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
Functions of several variables can be defined as easily as can functions of a single variable:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f := (x,y) -> exp(-x) * sin(y);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{f := proc (x, y) options operator, arrow; exp(-x)*sin(y) end proc}{\[\displaystyle f\, := \,( {x,y} )\mapsto {{\rm e}^{-x}}\sin \left( y \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{f(1,2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{exp(-1)*sin(2)}{\[\displaystyle {{\rm e}^{-1}}\sin \left( 2 \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{g := (x,y) -> alpha*exp(-k*x)*sin(w*y);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{g := proc (x, y) options operator, arrow; alpha*exp(-k*x)*sin(Typesetting:-delayDotProduct(w, y, true)) end proc}{\[\displaystyle \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{g(1,2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{alpha*exp(-k)*sin(2*w)}{\[\displaystyle \alpha\,{{\rm e}^{-k}}\sin \left( 2\,w \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{alpha := 2; k := 3; g(1,2);

}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{alpha := 2}{\[\displaystyle \alpha\, := \,2\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{k := 3}{\[\displaystyle k\, := \,3\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2*exp(-3)*sin(2*w)}{\[\displaystyle 2\,{{\rm e}^{-3}}\sin \left( 2\,w \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{w := 3.5; g(1,2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{w := 3.5}{\[\displaystyle w\, := \, 3.5\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1.313973197*exp(-3)}{\[\displaystyle  1.313973197\,{{\rm e}^{-3}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{alpha := 'alpha'; g(1,2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{alpha := alpha}{\[\displaystyle \alpha\, := \,\alpha\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.6569865987*alpha*exp(-3)}{\[\displaystyle  0.6569865987\,\alpha\,{{\rm e}^{-3}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
}\end{Maple Normal}
\begin{Maple Normal}{
Calculus}\end{Maple Normal}

\textbf{}\textbf{Derivatives}
To compute the derivative of the expression\mapleinline{inert}{2d}{x^3-2*x+9}{$\displaystyle {x}^{3}-2\,x+9$}
, say
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{diff( x\symbol{94}3 - 2*x + 9, x);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{3*x^2-2}{\[\displaystyle 3\,{x}^{2}-2\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
To compute the second derivative, say
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{diff( x\symbol{94}3 - 2*x + 9, x, x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{6*x}{\[\displaystyle 6\,x\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
or alternatively,
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{diff( x\symbol{94}3 - 2*x + 9, x$2 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{6*x}{\[\displaystyle 6\,x\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
This works because Maple translates the expression\textbf{x\$2}into the sequence\textbf{x, x}.  By analogy,\textbf{x\$3}would give the third derivative.  Thus one can easily compute derivatives of any order.  Now suppose that we are given a function\mapleinline{inert}{2d}{g}{$\displaystyle g$}
defined by
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{g := x -> x\symbol{94}3 - 2*x + 9;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{g := proc (x) options operator, arrow; x^3-2*x+9 end proc}{\[\displaystyle g\, := \,x\mapsto {x}^{3}-2\,x+9\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
It seems natural to use
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{diff( g, x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{0}{\[\displaystyle 0\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
to get the derivative of\mapleinline{inert}{2d}{g}{$\displaystyle g$}
.  However, Maple expects an expression in\mapleinline{inert}{2d}{x}{$\displaystyle x$}
and so interprets\mapleinline{inert}{2d}{g}{$\displaystyle g$}
as a constant, giving the wrong result.  The command
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{diff( g(x), x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{3*x^2-2}{\[\displaystyle 3\,{x}^{2}-2\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
which uses the expression\mapleinline{inert}{2d}{g(x)}{$\displaystyle g \left( x \right) $}
, works correctly.  The subtlety here is an important one:\textbf{diff}operates on expressions, not on functions -\mapleinline{inert}{2d}{g}{$\displaystyle g$}
is a function while\mapleinline{inert}{2d}{g(x)}{$\displaystyle g \left( x \right) $}
is an expression.  To define the derivative of a function, use Maple's\textbf{D}operator:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{dg := D(g);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{dg := proc (x) options operator, arrow; 3*x^2-2 end proc}{\[\displaystyle {\it dg}\, := \,x\mapsto 3\,{x}^{2}-2\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
The result is a function.  You can work with it just as you worked with\mapleinline{inert}{2d}{g}{$\displaystyle g$}
.  Thus you can compute function values and make plots:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{dg(1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1}{\[\displaystyle 1\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( \{ g(x), dg(x) \}, x = -5..5, title = `g(x) = x\symbol{94}3 - 2x + 9 and its derivative` );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d15.eps}
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Partial Derivatives}
To compute partial derivatives:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{q := sin(x*y);     # expression with two variables
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{q := sin(x*y)}{\[\displaystyle q\, := \,\sin \left( xy \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{diff( q, x );      # partial with respect to x
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{cos(x*y)*y}{\[\displaystyle \cos \left( xy \right) y\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{diff( q, x, y );   # compute d/dy of dq/dx
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-sin(x*y)*x*y+cos(x*y)}{\[\displaystyle -\sin \left( xy \right) xy+\cos \left( xy \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
As in the one variable case, there is an operator for computing derivatives of functions (as opposed to expressions):
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{k := (x,y) -> cos(x) + sin(y);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{k := proc (x, y) options operator, arrow; cos(x)+sin(y) end proc}{\[\displaystyle k\, := \,( {x,y} )\mapsto \cos \left( x \right) +\sin \left( y \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{D[1](k);        # partial with respect to x
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{proc (x, y) options operator, arrow; -sin(x) end proc}{\[\displaystyle ( {x,y} )\mapsto -\sin \left( x \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{D[2](k);        # partial with repsect to y
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{proc (x, y) options operator, arrow; cos(y) end proc}{\[\displaystyle ( {x,y} )\mapsto \cos \left( y \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{D[1,1](k);      # second partial with respect to x
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{proc (x, y) options operator, arrow; -cos(x) end proc}{\[\displaystyle ( {x,y} )\mapsto -\cos \left( x \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{D[1,2](k);      # partial with respect to y, then x
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{0}{\[\displaystyle 0\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{D[1](D[2](k));  # same as above;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{0}{\[\displaystyle 0\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Integrals}
To compute integrals, use\textbf{int}.  The indefinite integral (antiderivative)\mapleinline{inert}{2d}{Int(x^3, x)}{$\displaystyle \int \!{x}^{3}{dx}$}
is given by\textbf{int( x\symbol{94}3, x)}.
The following examples illustrate maple engine integration by parts, substitution, and partial fractions:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( 1/x, x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{ln(x)}{\[\displaystyle \ln  \left( x \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( x*sin(x), x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{sin(x)-x*cos(x)}{\[\displaystyle \sin \left( x \right) -x\cos \left( x \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( sin(3*x + 1), x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-(1/3)*cos(3*x+1)}{\[\displaystyle -1/3\,\cos \left( 3\,x+1 \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( x/ (x\symbol{94}2 - 5*x + 4), x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(4/3)*ln(x-4)-(1/3)*ln(x-1)}{\[\displaystyle 4/3\,\ln  \left( x-4 \right) -1/3\,\ln  \left( x-1 \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Nonetheless, Maple can't do everything:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( sin( sqrt(1-x\symbol{94}3)), x );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{int(sin(sqrt(1-x^3)), x)}{\[\displaystyle \int \!\sin \left(  \sqrt{1-{x}^{3}} \right) {dx}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
The last response echoed back the indefinite integral, a signal that the Maple engine failed to find an antiderivative for\mapleinline{inert}{2d}{sin(sqrt(1-x^3))}{$\displaystyle \sin \left(  \sqrt{1-{x}^{3}} \right) $}
.  In fact, it can be proved that no such antiderivative exists.
There are cases when the engine fails but there is an antiderivative. And cases when the engine gets the wrong answer.
The lesson: don't trust maple; use maple to assist solving a problem, do not use maple as an authority.To compute definite integrals like\mapleinline{inert}{2d}{Int(x^3, x = 0 .. 1)}{$\displaystyle \int _{0}^{1}\!{x}^{3}{dx}$}
we say\textbf{int( x\symbol{94}3, x = 0..1 )}.  Note that the only difference is that we give an interval of integration.\end{maplegroup}
\begin{maplegroup}
\textbf{Numerical Integration}.
Let us return to the integral\mapleinline{inert}{2d}{Int(sin(sqrt(1-x^3)), x)}{$\displaystyle \int \!\sin \left(  \sqrt{1-{x}^{3}} \right) {dx}$}
, which Maple did not evaluate symbolically.  Maple finds a numerical value for the definite integral by this syntax:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( sin( sqrt(1 - x\symbol{94}3) ), x = 0..1 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{int(sin(sqrt(1-x^3)), x = 0 .. 1)}{\[\displaystyle \int _{0}^{1}\!\sin \left(  \sqrt{1-{x}^{3}} \right) {dx}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf(%);      # Force numerical evaluation. Works only if there are no undefined symbols.
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.7315380065}{\[\displaystyle  0.7315380065\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf( Int( sin( sqrt(1 - x\symbol{94}3) ), x = 0..1 ) ); # The inert integral Int(...) skips symbolic evaluation. Speed advantage.
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.7315380065}{\[\displaystyle  0.7315380065\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{}Another approach to numerical integration is to use the\textbf{student}package.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with( student ):            # load the package

}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{j := sin( sqrt(1 - x\symbol{94}3) );  # define the integrand

}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{j := sin(sqrt(1-x^3))}{\[\displaystyle j\, := \,\sin \left(  \sqrt{1-{x}^{3}} \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{trapezoid( j, x = 0..1 );   # apply trapezoid rule

}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(1/8)*sin(1)+(1/4)*(Sum(sin(sqrt(1-(1/64)*i^3)), i = 1 .. 3))}{\[\displaystyle 1/8\,\sin \left( 1 \right) +1/4\,\sum _{i=1}^{3}\sin \left(  \sqrt{1-{\frac {1}{64}}\,{i}^{3}} \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf(%);                   # put in decimal form

}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.6879899163}{\[\displaystyle  0.6879899163\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
By default the\textbf{trapezoid}command approximates the area under the graph of\mapleinline{inert}{2d}{sin(sqrt(1-x^3))}{$\displaystyle \sin \left(  \sqrt{1-{x}^{3}} \right) $}
with four trapezoidal panels.
For greater accuracy use more panels, i.e., a finer subdivision of the interval of integration:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{panels:=10: evalf( trapezoid( j, x = 0..1, panels) );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.7202948615}{\[\displaystyle  0.7202948615\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Better yet, use a more sophisticated numerical method like Simpson's rule:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf( simpson( j, x = 0..1 ));
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.7130564636}{\[\displaystyle  0.7130564636\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Only an even number of subdivisions is allowed, as in\textbf{simpson( j, x = 0..1, 10 )}.
The\textbf{student}package is well worth exploring.  Among other things it has tools for displaying figures which explain the meaning of integration:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{leftbox( j, x = 0..1, 10 );
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d16.eps}
\end{maplegroup}
\begin{maplegroup}
The area of the figure displayed by\textbf{leftbox}is computed by\textbf{leftsum}:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{evalf( leftsum( j, x = 0..1, 10 ));
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{.7623684108}{\[\displaystyle  0.7623684108\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
One can also experiment with\textbf{rightbox}and\textbf{middlebox}and their companion functions\textbf{rightsum}and\textbf{middlesum}.
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Multiple Integrals}
Let\mapleinline{inert}{2d}{R}{$\displaystyle R$}
be the rectangular region defined by\mapleinline{inert}{2d}{x}{$\displaystyle x$}
between 0 and 1, and\mapleinline{inert}{2d}{y}{$\displaystyle y$}
between 0 and 1.
To integrate\mapleinline{inert}{2d}{Int(Int(x^2+y^2, x), y)}{$\displaystyle \int \!\!\!\int \!{x}^{2}+{y}^{2}{dx}\,{dy}$}
over\mapleinline{inert}{2d}{R}{$\displaystyle R$}
in Maple, we compute the repeated integral.  Here is one way to do this:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( x\symbol{94}2 + y\symbol{94}2, x = 0..1 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1/3+y^2}{\[\displaystyle 1/3+{y}^{2}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{int( %, y = 0..1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2/3}{\[\displaystyle 2/3\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
The first command integrates with respect to the\mapleinline{inert}{2d}{x}{$\displaystyle x$}
variable, producing an expression in\mapleinline{inert}{2d}{y}{$\displaystyle y$}
.
The second command integrates the result with respect to\mapleinline{inert}{2d}{y}{$\displaystyle y$}
to give a number.
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Other Calculus Tools}
Limits:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{g := x -> (x\symbol{94}3 - 2*x + 9)/(2*x\symbol{94}3 + x - 3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{g := proc (x) options operator, arrow; (x^3-2*x+9)/(2*x^3+x-3) end proc}{\[\displaystyle g\, := \,x\mapsto {\frac {{x}^{3}-2\,x+9}{2\,{x}^{3}+x-3}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{limit( g(x), x = infinity );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1/2}{\[\displaystyle 1/2\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{limit( sin(x)/x, x = infinity );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{0}{\[\displaystyle 0\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{limit( sin(x)/x, x = 0 );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1}{\[\displaystyle 1\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Taylor expansions and sums:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{taylor( exp(x), x = 0, 4 ); # expansion around x = 0
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1+x+(1/2)*x^2+(1/6)*x^3+O(x^4)}{\[\displaystyle 1+x+1/2\,{x}^{2}+1/6\,{x}^{3}+O \left( {x}^{4} \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{sum( i\symbol{94}2, i = 1..100 );    # be sure i is unassigned
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{338350}{\[\displaystyle 338350\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{sum( x\symbol{94}n, n = 5..10 );     # needs n to be unassigned
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{x^5+x^6+x^7+x^8+x^9+x^10}{\[\displaystyle {x}^{5}+{x}^{6}+{x}^{7}+{x}^{8}+{x}^{9}+{x}^{10}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{sum( 1/d\symbol{94}5, d=1..infinity );  evalf(%);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Zeta(5)}{\[\displaystyle \zeta  \left( 5 \right) \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1.036927755}{\[\displaystyle  1.036927755\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Differential Equations}
Maple can solve differential equations for you.  One way is to use\textbf{dsolve}:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{deq := diff( y(x), x$2 ) + y(x) = 0;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{deq := diff(y(x), x, x)+y(x) = 0}{\[\displaystyle {\it deq}\, := \,{\frac {d^{2}}{d{x}^{2}}}y \left( x \right) +y \left( x \right) =0\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{dsolve( deq, y(x) );
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{y(x) = _C1*sin(x)+_C2*cos(x)}{\[\displaystyle y \left( x \right) ={\it \_C1}\,\sin \left( x \right) +{\it \_C2}\,\cos \left( x \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Try\textbf{?dsolve}for more information.  We can specify initial conditions and experiment with parameters.\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{de := diff( y(x), x ) = y(x) - sin(x);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{de := diff(y(x), x) = y(x)-sin(x)}{\[\displaystyle {\it de}\, := \,{\frac {d}{dx}}y \left( x \right) =y \left( x \right) -\sin \left( x \right) \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{sol := dsolve( \{de, y(0) = 0.1\}, y(x));
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{sol := y(x) = (1/2)*cos(x)+(1/2)*sin(x)-(2/5)*exp(x)}{\[\displaystyle {\it sol}\, := \,y \left( x \right) =1/2\,\cos \left( x \right) +1/2\,\sin \left( x \right) -2/5\,{{\rm e}^{x}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{sol;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{y(x) = (1/2)*cos(x)+(1/2)*sin(x)-(2/5)*exp(x)}{\[\displaystyle y \left( x \right) =1/2\,\cos \left( x \right) +1/2\,\sin \left( x \right) -2/5\,{{\rm e}^{x}}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
To graph the solution, we need only the right-hand side of\textbf{sol}, which we can get by
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{plot( rhs(sol), x = 0..10);
}{}
\end{mapleinput}
\mapleresult
\mapleplot{Intro-maple2012bplot2d17.eps}
\end{maplegroup}
\begin{maplegroup}
Now let's try to make the slope field and draw some trajectories.  We can get the slope field with the\textbf{DEplot}command from the\textbf{DEtools}package:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{with(DEtools):
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{de := diff( y(x), x ) = y(x) - sin(x);
DEplot( de, y(x), x = -3..3, y = -3..3, arrows = line, dirgrid = [30,30]);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{de := diff(y(x), x) = y(x)-sin(x)}{\[\displaystyle {\it de}\, := \,{\frac {d}{dx}}y \left( x \right) =y \left( x \right) -\sin \left( x \right) \]}
\end{maplelatex}
\mapleresult
\mapleplot{Intro-maple2012bplot2d18.eps}
\end{maplegroup}
\begin{maplegroup}
Plot the slope field and a few trajectories.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ics:=[ [y(0)=0], [y(0)=1], [y(0)=3] ]; # Set of initial conditions. A double list.
DEplot( de, y(x), x = -3..3, y = -3..3, color='black', linecolor='red', arrows='line', dirgrid=[30,30], ics);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{ics := [[y(0) = 0], [y(0) = 1], [y(0) = 3]]}{\[\displaystyle {\it ics}\, := \,[[y \left( 0 \right) =0],[y \left( 0 \right) =1],[y \left( 0 \right) =3]]\]}
\end{maplelatex}
\mapleresult
\mapleplot{Intro-maple2012bplot2d19.eps}
\end{maplegroup}
\begin{maplegroup}
\textbf{}\textbf{Vector and Matrix Operations}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{restart; # Erase any variables defined above.
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
No packages are required for basic maple engine operations.
Define and display a vector like this:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{v := <1, -1>;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{v := Vector[column](%id = 195823940)}{\[\displaystyle v\, := \, \left[ \begin {array}{c} 1\\ \noalign{\medskip}-1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{v[1];  v[2];  v;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1}{\[\displaystyle 1\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-1}{\[\displaystyle -1\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Vector[column](%id = 187314456)}{\[\displaystyle  \left[ \begin {array}{c} 1\\ \noalign{\medskip}-1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Maple treats vectors as columns.  Now define another vector\textbf{w}and do some simple computations:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{w := <1, 1>;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{w := Vector[column](%id = 173082960)}{\[\displaystyle w\, := \, \left[ \begin {array}{c} 1\\ \noalign{\medskip}1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{v+w;     # vector or matrix addition
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Vector[column](%id = 176787388)}{\[\displaystyle  \left[ \begin {array}{c} 2\\ \noalign{\medskip}0\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{v.w;     # dot product for vectors, matrix multiply otherwise
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{0}{\[\displaystyle 0\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Next we define two matrices by rows,
Syntax: A:=Matrix([ row1, row2, ...]); where row1 is a comma-separated list [a,b,c ..] of row elements.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A := Matrix([ [2,3], [1,2] ]);# Enter a matrix by rows
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{A := Matrix(%id = 183957320)}{\[\displaystyle A\, := \, \left[ \begin {array}{cc} 2&3\\ \noalign{\medskip}1&2\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{B := <<1,1> | <0,1>>;         # Enter a matrix by columns
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{B := Matrix(%id = 182378952)}{\[\displaystyle B\, := \, \left[ \begin {array}{cc} 1&0\\ \noalign{\medskip}1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C := <<2|3>,<1|2>>;           # Enter a matrix by rows, C == A.
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C := Matrix(%id = 183815320)}{\[\displaystyle C\, := \, \left[ \begin {array}{cc} 2&3\\ \noalign{\medskip}1&2\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{E := <2,3|1,2>\symbol{94}+;  # Ver 12+ shortcut, \symbol{94}+ is transpose. E == A.
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{E := Matrix(%id = 182465480)}{\[\displaystyle E\, := \, \left[ \begin {array}{cc} 2&3\\ \noalign{\medskip}1&2\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}

Make an augmented matrix (or vector) from previous definitions.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{F := < A| v| w >;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{F := Matrix(%id = 176930416)}{\[\displaystyle F\, := \, \left[ \begin {array}{cccc} 2&3&1&1\\ \noalign{\medskip}1&2&-1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Algebraic computations with matrices\textbf{A}and\textbf{B}and vectors\textbf{v}and\textbf{w}:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A+B;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 190311828)}{\[\displaystyle  \left[ \begin {array}{cc} 3&3\\ \noalign{\medskip}2&3\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{2*(A+B);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 184146428)}{\[\displaystyle  \left[ \begin {array}{cc} 6&6\\ \noalign{\medskip}4&6\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A.B;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 183010920)}{\[\displaystyle  \left[ \begin {array}{cc} 5&3\\ \noalign{\medskip}3&2\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A.(v+w);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Vector[column](%id = 194484804)}{\[\displaystyle  \left[ \begin {array}{c} 4\\ \noalign{\medskip}2\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
Change the individual entries of a matrix.
Beware, it changes symbols A and B everywhere in the worksheet!
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A[1,1] := 5;  B[2,1] := 1;
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{A[1, 1] := 5}{\[\displaystyle A_{{1,1}}\, := \,5\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{B[2, 1] := 1}{\[\displaystyle B_{{2,1}}\, := \,1\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A,B;   # check
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 185311028), Matrix(%id = 193430100)}{\[\displaystyle  \left[ \begin {array}{cc} 5&3\\ \noalign{\medskip}1&2\end {array} \right] ,\, \left[ \begin {array}{cc} 1&0\\ \noalign{\medskip}1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
}\end{Maple Normal}
\begin{Maple Normal}{
\textbf{Maple Engine Linear Algebra}, since maple Ver 7 (2001), no packages.}\end{Maple Normal}
\begin{Maple Normal}{
}\end{Maple Normal}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{  A:=Matrix([[1,2],[3,4]]);  # Enter A by rows
  R:=<<1|2>,<3|4>>;          # By row.
  R:=<<1,3>|<2,4>>;          # By column
  A.R-3*R;       # Kernel matrix algebra, like matlab
  B:=<-1,1>;  # Column vector
  A.B;              # Matrix times vector
  1/A; A\symbol{94}(-1);  # Matrix inverse
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{A := Matrix(%id = 196301480)}{\[\displaystyle A\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{R := Matrix(%id = 191710788)}{\[\displaystyle R\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{R := Matrix(%id = 191570796)}{\[\displaystyle R\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 187070792)}{\[\displaystyle  \left[ \begin {array}{cc} 4&4\\ \noalign{\medskip}6&10\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{B := Vector[column](%id = 184982684)}{\[\displaystyle B\, := \, \left[ \begin {array}{c} -1\\ \noalign{\medskip}1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Vector[column](%id = 189392272)}{\[\displaystyle  \left[ \begin {array}{c} 1\\ \noalign{\medskip}1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 167833960)}{\[\displaystyle  \left[ \begin {array}{cc} -2&1\\ \noalign{\medskip}3/2&-1/2\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 171869756)}{\[\displaystyle  \left[ \begin {array}{cc} -2&1\\ \noalign{\medskip}3/2&-1/2\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
\textbf{}}\end{Maple Normal}
\begin{Maple Normal}{
\textbf{Solve linear systems}, since maple Ver 7 (2001).}\end{Maple Normal}

\begin{Maple Normal}{
No packages.}\end{Maple Normal}
\begin{Maple Normal}{
}\end{Maple Normal}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{  A:=Matrix([[1,2],[3,4]]);X:=<x,y>;B:=<-1,1>;
  Q:=A.X-B;            # Represent A.X=B as Q=<0,0>
  sys:=convert(Q,set); # Convert A.X=B to scalar equations.
  solve(sys);          # Linear system solve for unique x,y.
  <x,y> = A\symbol{94}(-1).B;    # Inversion solve of AX=B for unique x,y
  C:=<<1,2>|<1,2>>; # C has no inverse, infinitely many or no solution.
  sys:=convert(C.X,set);solve(sys);   # Solve CX=0, free variables
  sys:=convert(C.X-B,set);solve(sys); # No solution to CX=B
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{A := Matrix(%id = 176462092)}{\[\displaystyle A\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{X := Vector[column](%id = 172851188)}{\[\displaystyle X\, := \, \left[ \begin {array}{c} x\\ \noalign{\medskip}y\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{B := Vector[column](%id = 194677264)}{\[\displaystyle B\, := \, \left[ \begin {array}{c} -1\\ \noalign{\medskip}1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Q := Vector[column](%id = 174385612)}{\[\displaystyle Q\, := \, \left[ \begin {array}{c} x+2\,y+1\\ \noalign{\medskip}3\,x+4\,y-1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{sys := {x+2*y+1, 3*x+4*y-1}}{\[\displaystyle {\it sys}\, := \, \left\{ x+2\,y+1,3\,x+4\,y-1 \right\} \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{{x = 3, y = -2}}{\[\displaystyle  \left\{ x=3,y=-2 \right\} \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Vector[column](%id = 182428348) = Vector[column](%id = 176732140)}{\[\displaystyle  \left[ \begin {array}{c} x\\ \noalign{\medskip}y\end {array} \right] = \left[ \begin {array}{c} 3\\ \noalign{\medskip}-2\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C := Matrix(%id = 172625508)}{\[\displaystyle C\, := \, \left[ \begin {array}{cc} 1&1\\ \noalign{\medskip}2&2\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{sys := {x+y, 2*x+2*y}}{\[\displaystyle {\it sys}\, := \, \left\{ x+y,2\,x+2\,y \right\} \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{{x = -y, y = y}}{\[\displaystyle  \left\{ x=-y,y=y \right\} \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{sys := {x+y+1, 2*x+2*y-1}}{\[\displaystyle {\it sys}\, := \, \left\{ x+y+1,2\,x+2\,y-1 \right\} \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{Shortcuts}in maple Ver 9 to 15.\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{  A:=Matrix([[1,2],[3,4]]);
  C:=A\symbol{94}%T;        # Transpose, since Ver 9 (2003)
  K:=<1,3|2,4>;   # K==Matrix([[1,2],[3,4]]), since Ver 12 (2008)
  J:=<1,2|3,4>\symbol{94}+; # By columns, then transpose, J==K, since Ver 12
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{A := Matrix(%id = 184233536)}{\[\displaystyle A\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C := Matrix(%id = 192185468)}{\[\displaystyle C\, := \, \left[ \begin {array}{cc} 1&3\\ \noalign{\medskip}2&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{K := Matrix(%id = 183361600)}{\[\displaystyle K\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{J := Matrix(%id = 183995632)}{\[\displaystyle J\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\textbf{LinearAlgebra package}.
This package is used to extend the basic operations illustrated above.
The long forms avoid loading a package, giving bulletproof code.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A:=Matrix([[1,2],[3,4]]);B := <<1,1> | <0,1>>;
LinearAlgebra[Determinant](A); LinearAlgebra[Determinant](B);
with(LinearAlgebra): # load the package to shorten commands
Determinant(A-B); Determinant(A+B); Eigenvectors(A);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{A := Matrix(%id = 195669752)}{\[\displaystyle A\, := \, \left[ \begin {array}{cc} 1&2\\ \noalign{\medskip}3&4\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{B := Matrix(%id = 192222016)}{\[\displaystyle B\, := \, \left[ \begin {array}{cc} 1&0\\ \noalign{\medskip}1&1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-2}{\[\displaystyle -2\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{1}{\[\displaystyle 1\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{-4}{\[\displaystyle -4\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{2}{\[\displaystyle 2\]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Vector[column](%id = 181524340), Matrix(%id = 181520080)}{\[\displaystyle  \left[ \begin {array}{c} 5/2+1/2\,\sqrt {33}\\ \noalign{\medskip}5/2-1/2\,\sqrt {33}\end {array} \right] ,\, \left[ \begin {array}{cc} 2\, \left( 3/2+1/2\,\sqrt {33} \right) ^{-1}&2\, \left( 3/2-1/2\,\sqrt {33} \right) ^{-1}\\ \noalign{\medskip}1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
Shortcut: To complete a long command, use the ESC key. Prevents typing errors.}\end{Maple Normal}
\end{maplegroup}
\begin{maplegroup}
Symbolic matrices are as legitimate as numerical ones:
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{A := Matrix([ [a,b], [c,d] ]);
Determinant(A);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{A := Matrix(%id = 183187968)}{\[\displaystyle A\, := \, \left[ \begin {array}{cc} a&b\\ \noalign{\medskip}c&d\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{a*d-b*c}{\[\displaystyle ad-bc\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
}\end{Maple Normal}
\begin{Maple Normal}{
Reduced Echelon form of a matrix}\end{Maple Normal}

\begin{Maple Normal}{
}\end{Maple Normal}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C := Matrix([ [3,2,2], [3,1,2], [1,1,1] ]);
LinearAlgebra[ReducedRowEchelonForm](C);
linalg[rref](C);
linalg[gaussjord](C);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C := Matrix(%id = 176626896)}{\[\displaystyle C\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}3&1&2\\ \noalign{\medskip}1&1&1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 188213876)}{\[\displaystyle  \left[ \begin {array}{ccc} 1&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 186744008)}{\[\displaystyle  \left[ \begin {array}{ccc} 1&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 191409132)}{\[\displaystyle  \left[ \begin {array}{ccc} 1&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
\textbf{Elimination Steps.}}\end{Maple Normal}

The hand work on paper can be done error free by defining operations in terms of a linear algebra package, which do the
three basic toolkit operations\textbf{combination, swap, multiply}. Here's the definitions which makes this process identical to
what is done with paper and pencil.
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
A set of Elimination Toolkit macros can be defined for the depreciatedlinalgpackage.}\end{Maple Normal}
\begin{Maple Normal}{
}\end{Maple Normal}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{macro(combo=linalg[addrow],swap=linalg[swaprow],mult=linalg[mulrow]);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{combo, swap, mult}{\[\displaystyle {\it combo},\,{\it swap},\,{\it mult}\]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C1 := Matrix([ [3,2,2], [3,1,2], [1,1,1] ]);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C1 := Matrix(%id = 174827988)}{\[\displaystyle {\it C1}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}3&1&2\\ \noalign{\medskip}1&1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C2:=combo(C1,1,2,-1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C2 := Matrix(%id = 192464204)}{\[\displaystyle {\it C2}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&-1&0\\ \noalign{\medskip}1&1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C3:=combo(C2,1,3,-1/3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C3 := Matrix(%id = 184683728)}{\[\displaystyle {\it C3}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&-1&0\\ \noalign{\medskip}0&1/3&1/3\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C4:=combo(C3,2,3,1/3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C4 := Matrix(%id = 188737696)}{\[\displaystyle {\it C4}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&-1&0\\ \noalign{\medskip}0&0&1/3\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C5:=mult(C4,2,-1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C5 := Matrix(%id = 196064096)}{\[\displaystyle {\it C5}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1/3\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C6:=mult(C5,3,3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C6 := Matrix(%id = 184569180)}{\[\displaystyle {\it C6}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C7:=combo(C6,2,1,-2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C7 := Matrix(%id = 190823656)}{\[\displaystyle {\it C7}\, := \, \left[ \begin {array}{ccc} 3&0&2\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C8:=combo(C7,3,1,-2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C8 := Matrix(%id = 172345652)}{\[\displaystyle {\it C8}\, := \, \left[ \begin {array}{ccc} 3&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C9:=mult(C8,1,1/3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C9 := Matrix(%id = 174969040)}{\[\displaystyle {\it C9}\, := \, \left[ \begin {array}{ccc} 1&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ReducedRowEchelonForm(C1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 182495944)}{\[\displaystyle  \left[ \begin {array}{ccc} 1&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{# LinearAlgebra package. Reversable operations. a=matrix, s=source, t=target, c=constant
macro(combo=combo,swap=swap,mult=mult); # Erase macro definitions
combo:=(a,s,t,c)->RowOperation(a,[t,s],c); # Replace row t by c times row s added to row t.
 swap:=(a,s,t)->RowOperation(a,[t,s]);     # Swap rows s and t
  mult:=(a,t,c)->RowOperation(a,t,c);      # Replace row t by c times row t. Illegal: c=0
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{combo := proc (a, s, t, c) options operator, arrow; LinearAlgebra:-RowOperation(a, [t, s], c) end proc}{\[\displaystyle \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{swap := proc (a, s, t) options operator, arrow; LinearAlgebra:-RowOperation(a, [t, s]) end proc}{\[\displaystyle \]}
\end{maplelatex}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{mult := proc (a, t, c) options operator, arrow; LinearAlgebra:-RowOperation(a, t, c) end proc}{\[\displaystyle \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C1 := Matrix([ [3,2,2], [3,1,2], [1,1,1] ]);

}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C1 := Matrix(%id = 192617232)}{\[\displaystyle {\it C1}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}3&1&2\\ \noalign{\medskip}1&1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C2:=combo(C1,1,2,-1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C2 := Matrix(%id = 175487020)}{\[\displaystyle {\it C2}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&-1&0\\ \noalign{\medskip}1&1&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C3:=combo(C2,1,3,-1/3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C3 := Matrix(%id = 186282180)}{\[\displaystyle {\it C3}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&-1&0\\ \noalign{\medskip}0&1/3&1/3\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C4:=combo(C3,2,3,1/3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C4 := Matrix(%id = 187039936)}{\[\displaystyle {\it C4}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&-1&0\\ \noalign{\medskip}0&0&1/3\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C5:=mult(C4,2,-1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C5 := Matrix(%id = 181948784)}{\[\displaystyle {\it C5}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1/3\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C6:=mult(C5,3,3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C6 := Matrix(%id = 192453908)}{\[\displaystyle {\it C6}\, := \, \left[ \begin {array}{ccc} 3&2&2\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C7:=combo(C6,2,1,-2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C7 := Matrix(%id = 190882620)}{\[\displaystyle {\it C7}\, := \, \left[ \begin {array}{ccc} 3&0&2\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C8:=combo(C7,3,1,-2);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C8 := Matrix(%id = 191978408)}{\[\displaystyle {\it C8}\, := \, \left[ \begin {array}{ccc} 3&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{C9:=mult(C8,1,1/3);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{C9 := Matrix(%id = 191970428)}{\[\displaystyle {\it C9}\, := \, \left[ \begin {array}{ccc} 1&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{ReducedRowEchelonForm(C1);
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Matrix(%id = 191183660)}{\[\displaystyle  \left[ \begin {array}{ccc} 1&0&0\\ \noalign{\medskip}0&1&0\\ \noalign{\medskip}0&0&1\end {array} \right] \]}
\end{maplelatex}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\begin{Maple Normal}{
}\end{Maple Normal}
\begin{Maple Normal}{
\textbf{Elimination tutor.}}\end{Maple Normal}

\begin{Maple Normal}{
On maple menus, Tools --> Tutors --> Linear Algebra --> Gaussian Elimination}\end{Maple Normal}

\begin{Maple Normal}{
produces a tutor for learning combo, swap, multiply ideas. It is too clumsy for}\end{Maple Normal}

\begin{Maple Normal}{
daily use (use the macros above), but useful on the first days with the topic.}\end{Maple Normal}

\begin{Maple Normal}{
}\end{Maple Normal}
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{Student[LinearAlgebra][GaussianEliminationTutor]();
}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplegroup}
\textbf{}\begin{Maple Normal}{
\textbf{Troubleshooting}}\end{Maple Normal}

Maple's error message are irritating at first. Experience changes that.
\textbf{Common Maple Coding Errors.}
1.  Do statements end with a semicolon or a colon?
2.  Are parentheses, braces, brackets, etc., balanced?  Code like\textbf{\{ x,y \}}is good, but\textbf{x,y\}}will cause trouble.
3.  Are you trying to use something as a variable to which you have already assigned a value?
To "clear" a variable\mapleinline{inert}{2d}{x}{$\displaystyle x$}
, say\textbf{unassign('x')}.  You can clear many variables at once, e.g.,\textbf{unassign( 'x', 'y' )}.
You will not have to reload any packages after using the unassign command.  A variable that has a value assigned becomes a constant.
To display the value of an ordinary variable, type its name, followed by a semicolon, e.g.,x;4.  If things seem hopelessly messed up, issue the command\textbf{restart;}You will have to reload any needed packages after this.
5.  Are you using a function when an expression is called for, or vice versa?  Syntax\textbf{g := x\symbol{94}2 + y\symbol{94}2;}defines an expression while
\textbf{f := (x,y) -> x\symbol{94}2 + y\symbol{94}2;}defines a function.  It makes good sense to code\textbf{f(1,3);}but not so much sense to code\textbf{g(1,2);}
6.  Are you using\textbf{=}when\textbf{:=}is called for?  The first tests for equality (like double-equal in C++) while the second assigns a value to a variable (like single-equal in C++).
7.  Are you distinguishing between the three kinds of quotes?  They are:\textbf{"}the double quote,\textbf{'}the single quote, and\textbf{`}the left single quote. The left signle quoteis basically used for nothing by rookies. When used, it is in expressions like
\textbf{}\textbf{`"two" "three"`;   "two" "three";}\textbf{}\textbf{`two''and"""three`;}
\begin{Maple Normal}{
\textbf{}\textbf{`two`    `three`;}\textbf{}\textbf{}\textbf{`two``three`;}\textbf{`two"``"three`;}}\end{Maple Normal}

To see the difference, execute the expressions. The single back quote is not a duplicate double quote. Single quotes change a name or constant into a symbol.
For example, print(Digits) and print('Digits') have two different outputs (one is10, the other symbol'Digits'). Settle issues by reading maple help:?quotes
8.  If you use a function in a package, load the package first.  To use\textbf{Determinant}, loadLinearAlgebra. To use\textbf{display}, load\textbf{plots}.
To load package\textbf{LinearAlgebra}
\textbf{with(LinearAlgebra): Determinant(A);}\textbf{Load a package once per session.}
\textbf{LinearAlgebra[Determinant](A);}\textbf{Bulletproof code, no package load needed.}
9.  Use the shortcut\textbf{?}to inquire about the details of a Maple function, e.g.,\textbf{?plot}for information about plot or just\textbf{?}for general information.
10.  If all of the licenses for the current version of Maple are being used, you can use a different version by calling it up by name, i.e. by typing\textbf{xmapleV8}or\textbf{xmapleV15}in a terminal window.
\textbf{References}.
The WWW has manyexamples of Maple code.  Use a search engine to find code that fits your application. Ask in the Undergraduate Computer Lab for textbooks to check out.
\end{maplegroup}
\begin{maplegroup}
\begin{mapleinput}
\mapleinline{active}{1d}{}{}
\end{mapleinput}
\end{maplegroup}
\begin{maplelatex}\end{maplelatex}
\begin{maplelatex}\end{maplelatex}
\begin{maplelatex}\end{maplelatex}
\begin{maplelatex}\end{maplelatex}
\end{document}
