# 多项式因式分解（Factor a polynomial，factor）

把多项式分解为不可约因式。

使用这个函数时，求解器只要找到步骤就会展示。

## 怎么写

### factor(expr)

**expr**

任意表达式：一个数、一个公式、一个列表或一个矩阵。接受一个多项式。

## 示例

- $\displaystyle x^{2}-1 = (x-1) (x+1)$

  `factor(x^2 - 1)`

  在求解器中，`factor(x^2 - 1)` 的结果是 `(x - 1)(x + 1)`。

  [在求解器中打开](https://zh.hilberon.com/?q=factor%28x%5E2%20-%201%29)
- $\displaystyle x^{3}-6 x^{2}+11 x-6 = (x-1) (x-2) (x-3)$

  `factor(x^3 - 6x^2 + 11x - 6)`

  在求解器中，`factor(x^3 - 6x^2 + 11x - 6)` 的结果是 `(x - 1)(x - 2)(x - 3)`。

  [在求解器中打开](https://zh.hilberon.com/?q=factor%28x%5E3%20-%206x%5E2%20%2B%2011x%20-%206%29)

## 相关函数

- [full_simplify](https://zh.hilberon.com/library/full_simplify)

  在给定假设下，比 simplify 更努力地寻找更简单的形式。
- [expand](https://zh.hilberon.com/library/expand)

  把乘积和乘方展开成和式。
- [function_expand](https://zh.hilberon.com/library/function_expand)

  把带平移自变量的特殊函数改写为更简单的函数。
- [discriminant](https://zh.hilberon.com/library/discriminant)

  多项式关于某个变量的判别式。
- [groebner_basis](https://zh.hilberon.com/library/groebner_basis)

  一组多项式的 Groebner 基。
- [denominator](https://zh.hilberon.com/library/denominator)

  分数的分母。

---
Source: https://zh.hilberon.com/library/factor
