Re: Better use of PolynomialReduce?
- To: mathgroup at smc.vnet.net
- Subject: [mg121082] Re: Better use of PolynomialReduce?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Fri, 26 Aug 2011 05:25:21 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201108251106.HAA24956@smc.vnet.net>
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
- References:
- Better use of PolynomialReduce?
- From: Irretrev Unable <irdeva_ble@yahoo.com>
- Better use of PolynomialReduce?