How to Use Maple Worksheets

How to get the worksheets using the Netscape browser.

To access the worksheets, go to the Math 126 web page for section A and click on Maple, then on the appropriate category, then on the appropriate worksheet. The Math 126 A web page address is http://www.nd.edu/~nancy/Math126/info.html

Netscape caches recently accessed data. If you have used a web page, hold down shift-key while clicking on the Reload button to be sure you are getting the latest version. (This will usually but not always get the most up to date document.)

Click on the worksheet you wish to download. A dialog box will appear which will allow you to save the file. Place it in an appropriate directory or folder, which should be in your Private directory or folder if you are using the university system. Make sure that you organize your computer in appropriate directories or folders for different purposes so you can find important files like your Maple worksheets. The worksheet file will have some abbreviated name indicating its purpose, and it will have an extension of the form `.mws' or `.ms'. (Some systems may suppress the extension.)

To start a Maple worksheet.

First start the Maple program. How you do this will depend on the system you are using. I urge you to use a Sparc Station. There have been technical problems with the Maple installation on Macs and PCs, such as difficulty getting plots to print. On a Sparc Station, give the command xmaple. On a PC, open My Computer, then the H drive (Afs(H:)), then the folder Private. Now make a new folder such as math126 to save your work in, open it, then go to Start/NT@ND Programs/Basic/Statistics and Math/MapleV Release 5.1. On a Mac, you can find Maple under Applications on the Launcher, or under Applications on the apple menu.

Maple will start with a blank worksheet which you should close (unless you wish to write your own worksheet). Normally, you will be loading existing worksheets. You may also want to adjust the size of the window so that it fills the screen. Open the desired worksheet by choosing the File menu option `Open'. A dialog box will appear allowing you to find the worksheet and load it. On a Mac if Maple can't find the worksheet, it might be because you started working on the worksheet on a different kind of computer. In this case, first open the file in Word on the Mac. (Be sure to tell Word to check All Files.) Then save it as Text Only with Line Breaks. Then open Maple, go to the File Menu, then Open. You should now be able to open it.

To run a Maple worksheet.

You are not expected to become a proficient Maple programmer. You will find four types of worksheets. One type will be the Maple assignment worksheets. These will contain the problems you are expected to do with Maple and space for your solutions. The second type will be general Maple help worksheets. The third type will be worksheets which will help you with assignments. There will usually be one for each assignment, which will contain the necessary Maple commands (or direct you to the appropriate general Maple help worksheet), some Maple tips, and some examples similar to some of the homework problems. The fourth type will be the ones used in classroom demonstrations. These will be available no later than the day after the class. You might find it useful to refer to some of these. Because these will be available, you don't need to sit in class frantically attempting to take notes on a computer demonstration. To use the second and third types of worksheets, read the text and execute each Maple input statement by pressing the enter or return key. An input statement will usually be colored red and preceded by an input prompt '>'. Note that the cursor must be somewhere in the line containing the statement (or for a group of related statements with a single prompt, anywhere in the group). Maple will produce output, and move the cursor to the next input statement. In some cases, however, you may have placed the cursor elsewhere (to activate a graphics window, for example), and in those cases you will have to go to the desired Maple input statement and click to place the cursor there. Maple keeps a record of the order in which the statements are executed , so make sure you don't skip statements. For example, in the sequence

> with(plots):
> polarplot(2*sin(theta),theta=0..2*Pi);

if you execute the second statement without having executed the first, Maple will just print the statement again. The first statement loads the plots package which contains the operation `polarplot'. Without that operation loaded, Maple doesn't know what to do when you invoke it, so it just repeats it to you.

Since output and text can overflow the screen, you may have to use the scroll bar to move back in the worksheet to see relevant output.

Many Maple statements will be self explanatory, but don't worry about the meaning of obscure syntax in commands. The text in the demonstration and help worksheets will explain what is being done. Your main tasks on Maple assignments are to learn how to use Maple to do routine calculations and to observe the output and think about what it means, not to become an expert Maple programmer.

Saving and restarting Maple Worksheets.

You should save your Maple worksheet under a new name to distinguish it from the original. That way you can always start fresh if things get confusing. You can save the file by using the File Menu and choosing `Save as'. Subsequently, you should periodically save your progress by using the `Save' option.

An important warning. Maple and similar programs have one confusing aspect. If you save a partially completed worksheet and later reopen it, your previous output will appear on the screen, but the statements won't have been executed. So you should start again at the beginning of the worksheet and re-execute all the statements. This just amounts to pressing enter or return until you get to the point you left off. You need not read all the text and output again unless you want to review it. (In a subsequent release, Maple promises that it will provide a way to avoid this annoyance.) Similarly, as mentioned previously, Maple remembers the order in which statements have been executed rather than their order on the screen. If you move around in the worksheet and execute statements, you may produce some unexpected results.

Homework

The primary purpose of the Maple homework is to increase your understanding of calculus. This requires you to show that you have thought about what you have observed rather than just copying and editing statements from another worksheet, pressing return several times and printing the result. Since you will have access to Maple worksheets designed to help you with the assignments, figuring out the syntax of the Maple commands should not be specially taxing. You may be asked to describe the Maple output or explain it. You can either type this in as text in the appropriate place on the worksheet or leave enough space to write the explanation by hand.
Often, if you wish to modify a statement in place, you can do this by placing the cursor there and editing. Or, if you want a neat record of your work, you may use the Edit menu `Copy' and `Paste' commands to copy the statement to the end of the worksheet, and then make your changes there. You can experiment with the functions in the Menu bar to see how to add a prompt when you need one.

When done, you should save the worksheet, then print the worksheet by selecting the `Print' option from the File menu. To print it from a Sparc on a printer in the cluster where you are working, choose Print Command. (Otherwise, you create a postscript file.) On a Mac, to get plots to print, you might have to give the Maple command: plotsetup(gdi); then do the plot. (After giving the plotsetup command, you might get a message: Warning, unknown plot device--ignore it.) There have been several cases of Maple crashing--which is one reason you should save the worksheet before printing--and a segmentation fault error appearing when people have tried to print from the Sparcs. There's a good chance that you can solve this problem by starting Maple again, going to Edit/Remove Output/From Worksheet on the menu bar. Then go back to the beginning of the worksheet and hit enter after every command to execute the commands again. Now you can probably print. If you have any other trouble printing, consultants in the labs may be able to help you with printing, but they probably won't know be able to help you with the substance in the worksheets. Maple is available in all the labs on campus. If none of these instructions help, don't spend an hour struggling to print. Contact your instructor for help.

Getting Help.

If you don't understand the mathematics involved in a worksheet, you should consult your teaching assistant or instructor.

It is important to understand that Maple is just one tool to help you understand mathematics, and it is not the major part of your course. Your instructor and teaching assistant will rightfully be concentrating on how to help you understand the mathematics and may not be particularly interested in the intricacies of Maple programming, which requires specialized knowledge. If you have a question about Maple which they cannot answer, they will direct you to someone who can.

Using Maple to help you do your homework.

You should study the Maple worksheets that are returned to you and identify any errors you have made. You will quickly build up a small repertoire of Maple statements that you will find helpful. For example, you ought to know that

> int(f(x), x=a..b);

may calculate the integral of an expression in x, here denoted f(x) between the limits a and b. f(x) could be an explicit expression such as 2*x + x^2, or it could be a function value for a function defined previously by a statement of the form
> f := x -> some expression in x;
Similarly,
> plot3d(f(x,y),x=a..b,y=c..d);
will allow you make a three dimensional plot of an expression. Thus, you might find it helpful to use Maple in routine homework assignments as you learn more Maple statements. Don't rely too strongly on this, however, since, at least at present, you will have to do your tests the old fashioned way, by hand. You may be tested on material which appears in Maple worksheets, but such questions will relate to mathematical substance and not require you to use Maple commands.

Updates

It would be wise to check the Maple Worksheets web page for updates to this document or additional advice. Remember `shift Reload' to update your cache, and check the date of the document.

Learning More About Maple.

Start by using Introduction to Maple which is under Maple Help under Maple on the course web page. There you can also find additional help worksheets for specific topics. If you want to learn more about Maple, you can click on Maple's Help button, then on New User's Tour. Follow the instructions given there.

Prepared by Nancy K. Stanton
Department of Mathematics
631-7436
8/31/00
Nancy.K.Stanton.1@nd.edu
based on material prepared by Leonard Evens at Northwestern University.