Recent changes to 1037: factor involving sqrt(2) fails, but gfactor works (?!)https://sourceforge.net/p/maxima/bugs/1037/2006-12-04T23:36:04Zfactor involving sqrt(2) fails, but gfactor works (?!)2006-12-04T23:36:04Z2006-12-04T23:36:04ZStavros Macrakishttps://sourceforge.net/u/macrakis/https://sourceforge.net9bfde32e891a22f3b8d49395fb03ec2400298ee3fex: sqrt\(2\)\*n - n + sqrt\(2\) - 2 $
Neither one of:
factor\(fex\)
factor\(fex\),algebraic:true
factors fex.
but both of:
gfactor\(fex\)
factor\(fex,q^3-7\) // Any polynom will do
do factor correctly into
\(sqrt\(2\)-1\)\*\(n-sqrt\(2\)\)
This behavior difference is not documented, and is confusing.
Of course, the semantics are not entirely clear, and anyway the current code doesn't work for all cases you'd like, e.g.
gfactor\(expand\(
\(x-sqrt\(2\)+sqrt\(3\)\)\*\(x+sqrt\(2\)\*3+sqrt\(3\)\)
\)\)
doesn't factor, though
factor\(expand\( // not even gfactor
\(x + 7 sqrt\(2\)\) \(x - sqrt\(3\)\)
\)\)
does.
-s