Personal Stories

Stories about how you have used Maple, MapleSim and Math in your life or work.

My desk was covered with papers, a glass of water, and a big shipping container. Even though my chair was there, I was sitting on the floor with my laptop, having a bad hair day, and a robot was seated next to me.  This was a typical day at Maplesoft for an engineering co-op student.

For this project, at the request of my manager, I left my duties as Spanish translator and marketing assistant and I started to work with the robot NAO from Aldebaran Robotics. The purpose of this project was to program NAO using Aldebaran’s Choreographe software to make new movements and dances that I would later use to create new MapleSim models for Maplesoft’s Model Gallery. Maplesoft’s marketing team would then use these models in some of their promotional activities.

Given that NAO was going to travel to Taiwan in a short period of time, I wanted to focus on doing one elaborate dance and a couple of simple movements.Thanks to F.U.N. lab from the University of Notre Dame, I was able to focus on the detailed dance because they had an amazing Choreographe database of behaviour/movement code.   

I started this project with zero knowledge about Choreographe, but with a good understanding of NAO´s MapleSim model that the Maplesoft engineers had previously created. After a few weeks with NAO and some YouTube tutorials, I discovered that programming NAO was really easy. I would move NAO’s joints to the positions I wanted to, and then I would tap its head to record and save them. I did this for a couple of weeks making sure that the sequence of movements wouldn’t make NAO fall or break a finger. At this point I was already a NAO expert.

After finishing up all the movements and dances it was time to move on to the next phase of the project: obtaining the data for the MapleSim model. The MapleSim model was created using the Denavit-Hartenberg (DH) convention; therefore, I needed the values of the degrees of rotation of each joint while the robot performed a dance. These numbers were easily obtained using the “record” button in Choreographe and exporting them into a CSV file. This file was later attached to the MapleSim model, so it could be used in a time look up table. The input of NAO´s joints were then specified by using the values within this table.

I started by recording the simplest movements: NAO blowing kisses and doing the sprinkler. These were the best ones to start working on because in these examples, the robot only needs to move its upper body, meaning that the lower body didn’t need any flexibility. This gave me and Abtin Athari, Application Engineer at Maplesoft, the freedom to simplify the original model by removing unnecessary degrees of freedom on the lower body. Abtin and I also realized that at the beginning of some of the new movements the robot would have too much torque, so we extended some of the recorded position of the rotational joints so the robot could stay in the same position for a longer time. These modifications ensured that the model wouldn´t have any problems during any of the simulations.

To finish the project, I worked with the Marketing team to create some videos where we could display the real robot next to the MapleSim model doing the same movements. The purpose of these videos was to showcase the essence of the high-fidelity models that MapleSim allowed us to create. It was amazing to see how the MapleSim model corresponded so closely to the physical robot.

After three weeks of intense work and meetings, my days as a robot whisperer ended. I learned new things about robots, how to build models with MapleSim, and the processes behind developing videos. It was a project that allowed me to wear both an engineer’s and a marketer’s shoes.  I was able to put into practice my technical knowledge and problem solving skills; and at the same time I was able to enhance my creative and analytical skills by evaluating the quality and impact of my work.

On this week I asked Maplesoft Customer Service for help. Here is our correspondence
(Only the purchase code and e-mail addresses are censored. PS. Also the last name of Kari was deleted by Bryon Thur on 28.08.2015.).
I think this is of interest for many Maple users. I have got some experience contacting
with Kaspersky Antivirus (They helped me by the use of indices of my comp.) and ABBYYLingvo
(They helped to install an ABBYYLingvo vocabulary on my phone.) so I can compare and
make conclusions.


From:
Sent: August-15-15 4:44 AM
To: Maplesoft Customer Service
Subject: Customer Service Request: (Web) Installation questions

Hello,
After upgrading my Windows 7 HB 32-bit to Windows 10 I cannot uninstall my Maple 16 PE.
 It cannot be uninstalled by neither Start/Parameters/System/Applications nor
Uninstall in C/ProgramFiles/Maple 16.
The Uninstall option is not seen in Maple 16 as application.
Also the overinstallation of Maple 16 does not work.
Waiting for your feedback.
Sincerely,
Markiyan Hirnyk
------------------------------------------------------------------------------------------------------

Dear Markiyan Hirnyk,

Thank you for contacting Maplesoft.

Maple 16 is not officially supported on Windows 10 but I have added an activation to your
existing Maple 16 Personal Edition purchase code: XXXXXXXXXXXXXXXX to see if reactivating
your license fixes the issue.  If reactivating doesn't give you access to Maple 16, please
send me the exact wording of any error messages that you receive so that I can send
 the information to our Technical Support Team so that they can investigate further.

Kind regards,

Kari
Maplesoft
Customer Service
-----------------------------------------------------------------------------------------------------------
Hello Kari,
Unfortunately, neither the  reactivation of my Maple 16 PE by XXXXXXXXXX nor its uninstallation
do not succeed for me. See the error communications in the attached screens (both in one file) screens_1_2.docx.
It should be noticed that Maple V Release 4 works on Windows 10 of my comp without any problems.
Regards,
Markiyan Hirnyk

--------------------------------------------------------------------------------------------------------
Hi Markiyan Hirnyk,

Thanks for your response.
I am forwarding your information to our Technical Support Team.
A representative will contact you soon.
Kind regards, Kari
Maplesoft Customer Service
------------------------------------------------------------------------------------------------------------
Hello Markiyan,

This error is usually caused by a Windows permissions setting. To fix this, please do the following:

1. Ensure that all Maple programs are completely closed.
2. Click on your Start Menu and go to the 'Programs' > 'Maple 16' > 'Tools' folder.
3. Right click the 'Activate Maple' icon and choose 'Run as administrator'.
4. Activate Maple using your purchase code and this should fix your issue.

Please let me know if you continue to experience any troubles.

Regards,

Chris
Technical Support Analyst
--------------------------------------------------------------------------------------------------------
Hello Chris,
Following your directions, I have just reactivated Maple 16, but my problem is not solved.
To shed light on the situation, my Maple 16.02 works properly,
but I cannot uninstall it after upgrading to Windows 10 Home 32bit.
See the screens in the attached file screen.docx .
Regards,
Markiyan Hirnyk
----------------------------------------------------------------------------------------
Hello Markiyan,
If you are seeing error messages about Maple still being open,
 I would suggest you try to restart your PC and then attempt the uninstall again to ensure
that you do not have any lingering Maple programs running. Please let me know
if you still see this message after restarting.

Regards,

Chris
Technical Support Analyst
------------------------------------------------------------------------------------------------------
Hello Chris,
This does not help too. My guess is execution failure when Maple 16 was installing.
Because of that reason the Maple 16 installer did not create Maple uninstaller in my Maple 16.
 See the attached screen of the uninstall folder in C:/ Program Files/ screen_3.docx.
Regards,
Markiyan Hirnyk
--------------------------------------------------------------------------------------------------------
Hello,
If you think that you have a corrupted installation, I recommend that you reinstall Maple
using the new Maple 16.02 installer link provided below.
 This version of the installer was created to get around the Windows 8 installation issues and
 may be of help to you in Windows 10 as well, though again please be aware that
 we do not officially support Windows 10 yet.
Here are the steps to reinstall Maple:
1. Click on the Start Menu > Control Panel > Programs and Features ( or Add/Remove Programs).
 Find ‘Maple 16’ in the list and uninstall it. If this is not possible, move on to the next step and continue.
2. Restart your computer.
3. Click on the Start Menu > Computer > Local Disk C: > Program Files.
If there is a folder here called ‘Maple 16’, please delete it.
4. Download the installer for Maple 16 from the following link:
        http://www.maplesoft.com/downloads/?d=C75DEBEC838C08BB1DCCED0440B49503&pr=Maple16
5. Make sure to download the correct version for your operating system, i.e. Windows version and 32 or 64-bit.
6. Install Maple by right clicking the installation file and choosing ‘Run as administrator’.
I hope that this helps to resolve the issues that you’re having and if it does not,
contact us and we can further investigate for you.

Regards,
Chris
Technical Support Analyst
--------------------------------------------------------------------------------------------------------
 Hi Chris,
My problem with Maple 16 is solved. I completely uninstalled it by Uninstall Tool 3.4, not using brute force. After that I installed Maple 16 by the distributive suggested by you. That's all right.
Regards,
Markiyan Hirnyk
---------------------------------------------------------------------------------------------------------
Alright, that is good to hear. Please let us know if you run into any further issues with your installation.
Regards,
Chris
Technical Support Analyst

Dear friends,

some time ago I shared a story here on the use of Maple to compute the cycle index of the induced action on the edges of an ordinary graph of the symmetric group permuting the vertices and the use of the Polya Enumeration Theorem to count non-isomorphic graphs by the number of edges. It can be found at the following Mapleprimes link.

I am writing today to alert you to another simple Maple program that is closely related and demonstrates Maple's capability to implement concepts from group theory and Polya enumeration. This link at Math.Stackexchange.com shows how to use the cycle index of the induced action by the symmetric group permuting vertices on the edges of a multigraph that includes loops to count set partitions of multisets containing two instances of n distinct types of items. The sequence that corresponds to these set partitions is OEIS A020555 where it is pointed out that we can equivalently count multigraphs with n labeled i.e. distinct edges where the vertices of the graph represent the multisets of the multiset partition and are connected by an edge k if the two instances of the value k are included in the sets represented by the two vertices that constitute the edge. The problem then reduces to a simple substitution into the aforementioned cycle index of a polynomial representing the set of labels on an edge including no labels on an edge that is not included.

This computation presents a remarkable simplicity while also implementing a non-trivial application of Polya counting. It is hoped that MaplePrimes users will enjoy reading this program, possibly profit from some of the techniques employed and be motivated to use Maple in their work on combinatorics problems.

Best regards,

Marko Riedel

For the past thirty years, I have used several mathematical packages for problem solving and graphing. It all started with spreadsheet software that really helped speedup calculations compared to calculators. As many people do, once I had one tool I then started looking for another that would offer even more capabilities and features. I tested several of the very early math software but none really did all that I wanted until I came across Maple while I was working at SPAR Aerospace in Canada. For me, the rest is history. As long as I had a copy of Maple, it was all that I needed.

On occasions when I did not have a copy of this amazing software, I resorted to spreadsheets once more to complete fairly large and complex projects involving large databases and large numbers of calculations, especially when performing What-If scenarios. One distinct disadvantage of using a spreadsheet was the cryptic form of equation writing. I had to divide one long equation into several sections in different cells and then add them all up, which clearly is not good for documentation of the calculations. It is also very confusing for other engineers to know what that equation is or what it does. The development of the full engineering spreadsheet took months to complete, debug and verify. During this process, when I had errors, it was often very difficult to track exactly where the problem was, making the debugging process time consuming and sometimes very frustrating.

Having worked with Maple before, I remembered how easy it was to enter equations in a very familiar, readable math format. The real power of this software is that it allows you to write the equation(s) anyway you like and solve for any given parameter, unlike spreadsheets where you have to solve the problem first, by hand, for the parameter you want and then get the spreadsheet to calculate the value. I remember one time a few years ago when I wrote nine or ten simultaneous differential equations all in symbolic form and asked Maple to calculate certain parameters in a fully symbolic form. To my utmost disbelief, the answer came back within few minutes. With results in hand, I was able to quickly finish my research, and the results were published at PCIM Europe 2005 in “Distributed Gate ESR and its Effect on Shoot Through Performance at the Die Level”. I would never have gotten the results I needed if I was using a spreadsheet.

Even with much simpler systems of equations, finding solutions with a paper and pencil was never an easy task for me. It took a very long time, and even then there was no guarantee that I did not make copying errors, accidentally leave out a term, or make a calculation error. After I found the correct solution, I then had the problem of plotting the results, which I often needed in 3-D. Plotting allowed much deeper insights into the interdependency of all the parameters and made it easy for me to concentrate on the important ones without wasting any time. I was very happy when I could pass all these tasks onto Maple, which could do them much faster and more reliably then I ever could. Maple is a software that allows me to go beyond routine engineering calculations and gives me the tools to reach levels of insight and understanding that were completely out of reach of the average engineer until a few years ago.

For the record, I have no business affiliations with Maplesoft. I’m writing this article because Maple makes such a difference in my work that I feel it is important to share my experiences so other engineers can get the same benefits.

Solving DAEs in Maple

As I had mentioned in many posts, Maple cannot solve nonlinear DAEs. As of today (Maple 2015), given a system of index 1 DAE dy/dt = f(y,z); 0 = g(y,z), Maple “extends” g(y,z) to get dz/dt = g1(y,z). So, any given index 1 DAE is converted to a system of ODEs dy/dt = f, dz/dt = g1 with the constraint g = 0, before it solves. This is true for all the solvers in Maple despite the wrong claims in the help files. It is also true for MEBDFI, the FORTRAN implementation of which actually solves index 2 DAEs directly. In addition, the initial condition for the algebraic variable has to be consistent. The problem with using fsolve is that one cannot specify tolerance. Often times one has to solve DAEs at lower tolerances (1e-3 or 1e-4), not 1e-15. In addition, one cannot use compile =true for high efficiency.

The approach in Maple fails for many DAEs of practical interest. In addition, this can give wrong answers. For example, dy/dt = z, y^2+z^2-1=0, with y(0)=0 and z(0)=1 has a meaningful solution only from 0 to Pi/2, Maple’s dsolve/numeric will convert this to dy/dt = z and dz/dt = -y and integrate in time for ever. This is wrong as at t = Pi/2, the system becomes index 2 DAE and there is more than 1 acceptable solution.

We just recently got our paper accepted that helps Maple's dsolve and many ODE solvers in other languages handle DAEs directly. The approach is rather simple, the index 1 DAE is perturbed as dy/dt = f.S ; -mu.diff(g,t) = g. The switch function is a tanh function which is zero till t = tinit (initialization time). Mu is chosen to be a small number. In addition, lhs of the perturbed equation is simplified using approximate initial guesses as Maple cannot handle non-constant Mass matrix. The paper linked below gives below more details.

http://depts.washington.edu/maple/pubs/U_Apprach_FULL_DRAFT.pdf  

Next, I discuss different examples (code attached).

Example 1: Simple DAE (one ODE and one AE), the proposed approach helps solve this system efficiently without knowing the exact initial condition.

Hint: The code is given with a semicolon at the end of the most of the statements for educational purposes for new users. Using semicolon after dsolve numeric in classic worksheet crashes the code (Maplesoft folks couldn’t fix this despite my request).

Example 2:

This is a nickel battery model (one ODE and one AE). This fails with many solvers unless exact IC is given. The proposed approach works well. In particular, stiff=true, implicit=true option is found to be very efficient. The code given in example 1 can be used to solve example 2 or any other DAEs by just entering ODEs, AEs, ICs in proper places.

Example 3:

This is a nonlinear implicit ODE (posted in Mapleprimes earlier by joha, (http://www.mapleprimes.com/questions/203096-Solving-Nonlinear-ODE#answer211682 ). This can be converted to index 1 DAE and solved using the proposed approach.

Example 4:

This example was posted earlier by me in Mapleprimes (http://www.mapleprimes.com/posts/149877-ODEs-PDEs-And-Special-Functions) . Don’t try to solve this in Maple using its dsolve numeric solver for N greater than 5 directly. The proposed approach can handle this well. Tuning the perturbation parameters and using compile =true will help in solving this system more efficiently.

Finally example 1 is solved for different perturbation parameters to show how one can arrive at convergence. Perhaps more sophisticated users and Maplesoft folks can enable this as automatically tuned parameters in dsolve/numeric.

Note:

This post should not be viewed as just being critical on Maple. I have wasted a lot of time assuming that Maple does what it claims in its help file. This post is to bring awareness about the difficulty in dealing with DAEs. It is perfectly fine to not have a DAE solver, but when literature or standard methods are cited/claimed, they should be implemented in proper form. I will forever remain a loyal Maple user as it has enabled me to learn different topics efficiently. Note that Maplesim can solve DAEs, but it is a pain to create a Maplesim model/project just for solving a DAE. Also, events is a pain with Maplesim. The reference to Mapleprimes links are missing in the article, but will be added before the final printing stage. The ability of Maple to find analytical Jacobian helps in developing many robust ODE and DAE solvers and I hope to post my own approaches that will solve more complicated systems.

I strongly encourage testing of the proposed approach and implementation for various educational/research purposes by various users. The proposed approach enables solving lithium-ion and other battery/electrochemical storage models accurately in a robust manner. A disclosure has been filed with the University of Washington to apply for a provisional patent for battery models and Battery Management System for transportation, storage and other applications because of the current commercial interest in this topic (for batteries). In particular, use of this single step avoids intialization issues/(no need to initialize separately) for parameter estimation, state estimation or optimal control of battery models.

 

Appendix A

Maple code for Examples 1-4 from "Extending Explicit and Linealry Implicit ODE Solvers for Index-1 DAEs", M. T. Lawder,

V. Ramadesigan, B. Suthar and V. R. Subramanian, Computers and Chemical Engineering, in press (2015).

Use y1, y2, etc. for all differential variables and z1, z2, etc. for all algebraic variables

 

Example 1

restart;

with(plots):

Enter all ODEs in eqode

eqode:=[diff(y1(t),t)=-y1(t)^2+z1(t)];

eqode := [diff(y1(t), t) = -y1(t)^2+z1(t)]

(1)

Enter all AEs in eqae

eqae:=[cos(y1(t))-z1(t)^0.5=0];

eqae := [cos(y1(t))-z1(t)^.5 = 0]

(2)

Enter all initial conditions for differential variables in icodes

icodes:=[y1(0)=0.25];

icodes := [y1(0) = .25]

(3)

Enter all intial conditions for algebraic variables in icaes

icaes:=[z1(0)=0.8];

icaes := [z1(0) = .8]

(4)

Enter parameters for perturbation value (mu), switch function (q and tint), and runtime (tf)

pars:=[mu=0.1,q=1000,tint=1,tf=5];

pars := [mu = .1, q = 1000, tint = 1, tf = 5]

(5)

Choose solving method (1 for explicit, 2 for implicit)

Xexplicit:=2;

Xexplicit := 2

(6)

Standard solver requires IC z(0)=0.938791 or else it will fail

solx:=dsolve({eqode[1],eqae[1],icodes[1],icaes[1]},numeric):

Error, (in dsolve/numeric/DAE/checkconstraints) the initial conditions do not satisfy the algebraic constraints
  error = .745e-1, tolerance = .559e-6, constraint = cos(y1(t))-z1(t)^.5000000000000000000000

 

ff:=subs(pars,1/2+1/2*tanh(q*(t-tint)));

ff := 1/2+(1/2)*tanh(1000*t-1000)

(7)

NODE:=nops(eqode);NAE:=nops(eqae);

NODE := 1

NAE := 1

(8)

for XX from 1 to NODE do
EQODE||XX:=lhs(eqode[XX])=rhs(eqode[XX])*ff;
end do;

EQODE1 := diff(y1(t), t) = (-y1(t)^2+z1(t))*(1/2+(1/2)*tanh(1000*t-1000))

(9)

for XX from 1 to NAE do
EQAE||XX:=subs(pars,-mu*(diff(rhs(eqae[XX])-lhs(eqae[XX]),t))=rhs(eqae[XX])-lhs(eqae[XX]));
end do;

EQAE1 := -.1*sin(y1(t))*(diff(y1(t), t))-0.5e-1*(diff(z1(t), t))/z1(t)^.5 = -cos(y1(t))+z1(t)^.5

(10)

 

Dvars1:={seq(diff(z||x(t),t)=D||x,x=1..NAE)};

Dvars1 := {diff(z1(t), t) = D1}

(11)

Dvars2:={seq(rhs(Dvars1[x])=lhs(Dvars1[x]),x=1..NAE)};

Dvars2 := {D1 = diff(z1(t), t)}

(12)

icsn:=seq(subs(y||x(0)=y||x(t),icodes[x]),x=1..NODE),seq(subs(z||x(0)=z||x(t),icaes[x]),x=1..NAE);

icsn := y1(t) = .25, z1(t) = .8

(13)

for j from 1 to NAE do

EQAEX||j:=subs(Dvars1,eqode,icsn,Dvars2,lhs(EQAE||j))=rhs(EQAE||j);

end do:

Sys:={seq(EQODE||x,x=1..NODE),seq(EQAEX||x,x=1..NAE),seq(icodes[x],x=1..NODE),seq(icaes[x],x=1..NAE)};

Sys := {-0.1824604200e-1-0.5590169945e-1*(diff(z1(t), t)) = -cos(y1(t))+z1(t)^.5, y1(0) = .25, z1(0) = .8, diff(y1(t), t) = (-y1(t)^2+z1(t))*(1/2+(1/2)*tanh(1000*t-1000))}

(14)

if Xexplicit=1 then

sol:=dsolve(Sys,numeric):

else

sol:=dsolve(Sys,numeric,stiff=true,implicit=true):
end if:

 

for XX from 1 to NODE do
a||XX:=odeplot(sol,[t,y||XX(t)],0..subs(pars,tf),color=red);
end do:

for XX from NODE+1 to NODE+NAE do
a||XX:=odeplot(sol,[t,z||(XX-NODE)(t)],0..subs(pars,tf),color=blue);
end do:

display(seq(a||x,x=1..NODE+NAE),axes=boxed);

 

End Example 1

 

Example 2

restart;

with(plots):

eq1:=diff(y1(t),t)=j1*W/F/rho/V;

eq1 := diff(y1(t), t) = j1*W/(F*rho*V)

(15)

eq2:=j1+j2=iapp;

eq2 := j1+j2 = iapp

(16)

j1:=io1*(2*(1-y1(t))*exp((0.5*F/R/T)*(z1(t)-phi1))-2*y1(t)*exp((-0.5*F/R/T)*(z1(t)-phi1)));

j1 := io1*(2*(1-y1(t))*exp(.5*F*(z1(t)-phi1)/(R*T))-2*y1(t)*exp(-.5*F*(z1(t)-phi1)/(R*T)))

(17)

j2:=io2*(exp((F/R/T)*(z1(t)-phi2))-exp((-F/R/T)*(z1(t)-phi2)));

j2 := io2*(exp(F*(z1(t)-phi2)/(R*T))-exp(-F*(z1(t)-phi2)/(R*T)))

(18)

params:={F=96487,R=8.314,T=298.15,phi1=0.420,phi2=0.303,W=92.7,V=1e-5,io1=1e-4,io2=1e-10,iapp=1e-5,rho=3.4};

params := {F = 96487, R = 8.314, T = 298.15, V = 0.1e-4, W = 92.7, io1 = 0.1e-3, io2 = 0.1e-9, rho = 3.4, iapp = 0.1e-4, phi1 = .420, phi2 = .303}

(19)

eqode:=[subs(params,eq1)];

eqode := [diff(y1(t), t) = 0.5651477584e-2*(1-y1(t))*exp(19.46229155*z1(t)-8.174162450)-0.5651477584e-2*y1(t)*exp(-19.46229155*z1(t)+8.174162450)]

(20)

eqae:=[subs(params,eq2)];

eqae := [0.2e-3*(1-y1(t))*exp(19.46229155*z1(t)-8.174162450)-0.2e-3*y1(t)*exp(-19.46229155*z1(t)+8.174162450)+0.1e-9*exp(38.92458310*z1(t)-11.79414868)-0.1e-9*exp(-38.92458310*z1(t)+11.79414868) = 0.1e-4]

(21)

icodes:=[y1(0)=0.05];

icodes := [y1(0) = 0.5e-1]

(22)

icaes:=[z1(0)=0.7];

icaes := [z1(0) = .7]

(23)

solx:=dsolve({eqode[1],eqae[1],icodes[1],icaes[1]},type=numeric):

Error, (in dsolve/numeric/DAE/checkconstraints) the initial conditions do not satisfy the algebraic constraints
  error = .447e9, tolerance = .880e4, constraint = -2000000*(-1+y1(t))*exp(19.46229155000000000000*z1(t)-8.174162450000000000000)-2000000*y1(t)*exp(-19.46229155000000000000*z1(t)+8.174162450000000000000)+exp(38.92458310000000000000*z1(t)-11.79414868000000000000)-exp(-38.92458310000000000000*z1(t)+11.79414868000000000000)-100000

 

pars:=[mu=0.00001,q=1000,tint=1,tf=5001];

pars := [mu = 0.1e-4, q = 1000, tint = 1, tf = 5001]

(24)

Xexplicit:=2;

Xexplicit := 2

(25)

ff:=subs(pars,1/2+1/2*tanh(q*(t-tint)));

ff := 1/2+(1/2)*tanh(1000*t-1000)

(26)

NODE:=nops(eqode):NAE:=nops(eqae);

NAE := 1

(27)

for XX from 1 to NODE do
EQODE||XX:=lhs(eqode[XX])=rhs(eqode[XX])*ff:
end do;

EQODE1 := diff(y1(t), t) = (0.5651477584e-2*(1-y1(t))*exp(19.46229155*z1(t)-8.174162450)-0.5651477584e-2*y1(t)*exp(-19.46229155*z1(t)+8.174162450))*(1/2+(1/2)*tanh(1000*t-1000))

(28)

for XX from 1 to NAE do
EQAE||XX:=subs(pars,-mu*(diff(rhs(eqae[XX])-lhs(eqae[XX]),t))=rhs(eqae[XX])-lhs(eqae[XX]));
end do;

EQAE1 := -0.2e-8*(diff(y1(t), t))*exp(19.46229155*z1(t)-8.174162450)+0.3892458310e-7*(1-y1(t))*(diff(z1(t), t))*exp(19.46229155*z1(t)-8.174162450)-0.2e-8*(diff(y1(t), t))*exp(-19.46229155*z1(t)+8.174162450)+0.3892458310e-7*y1(t)*(diff(z1(t), t))*exp(-19.46229155*z1(t)+8.174162450)+0.3892458310e-13*(diff(z1(t), t))*exp(38.92458310*z1(t)-11.79414868)+0.3892458310e-13*(diff(z1(t), t))*exp(-38.92458310*z1(t)+11.79414868) = 0.1e-4-0.2e-3*(1-y1(t))*exp(19.46229155*z1(t)-8.174162450)+0.2e-3*y1(t)*exp(-19.46229155*z1(t)+8.174162450)-0.1e-9*exp(38.92458310*z1(t)-11.79414868)+0.1e-9*exp(-38.92458310*z1(t)+11.79414868)

(29)

Dvars1:={seq(diff(z||x(t),t)=D||x,x=1..NAE)};

Dvars1 := {diff(z1(t), t) = D1}

(30)

Dvars2:={seq(rhs(Dvars1[x])=lhs(Dvars1[x]),x=1..NAE)};

Dvars2 := {D1 = diff(z1(t), t)}

(31)

icsn:=seq(subs(y||x(0)=y||x(t),icodes[x]),x=1..NODE),seq(subs(z||x(0)=z||x(t),icaes[x]),x=1..NAE);

icsn := y1(t) = 0.5e-1, z1(t) = .7

(32)

for j from 1 to NAE do

EQAEX||j:=subs(Dvars1,eqode,icsn,Dvars2,lhs(EQAE||j))=rhs(EQAE||j);

end do;

EQAEX1 := -0.2e-8*(0.5368903705e-2*exp(5.449441630)-0.2825738792e-3*exp(-5.449441630))*exp(5.449441630)+0.3697835394e-7*(diff(z1(t), t))*exp(5.449441630)-0.2e-8*(0.5368903705e-2*exp(5.449441630)-0.2825738792e-3*exp(-5.449441630))*exp(-5.449441630)+0.1946229155e-8*(diff(z1(t), t))*exp(-5.449441630)+0.3892458310e-13*(diff(z1(t), t))*exp(15.45305949)+0.3892458310e-13*(diff(z1(t), t))*exp(-15.45305949) = 0.1e-4-0.2e-3*(1-y1(t))*exp(19.46229155*z1(t)-8.174162450)+0.2e-3*y1(t)*exp(-19.46229155*z1(t)+8.174162450)-0.1e-9*exp(38.92458310*z1(t)-11.79414868)+0.1e-9*exp(-38.92458310*z1(t)+11.79414868)

(33)

Sys:={seq(EQODE||x,x=1..NODE),seq(EQAEX||x,x=1..NAE),seq(icodes[x],x=1..NODE),seq(icaes[x],x=1..NAE)};

Sys := {-0.5810962488e-6+0.8802389238e-5*(diff(z1(t), t)) = 0.1e-4-0.2e-3*(1-y1(t))*exp(19.46229155*z1(t)-8.174162450)+0.2e-3*y1(t)*exp(-19.46229155*z1(t)+8.174162450)-0.1e-9*exp(38.92458310*z1(t)-11.79414868)+0.1e-9*exp(-38.92458310*z1(t)+11.79414868), y1(0) = 0.5e-1, z1(0) = .7, diff(y1(t), t) = (0.5651477584e-2*(1-y1(t))*exp(19.46229155*z1(t)-8.174162450)-0.5651477584e-2*y1(t)*exp(-19.46229155*z1(t)+8.174162450))*(1/2+(1/2)*tanh(1000*t-1000))}

(34)

if Xexplicit=1 then

sol:=dsolve(Sys,numeric,maxfun=0):

else

sol:=dsolve(Sys,numeric,stiff=true,implicit=true,maxfun=0):

end if:

 

for XX from 1 to NODE do
a||XX:=odeplot(sol,[t,y||XX(t)],0..subs(pars,tf),color=red);
end do:

for XX from NODE+1 to NODE+NAE do
a||XX:=odeplot(sol,[t,z||(XX-NODE)(t)],0..subs(pars,tf),color=blue);
end do:

b1:=odeplot(sol,[t,y1(t)],0..1,color=red):
b2:=odeplot(sol,[t,z1(t)],0..1,color=blue):

display(b1,b2,axes=boxed);

 

display(seq(a||x,x=1..NODE+NAE),axes=boxed);

 

End Example 2

 

Example 3

restart;

with(plots):

eq1:=diff(y1(t),t)^2+diff(y1(t),t)*(y1(t)+1)+y1(t)=cos(diff(y1(t),t));

eq1 := (diff(y1(t), t))^2+(diff(y1(t), t))*(y1(t)+1)+y1(t) = cos(diff(y1(t), t))

(35)

solx:=dsolve({eq1,y1(0)=0},numeric):

Error, (in dsolve/numeric/make_proc) Could not convert to an explicit first order system due to 'RootOf'

 

eqode:=[diff(y1(t),t)=z1(t)];

eqode := [diff(y1(t), t) = z1(t)]

(36)

eqae:=[subs(eqode,eq1)];

eqae := [z1(t)^2+z1(t)*(y1(t)+1)+y1(t) = cos(z1(t))]

(37)

icodes:=[y1(0)=0.0];

icodes := [y1(0) = 0.]

(38)

icaes:=[z1(0)=0.0];

icaes := [z1(0) = 0.]

(39)

pars:=[mu=0.1,q=1000,tint=1,tf=4];

pars := [mu = .1, q = 1000, tint = 1, tf = 4]

(40)

Xexplicit:=2;

Xexplicit := 2

(41)

ff:=subs(pars,1/2+1/2*tanh(q*(t-tint)));

ff := 1/2+(1/2)*tanh(1000*t-1000)

(42)

NODE:=nops(eqode);NAE:=nops(eqae);

NODE := 1

NAE := 1

(43)

for XX from 1 to NODE do
EQODE||XX:=lhs(eqode[XX])=rhs(eqode[XX])*ff:
end do;

EQODE1 := diff(y1(t), t) = z1(t)*(1/2+(1/2)*tanh(1000*t-1000))

(44)

for XX from 1 to NAE do
EQAE||XX:=subs(pars,-mu*(diff(rhs(eqae[XX])-lhs(eqae[XX]),t))=rhs(eqae[XX])-lhs(eqae[XX]));
end do;

EQAE1 := .1*sin(z1(t))*(diff(z1(t), t))+.2*z1(t)*(diff(z1(t), t))+.1*(diff(z1(t), t))*(y1(t)+1)+.1*z1(t)*(diff(y1(t), t))+.1*(diff(y1(t), t)) = cos(z1(t))-z1(t)^2-z1(t)*(y1(t)+1)-y1(t)

(45)

 

Dvars1:={seq(diff(z||x(t),t)=D||x,x=1..NAE)};

Dvars1 := {diff(z1(t), t) = D1}

(46)

Dvars2:={seq(rhs(Dvars1[x])=lhs(Dvars1[x]),x=1..NAE)};

Dvars2 := {D1 = diff(z1(t), t)}

(47)

icsn:=seq(subs(y||x(0)=y||x(t),icodes[x]),x=1..NODE),seq(subs(z||x(0)=z||x(t),icaes[x]),x=1..NAE);

icsn := y1(t) = 0., z1(t) = 0.

(48)

for j from 1 to NAE do

EQAEX||j:=subs(Dvars1,eqode,icsn,Dvars2,lhs(EQAE||j))=rhs(EQAE||j);

end do;

EQAEX1 := .1*sin(0.)*(diff(z1(t), t))+.1*(diff(z1(t), t)) = cos(z1(t))-z1(t)^2-z1(t)*(y1(t)+1)-y1(t)

(49)

Sys:={seq(EQODE||x,x=1..NODE),seq(EQAEX||x,x=1..NAE),seq(icodes[x],x=1..NODE),seq(icaes[x],x=1..NAE)};

Sys := {.1*(diff(z1(t), t)) = cos(z1(t))-z1(t)^2-z1(t)*(y1(t)+1)-y1(t), y1(0) = 0., z1(0) = 0., diff(y1(t), t) = z1(t)*(1/2+(1/2)*tanh(1000*t-1000))}

(50)

if Xexplicit=1 then

sol:=dsolve(Sys,numeric):

else

sol:=dsolve(Sys,numeric,stiff=true,implicit=true):

end if:

 

for XX from 1 to NODE do
a||XX:=odeplot(sol,[t,y||XX(t)],0..subs(pars,tf),color=red);
end do:

for XX from NODE+1 to NODE+NAE do
a||XX:=odeplot(sol,[t,z||(XX-NODE)(t)],0..subs(pars,tf),color=blue);
end do:

display(seq(a||x,x=1..NODE+NAE),axes=boxed);

 

End Example 3

 

Example 4

restart;

with(plots):

N:=11:h:=1/(N+1):

for i from 2 to N+1 do eq1[i]:=diff(y||i(t),t)=(y||(i+1)(t)-2*y||i(t)+y||(i-1)(t))/h^2-y||i(t)*(1+z||i(t));od:

for i from 2 to N+1 do eq2[i]:=0=(z||(i+1)(t)-2*z||i(t)+z||(i-1)(t))/h^2-(1-y||i(t)^2)*(exp(-z||i(t)));od:

eq1[1]:=(3*y1(t)-4*y2(t)+y3(t))/(2*h)=0: eq1[N+2]:=y||(N+2)(t)-1=0:

eq2[1]:=(3*z1(t)-4*z2(t)+1*z3(t))/(2*h)=0: eq2[N+2]:=z||(N+2)(t)=0:

eq1[1]:=subs(y1(t)=z||(N+3)(t),eq1[1]):

eq1[N+2]:=subs(y||(N+2)(t)=z||(N+4)(t),eq1[N+2]):

eqode:=[seq(subs(y1(t)=z||(N+3)(t),y||(N+2)(t)=z||(N+4)(t),eq1[i]),i=2..N+1)]:

eqae:=[eq1[1],eq1[N+2],seq(eq2[i],i=1..N+2)]:

icodes:=[seq(y||j(0)=1,j=2..N+1)]:

icaes:=[seq(z||j(0)=0,j=1..N+2),z||(N+3)(0)=1,z||(N+4)(0)=1]:

pars:=[mu=0.00001,q=1000,tint=1,tf=2]:

Xexplicit:=2:

ff:=subs(pars,1/2+1/2*tanh(q*(t-tint))):

NODE:=nops(eqode):NAE:=nops(eqae):

for XX from 1 to NODE do

EQODE||XX:=lhs(eqode[XX])=rhs(eqode[XX])*ff: end do:

for XX from 1 to NAE do

EQAE||XX:=subs(pars,-mu*(diff(rhs(eqae[XX])-lhs(eqae[XX]),t))=rhs(eqae[XX])-lhs(eqae[XX])); end do:

Dvars1:={seq(diff(z||x(t),t)=D||x,x=1..NAE)}:

Dvars2:={seq(rhs(Dvars1[x])=lhs(Dvars1[x]),x=1..NAE)}:

icsn:=seq(subs(y||x(0)=y||x(t),icodes[x]),x=1..NODE),seq(subs(z||x(0)=z||x(t),icaes[x]),x=1..NAE):

for j from 1 to NAE do

EQAEX||j:=subs(Dvars1,eqode,icsn,Dvars2,lhs(EQAE||j))=rhs(EQAE||j):

end do:

Sys:={seq(EQODE||x,x=1..NODE),seq(EQAEX||x,x=1..NAE),seq(icodes[x],x=1..NODE),seq(icaes[x],x=1..NAE)}:

if Xexplicit=1 then

sol:=dsolve(Sys,numeric,maxfun=0):

else

sol:=dsolve(Sys,numeric,stiff=true,implicit=true,maxfun=0):

end if:

 

for XX from 1 to NODE do

a||XX:=odeplot(sol,[t,y||(XX+1)(t)],1..subs(pars,tf),color=red): end do:

for XX from NODE+1 to NODE+NAE do

a||XX:=odeplot(sol,[t,z||(XX-NODE)(t)],1..subs(pars,tf),color=blue): end do:

display(seq(a||x,x=1..NODE),a||(NODE+NAE-1),a||(NODE+NAE),axes=boxed);

 

End of Example 4

 

Sometimes the parameters of the switch function and perturbation need to be tuned to obtain propoer convergence. Below is Example 1 shown for several cases using the 'parameters' option in Maple's dsolve to compare how tuning parameters affects the solution

restart:

with(plots):

eqode:=[diff(y1(t),t)=-y1(t)^2+z1(t)]: eqae:=[cos(y1(t))-z1(t)^0.5=0]:

icodes:=[y1(0)=0.25]: icaes:=[z1(0)=0.8]:

pars:=[tf=5]:

Xexplicit:=2;

Xexplicit := 2

(51)

ff:=subs(pars,1/2+1/2*tanh(q*(t-tint))):

NODE:=nops(eqode):NAE:=nops(eqae):

for XX from 1 to NODE do
EQODE||XX:=lhs(eqode[XX])=rhs(eqode[XX])*ff:
end do:

for XX from 1 to NAE do
EQAE||XX:=subs(pars,-mu*(diff(rhs(eqae[XX])-lhs(eqae[XX]),t))=rhs(eqae[XX])-lhs(eqae[XX]));
end do:

 

Dvars1:={seq(diff(z||x(t),t)=D||x,x=1..NAE)}:

Dvars2:={seq(rhs(Dvars1[x])=lhs(Dvars1[x]),x=1..NAE)}:

icsn:=seq(subs(y||x(0)=y||x(t),icodes[x]),x=1..NODE),seq(subs(z||x(0)=z||x(t),icaes[x]),x=1..NAE):

for j from 1 to NAE do

EQAEX||j:=subs(Dvars1,eqode,icsn,Dvars2,lhs(EQAE||j))=rhs(EQAE||j):

end do:

Sys:={seq(EQODE||x,x=1..NODE),seq(EQAEX||x,x=1..NAE),seq(icodes[x],x=1..NODE),seq(icaes[x],x=1..NAE)}:

if Xexplicit=1 then

sol:=dsolve(Sys,numeric,'parameters'=[mu,q,tint],maxfun=0):

else

sol:=dsolve(Sys,numeric,'parameters'=[mu,q,tint],stiff=true,implicit=true):

end if:

 

sol('parameters'=[0.1,1000,1]):

plot1:=odeplot(sol,[t-1,y1(t)],0..4,color=red):
plot2:=odeplot(sol,[t-1,z1(t)],0..4,color=blue):

sol('parameters'=[0.001,10,1]):

plot3:=odeplot(sol,[t-1,y1(t)],0..4,color=red,linestyle=dot):
plot4:=odeplot(sol,[t-1,z1(t)],0..4,color=blue,linestyle=dot):

display(plot1,plot2,plot3,plot4,axes=boxed);

 

In general, one has to decrease mu, and increase q and tint until convergence (example at t=3)

sol('parameters'=[0.001,10,1]):sol(3+1);

[t = 4., y1(t) = .738587929442734, z1(t) = .546472878850096]

(52)

sol('parameters'=[0.0001,100,10]):sol(3+10);

[t = 13., y1(t) = .738684397167344, z1(t) = .546618936273638]

(53)

sol('parameters'=[0.00001,1000,20]):sol(3+20);

[t = 23., y1(t) = .738694113087217, z1(t) = .546633473784526]

(54)

 

The results have converged to 4 digits after the decimal. Of course, absolute and relative tolerances of the solvers can be modified if needed

 

Download SolvingDAEsinMaple.mws

Last month, we received a very kind note from a recipient of one of our sponsorships. Maplesoft sponsors several academic and commercial events throughout the year, providing free copies of Maple or MapleSim to lucky attendees. Audrey was one of the winners of the Elgin Community College Calculus Contest, where she won a copy of Maple. Here’s what she had to say:

Thank you so much for the Maple license.  I have become familiar with Maple during the last school year.  At first the commands were like Chinese to me and I had a rough time getting anything done, but once I made a connection between the commands and what they were doing it was a lot easier.  Even without former knowledge of computer programing, the commands are increasingly intuitive.  Maple has been a huge help to me doing my homework and projects, and even as I was studying for the competition it was useful for checking my answers.  Another reason that I love Maple is that it provides visuals for the difficult concepts we learned in class, such as shell method in Calc II and mixed partial derivatives in Calc III.  I enjoy math, but I thank that Maple has enriched my experience along the way.

Thank you again for your generous gift, 

~Audrey~

It’s always nice to hear how students and professionals alike are succeeding with the help of Maple. If you’d like to share your experience, please send an email to customerservice@maplesoft.com or post it here on MaplePrimes.

On a related post here, I have posted some screen shots for fun. Today is a special day for me in particular, because I passed my PhD viva with minor corrections! If you look colsely on the date, by coincidence, it was TWO years ago exactly. So I feel like I maybe 'update' the old post with a bit more, to make it V2.

 

So here comes the new screent shots: (Bear with me for now, I will post some actual content about how I feel when using Maple later.)

Alright, enough with the screent shots. If you click to see the big picture, you would notice that I have managed to get a complete sets of Maple versions from Maple V to Maple 2015!

 

===============================================

I am originally from Shanghai and I have always done well in Maths and science. I first heard about Maple in 2004 from a Maths teacher. He introduced me to this software. I played just a couple of times with Maple 6 on his computer, to get a first impression. At that time, all I could say was, hmmm insteresting.

 

In 2006, I went to UK for a foundation course. That was the first time I was actually taught how to use Maple 9.5. So I had access to it on the university computers. I discovered a lot about Maple and used it for ALL my Maths homeworks. Yes, I am lazy. I hope that Maple can do everything!

 

Then I got fascinated with Maple. Unfortunately, Maple was not taught in the undergraduate course. But there are materials for self-learning. By that time, I had become quite good with most of the contents in those materials. So I went look for other things to try. I went to ask my foundation course classmates, to see if they have anything on Maple and if they needed the help. One of them was at Imperial College and the questions were a bit chanlleging (finally!). That was the time I first met MaplePrimes! Hello, how have you been?

 

After that I have never stopped using Maple or Maple Primes. I may have been quite on the forum, but I was there. My PhD research rely hugely on the ability to compute the symbolic rank of certain matrices as well as the ability to simplifiying complicated expressions using siderules.

 

I do not want to talk too much about the technical details when using Maple. But I do

THANK Maple and it creators, developers and all relavent staff around the globe.

THANK Maple Primes and all its users. Some users have been particulary helpful!

 

Lastly, I dont have any other words to say other than this:

It's been really fun and enjoyable. Thanks!

 

 

We’re trying out something new with our webinars and are hosting our first ever live streaming webinar. Broadcast in real time, and featuring Jonny Zivku, our Maple T.A. Product Manager, this will be your chance to see the face behind the voice, as well as learn more about how academic institutions around the world are using Maple T.A. We hope you can join us.

Here are the full details:

Transforming Testing and Assessment with Maple T.A.

In this webinar, you will learn how Maplesoft's testing and assessment system, Maple T.A., is being used to improve learning, save money, reduce drop-out rates, and increase student satisfaction at academic institutions around the world.

The following Maple T.A. case studies will be presented:

  • The University of Waterloo saved $100,000/year on their grading budget
  • At the Amsterdam University of Applied Science, student pass rates went up approximately 20% within one year
  • The University of Canterbury continued to offer their full academic program after an earthquake damaged classrooms
  • At the University of Guelph, drop-out rates were reduced by more than 10%
  • ...And more!

All attendees of this webinar will be sent a complimentary copy of the Maplesoft magazine Transforming Testing and Assessment.

To join us for the live streaming webinar, please click here to register.

 

     Maple is seriously used in my article Approximation of subharmonic functions in the half-plane by the logarithm of the modulus of an analytic function. Math. Notes 78, No 4, 447-455 in two places. The purpose of this post is to present these applications.                                                                                                 First, I needed to prove the elementary inequality (related to the properties of the minimal harmonic majorant of the function 1/Im z in a certain strip)                                                                                                    2R+sqrt(R)-R(R+sqrt(R))y - 1/y   1/4                                                                                                  for    y ≥ 1/(R+sqrt(R)) and  y ≤ 1/R, the parameter R is greater than or equal to 1.   The artless attemt                                                                          
restart; `assuming`([maximize(2*R+sqrt(R)-R*(R+sqrt(R))*y-1/y, y = 1/(R+sqrt(R)) .. 1/R)], [R >= 1])

maximize(2*R+R^(1/2)-R*(R+R^(1/2))*y-1/y, y = 1/(R+R^(1/2)) .. 1/R)

(1)

fails. The second (and successful) try consists in the use of optimizers:

F := proc (R) options operator, arrow; evalf(maximize(2*R+sqrt(R)-R*(R+sqrt(R))*y-1/y, y = 1/(R+sqrt(R)) .. 1/R)) end proc:

F(1)

.171572876

(2)

 

Optimization:-Minimize('F(R)', {R >= 1})

[.171572875253809986, [R = HFloat(1.0)]]

(3)

To be sure ,
DirectSearch:-Search(proc (R) options operator, arrow; F(R) end proc, {R >= 1})
;

[.171572875745665, Vector(1, {(1) = 1.0000000195752754}, datatype = float[8]), 11]

(4)

Because 0.17
"158 < 0.25, the inequality is  proved.   "
Now we establish this  by the use of the derivative. 

solve(diff(2*R+sqrt(R)-R*(R+sqrt(R))*y-1/y, y) = 0, y, explicit)

1/(R^(3/2)+R^2)^(1/2), -1/(R^(3/2)+R^2)^(1/2)

(5)

maximize(1/sqrt(R^(3/2)+R^2)-1/(R+sqrt(R)), R = 1 .. infinity, location)

(1/2)*2^(1/2)-1/2, {[{R = 1}, (1/2)*2^(1/2)-1/2]}

(6)

minimize(eval(2*R+sqrt(R)-R*(R+sqrt(R))*y-1/y, y = 1/sqrt(R^(3/2)+R^2)), R = 1 .. infinity, location)

3-2*2^(1/2), {[{R = 1}, 3-2*2^(1/2)]}

(7)

evalf(3-2*sqrt(2))

.171572876

(8)

The second use of Maple was the calculation of the asymptotics of the following integral (This is the double integral of the Laplacian of 1/Im z over the domain {z: |z-iR/2| < R/2} \ {z: |z| ≤ 1}.). That place is the key point of the proof. Its direct calculation in the polar coordinates fails.

`assuming`([(int(int(2/(r^2*sin(phi)^3), r = 1 .. R*sin(phi)), phi = arcsin(1/R) .. Pi-arcsin(1/R)))/(2*Pi)], [R >= 1])

(1/2)*(int(int(2/(r^2*sin(phi)^3), r = 1 .. R*sin(phi)), phi = arcsin(1/R) .. Pi-arcsin(1/R)))/Pi

(9)

In order to overcome the difficulty, we find the inner integral

`assuming`([(int(2/(r^2*sin(phi)^3), r = 1 .. R*sin(phi)))/(2*Pi)], [R*sin(phi) >= 1])

(R*sin(phi)-1)/(sin(phi)^4*R*Pi)

(10)

and then we find the outer integral. Because
`assuming`([int((R*sin(phi)-1)/(sin(phi)^4*R*Pi), phi = arcsin(1/R) .. Pi-arcsin(1/R))], [R >= 1])

int((R*sin(phi)-1)/(sin(phi)^4*R*Pi), phi = arcsin(1/R) .. Pi-arcsin(1/R))

(11)

is not successful, we find the indefinite integral  

J := int((R*sin(phi)-1)/(sin(phi)^4*R*Pi), phi)

-(1/2)*cos(phi)/(Pi*sin(phi)^2)+(1/2)*ln(csc(phi)-cot(phi))/Pi+(1/3)*cos(phi)/(R*Pi*sin(phi)^3)+(2/3)*cos(phi)/(R*Pi*sin(phi))

(12)

We verify that  the domain of the antiderivative includes the range of the integration.
plot(-cos(phi)/sin(phi)^2+ln(csc(phi)-cot(phi)), phi = 0 .. Pi)

 

plot((2/3)*cos(phi)/sin(phi)^3+(4/3)*cos(phi)/sin(phi), phi = 0 .. Pi)

 

    That's all right. By the Newton-Leibnitz formula,

``
eval(J, phi = Pi-arcsin(1/R))-(eval(J, phi = arcsin(1/R)));

(1/3)*(1-1/R^2)^(1/2)*R^2/Pi+(1/2)*ln((1-1/R^2)^(1/2)*R+R)/Pi-(4/3)*(1-1/R^2)^(1/2)/Pi-(1/2)*ln(R-(1-1/R^2)^(1/2)*R)/Pi

(13)

Finally, the*asymptotics*is found by

asympt(eval(J, phi = Pi-arcsin(1/R))-(eval(J, phi = arcsin(1/R))), R, 3)

(1/3)*R^2/Pi-(3/2)/Pi+(1/2)*(ln(2)+ln(R))/Pi-(1/2)*(-ln(2)-ln(R))/Pi+O(1/R^2)

(14)

      It should be noted that a somewhat different expression is written in the article. My inaccuracy, as far as I remember it, consisted in the integration over the whole disk {z: |z-iR/2| < R/2} instead of {z: |z-iR/2| < R/2} \ {z: |z| ≤ 1}. Because only the form of the asymptotics const*R^2 + remainder is used in the article, the exact value of this non-zero constant is of no importance.

       It would be nice if somebody else presents similar examples here or elsewhere.

 

Download Discovery_with_Maple.mw

Math powers the world. From tracking the spread of an epidemic to designing a new rocket engine, mathematical equations allow us to understand a challenge and formulate an approach to solving it. Everywhere around us, math is ubiquitous; an equation determines how your thermostat controls your home furnace; a mathematical algorithm is used to encode the signal from your cell phone. More than ever, we rely on mathematics to make our lives better. And continually, our mathematical techniques get more refined as we solve more and more complex problems.

Greetings to all.

I am writing to alert MaplePrimes users to a Maple package that makes an remarkable contribution to combinatorics and really ought to be part of your discrete math / symbolic combinatorics class if you teach one. The combstruct package was developed at INRIA in Paris, France, by the algorithmics research team of P. Flajolet during the mid 1990s. This software package features a parser for grammars involving combinatorial operators such as sequence, set or multiset and it can derive functional equations from the grammar as well as exponential and ordinary generating functions for labeled and unlabeled enumeration. Coefficients of these generating functions can be computed. All of it easy to use and very powerful. If you are doing research on some type of combinatorial structure definitely check with combstruct first.

My purpose in this message is to advise you of the existence of this package and encourage you to use it in your teaching and research. With this in mind I present five applications of the combstruct package. These are very basic efforts that admit improvement that can perhaps serve as an incentive to deploy combstruct nonetheless. Here they are:

I hope you enjoy reading these and perhaps you might want to feature combstruct as well, which presented the first complete implementation in a computer algebra system of the symbolic method, sometimes called the folklore theorem of combinatorial enumeration, when it initially appeared.

Best regards,

Marko Riedel.


Partial rectification for the Physics:-Simplify and Physics:-Library:-SortProducts procedures dealing with Fermi annihilation/creation operators

This post will be useful for physicists dealing with Fermi annihilation/creation operators. Physics Package provides plenty of powerful tools for quantum operators handling, however some of them often fail to render correct result.  In particular incorrect behaviour with respect to Fermi annihilation/creation operators is observed for routines Simplify and SortProducts.  In this post I present my procedures S*implifyFermionicOperators and SortProductsFermi which partially solve these issues.

Problems with Physics Package routines

   

Short explanation of custom routines SimplifyFermionicOperators and SortProductsFermi

   

"Details for SimplifyFermionicOperators(z,prefix)"

   

"Details for SortProductsFermi(x,L,prefix)"

   

Weak points

   

Final notes

   


Download FermiCreationAnnihilation.mw

I would like to announce a new unofficial record computation of the MRB constant that was finished on Sun 21 Sep 2014 18:35:06.

I really would like to see someone beat it with Maple!

It took 1 month 27 days 2 hours 45 minutes 15 seconds. I computed 3,014,991 digits of the MRB constant, (confirming my previous 2,00,000 or more digit computation was actually accurate to 2,009,993 digits), with Mathematica 10.0. I Used my version of Richard Crandall's code:

 

____________________________________________________________________________

(*Fastest (at MRB's end) as of 25 Jul 2014.*)

DateString[]

prec = 3000000;(*Number of required decimals.*)ClearSystemCache[];

T0 = SessionTime[];

expM[pre_] := 

  Module[{a, d, s, k, bb, c, n, end, iprec, xvals, x, pc, cores = 12, 

    tsize = 2^7, chunksize, start = 1, ll, ctab, 

    pr = Floor[1.005 pre]}, chunksize = cores*tsize;

   n = Floor[1.32 pr];

   end = Ceiling[n/chunksize];

   Print["Iterations required: ", n];

   Print["end ", end];

   Print[end*chunksize]; d = ChebyshevT[n, 3];

   {b, c, s} = {SetPrecision[-1, 1.1*n], -d, 0};

   iprec = Ceiling[pr/27];

   Do[xvals = Flatten[ParallelTable[Table[ll = start + j*tsize + l;

        x = N[E^(Log[ll]/(ll)), iprec];

        pc = iprec;

        While[pc < pr, pc = Min[3 pc, pr];

         x = SetPrecision[x, pc];

         y = x^ll - ll;

         x = x (1 - 2 y/((ll + 1) y + 2 ll ll));];(*N[Exp[Log[ll]/ll],

        pr]*)x, {l, 0, tsize - 1}], {j, 0, cores - 1}, 

       Method -> "EvaluationsPerKernel" -> 4]];

    ctab = ParallelTable[Table[c = b - c;

       ll = start + l - 2;

       b *= 2 (ll + n) (ll - n)/((ll + 1) (2 ll + 1));

       c, {l, chunksize}], Method -> "EvaluationsPerKernel" -> 2];

    s += ctab.(xvals - 1);

    start += chunksize;

    Print["done iter ", k*chunksize, " ", SessionTime[] - T0];, {k, 0,

      end - 1}];

   N[-s/d, pr]];

t2 = Timing[MRBtest2 = expM[prec];]; DateString[]

Print[MRBtest2]

MRBtest2 - MRBtest2M

_________________________________________________________________________.

 

I used a six core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz 3.20 GHz with 64 GB of RAM of which only 16 GB was used.

t2 From the computation was {1.961004112059*10^6, Null}.

 

 

 

Greetings to all.

As some of you may remember I have posted several announcements concerning Power Group Enumeration and the Polya Enumeration Theorem this past year, e.g. at this MaplePrimes link: Power Group Enumeration.

I have continued to work in this field and for those of you who have followed the earlier threads I would like to present some links to my more recent work using the Burnside lemma. Of course all of these are programmed in Maple and include the Maple code and it is with the demonstration of Maple's group theory capabilities in mind that I present them to you (math.stackexchange links).

The third and fourth to last link in particular include advanced Maple code.

The second entry is new as of October 30 2015.

With my best wishes for happy group theory computing with Maple,

Regards,

Marko Riedel

I see two recent items on the web about Mathematica and the rosettacode.org site. One was a Wolfram Inc. corporate blog post, and the other a post on Wolfram's relatively new community site.

There are many items on the page of tasks still without a submitted Maple implementation. It would be nice to see interesting implementations of some remaining tasks, as contributions from the Maple user base. The tasks remaining are of very mixed difficulty levels.

To date there are only 132 entries on the page for Maple implementations of that site's programming tasks. (Of these about 40 were submitted by one member while about 80 were submitted by another member.)

acer

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