PLOTTING IN MAPLE

 

             MAPLE is available in the PSII (William Small Centre), GAUSS and JUPITER labs.

 

            Here is a sample MAPLE session to plot the function ( p - x)/2 if 0 < x < 2 p and the first three partial sums of its Fourier series.  The function has Fourier coefficients an = 0, bn = 1/n. 

1. Start the computer (if it is off) and click OK on the notice.  Enter your ACADLAB username and password.  Wait for the programs to Load.  BE PATIENT – it takes a while.

2.  Click on the START button in the lower left-hand corner of the screen and choose Program – Maple 8 – Maple 8.

(Maple 9 is also available but it didn’t seem to open properly in PSII.  In any case, there is not much difference between them for the purpose of this course).

3.  You will get a MAPLE window in which you can enter the commands as listed below.  Note that > is the MAPLE prompt.

> f:=(Pi-x)/2;

> s1:=sin(x);

> s2:=s1+sin(2*x)/2;

> s3:=s2+sin(3*x)/3;

> plot([f,s1,s2,s3],x=0..2*Pi,colour=black);

You can add text to your worksheet by using the command ctrl-t.  You should do this to explain what you are doing and to answer questions on the MAPLE part of the assignment.  Using the colour=black option produces clearer output when printing the file.  You can find out more about using the plotting command by using the help file.

> help(plot);

Try using MAPLE to plot the function f(x) = |x| if -1 < x < 1 and the first few partial sums of its Fourier series.  Here the coefficients are a0 = ˝, a2n = 0, a2n+1 = 4/(p(2n+1))2, bn = 0.  This function has period 2 so the series contains the terms cos(npx).

 

            You can save your work by using the SAVE AS command on the FILE menu.  Since you have limited space to store files and the plots can take a lot of memory, go to the EDIT menu and click on REMOVE OUTPUT -> WORKSHEET.  When you open the file next time you can regenerate the plots by going to the EDIT menu and clicking EXECUTE -> WORKSHEET.

 

            In order to print your work click on the PRINT command on the FILE menu.  If you are in the Jupiter lab choose PARKING-LAB as your printer.  You will then have to go to the parking Garage lab to retrieve your output (and pay for it).  The Gauss and PSII labs have printers on site.

 

            In order to quit the MAPLE program go to the file menu and click on EXIT.

 

            There are lots of other features of MAPLE which you can explore using the help command.

 

            There will be a MAPLE tutorial in the Jupiter lab (226 Petrie) on Wednesday, Sept 24 at 15:30 (following the class) for those who are unfamiliar with MAPLE or want a quick refresher.  We will only cover the very basic commands necessary for plotting.