I wish to use Maple to multilinearize polynomials. For example, given $xy^2z^4+x^3$ as input, I want $xyz+x$ as output. Is there a specific command for this?
2026-03-27 10:44:16.1774608256
On
Efficient way to multilinearize in Maple
57 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
1
On
If you simply want to eliminate the powers, I suppose you could do this with a regular expression. In Maple this is done with the StringTools package.
with(StringTools):
have := x*y^2*z^4+x^3; ## Input
have_string := convert(have,string); ## Make it a string
want_string := RegSubs("\\^[0-9]" = "",have_string); ## Remove "raised to number"
want := parse(want_string); ## Back to equation
The very best way to do this in Maple is probably the
evalindetscommand which lets you apply a transformation to type-selected subexpressions:The
opcommand takes the operands of an expression, the first operand of an expression likex^nis the base of the power:x.So the above code walks the expression tree and replaces every
x^nterm withx.