roman_pearce

Mr. Roman Pearce

1673 Reputation

19 Badges

18 years, 2 days
CECM/SFU
Research Associate
Abbotsford, British Columbia, Canada

I am a research associate at Simon Fraser University and a member of the Computer Algebra Group at the CECM.

MaplePrimes Activity


These are answers submitted by roman_pearce

Try the following, it works for me.  I make a separate integration procedure called myint which sets the value of Digits.  Then map that onto the integrands.  Also, I use capital Int to force numerical integration, lower case int will try symbolic integration first.  

Integrands := [seq(sin((1/10)*k*x), k=1..4)];
myint := proc(expr, range) global Digits;
Digits := 30:
evalf(Int(expr,range));
end proc:
Grid[Map](myint, Integrands, x = 0 .. Pi);

I think the problem is that Digits is not transmitted to the Grid nodes. There's probably a way to do that, but this was easier.

This is a bug.  You can load this code to replace EliminationIdeal with a patched version to fix it.

unprotect(PolynomialIdeals:-EliminationIdeal):
PolynomialIdeals:-EliminationIdeal := proc(J::PolynomialIdeal, X::set(name), $)
option cache;
uses PolynomialIdeals:
local X2, U, G, tord, i;
 X2, U := selectremove(member, IdealInfo:-Variables(J) intersect 
indets(IdealInfo:-Generators(J), 'name'), X);
if nops(U) = 0 then
return J
elif nops(X2) = 0 then
return PolynomialIdeal([], 'characteristic'=IdealInfo:-Characteristic(J));
elif nops(X2) = 1 then
G := UnivariatePolynomial(op(X2), J);
return PolynomialIdeal(G, 'characteristic'=IdealInfo:-Characteristic(J),
'variables'=X2, 'known_groebner_bases'=['plex'(op(X2))=[G], 'tdeg'(op(X2))=[G]])
end if;
tord := select(Groebner:-ShortMonomialOrders:-IsElimOrder, 
IdealInfo:-KnownGroebnerBases(J, X2 union U), X2);
if nops(tord) > 0 then
G := [seq(Groebner:-ShortMonomialOrders:-ProjectOrder(i, X2) =
remove(has, Groebner:-Basis(J, i, ':-normalize'=false), U), i=tord)];
return PolynomialIdeal(rhs(G[1]), 'characteristic'=IdealInfo:-Characteristic(J),
'variables'=X2, 'known_groebner_bases'=G)
end if;
tord := 'lexdeg'(selectremove(member, [Groebner:-SuggestVariableOrder(J, X2 union U)], U));
G := remove(has, Groebner:-Basis(J, tord, ':-normalize'=false), U);
PolynomialIdeal(G, 'characteristic'=IdealInfo:-Characteristic(J),'variables'=X2, 
'known_groebner_bases'=[Groebner:-ShortMonomialOrders:-ProjectOrder(tord, X2)=G])
end proc;

 

There is an example of how to compute with modules on the help page:

http://www.maplesoft.com/support/help/maple/view.aspx?path=Groebner%2fBasis_details

It would be nice if Maple would accept a list of lists as a module.  Maybe we could add that, along with TOP and POT.

Operating systems typically reserve at least 1GB of address space for themselves (Windows reserves 2GB by default), so you can't actually use 4GB of memory in a 32-bit program.

You're not supposed to divide by zero :)  In the DoExist function you could return NULL instead of zero, and the zero elements will be eliminated.  You can also use the map command to apply DoExist to every element of a list.

Maple has had Groebner bases for modules for a long time, but it doesn't use vectors directly.  There is an example on the help page ?Groebner,Basis_details

http://www.maplesoft.com/support/help/Maple/view.aspx?path=Groebner/Basis_details

Does this make sense?

T := table([e = w, c = z, d = w, a = w, b = y]);
S := table():
for i in [op(op(eval(T)))] do
l,r := op(i):
if type(S[r],set) then S[r] := S[r] union {l}: else S[r] := {l}: end if:
end do:
eval(S);
 

When you get a lot of code like this, it generally makes sense to put it into its own text file.  It makes the code much easier to maintain and keeps it separate from any data.  It is also less likely to get corrupted.  If you go this route, you can have one big file a main file that defines the module and $include separate files that define the procedures.

If you want to keep the code in a worksheet, you can define the module in one execution group and assign to each export in another execution group.  For example:

test := module() export foo;
end module:
test:-foo := proc(a) b; end proc;

Mathematica is using a proper antialiasing algorithm to draw the plot.  I don't know what Maple is doing but it's poor and broken.  Simply zoom in and look at the jumps.  Those jumps should not be there.

Also of note, Mathematica is using subpixel rendering for fonts.

Use the readdata command, it's great.

For a two column file where the first column is a word and the second is a float:

F := readdata("file.txt", [string, float]);

Or you can specify the number of columns:

F := readdata("file.txt", float, 5);

For irregular data, I usually specify "string" with a large number of columns and write a Maple program to filter it.

Run this first:

unprotect(`evala/Factors/efactor`);
`evala/Factors/efactor` := proc(f1,vars,rofs,alginds)
  if nops(alginds) > 0 then
    `evala/Factors/multiff`(f1,vars,alginds,rofs,{})
  else
    `evala/Factors/multinf`(f1,vars,rofs,{})
  end if:
end proc:

Can you post the Matrix?  I want to see if Maple 17 can do it.

I think it's not so easy to answer this question without trying it, but I'd be very surprised if it did not work.  My understanding is that the Intel 4000 Linux drivers may not support OpenGL 1.5.  I don't think Maple uses OpenGL 1.5.  Can anyone confirm?

Do your homework

For exact division, Maple's divide command uses this algorithm:

http://www.cecm.sfu.ca/~rpearcea/sdmp/sdmp_div.pdf

For division with remainder (rem and quo) Maple uses the division algorithm for univariate polynomials, where the coefficients are polynomials in the remaining variables.  You can see the code:

interface(verboseproc=3): eval(sprem);

For reference, try "Algorithms for Computer Algebra" by Geddes, Czapor, and Labahn.

1 2 3 4 5 6 7 Last Page 2 of 19