I have been playing with Maple on and off for 3 months. This summer, now that school is out, I have set about trying to master this environment. My frustration with Maple has subsided a bit only to be replaced with an understanding of its limitations.
I set about building my own package of doing surface and flux integrals as a way of discovering how to manipulate expressions. I think I know why Maple is so tough. I read somewhere on these forums a diatribe on what seemed an esoteric nuance in the difference between the way Mathematica approaches functions vs the way Maple does. Mathematica is essentially a functional programming language wrapped around list structures (ala LISP). In mathematica everything, at the ground level, is a list. Various types get defined for different quantities but they are essentially lists. Maple defines its types internally. I don't know how they are put together (rtables?) Maple has evolved over time so that these types have grown to a huge number that are hard to keep track of. The inability of maple functions to screen their inputs for different data types means that the Maple programmers have to write lots of different functions for the different data types. This is a very old style of programming.
How does this esoterica affect the Maple interface? Profoundly. Lets get back to my original mission: surface integral. I set up a parametric surface. This should be an ordered list of functions describing the effect of each variable as a function some others. R2 -> R3 for a 3D surface. I need to take the derivatives of this "vector" wrt to the parametrized values to build the differential suface element dS. Maple balks at taking derivatives of vectors since they are not arrays. I have to convert them to arrays, take their derivatives and now it is time to take the cross product. The cross product operator doesn't recognize arrays as an input so I need to explicitly convert the arrays back to vectors. (Did I mention that there are vectors and Vectors?) I take the cross product and get its 'length'. I then throw it in the integral but it needs to be conveted back to an algeraic. I spent most of my time converting from Vector to array and back again. Mathematica doesn't distinguish between these types since arrays are vectors are lists. Even if they were a different type the sophisticated pattern matching means that if I define a new operator that may share the same name as some new operator it can be easily defined to match only the new data type and not override existing functions.
What this means is that I don't need 3 different named functions for the "cross product", conversions from lists to vectors, arrays happen naturally and automatically*. Loading a library doesn't change the state of the interface and create unpredictable namespace problems (vector vs Vector).
Many purists will point out that these type distinctions are a good thing. Yes, as a former programmer I appeciate the need for strict type checking. There are times, however, when this kind of checking can get in the way of getting things done. Maple is very close to that line.
I think I need to get some better reference material on worked problems in Maple to make any headway into this system.
* While I am picking on this one part there are numerous examples of functions that need to be redefined to allow some new type defined in some included library. To Maple's credit these libraries are VAST. The downside is that the documentation is incomplete in weird ways. The descriptions are detailed without being clear as to what the function does and how it does it.
Comments
a few comments
I have a couple of remarks which should hopefully bring the issues you point out into focus. First, the Maple kernel is actually very small. It implements only a few mathematical algorithms (such as normal). For the most part, it's job is to implement data structures: sums, products, hash tables, rtables, etc, and the Maple programming language: procedures, branching, loops, as well as other primitives such as integer and finite field arithmetic. For a reference I suggest the book "Algorithms for Computer Algebra" by Geddes, Czapor, and Labahn, as well as the Maple programming guides distributed with the full version of Maple. You can download the programming guides here. These are all good introductions to the data structures implemented in the Maple kernel.
About 90% of the mathematical functionality of Maple is written in the Maple language, making the system extremely flexible. You can build almost anything on top of the Maple kernel, and people often do. There are programs and packages for roughly every area of mathematics, including some very specialized areas, and routines for engineering, the life sciences, and education as well. These are all written in the Maple language, and they are bolted on to the system, often independently of oneanother. This includes things like mathematical functions and types (!). The actual development of Maple is spread across labs all over the world, for example, in Moscow, Paris, Vancouver, London Ontario, and of course Waterloo. These labs contribute most of the specialized packages and routines. The Maplesoft company maintains and enhances the core routines (such as simplify, int, solve, etc), develops the Maple kernel, and oversees development of the system as a whole.
The picture I'm trying to paint here is that Maple is more like an organic ecosystem than a monolithic product. The company has built a platform and it supports many different (and sometimes competing) development efforts. The advantage of this approach is that the good routines win out over the long term, and the product is allowed to evolve and adapt to new uses quickly. This is the reason why Maple is so widely installed - there is almost always something useful that it does. The downside of this approach is that it is chaotic. Old parts of the system don't seem to know about new functionality, and some newer parts occasionally conflict. Long-term users of Maple accept this, and complain to the company endlessly about what needs to be fixed. The important thing is that the company actually does fix things, so that over time some coherence begins to emerge. The added benefit is that the product is developed in a direction that is influenced strongly by users.
As for your specific complaint, it looks like you found a rough spot in the system. The old linalg package (which uses vectors and lower-case matrix) was replaced by the LinearAlgebra and VectorCalculus packages (which use Vector and Matrix). There is an incompatibility there because the VectorCalculus package supports a more general notion of Vector (including, for example, cylindrical and spherical coordinates) that don't make sense outside of that package. Where possible, you should try to stay within the VectorCalculus package if you are using those kinds of features. For example, instead of a list try to use a Vector of functions. For functions which do not understand Vectors (such as int), use the map command to apply the function to each element. For something more complicated (such as surface integrals) you will have to write your own procedures if it is not built in to the system. Usually these are not too difficult to write, but post details (or better yet, an example calculation) if you need suggestions.
You are right
I overreacted a bit. I am on using Maple on a Mac system which has some well documented interface issues (relatively minor, but annoying nonetheless.) These frustrations as well as my steep learning curve beyond the simple stuff just caused my head to explode for a moment. I actually think that on the whole Maple is very neat. I am getting better at dealing with it. I discovered what you pointed out, is the "organic" nature of Maple. I, too, believe that this is a strength, ultimately. I am a big fan of open source work built on sturdy platforms. The problem with open source is that often there are many different perspectives on how to solve a problem and the documentation on which path to take to solve a particular problem isn't always clear.
More specifically I have been setting up some material for my students and become more familiar with the VectorCalculus package and have, if I may say so, grown quite fond of it. I have already built some visualization tools (I am sure they already exist but I needed to do this myself) to help support my intended use of the material and I am much happier person for it.