JacquesC

Prof. Jacques Carette

2401 Reputation

17 Badges

20 years, 84 days
McMaster University
Professor or university staff
Hamilton, Ontario, Canada

Social Networks and Content at Maplesoft.com

From a Maple perspective: I first started using it in 1985 (it was Maple 4.0, but I still have a Maple 3.3 manual!). Worked as a Maple tutor in 1987. Joined the company in 1991 as the sole GUI developer and wrote the first Windows version of Maple (for Windows 3.0). Founded the Math group in 1992. Worked remotely from France (still in Math, hosted by the ALGO project) from fall 1993 to summer 1996 where I did my PhD in complex dynamics in Orsay. Soon after I returned to Ontario, I became the Manager of the Math Group, which I grew from 2 people to 12 in 2.5 years. Got "promoted" into project management (for Maple 6, the last of the releases which allowed a lot of backward incompatibilities, aka the last time that design mistakes from the past were allowed to be fixed), and then moved on to an ill-fated web project (it was 1999 after all). After that, worked on coordinating the output from the (many!) research labs Maplesoft then worked with, as well as some Maple design and coding (inert form, the box model for Maplets, some aspects of MathML, context menus, a prototype compiler, and more), as well as some of the initial work on MapleNet. In 2002, an opportunity came up for a faculty position, which I took. After many years of being confronted with Maple weaknesses, I got a number of ideas of how I would go about 'doing better' -- but these ideas required a radical change of architecture, which I could not do within Maplesoft. I have been working on producing a 'better' system ever since.

MaplePrimes Activity


These are replies submitted by JacquesC

Floats and 'exact' numbers are extremely different, and Maple treats them so. This distinction is usually not made in most undergraduate classes, and that's a pity, because it makes using a system where this fundamental mathematical fact is front-and-center rather surprising.
That error is because an internal computation has curr_numer = 0.+0.*I, and so ilog(curr_numer) = infinity, and it uses that infinity as something to add to the current setting of Digits! I guess that routine is thinking your problem is particularly ill-conditioned! (smiley).
I believe that some proxy for that exists, in two ways: 1) task assistants 2) look at ??plot (yes, with 2 ?, not just one). Of course, the help page may be sub-optimal, in which case ??plot is not so helpful, but that's a different problem! Note that, in general, features like Intelli-Sense are not really possible in Maple because it is dynamically typed, unlike C# (and similar stuff for Java) which are statically typed. In fact, Maple is even more dynamic than just "dynamically typed", so that the complete set of possible input combinations cannot be enumerated (since that 'set' is not described declaratively like in most other languages, but rather through arbitrary code). Having said that, the vast majority of Maple code has a uniform API which can be automatically inferred. Of course, it is exactly those 'other' routines that cause people the most grief! And guess what? plot (and plot3d) would be chief amongst those latter routines.
Although Maple can do some client-server stuff, that is rather tricky to do. The default Maple runs on the client, even in a so-called 'network' setup. As you guessed, all that means is that the license server (and often the Maple executable) are 'served' from a central location, but all computations are done on the client.
There are probably simpler ways, but you can get the matrix thus: > LV := [diff(x(t), t) = 0.2e-1*x(t)-0.5e-2*x(t)*y(t), diff(y(t), t) = 0.1e-1*x(t)*y(t)-0.1e-1*y(t)]: > r := map(rhs, LV): > frontend(VectorCalculus[Jacobian],[r, [x(t), y(t)]], [{`+`,`*`,list},{}]);
               [0.02 - 0.005 y(t)      -0.005 x(t)   ]
               [                                     ]
               [    0.01 y(t)        0.01 x(t) - 0.01]
then LinearAlgebra:-Eigenvalues is quite happy to return a closed-form for that.
There are probably simpler ways, but you can get the matrix thus: > LV := [diff(x(t), t) = 0.2e-1*x(t)-0.5e-2*x(t)*y(t), diff(y(t), t) = 0.1e-1*x(t)*y(t)-0.1e-1*y(t)]: > r := map(rhs, LV): > frontend(VectorCalculus[Jacobian],[r, [x(t), y(t)]], [{`+`,`*`,list},{}]);
               [0.02 - 0.005 y(t)      -0.005 x(t)   ]
               [                                     ]
               [    0.01 y(t)        0.01 x(t) - 0.01]
then LinearAlgebra:-Eigenvalues is quite happy to return a closed-form for that.
Doubleint represents an integral, like Int is to int (where Int represents an integral, int computes an integral). It happens frequently enough (like when computing series expansions) that one prefers to work with a representation rather than a closed-form that Maple provides quite a few such representations. In your case, you need to put a call to value before the simplify, ie > simplify(value(int(int(T(u,v),v=0..infinity),u=0..m) - Doubleint(T(u,v),v=0..infinity,u=0..m))); > simplify(value(int(int(q(u,v),v=0..infinity),u=0..m) - Doubleint(q(u,v),v=0..infinity,u=0..m)));
Doubleint represents an integral, like Int is to int (where Int represents an integral, int computes an integral). It happens frequently enough (like when computing series expansions) that one prefers to work with a representation rather than a closed-form that Maple provides quite a few such representations. In your case, you need to put a call to value before the simplify, ie > simplify(value(int(int(T(u,v),v=0..infinity),u=0..m) - Doubleint(T(u,v),v=0..infinity,u=0..m))); > simplify(value(int(int(q(u,v),v=0..infinity),u=0..m) - Doubleint(q(u,v),v=0..infinity,u=0..m)));
The issue is that even though Maple can sometimes solve the general problem, it is not always able to recognize that a particular (complicated!) expression is an instance of that general problem. This is because zero-recognition is undecidable! In this case though, if you help Maple by just telling it a bit more, in this case assume(m>0, z0::real, sp::real, z1::real, s::real, x1::real, c0::real, y0::real, mu::real, y1::real); then you get 0 (and much nicer answers for I1 and I2). This is a very general phenomenon - Maple can't guess at what you mean, and uses the information you give it. If you leave everything purely symbolic, there may not be a good answer to the problem as stated. It is very important to state the problem you actually want to solve!
The issue is that even though Maple can sometimes solve the general problem, it is not always able to recognize that a particular (complicated!) expression is an instance of that general problem. This is because zero-recognition is undecidable! In this case though, if you help Maple by just telling it a bit more, in this case assume(m>0, z0::real, sp::real, z1::real, s::real, x1::real, c0::real, y0::real, mu::real, y1::real); then you get 0 (and much nicer answers for I1 and I2). This is a very general phenomenon - Maple can't guess at what you mean, and uses the information you give it. If you leave everything purely symbolic, there may not be a good answer to the problem as stated. It is very important to state the problem you actually want to solve!
The problem you describe is, as was point out by J. Tarr, exactly what Map is for. On your problem (after figuring out you had done with(Statistics) and with(ArrayTools), the latter of which wasn't obvious), then LinearAlgebra:-Map(tanh, k); does as you want. BTW, it is a really good habit to use the long names. There are too many namespace conflicts in Maple, and over the long term debugging those things will drive you mad, it is best to avoid the issue altogether. For interactive use, I will sometimes be lazy and use with(), but never in anything big. Command-completion helps a lot there.
The problem you describe is, as was point out by J. Tarr, exactly what Map is for. On your problem (after figuring out you had done with(Statistics) and with(ArrayTools), the latter of which wasn't obvious), then LinearAlgebra:-Map(tanh, k); does as you want. BTW, it is a really good habit to use the long names. There are too many namespace conflicts in Maple, and over the long term debugging those things will drive you mad, it is best to avoid the issue altogether. For interactive use, I will sometimes be lazy and use with(), but never in anything big. Command-completion helps a lot there.
Can you explain what you mean by "initialiser function" ?
Can you explain what you mean by "initialiser function" ?
If I understood your original problem properly, then the following
> f := CompSeq(params=[X],locals=[c11,c12,c21,c31], [c11 = 13*X+3, c12 = X-5, c21 = 12*c11-c12, c31 = c21^2, F = c31 + 2*c21 -c12]):
> convert(f, 'procedure');
proc(X)
local c11, c12, c21, c31;
   c11 := 13*X + 3;
   c12 := X - 5;
   c21 := 12*c11 - c12;
   c31 := c21^2;
   F := c31 + 2*c21 - c12
end proc
should give you an idea on how to proceed.
First 103 104 105 106 107 108 109 Last Page 105 of 119