MaplePrimes Posts

Latest Posts Latest Posts Feed

We have a new video about plotting with procedures, specifically on how to avoid an error related to evaluation that many people make. 

The worksheet I used in the video is available here:

By the way, this mistake doesn't occur just in the context of plotting. Users of Optimization commands (and other commands that allow functions to be expressed as either an expression in a variable or as a procedure) frequently run into this problem too.


We are happy to announce that Maple T.A. now supports the Learning Tools Interoperability® (LTI) standard, which means that Maple T.A. can be easily integrated with course management systems that support LTI. Maplesoft officially supports LTI connectivity with Canvas, Blackboard Learn™, Brightspace™, Moodle™, and Sakai.

Using the LTI standard, you can integrate Maple T.A. directly into your existing course management or learning management platforms. This allows for single-sign on in one central location and Maple T.A. assignment delivery and grade pushing right inside of your existing solutions.

If you would like to use the LTI connectivity feature, please contact Maplesoft Technical Support at They will provide the instructions and files you need to set up your connection, and answer any questions you may have about how the integration works on your platform.

Maplesoft Product Manager, Maple T.A.


The last ten posts I see are spam!

Isn't it possible to stop them from spaming this Forum?




A wealth of knowledge is on display in MaplePrimes as our contributors share their expertise and step up to answer others’ queries. This post picks out one such response and further elucidates the answers to the posted question. I hope these explanations appeal to those of our readers who might not be familiar with the techniques embedded in the original responses.

Before I begin, a quick note that the content below was primarily created by one of our summer interns, Pia, with guidance and advice from me.

The Question: Source Code of Math Apps

Eberch, a new Maple user, was interested in learning how to build his own Math Apps by looking at the source code of some of the already existing Math Apps that Maple offers.

Acer helpfully suggested that he look into the Startup Code of a Math App, in order to see definitions of procedures, modules, etc. He also recommended Eberch take a look at the “action code” that most of the Math Apps have which consist of function calls to procedures or modules defined in the Startup Code. The Startup Code can be accessed from the Edit menu. The function calls can be seen by right-clicking on the relevant component and selecting Edit Click Action.

Acer’s answer is correct and helpful. But for those just learning Maple, I wanted to provide some additional explanation.

Let’s talk more about building your own Math Apps

Building your own Math Apps can seem like something that involves complicated code and rare commands, but Daniel Skoog perfectly portrays an easy and straightforward method to do this in his latest webinar. He provides a clear definition of a Math App, a step-by-step approach to creating a Math App using the explore and quiz commands, and ways to share your applications with the Maple community. It is highly recommended that you watch the entire webinar if you would like to learn more about the core concepts of working with Maple, but you can find the Math App information starting at the 33:00 mark.

I hope that you find this useful. If there is a particular question on MaplePrimes that you would like further explained, please let me know. 

The GroupTheory package in Maple includes facilities for working with finitely presented groups - groups defined by finitely many generators and defining relations.  We now have a video tutorial that covers the basics of this aspect of the package.  As always, we appreciate feedback and suggestions regarding this feature, or new features that you would like to see in the GroupTheory package.

Maple's dsolve numeric can solve delay ODEs and DAEs as of Maple 18. However, if I am not wrong, it cannot solve delay equations with a time dependent history. In this post I show two examples.

Example 1:

y1(t) and y2(t) with time dependent history. Use of piecewise helps this problem to be solved efficiently. Hopefully Maple will add history soon in its capability.

Example 2: 

This is a very a complicated stiff problem from immunology. As of now, I believe only Maple can solve this (other than RADAR5 from Prof. Hairer). Details and plots are posted in the attached code.


Let me know if any one has a delay problem that needs to be solved. I have tested many delay problems in Maple (they work fine). The attached examples required addtional tweaking, hence the post.


I want to take this opportunity to congratulate and thank Maple's dsolve numeric/delay solvers for their fantastic job. Maple is world leader not because of example1, but because of its ability to solve example 2.




 This code is written by Dayaram Sonawane and Venkat R. Subramnian, University of Washington. You will need Maple 18 or later for this. For those who are wanting to solve these problems in earlier versions, I can help them by offering a procedure based approach (less efficient).

Example1 The first example solved is a state dependent delay problem (


eq1:= diff(y1(t),t)=y2(t);

eq1 := diff(y1(t), t) = y2(t)



eq2 := diff(y2(t), t) = -y2(exp(1-y2(t)))*y2(t)^2*exp(1-y2(t))


 Both y1(t) and y2(t) have time dependent history (y1(t)=log(t) and y2(t)=1/t, t<-0.1). If I am not mistaken one cannot solve this directly using Maple's dsolve numeric command. However, a simple trick can be used to redefine the equations for y1(t) and y2(t) as below


eq3 := diff(y1(t), t) = piecewise(t <= .1, 1/t, y2(t))



eq4 := diff(y2(t), t) = piecewise(t <= .1, -1/t^2, -y2(exp(1-y2(t)))*y2(t)^2*exp(1-y2(t)))


 The problem is solved from a small number close to t = 0 (1e-4) to make Maple's dsolve numeric remember the history till t = 0.1


epsilon := 0.1e-3









[t = 5.0, y1(t) = 1.60942323180838, y2(t) = .199998786891688]




Tweaking the tolerances and epsilon will get the solution even more closer to the expected answers.



 Example 2

 The next problem discussed is very stiff, complicated and as of today, according Professor Hairer (one of the world's leading authority in numerical solutions of ODEs, DAEs), cannot be solved by any other code other than his RADAR (5th order implicit Runge Kutta modified for delay equations, Guglielmi N. and Hairer E. (2001) Implementing Radau IIa methods for stiff delay differential equations. Computing 67:1-12). This problem requires very stringent tolerances. For more information read, I can safely say that Maple can boast that it can solve this delay differential equation by using a switch function (instead of Heaviside/picecewise function). Code is attached below and results are compared with the output from RADAR code.  Note that dsolve/numeric is probably taking more time steps compared to RADAR, but the fact that Maple's dsolve numeric solved this model (which cannot be solved in Mathematica or MATLAB[needs confirmation for MATLAB]) should make Maple's code writers proud. It is very likely that we will be trying to submit an educational/research article on this topic/example soon to a journal. For some weird reasons, stiff=true gives slightly inaccurate results.



radar5data:=readdata("C:\\Users\\Venkat16core-office\\Google Drive\\waltmanproblem\\sol.txt",[string,string,float,string,string,float,float,float,float,float,float]):





["X", "=", 300.000000, "Y", "=", 0.6154486288e-15, 0.3377120916e-6, 0.4221403310e-6, 0.2142554563e-5, 299.9999999, 299.6430338]



eq[1] := diff(y[1](t), t) = -r*y[1](t)*y[2](t)-s*y[1](t)*y[4](t)



eq[2] := diff(y[2](t), t) = -r*y[1](t)*y[2](t)+alpha*r*y[1](y[5](t))*y[2](y[5](t))*H1



eq[3] := diff(y[3](t), t) = r*y[1](t)*y[2](t)



eq[4] := diff(y[4](t), t) = -s*y[1](t)*y[4](t)-gamma1*y[4](t)+beta*r*y[1](y[6](t))*y[2](y[6](t))*H2



eq[5] := diff(y[5](t), t) = H1*(y[1](t)*y[2](t)+y[3](t))/(y[1](y[5](t))*y[2](y[5](t))+y[3](y[5](t)))



eq[6] := diff(y[6](t), t) = H2*(y[2](t)+y[3](t))/(y[2](y[6](t))+y[3](y[6](t)))



H1 := 1/2+(1/2)*tanh(100*t-3500)

H2 := 1/2+(1/2)*tanh(100*t-19700)



alpha := 1.8

beta := 20.

gamma1 := 0.2e-2

r := 50000.

s := 100000.



diff(y[1](t), t) = -50000.*y[1](t)*y[2](t)-100000.*y[1](t)*y[4](t), diff(y[2](t), t) = -50000.*y[1](t)*y[2](t)+90000.0*y[1](y[5](t))*y[2](y[5](t))*(1/2+(1/2)*tanh(100*t-3500)), diff(y[3](t), t) = 50000.*y[1](t)*y[2](t), diff(y[4](t), t) = -100000.*y[1](t)*y[4](t)-0.2e-2*y[4](t)+1000000.*y[1](y[6](t))*y[2](y[6](t))*(1/2+(1/2)*tanh(100*t-19700)), diff(y[5](t), t) = (1/2+(1/2)*tanh(100*t-3500))*(y[1](t)*y[2](t)+y[3](t))/(y[1](y[5](t))*y[2](y[5](t))+y[3](y[5](t))), diff(y[6](t), t) = (1/2+(1/2)*tanh(100*t-19700))*(y[2](t)+y[3](t))/(y[2](y[6](t))+y[3](y[6](t)))



ics := y[1](0) = 0.5000000000e-5, y[2](0) = 0.1000000000e-14, y[3](0) = 0, y[4](0) = 0, y[5](0) = 0.1e-39, y[6](0) = 0.1e-19






 note that compile = true was used for efficiency


[t = 300., y[1](t) = 0.615611371327094e-15, y[2](t) = 0.337706811581908e-6, y[3](t) = 0.422136411682798e-6, y[4](t) = 0.214253771204037e-5, y[5](t) = 299.999986716780, y[6](t) = 299.643054284209]





nd := 1059



["X", "=", 300.000000, "Y", "=", 0.6154486288e-15, 0.3377120916e-6, 0.4221403310e-6, 0.2142554563e-5, 299.9999999, 299.6430338]


 Values at t = 300 match with expected results.


























Download delayimmunetopost.mws

As a very good application for viewing and calculation of the components of acceleration either tangential or normal. Besides immediately it is shown an Application for physics.


(in spanish)

L. Araujo C.



Here we see the projection of a vector onto another using different concepts ranging from linear algebra to vector calculus. Implemented components thus seen in three-dimensional space.

(in spanish)

L.Araujo C.

Bryon, since you are the programmer I am requesting that you add replies to the users list.  They are not brought up under users answers.

We have see all posts by... see all questions by... and see all answers by... however those categories miss every reply posted by the user.

Maple 2015 has a new command, dataplot, for plotting datasets. It was designed to be easy to use and it offers several new features that are not available in Maple's other plotting commands. A few months ago, I recorded a video that gives an overview of the command. If you have any questions or comments about dataplot, feel free to post here. I'm also including the worksheet that is shown in the video:

Maple’s Code Generation makes it possible to translate your Maple code to various other programming languages including C, Python, and several others. In Maple 2015, we added a new Code Generation target to one of my other personal favourite languages, R. R is a programming language designed for statistical computing and graphics, so no code translation from Maple to R would be complete without attempting to translate as many commands as possible from Maple’s Statistics package. 

Translating code from one language to another is tricky business. Maple 2015 represented the first time that any Code Generation target language added the ability to translate commands from the Statistics package. With R, we found that many common statistics commands had almost a one-to-one mapping, such as Statistics:-Mean = mean, but several others were much more complicated, including several commands for dealing with probability functions that did not have direct mappings due to differences in how the systems handle symbolic probability functions.

A list of statistics commands that can be translated from Maple to R can be found here.

In addition to assisting me recall the correct syntax in R, having worked with CodeGeneration[R] for several months now, I find that one of my most common uses for Maple’s code generation to R is simply to pass data between the systems. A simple example:

 CodeGeneration:-R( LinearAlgebra:-RandomMatrix( 5, 2 ) );

translates to the following in R:

 cg <- matrix(c(-4,27,8,69,99,29,44,92,-31,67),nrow=5,ncol=2)

To see a couple more short examples, here’s a short video that I recorded on Code Generation to R:

A little known fact about Code Generation is that the translation files can be viewed in from the “samples” directory in your Maple install directory. Similar to many of Maple’s packages, you can view all of the source code that Code Generation uses for its translations. For example, you can view the translations for the commands that I mentioned above from the “” file inside of your “%MapleInstallDir%/ samples/CodeGeneration/R” directory.

Should you have any feedback on this translation, or any other, please feel free to contact us. We’re also on the hunt for our next code generation targets, so let us know what other languages you would like to see added as Code Generation targets.

A wealth of knowledge is on display in MaplePrimes as our contributors share their expertise and step up to answer others’ queries. This post picks out one such response and further elucidates the answers to the posted question. I hope these explanations appeal to those of our readers who might not be familiar with the techniques embedded in the original responses.

Before I begin, a quick note that the content below was primarily created by one of our summer interns, Pia, with guidance and advice from me.

MaplePrimes member Thomas Dean wanted 1/2*x^(1/2) + 1/13*x^(1/3) + 1/26*x^(45/37)  to become  0.5*x^0.500000 + 0.07692307692*x^0.333333 + 0.03846153846*x^1.216216216  using the evalf command.

Here you can see the piece of code that Thomas Dean wrote in Maple:

eq:=1/2*x^(1/2) + 1/13*x^(1/3) + 1/26*x^(45/37);

Carl Love replied simply and effectively with a piece of code, using the evalindets command instead:

evalindets(eq, fraction, evalf);

As always, Love provided an accurate response, and it is absolutely correct. But for those just learning Maple, I wanted to provide some additional explanation.

The evalindets command, evalindets( expr, atype, transformer, rest ), is a particular combination of calls to eval and indets that allows you to efficiently transform all subexpressions of a given type by some algorithm. It encapsulates a common "pattern" used in expression manipulation and transformation.

Each subexpression of type atype is transformed by the supplied transformer procedure. Then, each subexpression is replaced in the original expression, using eval, with the corresponding transformed expression.


Note: the parameter restis an optional expression sequence of extra arguments to be passed to transformer. In this example it was not used.

I hope that you find this useful. If there is a particular question on MaplePrimes that you would like further explained, please let me know. 

I happen to just have a look at mathematica's imagedeconvolve function .  I had a look at the Examples and saw how a very blurred image of Neil Armstrong standing on the moon with the lunar lander was deconvolved into some really amazing detail. 

I don't believe that image could deconvolve into what they show on that page, It's somewhat misleading.

The only way that deconvolved image could have such great detail is the blurred image used was most likely convolved from the detailed image.  

Here the potential of maple 2015 to the quantitative study of the decomposition of a vector table is shown in two dimensions. Application for the exclusive use of engineering students, which was implemented with embedded components.


Lenin Araujo Castillo

Archivo Corregido:  Decomposició

Hello all ,

Having read a recent post about comparing Maple and Mathematica I'd like to throw my 2 cents (FWIW).

It is *silly* (not to say stupid) to compare these two softwares.

Maple can do "things" that Mathematica can't. For examples Differential Geometry, Lie Algrebra, covariant derivative and the like.

And Mathematica Manipulate command is far better than Maple Explore (just another exemple).

I have being using Maple since Release V.2 (1992) and Mathematica since Release 1.1.a (1991).

I use both of them on a daily basis and I *LOVE* them both.

Inputs are welcome :-)

Kind regards to all,



First 8 9 10 11 12 13 14 Last Page 10 of 241