JacquesC

Prof. Jacques Carette

2401 Reputation

17 Badges

20 years, 77 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 answers submitted by JacquesC

This is Maple's data-structure representation for an assignment statement. So whatever code you are using is calling (somewhere) FromInert which tries to make a Maple object out of a _Inert_ data-structure. That data-structure is usually gotten by first calling ToInert, modifying the result, and the calling FromInert. In other words, without more details about what you are doing, it will be quite difficult to accurately diagnose your problem.
If you want an expression to functionally depend on a variable, perhaps you should be using a function instead? Anyways, there are two ways to proceed:
  1. Functions: expr1 := a -> a^2+4; expr1(17); expr1(0);
  2. Expression and proper evaluation: expr1 := a^2+4; eval(expr1, a=17); eval(expr1, a=0);
Using state and side-effects to achieve this can probably be done, but you'll be fighting Maple the whole way, instead of using the features it provides to make this easy.
map(convert, ss, 'name')
As soon as things get big, sum will try all sorts of stuff, which is probably not what you want. add is likely what you want. If you want to use evalhf, then investigate Array and especially rtable.
Obvious, no? For some strange reason, this stuff seems to be highly under-documented. All the options to INTERFACE_HELP are really quite useful, but very few people know them. By the way, inserting .mws files into the help database does NOT lose formatting. AFAIK, you can't insert .mw files into the help database!!!
You should know better than to believe marketing material verbatim. While what it says is true, it is not uniformly true. It is true when you use the newer Student package (details above). It is also true for some of the various Wizards (I can't ever keep straight what the funky terminology Maplesoft has invented for those). Assistants, maybe? It is not true for any of the older Maple functionality (ie pretty much anything that existed before Maple 10, which is a lot). Sometimes you can get an idea via userinfo, but that is often quite cryptic too. Of course, this feature, when it works, is great! As far as I know, only Maple has this implemented at all, so that it is only partly true is still infinitely better than the competition.
The part where Find/Replace does not look into input lines seems like an outright bug - you should send it directly to support@maplesoft.com so it gets properly filed. There are (at least) 2 solutions to your dilemma: an easy one, and a crazy fun hack. The easy one: write a "generator" for all your filename strings, and pass the generator in to a procedure which does all the actual ExportVector. Yes, this means some programming, and 2D math input is out for that. The crazy fun hack: use the DocumentTools and/or the Worksheet packages to write a Maple program which goes in and modifies your document (by essentially programming that find-and-replace you want). The first solution is all about the power of higher-order functions, which Maple excels at. And the second is just fun.
That is one of dozens of methods built-in to pdsolve.
Are you using Classic? I have only encountered that bug there. It is really annoying, especially since it wasn't there in Maple 9, it is only 9.5 and greater that suffer from this. And of course Maplesoft has stopped fixing (most) bugs in Classic, so even though it is a much more efficient interface for getting work done, it is slowly bit-rotting away.
It's a bug in Maple - let's hope that bugs reported on mapleprimes actually make their way to the developers (I have asked this before, but did not get an answer).
For just one variable, do map(x->`if`(x::linear(a[1]), subs(a[1]=a[1]^2,x), x), Poly) For many variables, this is a little trickier, but here is an example foldl((y,v) -> map(x->`if`(x::linear(lhs(v)), subs(lhs(v)=rhs(v),x), x), y), Poly, a[1]=a[1]^2, a[2]=a[2]^7);
This should get you started. First, the indefinite integral (for each n) can be computed, by Maple. But if you look at the results, you might find it hard to figure out "the pattern". I will post something to my blog next showing how to get it. But basically what Maple does is to transform sin(x)^n into its Fourier basis, ie in terms of sin(a*x) and cos(b*x). Of course, this only works because it can be expressed finitely in the Fourier basis. And from there, the result is essentially pattern matching, as the terms are of the form sin(a*x)*x^k, cos(a*x)*x^k or simply x^k for both negative and positive values of k. A simple limit computation finishes the task. There are a half dozen other ways to attack this problem.
First, what do you think Maple does when it encounters the assignment ggg[i,1] := i when ggg does not exist? Well, Maple tries to help you out and creates a table (with name ggg). Then the assignment can happen with no difficulty. So far so good, right? Well, not quite. See tables suffer from LNED which essentially means that they print as a name rather than as their contents. This is a basic design decision made in 1980 about Maple, so it is rather deeply ingrained! One good solution, as pointed out above, is to use an Array instead. The list solution which reads ggg:=[ ]; for i to 5 do ggg:=[op(ggg),[i,2*i]]; end do; is actually one of those Maple anti-patterns that should be wiped from your mind. The last solution (with seq) is definitely Maple-like.
This is a bit surprising, since Maplesoft goes on and on about how backwards compatible every release is! Anyways, what you want now is ContextMenu( [x^2-3=0], true); How did I find that out? I read the code! Magic follows: interface(verboseproc=3): kernelopts(opaquemodules=false): print(ContextMenu:-ModuleApply);
It seems to be a little known Maple command [it does not appear often in the books, and is not linked to much in the help either]. But it does exactly what you want.
First 20 21 22 23 Page 22 of 23