# Cancel common factors of a fraction (cancel)

Cancel the common factors of a fraction.

With this function, the solver shows the steps whenever it finds them.

## How to write it

### cancel(expr)

**expr**

Any expression: a number, a formula, a list or a matrix. Takes an expression.

## Examples

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

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

  In the solver, `cancel((x^2 - 1)/(x - 1))` gives `x + 1`.

  [Open in the solver](https://hilberon.com/?q=cancel%28%28x%5E2%20-%201%29%2F%28x%20-%201%29%29)

## Related functions

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

  List the coefficients of a polynomial, constant term first.
- [apart](https://hilberon.com/library/apart)

  Split a rational expression into partial fractions.
- [collect](https://hilberon.com/library/collect)

  Group the terms of an expression by powers of a variable.
- [together](https://hilberon.com/library/together)

  Combine fractions into one over a common denominator.
- [complex_expand](https://hilberon.com/library/complex_expand)

  Expand an expression assuming its variables are real.
- [to_radicals](https://hilberon.com/library/to_radicals)

  Write algebraic numbers, given as roots of polynomials, with radicals.

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