Math 5-385
Info about using Maple for computing with polynomials

(including the Groebner package)

Last updated: November 3, 2008

General intro: At the beginning, we'll just use Maple to do compute GCD's of polynomials and maybe also to use the division algorithm a bit. But we could do a lot of this by hand. The real point is to get used to Maple so that we can use it later for Groebner basis calculations, where it really will be useful.

Contents

Starting Maple

Getting help in Maple     Type     ?     at the maple prompt     >     to get a list of general help topics. Typing     ?topic     gives information about a particular command. For instance     ?intro     gives a general introductory discussion about maple, while     ?gcd     gives information about how to use the maple command gcd , which computes the GCD of two polynomials.
In the Xwindows version help commands pop up windows which can be navigated by scrolling and mouse clicks.
 

Remote access for running maple
If Maple isn't installed at your remote location, then you can connect to a math department machine exactly as in the
remote access for the Matlab scripts. If you're doing the command-line version (sufficient for most polynomial computations), then a machine without Xwindows capability (i.e. only an ssh client) is good enough!

Entering commands in Maple
If you want to see the output, then the command line must end with a semicolon   ;   -- this is different from Matlab!
For instance, to compute the GCD of x6 - 1  and  x4 - 1,   type:
gcd(x^4 - 1, x^6 - 1);   
 
The help commands, however, don't end with a semicolon.

An important note about entering exponents in the Xwindows version. (Added October 3, 2006)  
Of course, we must use the "hat symbol"  ^   to have our exponents recognized correctly. Once this is done, however,
it may appear that we're stuck in the exponent mode. To escape from use the right arrow key. (The arrow keys usually
are at the bottom, just to the right of the main part of the keyboard.) So, we really enter something more like this: gcd(x^4-> - 1, x^6-> - 1);
(Here the sequence  ->  is used to indicate the rightarrow key.)
Actually, Maple (the Xwindows version, anyway) never shows us the hat symbol, just exhibiting usual exponents on the screen. For instance, the command just entered will be exhibited approximately like this: gcd(x4 - 1, x6 - 1);

Storing answers for later use

One very useful trick is to use the "by definition" symbol    :=    to store the result of a computation for later use.
For instance:
g := gcd(x^4 - 1, x^6 - 1);   
will print the value of g and also save it for use in later calculations.
 

Adding text to your worksheet.

Printing from Maple

Saving your work as a Maple worksheet

If you haven't finished a project and would like to resume work later, then you can save it as a Maple worksheet. The process of saving something is fairly standard. The process of opening the saved worksheet and resuming work requires an "extra" step, and we'll also discuss that.
  • Saving your work.   Pull down the File menu on the main Maple window, and select    Save as ... Enter a file name of your own choice, and then click the Save button at the bottom of the dialog box. If you want to put your worksheet in a specific subdirectory of your home directory, that is possible but is not required.
     
  • Opening a worksheet, for instance at a later session.
    1. After starting Maple, pull down the File menu, and select    Open...
        After selecting a worksheet document, click the Open button at the bottom of the dialog box.
       
    2. When the worksheet has opened, you must re-activate each of your previously enterred commands -- in the correct order. If no change is needed, just put the cursor in the line of that command and type return or enter. You may, of course, change any of them that you need or want to change. And when any command is changed, be sure to update any later commands where the result of the present command is used as an input.

Quitting Maple

Calculations with polynomials in 1 variable

The Groebner package

Other useful commands
 

  • The LinearAlgebra package    To load this package, type either:
     
         with(LinearAlgebra):   or   with(LinearAlgebra);
     
    The version with the semicolon will produce a lengthy list of commands included in this package. The version that ends with a colon ¡suppresses! all of that output.

     


    Comments and questions to:  roberts@math.umn.edu


    Back to  the help page index.

    Back to  the Math 5385 class homepage.