Re: a fault in the Factor[] function for polynomials?
- To: mathgroup at smc.vnet.net
- Subject: [mg70439] Re: a fault in the Factor[] function for polynomials?
- From: dimmechan at yahoo.com
- Date: Mon, 16 Oct 2006 02:35:40 -0400 (EDT)
- References: <egse02$cpp$1@smc.vnet.net>
No fault at all (I have converted everything to InputForm). Options[Factor] {Extension -> None, GaussianIntegers -> False, Modulus -> 0, Trig -> False} Information[Extension] "Extension is an option for Factor, PolynomialGCD and related functions which specifies what algebraic numbers to allow in the coefficients of resulting polynomials." Attributes[Extension] = {Protected} ex = Expand[(x^4 + 2*Sqrt[3]*x^2 - 1)*(x^4 - 2*Sqrt[3]*x^2 - 1)] 1 - 14*x^4 + x^8 Factor[ex] (1 - 4*x^2 + x^4)*(1 + 4*x^2 + x^4) With the default setting Extension->None, Factor[poly] will treat algebraic number coefficients in poly like independent variables. But fex = Factor[ex, Extension -> Sqrt[3]] (-2 + Sqrt[3] - x^2)*(2 + Sqrt[3] - x^2)*(-2 + Sqrt[3] + x^2)*(2 + Sqrt[3] + x^2) With a little effort you can return to ex fex /. (a_)*(b_)*(c_)*(d_) :> Simplify[a*b]*Simplify[c*d] (-1 - 2*Sqrt[3]*x^2 + x^4)*(-1 + 2*Sqrt[3]*x^2 + x^4) Regards Dimitris