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


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

Re: Better use of PolynomialReduce?

Started byAndrzej Kozlowski <akoz@mimuw.edu.pl>
First post2011-08-26 09:32 +0000
Last post2011-08-26 09:32 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#4590 — Re: Better use of PolynomialReduce?

FromAndrzej Kozlowski <akoz@mimuw.edu.pl>
Date2011-08-26 09:32 +0000
SubjectRe: Better use of PolynomialReduce?
Message-ID<j37p87$4l8$1@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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web