John May

Dr. John May

2896 Reputation

18 Badges

17 years, 159 days
Maplesoft
Pasadena, California, United States

Social Networks and Content at Maplesoft.com

Maple Application Center
I have been a part of the Mathematical Software Group at Maplesoft since 2007. I have a Ph.D in Mathematics from North Carolina State University as well as Masters and Bachelors degrees from the University of Oregon. I have been working on research in computational mathematics since 1997. I currently work on symbolic solvers and visualization as well as other subsystems of Maple.

MaplePrimes Activity


These are replies submitted by John May

Explict forms are often not very readable.  That is one of the reasons the RootOf notation is used.

John

Currently, a large number of functions in the Maple library use solve and expect it to not respect assumptions on the independant variables and in fact break if solve is made to do so.  For that reason, the UseAssumptions option was given the default of "false" when we introduced it in Maple 13.  In a future release, after there is time to modify how all the other code calls solve, I expect that the default will be changed to true.

John May
Math Software
Maplesoft

Currently, a large number of functions in the Maple library use solve and expect it to not respect assumptions on the independant variables and in fact break if solve is made to do so.  For that reason, the UseAssumptions option was given the default of "false" when we introduced it in Maple 13.  In a future release, after there is time to modify how all the other code calls solve, I expect that the default will be changed to true.

John May
Math Software
Maplesoft

 Which is fine unless you want your .mapleinit file to work in older versions of maple where IsWorksheetInterface() returns unevaluated.

John

Since I use many different versions of Maple all day, I extended the idea of a comment prompt so that I have version information at a glance.  I have the following proc in my .mapleinit

setprompt := proc()
    local versionstring;

    if not IsWorksheetInterface()=true then

        versionstring := StringTools:-Split(ssystem("echo $MAPLE")[2][1..-2], "/")[-1];
        if length(versionstring) > 5 and versionstring[2..5] = "aple" then
            versionstring := versionstring[6..-1];
        end if;

        if not kernelopts(opaquemodules) then
            versionstring := cat(versionstring, "O");
        end if;

        interface(prompt=cat("(*",versionstring,"*)")):
    end if:

end proc;

So that my prompt in Maple 13 looks like (*13*), or (*13O*) if I have modules set to opaque.  It does rely on your different versions of maple being installed in directories named ../mapleXX, so it is probably unix specific.

If one were committed to not using the directory name, you could translate the output of version() into a release number using a lookup table.

John

solve does not use any assumptions on the variables for which you are solving so the first three work just as well without the assuming.  This is because solve restricts itself to real values of the variables when it is solving inequalities (< or <= but not <>).

John

solve does not use any assumptions on the variables for which you are solving so the first three work just as well without the assuming.  This is because solve restricts itself to real values of the variables when it is solving inequalities (< or <= but not <>).

John

The Maple specific %a can also be used here:

printf("No Roots Between The Interval %a\n", [a,b]);

John

This is a slightly wierd thing to being trying to solve: the second two equations are already solved:

{c = RootOf(_Z^2+_Z+1), b = RootOf(_Z^3-RootOf(_Z^2+_Z+1))}

So the first equation is just confusing solve.
 

For what it is worth, in general, when solve has a RootOf expression which contains a variable it needs to solve for, it adds an extra variable and equation:

b = RootOf(_Z^3+c^2+1)  becomes  {b = _Temp1,  _Temp1^3+c^2+1 = 0}

so you are better off just giving the equation as b^3+c^2+1=0 to to begin with, when possible.

 

John

solve is returning NULL, indicating that it found no solutions.  Which makes sense.  Written as a fraction, your input is  560 / ( 243*(x+1)^(13/3) ).  Since the numerator is constant, the expression can never be 0.

John

computing the exact value of the approximated integrand:

convert(x*sin(Pi*x)*sin(3.141592653*x),rational,exact);
int(% ,x=0..1);
evalf(evalf[Digits+3](%));

To do the whole thing with numerical methods:

> int(x*sin(Pi*x)*sin(3.141592653*x),x=0.0..1.0); # float range
                                 0.2500000000

> evalf(Int(x*sin(Pi*x)*sin(3.141592653*x),x=0..1)); # capital I
                                 0.2500000000

Pretty picture:

Ie:=int(x*sin(Pi*x)*sin((Pi-e)*x),x=0..1);
plot(Ie, e=0..10^(-6));

 

You need to apply coeff once for each "variable" (with frontend where necessary):

coeff( frontend(coeff, [t, sin(y),2]) ,x,1);

John

You need to apply coeff once for each "variable" (with frontend where necessary):

coeff( frontend(coeff, [t, sin(y),2]) ,x,1);

John

While working on my Ph.D and in research work afterwards I wrote and collaborated in writing a lot of prototype code in Maple for various numerical polynomial algorithms.  Keeping that code in plain text ".mpl" files made it easier to keep track of changes in a revision control system (or with "diff").

We also ran a lot of benchmarks on against various prototype and existing code.  For reliability of timings it is best to run each benchmark in a new maple session so we would put one benchmark example to a file and run them through the command line maple one at a time via a loop in a shell script

Most prototyping and benchmarking would start in the worksheet, but eventually it would move into text files when things got big, or it was time to start running lots of trials.

John

While working on my Ph.D and in research work afterwards I wrote and collaborated in writing a lot of prototype code in Maple for various numerical polynomial algorithms.  Keeping that code in plain text ".mpl" files made it easier to keep track of changes in a revision control system (or with "diff").

We also ran a lot of benchmarks on against various prototype and existing code.  For reliability of timings it is best to run each benchmark in a new maple session so we would put one benchmark example to a file and run them through the command line maple one at a time via a loop in a shell script

Most prototyping and benchmarking would start in the worksheet, but eventually it would move into text files when things got big, or it was time to start running lots of trials.

John

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