1 | initial version |

It is always possible: first factorize your polynomial in a algebraically closed field and then group the monomials two by two. Here is how to deal with Sage `Factorization`

objects (it is a question about Sage right ?):

```
sage: R.<x> = QQbar[]
sage: P = x^6 - 12*x^5 + 53*x^4 - 106*x^3 + 94*x^2 - 30*x + 2
sage: P.parent()
Univariate Polynomial Ring in x over Algebraic Field
sage: f = P.factor()
sage: f
(x - 4.467598964866742?) * (x - 3.188264366408823?) * (x - 2.386709362961476?) * (x - 1.395662139195394?) * (x - 0.4725664086233007?) * (x - 0.0891987579442645?)
sage: type(f)
<class 'sage.structure.factorization.Factorization'>
sage: Factorization? # this will provide some documentations
sage: f[0]
(x - 4.467598964866742?, 1)
sage: f[0][0]
x - 4.467598964866742?
sage: f[1][0]
x - 3.188264366408823?
sage: d = P.degree()
sage: d
6
sage: Factorization([(f[d/2][0]*f[d/2+1][0], 1) for i in range(d/2)], simplify=False)
(x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?)
```

But the previous factorization is somewhat artificial, since the factors are arbitrarilly paired and do not reflect some algebraic structure.

Perhaps, you want to find an intermediate field betweeb $\mathbb Q$ and $\mathbb C` such that the factorization with respect to that field has only degree-2 factors ?

I am not sure, is this homework ?

2 | No.2 Revision |

It is always possible: first factorize your polynomial in a algebraically closed field and then group the monomials two by two. Here is how to deal with Sage `Factorization`

objects (it is a question about Sage right ?):

```
sage: R.<x> = QQbar[]
sage: P = x^6 - 12*x^5 + 53*x^4 - 106*x^3 + 94*x^2 - 30*x + 2
sage: P.parent()
Univariate Polynomial Ring in x over Algebraic Field
sage: f = P.factor()
sage: f
(x - 4.467598964866742?) * (x - 3.188264366408823?) * (x - 2.386709362961476?) * (x - 1.395662139195394?) * (x - 0.4725664086233007?) * (x - 0.0891987579442645?)
sage: type(f)
<class 'sage.structure.factorization.Factorization'>
sage: Factorization? # this will provide some documentations
sage: f[0]
(x - 4.467598964866742?, 1)
sage: f[0][0]
x - 4.467598964866742?
sage: f[1][0]
x - 3.188264366408823?
sage: d = P.degree()
sage: d
6
sage: Factorization([(f[d/2][0]*f[d/2+1][0], 1) for i in range(d/2)], simplify=False)
(x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?)
```

But the previous factorization is somewhat artificial, since the factors are arbitrarilly paired and do not reflect some algebraic structure.

Perhaps, you want to find an intermediate field betweeb ~~$\mathbb Q$ ~~$\mathbb{Q}$ and ~~$\mathbb C` ~~$\mathbb{C}` such that the factorization with respect to that field has only degree-2 factors ?

I am not sure, is this homework ?

3 | No.3 Revision |

It is always possible: first factorize your polynomial in a algebraically closed field and then group the monomials two by two. Here is how to deal with Sage `Factorization`

objects (it is a question about Sage right ?):

```
sage: R.<x> = QQbar[]
sage: P = x^6 - 12*x^5 + 53*x^4 - 106*x^3 + 94*x^2 - 30*x + 2
sage: P.parent()
Univariate Polynomial Ring in x over Algebraic Field
sage: f = P.factor()
sage: f
(x - 4.467598964866742?) * (x - 3.188264366408823?) * (x - 2.386709362961476?) * (x - 1.395662139195394?) * (x - 0.4725664086233007?) * (x - 0.0891987579442645?)
sage: type(f)
<class 'sage.structure.factorization.Factorization'>
sage: Factorization? # this will provide some documentations
sage: f[0]
(x - 4.467598964866742?, 1)
sage: f[0][0]
x - 4.467598964866742?
sage: f[1][0]
x - 3.188264366408823?
sage: d = P.degree()
sage: d
6
sage: Factorization([(f[d/2][0]*f[d/2+1][0], 1) for i in range(d/2)], simplify=False)
(x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?)
```

But the previous factorization is somewhat artificial, since the factors are arbitrarilly paired and do not reflect some algebraic structure.

Perhaps, you want to find an intermediate field betweeb $\mathbb{Q}$ and ~~$\mathbb{C}` ~~$\mathbb{C}$ such that the factorization with respect to that field has only degree-2 factors ?

I am not sure, is this homework ?

4 | No.4 Revision |

`Factorization`

objects (it is a question about Sage right ?):

```
sage: R.<x> = QQbar[]
sage: P = x^6 - 12*x^5 + 53*x^4 - 106*x^3 + 94*x^2 - 30*x + 2
sage: P.parent()
Univariate Polynomial Ring in x over Algebraic Field
sage: f = P.factor()
sage: f
(x - 4.467598964866742?) * (x - 3.188264366408823?) * (x - 2.386709362961476?) * (x - 1.395662139195394?) * (x - 0.4725664086233007?) * (x - 0.0891987579442645?)
sage: type(f)
<class 'sage.structure.factorization.Factorization'>
sage: Factorization? # this will provide some documentations
sage: f[0]
(x - 4.467598964866742?, 1)
sage: f[0][0]
x - 4.467598964866742?
sage: f[1][0]
x - 3.188264366408823?
sage: d = P.degree()
sage: d
6
```

Since each factor has multiplicity 1, we can do:

```
sage: Factorization([(f[d/2][0]*f[d/2+1][0], 1) for i in range(d/2)], simplify=False)
(x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?)
```

Perhaps, you want to find an intermediate field betweeb $\mathbb{Q}$ and $\mathbb{C}$ such that the factorization with respect to that field has only degree-2 factors ?

I am not sure, is this homework ?

5 | No.5 Revision |

`Factorization`

objects (it is a question about Sage right ?):

```
sage: R.<x> = QQbar[]
sage: P = x^6 - 12*x^5 + 53*x^4 - 106*x^3 + 94*x^2 - 30*x + 2
sage: P.parent()
Univariate Polynomial Ring in x over Algebraic Field
sage: f = P.factor()
sage: f
(x - 4.467598964866742?) * (x - 3.188264366408823?) * (x - 2.386709362961476?) * (x - 1.395662139195394?) * (x - 0.4725664086233007?) * (x - 0.0891987579442645?)
sage: type(f)
<class 'sage.structure.factorization.Factorization'>
sage: Factorization? # this will provide some documentations
sage: f[0]
(x - 4.467598964866742?, 1)
sage: f[0][0]
x - 4.467598964866742?
sage: f[1][0]
x - 3.188264366408823?
sage: d = P.degree()
sage: d
6
```

Since each factor has multiplicity 1, we can do:

```
sage: Factorization([(f[d/2][0]*f[d/2+1][0], 1) for i in range(d/2)], simplify=False)
(x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?)
```

If you had some multiplicity greater than 1, you could do something like:

```
sage: def demultiply(L):
....: M = []
....: for i,j in L:
....: M += [i]*j
....: return M
sage: demultiply([(1,2),('a',3),(4,1)])
[1, 1, 'a', 'a', 'a', 4]
```

Perhaps, you want to find an intermediate field betweeb $\mathbb{Q}$ and $\mathbb{C}$ such that the factorization with respect to that field has only degree-2 factors ?

I am not sure, is this homework ?

6 | No.6 Revision |

`Factorization`

objects (it is a question about Sage right ?):

```
sage: R.<x> = QQbar[]
sage: P = x^6 - 12*x^5 + 53*x^4 - 106*x^3 + 94*x^2 - 30*x + 2
sage: P.parent()
Univariate Polynomial Ring in x over Algebraic Field
sage: f = P.factor()
sage: f
(x - 4.467598964866742?) * (x - 3.188264366408823?) * (x - 2.386709362961476?) * (x - 1.395662139195394?) * (x - 0.4725664086233007?) * (x - 0.0891987579442645?)
sage: type(f)
<class 'sage.structure.factorization.Factorization'>
sage: Factorization? # this will provide some documentations
sage: f[0]
(x - 4.467598964866742?, 1)
sage: f[0][0]
x - 4.467598964866742?
sage: f[1][0]
x - 3.188264366408823?
sage: d = P.degree()
sage: d
6
```

Since each factor has multiplicity 1, we can do:

```
sage: Factorization([(f[d/2][0]*f[d/2+1][0], 1) for i in range(d/2)], simplify=False)
(x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?) * (x^2 - 1.8682285478?*x + 0.6595430448?)
```

If you had some multiplicity greater than 1, you could do something like:

```
sage: def demultiply(L):
....: M = []
....: for i,j in L:
....: M += [i]*j
....: return M
sage: demultiply([(1,2),('a',3),(4,1)])
[1, 1, 'a', 'a', 'a', 4]
```

But the previous factorization is somewhat artificial, since the factors are arbitrarilly paired and do not reflect ~~some ~~a particular algebraic structure.

Perhaps, you want to find an intermediate field betweeb $\mathbb{Q}$ and $\mathbb{C}$ such that the factorization with respect to that field has only degree-2 factors ?

I am not sure, is this homework ?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.