Collect symbolic coeffecients of biquadratic
- To: mathgroup at smc.vnet.net
- Subject: [mg42771] Collect symbolic coeffecients of biquadratic
- From: gauer at ras.sk.ca
- Date: Fri, 25 Jul 2003 05:08:20 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Here's the problem: Collect[ReplaceAll[(a (x^2))+2(h x y)+(b (y^2))+2(f y)+2(g x)+c-((x-v)^2)+(y-w)^2)-((u^2/(l^2 + m^2)) (l x + m y + n)^2)), {v-> Coeffecients[a, h, b, f, g, c], w-> Coeffecients[a, h, b, f, g, c]}],{x y, (x^2), (y^2), x, y, 1}, Simplify] (** note that all of the six coeffecients are constants with respect to x, y, and I don't care whether you think of them (the six variables) together as being just real, and just complex, and just quaternions, in separate cases. However, this is not to say that v, w do not point to complex numerical values sometimes, because in fact, they do (In an expanded form, one can think of (Coeffecients[a, h, b, f, g, c])[x, y]. <-complex-> <------any-------> <----potential confusion-----> <------some function of [x,y]--------> So, there are special functions that take complexes of reals to a subset called reals, and others that can take to complexes. Likewise, complexes of complexes can take to reals or complexes. And, complexes of quaternions may take to all three, as subsets, depending on the function. And I don't care which way you consider looking at it, since the operations are algebraic and not numeric (until after evaluated). So, potential confusion is not really an issue here (think Im[Coeffecients]=/=0). The question is how to assign a collector to pick out the coeffecients of (x^2, x y, y^2, x, y, constant (in this case, assign constant:=1) out as a list, simplified and properly bracketed (also, the function would preferably hold my collection of the distribution of parentheses whenever possible, and the ordering of coeffecients (so, it would leave the expanded form of the discriminant alone (Det[{{a, h, g}, {h, b, f}, {g, f, c}}] in the form that you can see above, and, with respect to operators such as +, -, *, but more importantly, Sqrt[] (ie don't flip into 1/Sqrt[] default Mathematica format at all) ) as well as possible). (Once I can write the value as a six-element list, I can operate independently on it, but would also like to hold the form as much as possible.) This form (above) seems to almost work, and removing the 1 (one, not ell) produces a slightly different gathering (I think, anyways), and I also don't seem to completely trust it, as although it returned an (x y) coeffecient for a particular function, I don't think it paired it into a smallest 6-list version of what I was looking for (it returned 2hxy as the coeffecient of xy, for example, which was incredibly lucky, or else forgot about grouping the other coeffecients of xy and operate on them together, or else, paired up the x,y's as part of what it thought were coeffecients, and went out to collect x's from terms that already have a y (or another x) associated with it). I don't want to associate this with the series operator, as this is only a finite series, and also, there is good news in knowing that all the coeffecients will be of the form of one of the six above (ie so no x^(1/2) y^(3/2) coeffecients appear - all exponents of x, y are integers between 0 and 2 (for now, the upper limit may change later, but will still only be integer type)). Any help would be appreciated. Use is with version 3. **) -- Kai G. Gauer, B. Sc. (Mathematics) -- Alumnus, Luther College, University of Regina Royal Astronomy Society of Canada Regina Centre www.rasc.ca www.reginachessclub.com www.ras.sk.ca -- Regina Cathedral Centre Chess Club --