MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • With the launch of Maple 2017, we really wanted to showcase some of the amazing people that work so hard to make Maple. We wanted to introduce our developers to our awesome user community, put names to faces, and have some fun in the process.

    We’ll be doing this Q&A session from time to time with team members from the Maple, MapleSim, Maple T.A. and Möbius development groups.

    My first Q&A is with Math Architect, Paulina Chin. If you’re a regular MaplePrimes user, you’ll know her as @pchin. Let’s get right into the questions.

    1. What do you do at Maplesoft?

    I’m a member of the Math Software group. Much of my time goes toward developing and maintaining parts of the Maple library, but I occasionally develop Maple content related to math education as well.

    1. What did you study in school?

    I started in Applied Mathematics and then continued with graduate work in Computer Science and Electrical Engineering. My graduate and post-doc research  were in the area of numeric computation.

    1. What area(s) of Maple are you currently focusing on in your development?

    For many years, I’ve been working on the plotting and typesetting features in Maple. I also work on the Grading package and related applications.

    1. What’s the coolest feature of Maple that you’ve had a hand in developing?

    The Typesetting (2-D math) system in Maple is undoubtedly the most challenging and complex project I’ve worked on, and it involves careful coordination among a team of developers. I’m not sure others would see it as cool, because the features are not flashy like some of the visualization features I’ve worked on. However, whenever we implement a new feature and it works well, it’s really satisfying because it makes mathematics that much more accessible to users.

    1. What do you like most about working at Maplesoft? How long have you worked here?

    I’ve been at Maplesoft 17 years and my work has never been boring. I especially enjoy being surrounded by a very diverse and dedicated group of co-workers, and it’s terrific when we get new students, interns and visitors who come from all parts of the world. All of these people contribute to the great atmosphere here.

    1. Favorite hobby?

    I like discussing books as much as reading them. I run several book clubs, including the one here at Maplesoft. I also enjoy working with young people and volunteer at my daughter’s high school, helping students train for programming contests.

    1. What do you like on your pizza?

    Pineapple and hot peppers.

    1. What’s your favourite movie?

    I have so many favourites that it’s hard to answer this question. At the moment, I might say Notorious, The Empire Strikes Back, and Annie Hall, but ask me again next week and I’ll probably give you a different list.

    1. What skill would you love to learn? (That you haven’t already) Why?

    I wish I could play a musical instrument. I know a number of highly skilled amateur and professional musicians, and I’ve always admired their abilities.

    1. Who’s your favourite mathematician?

    I’d have to say it’s Euclid. When I was in Grade 6, my teacher saw I was bored with the math exercises we were doing and gave me a book on geometric constructions. That was the start of a life-long fascination with math. I even named my cat Euclid but she didn’t live up to the name, as she turned out to be lovable but not very smart.

    It can be interesting to consider a directional derivative of f(z) in the direction w:

    %ddiff(f(z), z, w) = %limit((f(z + w*h) - f(z))/(w*h), h = 0);
    ddiff := proc (fz0, z, dir) local rule, fz, dfz, ans;
      dfz := %ddiff(fz, z, dir)*dir;
      rule :=
       [abs(1, fz::anything) = (conjugate(fz)*dfz + fz*conjugate(dfz))/(2*abs(fz)*dfz),
        signum(1, fz::anything) = (conjugate(fz)*dfz - fz*conjugate(dfz))/(2*abs(fz)*conjugate(fz)*dfz)];
      ans := applyrule(rule, diff(fz0, z));
      ans := value(ans);
      ans := [ans, op(convert~(ans, [abs, argument, Re, Im, signum, conjugate]))];
      op(1, sort(simplify(ans, size), length)) end proc;

    For analytic functions the derivative is the same in any direction:

    ddiff(sqrt(Re(f(z))^2+Im(f(z))^2)*exp(I*argument(f(z))), z, w); # f(z) in disguise
                                --- f(z)

    For non-analytic functions that's no longer the case:

    ddiff(conjugate(z), z, w);
    ddiff(conjugate(f(z)), z, 1+I);
                              -I --- f(z)
    ddiff(abs(z), z, z);
    ddiff(ln(abs(z)), z, z);

    Some of those derivates have simple geometric interpretations: the derivative of argument(z) in the direction z is zero, since argument(z) doesn't change when moving in the direction z from the point z; the derivative of abs(z) in the direction I*z is zero, since the direction is tangent to the circle abs(z)=constant; since signum(z) is a function of argument(z) only, its derivative in the direction z is zero as well.

    Interestingly, the derivative taken twice in the direction z is zero for each of the six basic functions:

    map(fz -> ddiff(ddiff(fz, z, z), z, z), [abs, argument, Re, Im, signum, conjugate](z));
                           [0, 0, 0, 0, 0, 0]

    Does that have some simple geometric interpretation as well?


    I was asked if I would put together a list of top resources to help students who are using Maple for the first time.  An awful lot of students will be cracking Maple open in the next few weeks (the ones who are keeping up with their assignments, at least – for others, it sometimes takes little longer :-), so it seemed like a good idea.

    So then I had to decide what to do. I know Top N lists are very popular (Ten Things that Will Shock You about Your Math Software!), and there are tons of Maple training resources available to fill such a list without any difficulties.  But personally, I don’t always like Top N lists. What are the chances that there are exactly N things you need to know, for nice values of N? And how often you are really interested in all N items? I just want to get straight to the points I care about.

    I decided I’d try a matrix. So here you go: a mini “choose your own adventure” guide for getting to know Maple.  Pick the row that corresponds to what you want to do, and the column for how you want to do it.  All on a single, page, and ad-free!

    And best of luck for the new school year.



    I like words

    I like videos

    Just let me try it

    Product Overview

    Inside Maple, from the Help menu, select Take a Tour of Maple then click on the Ten Minute Tour button.


    (Okay, even though I like words, too, you might also want to watch the video in the next column. The whole “picture is worth a thousand words” does have some truth to it, much as I don’t always like to admit it. J)

    Watch Clickable Math


    Keep in mind that if you prefer to use commands instead of these Clickable Math tools, you can do that too.  Personally, I mix and match.

    You’ll figure it out.

    Getting Started Info

    Read the Maple Quick Start Tutorial Guide, as a PDF, or from the Help system. To access this guide from within Maple, start Maple, click on the Getting Started icon the left, then select the Quick Start Guide (first icon in the second row).

    Watch the Maple Quick Start Tutorial Video.

    The most important things to remember are

    1. Right click on your math expression to bring up a menu of things you can do, like plotting or integrating or solving your expression
    2. If you have just entered an exponent or the denominator of a fraction, use the right arrow key to get out of it.

    How do I? Essentials

    Look at the “How do I” section of the Maple Portal (Start Maple, click on the Getting Started icon, click on the Maple Portal icon; or search for “MaplePortal” in the help system).  Also look at the Maple Portal for Students, using the button from the Maple Portal.

    Check out the dozens of videos in the Maple Training Video collection.

    You can do a lot with the context menus and the various tools you’ll find on the Tools menu. But when in doubt, look at the list of “How do I” tasks from the Maple Portal described in the “words” column and pull out what you need from there.

    What now?

    The help system is your friend. Not only does it have help pages for every feature and every command, but it includes both the Maple User Manual and the Maple Programming Guide (also available as PDFs).

    Check out the collection of videos on the Maplesoft YouTube channel.  (And the help system is your friend, too. We can’t make videos to cover every last thing, and if we did, you wouldn’t have time to watch them all!)

    Maple comes with many examples and applications you can look at and modify.  You can browse through the Start page resources, or search for “examples,index” in the help system to see the full list.


    And yes, the help system is your friend, too.  But don’t worry, no one is going to make you read the manual.





    Dear Users,

    I have received a congratulations from a Mapleprime user for my post (on Finite Element Analysis - Basics) posted two years earlier. I  did not touch that subject for two years for obvious reasons. Now that a motivation has come, I have decided to post my second application using embedded components. This I was working for the past two years and with the support from Maplesoft technical support team and Dr.RobertLopez. I thank them here for this workbook has come out well to my satisfaction and has given me confidence to post it public.

    About the workbook

    I have tried to improve the performance of a 2-Stroke gasoline engine to match that of a four stroke engine by using exhaust gas recirculation. Orifice concept is new and by changing the orifice diameter and varying the % of EGR, performance was monitored and data stored in Excel workbook. These data can be imported to Maple workbook by you as you want for each performance characteristic. The data are only my experimental and not authentic for any commercial use.

    This Maple workbook generates curves from data for various experiments conducted by modifying the field variables namely Orifice diameter, % Exhaust gas Recirculation and Heat Exchanger Cooling. Hence optimum design selection is possible for best performance.

    Thanks for commenting, congratulating or critisising!! All for my learning and improving my Maple understanding!! 

    In this app you can use from the creation of curve, birth of the position vector and finally applied to the displacement and the distance traveled. All this application revolves around the creation of a path and the path of a particle over this generated by vectors. You will only have to insert the vector components and the times to evaluate. Designed for engineering students guided through Maple. In Spanish. Updated 


    Lenin Araujo C

    Ambassador of Maple

    Here in this video you can observe the correct insertion of vectors; Making use of the keyboard, ascii code and tool palette of our Maple program. As our worksheet is very large, I made the explanation in two parts; I recommend that you observe this first part of performing any execution on your Maple worksheet. You can contrast your results with the apps also made in this software. In Spanish.

    Movie # 01

    Movie # 02

    Lenin Araujo Castillo

    Ambassador of Maple

    On 5/July/2017, Kitonum responded to the 3/July/2017 MaplePrimes question "How to perform double integration over subdomain" by providing code for a procedure IntOverDomain that implements Green's theorem applied to a planar region whose boundary is a simple, closed, rectifiable, oriented curve (SCROC by some authors).

    I was intrigued. First, this is a significant extension of existing Maple functionalities. Second, the implementation admits boundaries defined piecewise with sections defined parametrically; or sections that are polygonal lines defined by a list of nodes.

    But how was the line integral around such boundaries coded? In the worksheet "IntOverDomain_Deconstructed," I summarize the existing Maple functionality for implementing iterated double integrals over specified domains, then analyze how Kitonum coded Green's theorem as an extension of Maple's capabilities. After recognizing the great coding skills of Kitonum, I conclude with a short wishlist of related extensions that I would like to see added to Maple in the future.


    Download the worksheet:

    A new code based on higher derivative method has been implemented in Maple. A sample code is given below and explained. Because of the symbolic nature of Maple, this method works very well for a wide range of BVP problems.

    The code solves BVPs written in the first order form dy/dx = f (Maple’s dsolve numeric converts general BVPs to this form and solves).

    The code can handle unknown parameters in the model if sufficient boundary conditions are provided.

    This code has been tested from Maple 8 to Maple 2017. For Digits:=15 or less, this code works in all of the Maple versions tested.

    Most problems can be solved with Digits:=15 with atol = 1e-10 or so. This code can be used to get a tolerance value of 1e-20 or any high precision as needed by changing the number of Digits accordingly. This may be needed if the original variables are not properly sacled. With arbitrarily high Digits, the code fails in Maple 18 or later version, etc because Maple does not support SparseDirect Solver at high precision in some of the versions (hopefuly this bug can be removed in the future versions).

    For simple problems, Maple’s dsolve/numeric is superior to the code developed as it is implemented in hardware floats. For large scale problems and stiff problems, the method developed is much more superior to Maple and comparable to (and often times better than) state of the art codes for BVPs - bvp4c (MATLAB), COLSYS,TWPBVP, etc.

    The code, as written, cannot be used for problems with a singularity at end points (doable in the future). In addition, mixed boundary conditions are not supported in this version of the code (for example, y1(1)=y2(0)). Future updates will include the application of this approach for DAE-BVPs, currently not supported by Maple’s dsolve/numeric command.

    A paper has been submitted to JCAM. I welcome feedback on the code and solicit input from Mapleprimes members if they are able to test (and break this code) for any BVP.


    PDF of the paper submitted, example maple code and the solver as a text file needed are uploaded here. Additional examples are hosted on my website at




    Troesch's problem
    This is an inherently unstable, difficult, nonlinear, two-point BVP formulated by Weibel and Troesch that describes the confinement of a place column by radiation pressure. Increasing epsilon increases the stiffness of the ODE.
    1. E.S. Weibel, On the confinement of a plasma by magnetostatic fields, Phys. Fluids. 2 (1959) 52-56.
    2. B. Troesch, A simple approach to a sensitive two-point boundary value problem, J. Comput. Phys. 21 (1976) 279-290.

    The package HDM solves boundary value problems (BVPs) using higher derivative methods (HDM) in Maple®. We explain how to solve BVPs using this package. HDM can numerically solve BVPs of ordinary differential equations (ODEs) of the form shown is the fowllowing example.




    Reset the program to clear the memory from previous execution command.



    Read the txt file which contains the HDM solver for BVPs.



    Declare the precision for the entire Maple® sheet.


    Digits := 15



    Enter the first-order ODEs into EqODEs list.


    EqODEs := [diff(y1(x), x) = y2(x), diff(y2(x), x) = epsilon*sinh(epsilon*y1(x))]



    Define the left boundary condition (bc1), and the right boundary condition (bc2). One should collect all the terms in one side.


    bc1 := [y1(x)]



    bc2 := [y1(x)-1.]



    Define the range (bc1 to bc2) of this BVP.


    Range := [0., 1.]



    List any known parameters in the list.


    pars := [epsilon = 2]



    List any unknown parameters in the list. When there is no unknown parameter, use [ ].


    unknownpars := []



    Define the initial derivative in nder (default is 5 for 10th order) and the number of the nodes in nele (default is 10 and distributed evenly across the range provided by the user). The code adapts to increase the order. For many problems, 10th order method with 10 elements are sufficient.


    nder := 5

    nele := 10



    Define the absolute and relative tolerance for the local error. The error calculation is done based on the norm of both the 9th and 10th order simulation results.


    atol := 0.1e-5

    rtol := 0.100000000000000e-7



    Call HDMadapt procedure, input all the information entered above and save the solution in sol. HDMadapt procedure does not need the initial guess for the mesh.

    sol:= HDMadapt(EqODEs,bc1,bc2,pars,unknownpars,nder,nele,Range,atol,rtol):


    Present some details of the solution.

    sol[4]; # final derivative



    sol[5]; # Maximum local RMSE




    Store the dimension of the solution (after adjusting the mesh) to NN.


    NN := 11



    Plot the interested variable (the ath ODE variable will be sol[1][i+NN*(a-1)] )


    node := 2

    odevars := [y1(x), y2(x)]




    for i from 1 to nops(sol[3]) do xx[i+1]:=xx[i]+sol[3][i]: od:

    for j from 1 to node do
    end do;




    Download Example_3_Troesch.mws


    Was just pondering this idea and posted this in the post topic for discussion. 

    Each Maple finished version of Maple may still have certain bugs that will not be updated for that version, so I am suggesting (I think anyone could implement it) that if there is a workaround, one could wrap it up in something I would call a patch package updateable by us users we could update here on mapleprimes.  It would be good for people who haven't upgraded or can't upgrade due to costs etc...

    For example, there was recent issue with pdsolve that was fixed quite quickly in the seperate updateable Physics package.  Things could be done similarily that might work with other workarounds using this patch package idea. 

    If anyone thinks this is good or even viable idea then lets implement it.  I envisioned it with just this one rule to follow - the name of the patch package would reflect the version we are patching (ie. with(patch12) or with(patch2016) for Maple 12 and Maple 2016 respectively etc...)  We could make these patch packages available in this post or start another.

    As I said, I'm just throwing the idea out there.  Thoughts?

    There seems to be a bug with improper integration:




    Substituting any number for x, or assuming x >= 0  (or x<=0) does give the correct result,

    The problem also persists when assuming x>-1 (or x>-Maple_floats(MIN_FLOAT))

    Hi MaplePrimes,


    These two files have the same content.  One is a .pdf and the other is a Maple Worksheet.  I explore integer sequences of the form - 

    a(r) = c*a(r-1)+d*a(r-2) with a(1) and a(2) given.

    Some of these sequences are in (the Online Encyclopedia of Integer Sequences) and some are not.  If we restrict c to 1 and assume that a(1)=1 and a(2) = 2 we have the parameter d remaining.  See additional webpage -

    Let me know if you like the code.





    Books free. Like!!!

    Lenin Araujo Castillo

    As you can see this app performs the trace of a given path r (t), then locate the position vector in a specific time. It also graphs the velocity vector, acceleration, Tangential and Normal unit vectors, along with the Binormal. Very good app developed entirely in Maple for our engineering students.

    Lenin Araujo Castillo

    Ambassador of Maple

    It seems a large number of people, when initially using maple, wrongly deduce that for example sin(60) is the sin of 60 degrees and not the sin of 1/3 Pi radians.  I believe mathematica's default is degrees.  When a student compares an expression to another but forgets to realize a value is read as radians and not degrees they are perplexed when Maple returns false and Mathematica returns true.

    As a suggestion, under tools->options allow a user to be able to change how maple reads values within trigonometric funtions as either radians or degrees.

    Most times when someone computes the sin(60) what they really mean in Maple..
    is sin(convert(60 degrees, radians))


    I'm back from presenting work in the "23rd Conference on Applications of Computer Algebra -2017" . It was a very interesting event. This fifth presentation, about "The Appell doubly hypergeometric functions", describes a very recent project I've been working at Maple, i.e. the very first complete computational implementation of the Appell doubly hypergeometric functions. This work appeared in Maple 2017. These functions have a tremendous potential in that, at the same time, they have a myriad of properties, and include as particular cases most of the existing mathematical language, and so they have obvious applications in integration, differential equations, and applied mathematics all around. I think these will be the functions of this XXI century, analogously to what happened with hypergeometric functions in the previous century.

    At the end, there is a link to the presentation worksheet, with which one could open the sections and reproduce the presentation examples.

    The four double-hypergeometric Appell functions,

    a complete implementation in a computer algebra system


    Edgardo S. Cheb-Terrab

    Physics, Differential Equations and Mathematical Functions, Maplesoft


    The four multi-parameter Appell functions, AppellF1 , AppellF2 , AppellF3  and AppellF4  are doubly hypergeometric functions that include as particular cases the 2F1 hypergeometric  and some cases of the MeijerG  function, and with them most of the known functions of mathematical physics. Appell functions have been popping up with increasing frequency in applications in quantum mechanics, molecular physics, and general relativity. In this talk, a full implementation of these functions in the Maple computer algebra system, including, for the first time, their numerical evaluation over the whole complex plane, is presented, with details about the symbolic and numerical strategies used.

    Appell Functions (symbolic)



    The main references:


    P. Appel, J.Kamke de Feriet, "Fonctions hypergeometriques et Hyperspheriques", 1926


    H. Srivastava, P.W. Karlsson, "Multiple Gaussian Hypergeometric Series", 1985


    24 papers in the literature, ranging from 1882 to 2015


    Definition and Symmetries


    Polynomial and Singular Cases


    Single Power Series with Hypergeometric Coefficients


    Analytic Extension from the Appell Series to the Appell Functions


    Euler-Type and Contiguity Identities


    Appell Differential Equations


    Putting all together


    Problem: some formulas in the literature are wrong or miss the conditions indicating when are they valid (exchange with the Mathematics director of the DLMF - NIST)


    Appell Functions (numeric)






    Compute these Appell functions over the whole complex plane


    Considering that this is a research problem, implement different methods and flexible optional arguments to allow for:

    a) comparison between methods (both performance and correctness),

    b) investigation of a single method in different circumstances.


    Develop a computational structure that can be reused with other special functions (abstract code and provide the main options), and that could also be translated to C (so: only one numerical implementation, not 100 special function numerical implementations)

    Limitation: the Maple original evalf command does not accept optional arguments


    The cost of numerically evaluating an Appell function



    If it is a special hypergeometric case, then between 1 to 2 hypergeometric functions


    Next simplest case (series/recurrence below) 3 to 4 hypergeometric functions plus adding somewhat large formulas that involve only arithmetic operations up to 20,000 times (frequently less than 100 times)


    Next simplest case: the formulas themselves are power series with hypergeometric function coefficients; these cases frequently converge rapidly but may involve the numerical evaluation of up to hundreds of hypergeometric functions to get the value of a single Appell function.


    Strategy for the numerical evaluation of Appell functions (or other functions ...)



    The numerical evaluation flows orderly according to:

    1) check whether it is a singular case

    2) check whether it is a special value

    3) compute the value using a series derived from a recurrence related to the underlying ODE

    4) perform an sum using an infinite sum formula, checking for convergence

    5) perform the numerical integration of the ODE underlying the given Appell function

    6) perform a sequence of concatenated Taylor series expansions





    Numerical integration of an underlying differential equation (ODEs and dsolve/numeric)


    Concatenated Taylor series expansions covering the whole complex plane




    Improvements in the numerical evaluation of hypergeometric functions


    Evalf: an organized structure to implement the numerical evaluation of special functions in general


    To be done



    Download Appell_Functions.pdf

    Edgardo S. Cheb-Terrab
    Physics, Differential Equations and Mathematical Functions, Maplesoft

    First 29 30 31 32 33 34 35 Last Page 31 of 282