# Coefficients of a polynomial (coefficients)

List the coefficients of a polynomial, constant term first.

## How to write it

### coefficients(polynomial, x)

**polynomial**

A polynomial, such as x^2 - 2. Takes a polynomial.

**x**

The variable of the polynomial. Takes a variable.

## Examples

- $\displaystyle \operatorname{coefficients}(2 x^{3}-x+5, x) = \left[ 5, -1, 0, 2 \right]$

  `coefficients(2x^3 - x + 5, x)`

  In the solver, `coefficients(2x^3 - x + 5, x)` gives `[5, -1, 0, 2]`.

  [Open in the solver](https://hilberon.com/?q=coefficients%282x%5E3%20-%20x%20%2B%205%2C%20x%29)

## Related functions

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

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

  Cancel the common factors of a fraction.
- [complex_expand](https://hilberon.com/library/complex_expand)

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

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

  Cyclotomic polynomial of a given order.
- [together](https://hilberon.com/library/together)

  Combine fractions into one over a common denominator.

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