Re: Better use of PolynomialReduce?
- To: mathgroup at smc.vnet.net
- Subject: [mg121066] Re: Better use of PolynomialReduce?
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Fri, 26 Aug 2011 05:22:27 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201108251106.HAA24956@smc.vnet.net>
On 08/25/2011 06:06 AM, 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
First create a Groebner basis from your reducing set.
In[8]:= scPhiDecomp[expr_] :=
PolynomialReduce[expr,
GroebnerBasis[{x^2 - y^2, 2 x y}, {x, y}], {x, y}]
In[9]:= scPhiDecomp[y (a x^2 + 2 c x y - a y^2)]
Out[9]= {{-a, a x + 2 c y, 0}, 0}
If you really need to see it reduced to zero in terms of your original
set {x^2 - y^2, 2 x y}, that can be done. Will take a bit of work
though. Requires a conversion matrix to take you from the original set
to the Groebner basis. See:
http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/364ef1e62ad099d6#
Daniel lichtblau
Wolfram Research
- References:
- Better use of PolynomialReduce?
- From: Irretrev Unable <irdeva_ble@yahoo.com>
- Better use of PolynomialReduce?