Maple and Excel

For students who particularly like spreadsheet environments, Maple does have a spreadsheet environment that can be employed and is shown below. Also, there have been links created to allow transfers between Maple and Excel . To perform these transfers between Maple and Excel and to use Maple inside of Excel, you have to launch the Excel program and go to Tools on the Menu Bar . Under the Add Ins , you check the Maple 6 option. You should see a series of Red Maple leafs appear on the lower Menu Bar . These provide Copy and Paste abilities and Help information.

We begin with the Maple Spreadsheet showing a few features.

Maple Spreadsheet

Note that Maple cells are referenced with a tilde in front of the cell reference name, such as ~C3 gives the entry in cell C3 . The spreadsheet is invoked with the command

> with(Spread);

> CreateSpreadsheet(name);

Function exp(-x) Differentiation*of*Product Integration*of*Product
x exp(-x) exp(-x)-x*exp(-x) -x*exp(-x)-exp(-x)
x^2 exp(-x) 2*x*exp(-x)-x^2*exp(-x) -x^2*exp(-x)-2*x*exp(-x)-2*exp(-x)
x^3 exp(-x) 3*x^2*exp(-x)-x^3*exp(-x) -x^3*exp(-x)-3*x^2*exp(-x)-6*x*exp(-x)-6*exp(-x)
-x^3*exp(-x)-3*x^2*exp(-x)-6*x*exp(-x)-6*exp(-x)
sin(x) exp(-x) cos(x)*exp(-x)-sin(x)*exp(-x) -1/2*cos(x)*exp(-x)-1/2*sin(x)*exp(-x)
cos(x) exp(-x) -sin(x)*exp(-x)-cos(x)*exp(-x) -1/2*cos(x)*exp(-x)+1/2*sin(x)*exp(-x)

name

The table above shows how you can nicely create differentiation or integration tables. The Maple Spreadsheet allows many of the spreadsheet options for easily manipulating of repetitive symbolic computations. The commands entered into the cells are standard Maple commands.

Using Maple Inside Excel

There is an Excel Spreadsheet that is available from the webpage that shows the use of Maple inside Excel. One first has to Add In Maple 6 from the Excel Tools Menu. The hyperlink to the Excel Spreadsheet is provided here.

Connecting Maple and Excel

Analyzing Data from Excel

There is an Excel Spreadsheet with the data on Triatoma phyllosoma from Session 3. An alternate method of processing these data is to copy the data from the Excel spreadsheet, using the special Maple copy button on the toolbar. Maple produces a Matrix of these values after pasting into the Maple worksheet as shown below. The data are reprocessed using the seq command into the form that we used before for the leastsquare fit routine in Maple. Here we fit a cubic polynomial. This equation is copied and pasted back into the Excel worksheet, where it can be easily graphed. A nice graph of the data and model are shown on the Excel spreadsheet.

The special package that is needed for the analysis is added.

> with(stats):

After typing a label A : = , the data is pasted from the Excel worksheet.

> A := Matrix(1..15,1..2,{(1,1)=1,(1,2)=116.6,(2,1)=2,(2,2)=120.1,(3,1)=3,(3,2)=114.9,(4,1)=4,(4,2)=129.9,(5,1)=5,(5,2)=116.5,(6,1)=6,(6,2)=107.7,(7,1)=7,(7,2)=99,(8,1)=8,(8,2)=104,(9,1)=9,(9,2)=100.7,(10,1)=10,(10,2)=87.5,(11,1)=11,(11,2)=82.7,(12,1)=12,(12,2)=53.8,(13,1)=13,(13,2)=54,(14,1)=14,(14,2)=72.4,(15,1)=15,(15,2)=81.1}):

The data are processed using the sequence command to prepare for the least squares best fit command below.

> td := [seq(A[i,1],i=1..15)]: yd := [seq(A[i,2],i=1..15)]:

The mathematical model is inserted for the data analysis.

> model := a*t^3 + b*t^2 + c*t + d;

model := a*t^3+b*t^2+c*t+d

Find the least squares best fit of the cubic model to the data.

> eqn := fit[leastsquare[[t,y], y=model, {a,b,c,d}]]([td, yd]);

eqn := y = .1194151165*t^3-2.949471199*t^2+15.69072...

The right hand side of the equation above is separated off, then copied into the Excel spreadsheet where it is easily graphed.

> rhs(eqn);

.1194151165*t^3-2.949471199*t^2+15.69072907*t+99.71...