In a concurrent thread I posted the following simplification procedure

  Tryhard:= proc(expr)
    global E_in_Tryhard;
    subs(pow= `^`,
      codegen[optimize](subs(E_in_Tryhard= expr, ()-> E_in_Tryhard), tryhard))()
  end proc;

and now put into an extra blog post, as it might be helpful for others. Note, that this does not work on all constructs in Maple and certainly the package is a bit dated.

And as it is part of something aiming code generation (which of course would not allow all Maple terms as input) it may have limitations also based on that. For example one should not use it on 'int', 'diff' or 'limit' directly, but has to substitute those by their inert forms. It may be a good complementary routine to the powerfull 'simplify/size'. The above is not my work at all, I would adress it to Carl Devore and is taken from an old discussion between him and Robert Israel at the usenet. Which is not easy to find, even the Big Brother gives only single posts: groups.google.de/group/ucsc.software.maple/browse_frm/thread/d26d120e26aea255/ Hope that it is useful and of interest.

Download 102_SimplifyTryhard.mws
View file details

Please Wait...