Items tagged with package


Maple 2017 has launched!

Maple 2017 is the result of hard work by an enthusiastic team of developers and mathematicians.

As ever, we’re guided by you, our users. Many of the new features are of a result of your feedback, while others are passion projects that we feel you will find value in.

Here’s a few of my favourite enhancements. There’s far more that’s new - see What’s New in Maple 2017 to learn more.


MapleCloud Package Manager

Since it was first introduced in Maple 14, the MapleCloud has made thousands of Maple documents and interactive applications available through a web interface.

Maple 2017 completely refreshes the MapleCloud experience. Allied with a new, crisp, interface, you can now download and install user-created packages.

Simply open the MapleCloud interface from within Maple, and a mouse click later, you see a list of user-created packages, continuously updated via the Internet. Two clicks later, you’ve downloaded and installed a package.

This completely bypasses the traditional process of searching for and downloading a package, copying to the right folder, and then modifying libname in Maple. That was a laborious process, and, unless I was motivated, stopped me from installing packages.

The MapleCloud hosts a growing number of packages.

Many regular visitors to MaplePrimes are already familiar with Sergey Moiseev’s DirectSearch package for optimization, equation solving and curve fitting.

My fellow product manager, @DSkoog has written a package for grouping data into similar clusters (called ClusterAnalysis on the Package Manager)

Here’s a sample from a package I hacked together for downloading maps images using the Google Maps API (it’s called Google Maps and Geocoding on the Package Manager).

You’ll also find user-developed packages for exploring AES-based encryption, orthogonal series expansions, building Maple shell scripts and more.

Simply by making the process of finding and installing packages trivially easy, we’ve opened up a new world of functionality to users.

Maple 2017 also offers a simple method for package authors to upload workbook-based packages to the MapleCloud.

We’re engaging with many package authors to add to the growing list of packages on the MapleCloud. We’d be interested in seeing your packages, too!


Advanced Math

We’re committed to continually improving the core symbolic math routines. Here area few examples of what to expect in Maple 2017.

Resulting from enhancements to the Risch algorithm, Maple 2017 now computes symbolic integrals that were previously intractable

Groeber:-Basis uses a new implementation of the FGLM algorithm. The example below runs about 200 times faster in Maple 2017.

gcdex now uses a sparse primitive polynomial remainder sequence together.  For sparse structured problems the new routine is orders of magnitude faster. The example below was previously intractable.

The asympt and limit commands can now handle asymptotic cases of the incomplete Γ function where both arguments tend to infinity and their quotient remains finite.

Among several improvements in mathematical functions, you can now calculate and manipulate the four multi-parameter Appell functions.


Appel functions are of increasing importance in quantum mechanics, molecular physics, and general relativity.

pdsolve has seen many enhancements. For example, you can tell Maple that a dependent variable is bounded. This has the potential of simplifying the form of a solution.


Plot Builder

Plotting is probably the most common application of Maple, and for many years, you’ve been able to create these plots without using commands, if you want to.  Now, the re-designed interactive Plot Builder makes this process easier and better.

When invoked by a context menu or command on an expression or function, a panel slides out from the right-hand side of the interface.


Generating and customizing plots takes a single mouse click. You alter plot types, change formatting options on the fly and more.

To help you better learn Maple syntax, you can also display the actual plot command.

Password Protected Content

You can distribute password-protected executable content. This feature uses the workbook file format introduced with Maple 2016.

You can lock down any worksheet in a Workbook. But from any other worksheet, you can send (author-specified) parameters into the locked worksheet, and extract (author-specified) results.


Plot Annotations

You can now get information to pop up when you hover over a point or a curve on a plot.

In this application, you see the location and magnitude of an earthquake when you hover over a point

Here’s a ternary diagram of the color of gold-silver-copper alloys. If you let your mouse hover over the points, you see the composition of the points

Plot annotations may seem like a small feature, but they add an extra layer of depth to your visualizations. I’ve started using them all the time!


Engineering Portal

In my experience, if you ask an engineer how they prefer to learn, the vast majority of them will say “show me an example”. The significantly updated Maple Portal for Engineers does just that, incorporating many more examples and sample applications.  In fact, it has a whole new Application Gallery containing dozens of applications that solve concrete problems from different branches of engineering while illustrating important Maple techniques.

Designed as a starting point for engineers using Maple, the Portal also includes information on math and programming, interface features for managing your projects, data analysis and visualization tools, working with physical and scientific data, and a variety of specialized topics.


Geographic Data

You can now generate and customize world maps. This for example, is a choropleth of European fertility rates (lighter colors indicate lower fertility rates)

You can plot great circles that show the shortest path between two locations, show varying levels of detail on the map, and even experiment with map projections.

A new geographic database contains over one million locations, cross-referenced with their longitude, latitude, political designation and population.

The database is tightly linked to the mapping tools. Here, we ask Maple to plot the location of country capitals with a population of greater than 8 million and a longitude lower than 30.


There’s much more to Maple 2017. It’s a deep, rich release that has something for everyone.

Visit What’s New in Maple 2017 to learn more.

I can't understand how to install this package "SADE" in Maple 17. Secondly, I am new to Maple. So Please guide me the process to install this package and how to use it. Thanks!

In the test package below I want the the Value of Clr to be "B" when the package is loaded. How do I achieve that?


mylibdir := cat(kernelopts(homedir), kernelopts(dirsep), "maple", kernelopts(dirsep), "toolbox", kernelopts(dirsep), "personal", kernelopts(dirsep), "lib")




libname := mylibdir, libname

"C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib", "C:\Program Files\Maple 2016\lib", "C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib"





"RTest:=module()  option package;  export  Sums;    global Clr;  Clr:=B;  Sums:=proc(p1,p2,c:=Clr)  if c=B or c=b  then    p1+p2  elif c=G or c=g then  p1-p2  elif c=R or c=r  then      if p2 =0 then "Not Valid"       else ( p1)/(p2)        end if  else "Error"  end if  end proc;    end module; "










"At This point I want the value of Clr to be automaticially   B"

Sums(2, 3)



RTest:-Sums(2, 3, b)




RTest:-Sums(2, 3, r)



RTest:-Sums(2, 3, g)



Clr := g



RTest:-Sums(2, 3)



RTest:-Sums(2, 3, b)



RTest:-Sums(2, 3)



RTest:-Sums(2, 0, r)

"Not Valid"





A number of MaplePrimers have asked how one might use the section and subsections of a Maple worksheet to structure the source code of an extended Maple package.  The usual answer is that it cannot be done; a module-based Maple package must be assigned in a single input region in a worksheet.  A recommended alternative is to write the source in text files and use either command line tools or the Maple read command from a worksheet to assign the package.  Because the read command handles Maple preprocessor macros, specifically the $include macro, the source can be conveniently split into smaller files.

I prefer this file-based method for development because text files are generally more robust than Maple worksheets, can be edited with the user's preferred editor, can be put under version control, and can be searched and modified by standard Unix-based tools.  However, not everyone is familiar with this method of development.  With that in mind, I wrote a small Maple package, CodeBuilder, that permits splitting the source of a Maple package (or any Maple code) into separate code edit regions in a standard Maple worksheet, using $include macros to include the source of other regions.  To build the package, the code edit regions are written to external files, using the names of the regions as the local file name relative to a temporary directory.

The package includes a method to run mint on the source code.  The result can be either printed in the worksheet or displayed in a pop-up maplet that allows selecting the infolevel and the region to check.

CodeBuilder includes help pages and a simple example (referenced from the top-level help page) demonstrating the usage.  To install the package, unzip the attached zip file and follow the directions in the README file.

Errata Just noticed that a last minute change broke some of the code.  Do not bother with the 1-0-1 version; I'll upload a new version shortly.  The latest version (1-0-3) is now available.


To have to better overview of a package, I would like to be able to group/ ungroup all the lines inside a subpackage as it is possible to do for example in a worksheet.

Is there a possibility to group lines (as a section) inside a package ?

Thank you for your feedback


I have a package with multiple subpackages that I want to correct.

For troubleshooting my package, i would be interested by 2 points :
1) I would like use subsection for each subpackage. It would enable to have a better view of the structure of my package. However, I heard that sections, and subsections can lead to syntax errors. Is there a possibility to gather lines in a subpackages as with a section or subsection ?

2) To troubleshoot my package, I would like to comment a important part of code lines. Is there a technique to comment/ uncomment an important group of lines in the same time. I would enable me to valid my code little by little.

Thanks a lot for your help and tips so as to troubleshoot a big package with many subpackages.



I try to retrieve some procedures from a package that I have in a 2D output.

But, when I copy/paste in a 1D maple input or a simple text file, the main part of the procedure is replaced by "...".

Example :

proc(a, b)  ...  end;

Do you have a idea to suppress this feature ? and so that I can retrieve the desired procedures?

Thanks a lot for your help



I would to understand a code that I have where the structure of packages are often using a local variable in a particular way. A variable local _DO_CONSTRAINT with the same name as the procedure DO_CONSTRAINT is created.

The code is the following :

module () 
option package; 

_DO_CONSTRAINT:=proc (phi::list, varslist::list) 
table([obj = CONSTRAINT, expr = phi, vars = varslist]) 
end proc

DO_CONSTRAINT:=proc (phi::{list, scalar}, vars::{list, scalar}) 
if type(phi, scalar) and type(vars, scalar) then 
_DO_CONSTRAINT([phi], [vars]) 
elif type(phi, list) and type(vars, list) and nops(phi) = nops(vars) then 
_DO_CONSTRAINT(phi, vars) 
else ERROR("The number of expressions <phi> and variables <vars> are not equal") 
end if 
end proc

end module

Question :
1) It seems me that this technique enable to adapt the procedure  (DO_CONSTRAINT) to different types of inputs that we can try on it (lists or scalars). Do I right ? May you give me more informations on how it works ?
2) Is it the only possibility to do this ? In other words, is there a possibility to make a similar code and also concise but without using this local variable ?

Thanks a lot for your help.


I am writing a package to define a few Records and collect some quantities and formulae to do some arithmetic with.

At some point I started running into a severe problem: Each time I want to use one of the exports form the module, the Maple kernel dies with a "Stack limit exceeded" message. The issue is: This seems to happen only on Maple 2016. I had some issues in Maple 2015 but that got sorted by rewriting some stuff. I never had any issue like that with Maple 15. I went as far as commenting out most of my .mapleinit code to make sure that did not cause issues. The code works as intended in Maple 15 and in Maple 2015.

I am posting this here and am asking others to see if they can reproduce this. Needless to say I will SCR this. But I actually need to get this to work.

The error can be triggered by simply entering


after loading the package. Needless to say, it should just echo the name "Booster", to get more one would need to enter eval(Booster) (due to the last-name evaluation rules).



I am experimenting with creating help files for  my own package.

I have saved  a package overview file and one package command  file into a help data base as a test usingTools, Help Database, Save as Help Page.

These 2 help pages work in principle as i can find them when I search for them and the command  help page opens from the overview page. I now need to edit them. So I edit the original worksheets and use Tools, Help Database, Save as Help Page to update the data base.

Now Maple will not let me overwrite the original page.The Help file savy you can overwrite. So I have to delete the original page first then resave it back in. This involves reentering all the data again. Topic Alisies and Table of contents.

To say the least this is extremely tedious  vastly innefficient and very error prone. I will have upto say 40 help pages to edit and they will require some expirementing with.

Is there a better way to do this?


Hve added this line the the bottom of the worksheet

makehelp('`Rational Trigonometry`', "Rational Trigonometry Overview", " C:\Users\Ronan.Ronan-PC\maple\toolbox\UserHelp\lib\")

get     Error, (in readline) file or directory does not exist



I want to make a package or module. Not sure. I cant get my head around what to do. I have loads of formulas I would like to be able to use without going back through work sheets. At present just want to keep it simple.

Have loaded a sample work sheet to use

Intend to place package in Maple2016 library folder.



Library Folder

C:\Program Files\Maple 2016\lib







Point2 := proc (x1, y1) options operator, arrow; [x1, y1] end proc

proc (x1, y1) options operator, arrow; [x1, y1] end proc


Point3 := proc (x1, y1, z1) options operator, arrow; [x1, y1, z1] end proc

proc (x1, y1, z1) options operator, arrow; [x1, y1, z1] end proc


a1 := Point3(x1, y1, z1)

[x1, y1, z1]


a2 := Point3(x2, y2, z2)

[x2, y2, z2]


a3 := Point3(x3, y3, z3)

[x3, y3, z3]


Line through 2 points

LinePts := proc (p1, p2) options operator, arrow; (p2[2]-p1[2])*x+(p1[1]-p2[1])*y-p2[2]*p1[1]+p1[2]*p2[1] end proc

proc (p1, p2) options operator, arrow; (p2[2]-p1[2])*x+(p1[1]-p2[1])*y-p2[2]*p1[1]+p1[2]*p2[1] end proc




Line := proc (a, b, c) options operator, arrow; a*x+b*y+c end proc

proc (a, b, c) options operator, arrow; a*x+b*y+c end proc


Lines s

LnPrll := proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, y)-coeff(l2, x)*coeff(l1, y) = 0) end proc

proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, y)-coeff(l2, x)*coeff(l1, y) = 0) end proc


Lines t

LnPrpnd := proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, x)+coeff(l1, y)*coeff(l2, y) = 0) end proc

proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, x)+coeff(l1, y)*coeff(l2, y) = 0) end proc




Quadrance between 2 points (2D)

Quadrance := proc (a1, a2) options operator, arrow; (a1[1]-a2[1])^2+(a1[2]-a2[2])^2 end proc

proc (a1, a2) options operator, arrow; (a1[1]-a2[1])^2+(a1[2]-a2[2])^2 end proc



Quadrance between 2 points (3D)

Qd3 := proc (a1, a2) options operator, arrow; (a1[1]-a2[1])^2+(a1[2]-a2[2])^2+(a1[3]-a2[3])^2 end proc

proc (a1, a2) options operator, arrow; (a1[1]-a2[1])^2+(a1[2]-a2[2])^2+(a1[3]-a2[3])^2 end proc


Triple Quad Formula (3 colinear points)

TQF := proc (Q1, Q2, Q3) options operator, arrow; (Q1+Q2+Q3)^2 = 2*Q1^2+2*Q2^2+2*Q3^2 end proc

proc (Q1, Q2, Q3) options operator, arrow; (Q1+Q2+Q3)^2 = 2*Q1^2+2*Q2^2+2*Q3^2 end proc



SpreadPoly := proc (n, s, rn) with(orthopoly); s-factor(1/2-(1/2)*T(n, 1-2*rn)) end proc

proc (n, s, rn) with(orthopoly); s-factor(1/2-(1/2)*T(n, 1-2*rn)) end proc


SpreadPoly(3, s, r)







Thanks to the help of several list members I managed to translate and update some old procedures.  These procedures were part of a packcage and they all had help files.   Here is an example


# E. Mendes - 25/04/94

`FUNCTION: sampling - finds the discretized model`,
` `,
` sampling(f)`,
` sampling(f,k)`,
` sampling(f,k,vars)`,
` f - state space`,
` k - order of approximation`,
` vars - variables`,
`- sampling(f,k) returns a discrete approximation for a continuous`,
` system`,``,
` dx(t)/dt=f(x(t),u(t)) `,
`EXAMPLE: `,``,
`> with(linalg):`,
`> f:=vector([x2,x3,-x1+x2^2+2*x3]):`,
`> sampling(f,1)`,
` 2`,
` [- x1, x2 + x1 ]`,``,
`SEE ALSO: fixpoind, fixpoinc`):


I have browsed the help documentation but I must confess I don't feel comfortable to modify the help database.  Do I have to wrap all the functions up as a package and then write the help files?   I am lost here.  Any help will be most welcome.

Many thanks




in internet or maple, is there a neural network package in maple?

i find example link after googled, however, still feeling not easy to apply to data.

is there the most simplest version for two columns of data ?

I am trying to find a download for the ONEOptimal package for Maple ( I read the article but there is no download link to the file. Does anyone know where I can download the package?


I have .mla. package and I would like to create the source code associated to this package.

In the past, you have also help me to obtain the source code of procedure of the module.

Here the post where Carl Love has helped me :

How can I do to create the complete source code of package directly ?

Is there a direct way enabling to not have to read one procedure by one procedure but to obtain the code source for all the package ?

Thank you for your help



1 2 3 4 5 6 7 Last Page 1 of 35