Archive for the ‘Maple’ Category

November 13th, 2010

Christmas isn’t all that far away so I thought that it was high time that I wrote my Christmas list for mathematical software developers and vendors.  All I want for christmas is….

Mathematica

MATLAB

  • Merge the parallel computing toolbox with core MATLAB.  Everyone uses multicore these days but only a few can feel the full benefit in MATLAB.   The rest are essentially second class MATLAB citizens muddling by with a single core (most of the time)
  • Make the mex interface thread safe so I can more easily write parallel mex files

Maple

  • More CUDA accelerated functions please.  I was initially excited by your CUDA package but then discovered that it only accelerated one function (Matrix Multiply).  CUDA accelerated Random Number Generators would be nice along with fast Fourier transforms and a bit more linear algebra.

MathCAD

  • Release Mathcad Prime.
  • Mac and Linux versions of Mathcad.  Maple,Mathematica and MATLAB have versions for all 3 platforms so why don’t you?

NAG Library

  • Produce vector versions of functions like g01bk (poisson distribution function).  They might not be needed in Fortran or C code but your MATLAB toolbox desperately needs them
  • A Mac version of the MATLAB toolbox.  I’ve got users practically begging for it :)
  • A NAG version of the MATLAB gamfit command

Octave

SAGE Math

  • A Locator control for the interact function.  I still have a bounty outstanding for the person who implements this.
  • A fully featured, native windows version.  I know about the VM solution and it isn’t suitable for what I want to do (which is to deploy it on around 5000 University windows machines to introduce students to one of the best open source maths packages)

SMath Studio

  • An Android version please.  Don’t make it free – you deserve some money for this awesome Mathcad alternative.

SpaceTime Mathematics

  • The fact that you give the Windows version away for free is awesome but registration is a pain when you are dealing with mass deployment.  I’d love to deploy this to my University’s Windows desktop image but the per-machine registration requirement makes it difficult.  Most large developers who require registration usually come up with an alternative mechanism for enterprise-wide deployment.  You ask schools with more than 5 machines to link back to you.  I want tot put it on a few thousand machines and I would happily link back to you from several locations if you’ll help me with some sort of volume license.  I’ll also give internal (and external if anyone is interested) seminars at Manchester on why I think Spacetime is useful for teaching mathematics.  Finally, I’d encourage other UK University applications specialists to evaluate the software too.
  • An Android version please.

How about you?  What would you ask for Christmas from your favourite mathematical software developers?

May 17th, 2010

Version 14 of Maple was released a couple of weeks ago and it appears to have some very cool stuff in it.  Some of the highlights that stand out for me include

  • Accelerated linear algebra using graphics cards via NVIDIA’s CUDA.    Maple’s advertising blurb says that they have implemented matrix multiplication and that this will help speed up many linear algebra routines since this is such a fundamental operation.  I think that Maple are the first of the big general purpose mathematical packages to offer direct CUDA integration out of the box and this development is well worth watching.  The speed-ups that are possible from CUDA technology are nothing short of astonishing – hundreds of times in some cases.  However, Maplesoft are going to need to add a lot more than matrix multiplication in order for this to be truly useful.  A set of fast random number generators would be nice for example (I’m thinking superfast Monte-carlo simulations – the finance people would love it).
  • Maple uses Intel’s Math Kernel Library (MKL) for many of its low-level numerical linear algebra routines and this has been updated to version 10.0 in Maple 14.  For 32bit windows users this has sped certain operations up quite a lot but it is 64bit Windows users who will really see the benefit since 64bit Maple 13 only used a set of generic BLAS routines.  The practical upshot is that certain basic linear algebra routines, such as Matrix Multiplication, can be around 10 times faster in 64bit windows Maple 14 compared to the previous version.  I couldn’t find mention of the Linux version.
  • A shed load of updates to their differential equation solvers including a new numerical routine called the Cash-Karp pair.
  • The Maple toolbox for MATLAB is no longer a separate product and is now included with Maple itself.  This is great news if you, like me, tend to work with several mathematical packages simultaneously.  Of course you need to have a copy of MATLAB installed to make use of this functionality – you don’t get a copy of MATLAB for free :)
  • You can now import MATLAB binary files (compressed and uncompressed) directly into Maple using the ImportMatrix command.
  • Another product, The Maple-NAG connector, has also been integrated with Maple itself.  This allows you to easily call the NAG C library directly from Maple but, similar to the MATLAB toolbox, you’ll have to purchase the NAG C library separately to make use of this.

As you can see, I tend to favour new features that lead to improved performance or better interoperability with other software packages in the first instance.  New mathematics and usability features take a little longer to sink in (for me at least).

I’ve not got a copy of Maple 14 yet but will try to write more if I upgrade (finances permitting).

For a full list of changes check out Maple’s online help section.

More on Maple from Walking Randomly

December 15th, 2009

Maplesoft have been getting into the Christmas spirit recently with a few festive demonstrations. The first uses MapleSim (essentially Maple’s answer to Simulink) to simulate Santa in flight.  Of course it is highly simplified since, among other things, the model doesn’t simulate the weight of the presents which will (obviously) be steadily decreasing throughout Christmas Eve. It is, however, a great start.

Santa Simulation

Slightly more practically, they have used Maple to derive a new rule of thumb for the cooking time of turkeys.  The traditional rule of thumb is to allow 20 minutes per pound of turkey if you cook at 350° F (after pre-heating to 400° F) although there is a variation to this rule that suggests adding an extra 15 minutes to the final cooking time.  According to Maplesoft’s analysis, this is great if your turkey is somewhere between 9 and 14 pounds in weight but if you use it to cook larger turkeys then you may find that the result is overcooked and dry.

After a bit of analysis, Maplesoft have suggested that if the weight of your turkey is x pounds then the ideal cooking time is 45*x^(2/3) minutes. So, using the new rule on a 10 pound turkey gives 45*10^(2/3) = (approx) 209 minutes compared to 200 minutes using the old rule – not much difference there then.

On a 20 pound turkey, however, the difference is more pronounced: 400 minutes using the old rule but 332 minutes using the new rule! Now, the Maple engineer who derived this equation admits that he hasn’t tried it out in the kitchen yet but he will do so this Christmas and I think that I might try it too if I get the chance.  If you are a cook and have tried this new formula for large turkeys then let me know how you got on.

Turkey Cooking Times

Please consider this formula to be experimental for now though and CHECK that your turkey is cooked before eating it.  Remember that the equation  hasn’t been checked in the kitchen yet!

For more examples of festive mathematical programs created with software such as Mathematica, Maple, MATLAB and SAGE check out the following links.

October 26th, 2009

Almost every computer you buy these days contains more than one processor core – even my laptop has 2 – and I have access to relatively inexpensive desktops that have as many as 8.  So, it is hardly surprising that I am steadily receiving more and more queries from people interested in making their calculations run over as many simultaneous cores as possible.

The big three Ms of the mathematical software world, Mathematica, Maple and MATLAB, all allow you to explicitly parallelise your own programs (although you have to pay extra if you want to do this in MATLAB without resorting to hand crafted C-code) but parallel programming isn’t easy and so tutorials are invaluable.

Fortunately, Darin Ohashi, a senior kernel developer at Maplesoft has taken the time to write some parallel Maple tutorials for us and he has presented his work as a series of blog posts over at MaplePrime.  Here’s an idex:

If you are interested in parallel programming in Maple then Darin’s posts are a great place to start.

Other articles from Walking Randomly you may be interested in

August 4th, 2009

Maplesoft, developers of the popular computer algebra system – Maple, have been bought by Cybernet Systems Co., Ltd., a Tokyo-based major Japanese importer/distributor of CAE (computer aided engineering) software.  More details here.

I just hope that this turns out to be a good thing.  I like Maple and I don’t want it messed up!

April 29th, 2009

OK, so with today’s release of Maple version 13, this blog post is a little late but I started so I’ll finish! My original install of Maple was 12.01 on Ubuntu Linux and a little while ago an update was released to take this to version 12.02.

Installation

In theory I should be able to install this automagically by clicking on Tools->Check for Updates inside Maple. However, when I did this I was told that ‘no updates were currently available‘ so I had to download the update manually from here. I was very pleased to note that this update was offered free of charge to all Maple 12 users. This is exactly as it should be and other software vendors should take note here – users don’t like paying for bug-fix updates! Well done to Maplesoft for doing it right. Once I had downloaded the 12.02 update installer, the installation itself was pretty straightforward. The following incantations did the trick for me

chmod +x ./Maple1202Linux32Upgrade.bin
sudo ./Maple1202Linux32Upgrade.bin

A graphical installer fired up and all I had to do was click Next a couple of times and point it to my Maple 12.01 installation. A few seconds later it was all over.  It’s a shame that the automatic checker didn’t work but all in all this was a very painless experience!

Now since this update only increments the version number by 0.01 you shouldn’t be expecting any marvellous new features.  What you should be expecting is some tidying up and bug fixing and that is exactly what you get.  Maplesoft’s own description of the bug-fixes weren’t detailed enough for my tastes and so I appealed to my informants at Maplesoft for something more explicit.

Happily, they delivered and most of what follows is from them.  Thanks Maplesoft :)

Since 12.02 was released along with the launch of MapleSim, many of the updates were geared towards symbolic manipulation and simplification, which is always beneficial for any advanced computations, but very important for MapleSim. As such, the best examples to illustrate the updates are in MapleSim, and are not easily shown with a Maple example alone. More specifically though, there were other enhancements and fixes that were added to Maple 12.02 to help improve it, which are not tied directly to MapleSim:

Updates to dsolve

There were two significant issues present in Maple 12.01 and earlier that are not present in Maple 12.02. One of these deals with a certain class of singularities that are transparent to explicit rk-pair based numerical solvers.

As the simplest example in this class, the differential system:

dsys := {diff(x(t),t)=x(t)/(1-t),x(0)=1};

having the exact solution:

dsolve(dsys);

has a singularity at t=1, and exactly ‘0’ error according to explicit rk-pair error estimation.

This, and other related singularities (such as jump discontinuities) are now detected to provide an accurate numerical solution. Compare this output from 12.01

dsn := dsolve(dsys, numeric);
 dsn := proc(x_rkf45)  ...  end proc
dsn(0.999);
[t = .999, x(t) = -48.3295522342053872]
dsn(1.001);
[t = 1.001, x(t) = -48.4646844943701609]

with the improved output from 12.02

dsn := dsolve(dsys, numeric);
 dsn := proc(x_rkf45)  ...  end proc
dsn(0.999);
 [t = 0.999, x(t) = 1000.00023834227034]
dsn(1.001);
Error, (in dsn) cannot evaluate the solution further right of
.99999999, probably a singularity

The second fix deals with error control on index-1 (non-differential) variables in the problem. This can be seen if you take a trivial problem coupled with a non-trivial index-1 variable. For example: In Maple 12.01:

dsys := {diff(x(t),t)=1, y(t)=sin(t), x(0)=0}:
 dsn := dsolve(dsys, numeric):
 dsn(Pi);

[t = 3.14159265358979, x(t) = 3.14159265358978956,
     y(t) = -0.00206731654642018647]

dsn(2*Pi);

[t = 6.28318530717958, x(t) = 6.28318530717958357,
     y(t) = -0.0623375491269087187]

The ‘y’ value should have been zero. In Maple 12.02:

dsys := {diff(x(t),t)=1, y(t)=sin(t), x(0)=0}:
 dsn := dsolve(dsys, numeric):
 dsn(Pi);

[t = 3.14159265358979, x(t) = 3.14159265358978956,
     y(t) = -0.117631599366556372 10^-6  ]

dsn(2*Pi);

[t = 6.28318530717958, x(t) = 6.28318530717958090,
     y(t) = -0.130170125786817359 10^-6  ]

which is zero within the default error tolerances.

Plot Annotations bug fix

In 12.01, some plot annotations were not appearing as expected. When a text box was entered on a 2D plot, the text would not appear until focus was taken away from the text box itself. For example, if you were to create a plot of sin(x) plot(sin(x)) and then click on the plot, select drawing from the toolbar and then select ‘T’ to enter a text field, you could begin typing, but would not receive visual feedback of what you entered until you clicked outside of the textbox. Obviously, this was a bug, and it was fixed in 12.02.

Improvements to embedded components

Prior to 12.02, some installations of Linux displayed some issues with redrawing of various embedded components, which slowed down scrolling in a Maple document. In 12.02, Maplesoft added a few fixes to the way that they handle embedded components, especially for 32-bit systems, which took care of this issue for most Linux installations. Also, since they were in the area, they took the opportunity to tweak response times for embedded components when creating them and executing the code that dictates their behavior in a document. This is not *very* noticeable when you have just a few components in a document, but it becomes very visible with Maplesoft’s interactive ebooks and with user applications that rely on a large number of components in a single application.

Excel Link improvements

In Maple, there is a built-in link to Microsoft Excel, so that you can perform Maple computations within an Excel spreadsheet. Maplesoft started supporting Excel 2007 in Maple 12, but with a service pack release to Windows released shortly thereafter and some security enhancements added to Maple, the link did not perform as expected in 12.01. Certain values were being interpreted incorrectly, as such, Maplesoft felt that they needed to address these inconsistencies as soon as possible. So for 12.02, they fixed the link for Excel 2007 to ensure that values were faithfully being passed from Microsoft Excel to Maple, in order to maintain the connection and computation accuracy.

April 29th, 2009

No sooner had I installed the Maple 12.02 update and wrote a blog post on it (to be published soon) than Maple 13 is released! I haven’t had chance to take a detailed look at everything that’s new (It was only released a few hours ago) but MapleSoft have prepared a series of great short videos that show off the new functionality.

Some highlights from my point of view are (the following links are to MapleSoft and will open a new browser window containing a video)

I’ll try and write more as soon as I get any extra information – right after the blog post concerning new functionality in Maple 12.02!  So much stuff to write about, so little time :(

February 17th, 2009

Regular readers of this blog will know that I am into mathematical software in a big way and that I have got access to pretty much all of the big commercial names – Mathematica, MATLAB, Mathcad, the NAG library and Origin to name just a few.

One conspicuous omission from this list is Maple since my University doesn’t have a site license for it and I can’t afford my own copy right now.  Thanks to the kind people of Maplesoft, however, I have been sent a review copy and so will be able to play with it, discuss it and hopefully be of some use to the Maple community.

I’m going to start slowly and just talk about installation today but Maple seems to be a great program so there will be a lot more to come.

Unboxing

I was sent a copy of Maple 12.01 and, like many software applications these days, it came in what appears to be a seriously oversized box!  Unlike many other applications though – the box for Maple is oversized for a very good reason.  It contains manuals! For the benefit of younger members of the audience – manuals are books that used to come with computer software but over the years they have been dropped in favour of on-line help systems.

Maybe I am showing my age but I have always lamented the passing of good quality paper-based manuals and so I was overjoyed to find that not only does Maple come with a nice little ‘Getting Started’ pamphlet but it also comes with a 400 page ‘user-manual’, a 388 page ‘Introductory Programming Guide‘ and a 442 page ‘Advanced Programming Guide.’ Truly, this must be documentation Nirvana.  Other software vendors should take note!

I have never really used Maple before and simply flicking through these books gave me a flavour for what was coming and before long I was itching to get started.

Installation

I installed my copy of Maple onto Ubuntu Linux version 8.10 and, like many new users, I didn’t even glance at the installation documentation.  I spend some of my professional life writing installation documentation and I find that bashing my way through an install without first consulting the docs allows me to pre-empt most of the problems that new users face.

Once the CD had auto mounted at /media/cdrom1/,  I installed Maple by typing the following at a bash prompt

sudo /media/cdrom1/installMapleLinux

and a nice Graphical User Interface started up which lead me through the process.  All very nice until it asked where I wanted to install Maple 12.  The suggested directory was

/root/maple12

Now opinions on this may vary but personally I don’t want to see anything get installed in the /root directory – ever.  I assume that the installer was picking up on the username I was using and, since I had used sudo, that username was root.  Still, I would much rather see the default directory be /opt/ which is used by many other commercial packages.  I am being picky here though..it is only the default directory after all.

The rest of the install was very straightforward and went without incident.  There comes a point where you have to be connected to the internet in order to activate the product but this is in line with many other packages of this type these days.

For those of you in user support – the problem will come when your Linux newbie user finishes the install and tries to actually run the thing.  It hasn’t been integrated with the GNOME or KDE menus in any way and typing

maple

at the command prompt rewards you with

bash: maple: command not found

Of course if you have had a bit of experience with Linux then you will know that the fix to this is quite trivial but if you don’t know Linux at all then this will lead to a support call to your IT department or at least a bit of goggling.  Even once this issue has been fixed, a new user may be surprised to find that the maple command rewards them with nothing more than a command line.  The actual command you need to use is xmaple.

Experienced users of Maple may be rolling their eyes at this point as they think something along the lines of ‘Why is Mike worrying about this stuff – it’s all so trivial.’ but I support applications like MATLAB and Mathematica at a large UK university and I find that experienced users rarely have the need to contact me.  Beginners, on the other hand, contact me all the time and this is the sort of stuff that bogs them down in the early stages.

Despite these minor issues, the install went fine and Maple is working just fine.  It is a very nice package and has many great features that set it apart from its competitors – expect to hear more from me about all of this soon.

update – how to fix the error message

Someone recently pointed out to me that if you google the error message

bash: maple: command not found

then you get this page and yet I didn’t give details on how to fix it. The reason for this error message is that the maple command has not been added to your system’s PATH which prevents your system from finding and executing it.

To fix this, edit your .bashrc file (which should be in your home directory) and add the following two lines to the end of the file

PATH=$PATH:/opt/maple12/bin
export PATH

You’ll need to change /opt/maple12/bin to wherever you actually installed maple.

October 13th, 2008

Flip Phillips, Professor of Psychology and Neuroscience at Skidmore College, has reviewed Maple 12 running on a Mac over at MacWorld. The Exploration Assistant sounds rather interesting from my point of view – if only I could find the time to have a play with it. It seems that Flip is rather impressed with this new version so why not head over there to read more?

July 4th, 2008

The makers of the big mathematical applications usually have some repository of user-generated code, documentation, examples etc. For example Wolfram Research have the Wolfram Demonstrations Project and the Wolfram Library Archive whereas Mathworks have MATALB Central. I really like these sites and often find myself browsing through them when I need help or inspiration.

Maple is a package that is starting to appear on my radar more and more and it turns out that they have an equivalent code repository called the Maple Application Center. According to the site it has over 1500 Maple applications, tutorials and so on which sounds fantastic. The only problem is that I have to register before I can download anything from it. So I haven’t downloaded anything from it.

Registration is free so you may wonder why I don’t just do it. To be honest, if Maple becomes a bigger part of my life then I probably will but, right now, when I am still at the ‘messing around’ stage of interacting with Maple I just can’t be bothered with registering yet another online account. I have almost a hundred online accounts for various things and I really don’t want to create more if I don’t have to.

So Maplesoft, if you are reading this, why do you insist on me creating an account to access this very nice repository of information? Logging in is, in my opinion, an unnecessary step between the user and the good stuff. Wolfram doesn’t do it and neither does Mathworks so why do you?

Update 26th October 2009: It is no longer necessary to register.  Thanks to ‘C’ for letting me know.