Canonical Polynomial Form w. resp. to certain Variables
- To: mathgroup at smc.vnet.net
- Subject: [mg34067] Canonical Polynomial Form w. resp. to certain Variables
- From: Detlef Mueller <dmueller at mathematik.uni-kassel.de>
- Date: Wed, 1 May 2002 08:00:40 -0400 (EDT)
- Organization: University of Kassel - Germany
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
I face the following Problem:
Given a polynomial, say (a + b + n + x)*n,
and a List of given Variables, say:
OreVariables={x,n}.
I want to have the same Polynomial in canonical
form as a Sum of Monomials in the given
Variables.
The desired Result is
(a+b) n + n x + n^2
where the given Variables are expanded and the
coefficients independent of this Variables are
collected as coefficients of the Monomials.
but
Collect[(a + b + n + x)*n, x_ /; MemberQ[OreVariables, x]]
yields
n^2 + n(a + b + x)
wich is "not expanded enough"
and
Expand[(a + b + n + x)*n, x_ /; MemberQ[OreVariables, x]]
yields
a n + b n + n^2 + n x
wich is "to expanded".
(To make Things worse, this is an Operation that will be used
often (and on big Polynomials) and hence is a bit
time-critical ...)
( The Goal is, do isolate the canonical Summands of an Expression, i.e.
Ex2Pol[(x+n+b)^3-(x-n+b)^3] ->
Poly[Summand[2 n^2],Summand[6 n x^2], Summand[12 b n x],Summand[6 b^2
n]])
Any Ideas?
Greetings,
Detlef