Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4590

Re: Better use of PolynomialReduce?

From Andrzej Kozlowski <akoz@mimuw.edu.pl>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Better use of PolynomialReduce?
Date 2011-08-26 09:32 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j37p87$4l8$1@smc.vnet.net> (permalink)
References <201108251106.HAA24956@smc.vnet.net>

Show all headers | View raw


On 25 Aug 2011, at 13:06, Irretrev Unable wrote:

>
>
> I've been using
>
>
> scPhiDecomp[expr_]:= PolynomialReduce[expr, {x^2-y^2,2 x y}, {x,y}]
>
> which works great on
>
> scPhiDecomp[a x^2 + 2c x y -a y^2]
>>> {{a,c},0}
>
> but doesn't do what I want on
>
> scPhiDecomp[y (a x^2 + 2c x y -a y^2)]
>>> {{0,(a x)/2+c y},-a y^3}
>
> How do I make scPhiDecomp produce
> {{a y, c y}, 0}
> on the second expression?
>
> Thanks,
> Keith
>

You need to use PolynomialReduce with a custom MonomialOrder, specified by means of a weight matrix. In this case, for example,

PolynomialReduce[
 a x^2 y - a y^3 + 2 c x y^2, {x^2 - y^2, 2 x y}, {x, y},
 MonomialOrder -> {{1, 3}, {1, 2}}]

{{a y,c y},0}

Andrzej Kozlowski

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Better use of PolynomialReduce? Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-08-26 09:32 +0000

csiph-web