Factoring polynomials over extensions of the Rationals Explanation by examples\251Mike May, S.J., maymk@slu.edu, Saint Louis University.restart;In this worksheet, we will use examples to explore factorization of polynomials over extensions of the rationals.
<Text-field layout="Heading 3" style="_cstyle266"><Font bold="true" family="Times New Roman" foreground="[0,0,0]" size="12" underline="false">The basic factor command</Font></Text-field>We start by looking at the factor command. The simplest version of the command factors a polynomial over the rationals.factor(x^4 - 5*x^2 + 6);factor(x^6 + x^5 + x^4 + x^3 + x^2 + x + 1);This form of the command will also factor polynomials in several variables.factor(x^2-y^4);
In working with field theory, we often want to factor polynomials over an extension field of the rationals. Maple lets you specify the extension by specifying a list of radicals that the field must contain or by specifying a list of roots of irreducible polynomials that must have an irreducible factor in the field
<Text-field layout="Heading 3" style="_cstyle267"><Font bold="true" family="Times New Roman" foreground="[0,0,0]" size="12" underline="false">Extensions defined by ajoining radicals</Font></Text-field>The first extension fields we work with are obtained by ajoining square roots and cube roots to the rationals. It should be noted that a square root can be indicated in Maple with the sqrt command, or as a fractional power, or with the root or surd command.factor(x^2-3); factor(x^2-3, sqrt(3)); factor(x^2-3, 3^(1/2)); factor(x^2-3, root(3,2)); factor(x^2-3, surd(3,2));With the obvious modification, the last three methods can be used to designate other roots.factor(x^3-2); factor(x^3-2,(2)^(1/3)); factor(x^3-2,root(2,3)); factor(x^3-2,surd(2,3));It should be noted that Maple understands I to be the square root of -1;factor(x^4+1); factor(x^4 + 1, I); factor(x^4 + 1, (-1)^(1/2)); factor(x^4 + 1, sqrt(-1)); factor(x^4 + 1, root(-1,2));It should be noted that square roots of other negative numbers need to be handled with care. In particular the sqrt and root commands cannot be used since Maple treats such square roots as a term that needs to be simplified.factor(x^2 +2, sqrt(-2)); factor(x^2 +2, root(-2,2)); factor(x^2 +2, surd(-2,2)); factor(x^2 +2, (-2)^(1/2));Finally, it is worth noting that Maple will let you add a list of radicals in defining an extension field.factor(x^4 - 5*x^2 + 6); factor(x^4 - 5*x^2 + 6, {sqrt(2), sqrt(3)}); factor(x^4 - 5*x^2 + 6, [sqrt(2), sqrt(3)]); factor(x^4 - 5*x^2 + 6, [sqrt(2), sqrt(6)]); factor(x^2 - 6, [sqrt(2), sqrt(3)]); factor(x^2 - 6, [sqrt(2), sqrt(3), sqrt(6)]);
<Text-field layout="Heading 3261" style="Heading 3261">Extensions defined by ajoining roots of polynomials </Text-field>The other way to define an extension is to ajoin roots of specified polynomials with the RootOf command. From above, the square root of -3 is RootOf(x^2+3). The advantage of the RootOf command is that it gives a wider set of elements to add to an extension field.Consider now the cubic equation x^3 -1. Since 1 is a cube root of unity, this factors as a linear times a quadratic over the rationals.factor(x^3-1);Since the solutions of the quadratic factor are NiMvJSZhbHBoYUcqJiwmIiIiISIiLSUlc3FydEc2IywkIiIkRihGJ0YnIiIjRig= and NiMvJSViZXRhRyomLCYiIiIhIiItJSVzcXJ0RzYjLCQiIiRGKEYoRiciIiNGKA==, it is straightforward that the quadratic factors over the extension field generated by NiMtJSVzcXJ0RzYjLCQiIiQhIiI=.factor(x^3-1,(-3)^(1/2));We would prefer to factor this expression over the field obtained by adjoining either NiMlJmFscGhhRw== or NiMlJWJldGFH, one of the roots of the quadratic obtained by factoring NiMsJiokJSJ4RyIiJCIiIkYnISIi. Notice that Maple will complain if we try to add the expression NiMqJiwmIiIiISIiLSUlc3FydEc2IywkIiIkRiZGJUYlIiIjRiY=. Once again the solution is to use the RootOf construction.factor(x^3 - 1, (-1 + sqrt(-3))/2); factor(x^3 - 1, RootOf(x^2 + x + 1));As with radicals, we can add in a list of RootOf expressions to the field we are factoring over.factor(x^12 - 1); factor(x^12 - 1, RootOf(x^2 + 1)); factor(x^12 - 1, RootOf(x^2 + x + 1)); factor(x^12 - 1, {RootOf(x^2 + x + 1), RootOf(x^2 + 1)});It is worth noting that Maple didn't tell us which root of the polynomial was being chosen for the RootOf construction. You will recall that algebraically, the roots of an irreducible polynomial are indistinguishable. Given any two roots of an irreducible polynomial, there is an isomorphism of the splitting field taking the first root to the second. If we use RootOf on a reducible equation Maple will complain when we try to use the root in factoring.factor(x^4 - 5*x^2 + 6); beta := RootOf(x^4 - 5*x^2 + 6); factor(x^4 - 5*x^2 + 6, beta);Aliases - getting pretty outputNotice that all of the RootOf(...) stuff looks ugly. Maple lets us rename an expression with the alias command. This is different from an assign statement. Where "x:=y" can be understood as assigning the value "y" to the variable "x", the statement "alias(x=y)" makes "x" an abbreviation for the expression "y". The output of the alias command is a list of currently aliases. alias(omega = RootOf(x^2 + x + 1)); factor(x^3-1, omega);We can use the same technique for other primitive roots of unity.alias (zeta[4]=RootOf(x^2+ 1));alias (zeta[6]=RootOf(x^2 - x + 1), zeta[12]=RootOf(x^4 - x^2 +1));factor(x^12 - 1, zeta[12]);This lets us see how a polynomial factors in different extension fieldsfactor(x^12 - 1); factor(x^12 - 1, omega); factor(x^12 - 1, zeta[4]); factor(x^12 - 1, zeta[6]); factor(x^12 - 1, {omega, zeta[4]}); factor(x^12 - 1, zeta[12]);
<Text-field layout="Heading 3" style="_cstyle269"><Font bold="true" family="Times New Roman" foreground="[0,0,0]" size="12" underline="false">A caution on mixing methods</Font></Text-field>It is worth noting that while we can add a list of radicals or a list of RootOf expressions, Maple will complain if we try to mix the methodsfactor(x^4-6); factor(x^4-6, {sqrt(2), sqrt(3)}); factor(x^4-6, {RootOf(x^2-2), RootOf(x^2-3)}); factor(x^4-6, {RootOf(x^2-2), sqrt(3)}); In particular, recall that I is understood as a radical.factor(x^4-4); factor(x^4-4, {sqrt(2), I}); factor(x^4-4, {RootOf(x^2-2), I});
<Text-field layout="Heading 3261" style="Heading 3261">Splitting polynomials with the split command</Text-field>If one approach is to see how a polynomial factors in a specified extension of the rationals, the other obvious approach is to ask how a polynomial splits in some extension of the rationals. That is done with the split command from the polytools package. The command only allows polynomials in one variable, which must be specified.)polytools[split](x^4 + x^2 - 6, x);This command also allows you to give as a third input parameter, a name which will be used to store the extension needed to split the polynomials. The extension field can be used by the factor command. This lets you determine how one polynomial factors in the splitting field of another polynomial.polytools[split](x^4 + x^2 - 6, x, 'ExtField'); print(ExtField);factor(x^4 + 3*x^2 -10); factor(x^4 + 3*x^2 -10, ExtField);
<Text-field layout="Heading 3261" style="Heading 3261">Factoring polynomials over the reals and the complexes</Text-field>Everything we have been discussing so far looks at finding exact factors over an algebraic extension of the rationals. For completeness it is worth noting that Maple also allows you to specify that you want to factor over either the reals or the complexes. Such a choice obviously leads to floating point approximations.factor(x^9 + x + 3); factor(x^9 + x + 3, real); factor(x^9 + x + 3, complex);