Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Collect terms by powers of a variable (collect)

Group the terms of an expression by powers of a variable.

How to write it

collect(expr, x)

expr
Any expression: a number, a formula, a list or a matrix. Takes an expression.
x
The variable to collect by. Takes a variable.

Examples

  • x2y+x2z+x=x2(y+z)+x\displaystyle x^{2} y+x^{2} z+x = x^{2} (y+z)+x
    collect(x^2 y + x^2 z + x, x)

    In the solver, collect(x^2 y + x^2 z + x, x) gives x^2*(y + z) + x.

    Open in the solver
  • complex_expand

    Expand an expression assuming its variables are real.

  • coefficients

    List the coefficients of a polynomial, constant term first.

  • cyclotomic

    Cyclotomic polynomial of a given order.

  • cancel

    Cancel the common factors of a fraction.

  • degree

    Degree of a polynomial in a variable.

  • apart

    Split a rational expression into partial fractions.