9.1.10 Factoring
The factor and
cfactor commands factor expressions
over their coefficient fields or extensions of their fields. (See also
Section 11.1.18.)
Examples
Factor x4−1 over ℚ.
|
| ⎛
⎝ | x−1 | ⎞
⎠ | ⎛
⎝ | x+1 | ⎞
⎠ | ⎛
⎝ | x2+1 | ⎞
⎠ |
| | | | | | | | | | |
|
The coefficients are rationals, hence the factors are polynomials with
rationals coefficients.
Factor x4−1 over ℚ[i]. This can be done in several ways.
Using cfactor:
or, using factor with adding i to the extension field:
or, using factor in complex mode:
|
| ⎛
⎝ | x−1 | ⎞
⎠ | ⎛
⎝ | x+1 | ⎞
⎠ | ⎛
⎝ | x+i | ⎞
⎠ | ⎛
⎝ | x−i | ⎞
⎠ |
| | | | | | | | | | |
|
Factor x4+1 over ℚ.
Indeed, x4+1 has no factor with rational coefficients.
Factor x4+1 over ℚ[i]. Using complex mode:
Factor x4+1 over ℝ.
You have to provide the square root required for extending the
rationals. In order to do that with the help of Xcas,
first check the complex box in the CAS configuration:
|
| ⎡
⎢
⎢
⎣ | | | √ | | | ⎛
⎝ | 1−i | ⎞
⎠ | ,− | | | √ | | | ⎛
⎝ | 1−i | ⎞
⎠ | ,− | | | √ | | | ⎛
⎝ | 1−i | ⎞
⎠ | i, | | | √ | | | ⎛
⎝ | 1−i | ⎞
⎠ | i | ⎤
⎥
⎥
⎦ |
| | | | | | | | | | |
|
The roots depend on √2, and so will be in ℚ[√2].
Putting Xcas back in real mode, either check the sqrt box
in the CAS configuration or:
|
| ⎛
⎜
⎝ | x2− | √ | | x+1 | ⎞
⎟
⎠ | ⎛
⎜
⎝ | x2+ | √ | | x+1 | ⎞
⎟
⎠ |
| | | | | | | | | | |
|
To factor over ℂ
input:
or put Xcas back in complex mode.