# 约分（Cancel common factors of a fraction，cancel）

约去分数的公因式。

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

## 怎么写

### cancel(expr)

**expr**

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

## 示例

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

  `cancel((x^2 - 1)/(x - 1))`

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

  [在求解器中打开](https://zh.hilberon.com/?q=cancel%28%28x%5E2%20-%201%29%2F%28x%20-%201%29%29)

## 相关函数

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

  列出多项式的系数，常数项在前。
- [apart](https://zh.hilberon.com/library/apart)

  将有理式拆分成部分分式。
- [collect](https://zh.hilberon.com/library/collect)

  按某个变量的幂次合并表达式中的项。
- [together](https://zh.hilberon.com/library/together)

  把分数合并成同分母的一个分数。
- [complex_expand](https://zh.hilberon.com/library/complex_expand)

  在假定变量为实数的前提下展开表达式。
- [to_radicals](https://zh.hilberon.com/library/to_radicals)

  把以多项式根形式给出的代数数用根式表示。

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