Converting from a symbolic polynomial: e2r symb2poly

### 5.27.5 Converting from a symbolic polynomial: e2r symb2poly

The e2r command converts a symbolic polynomial into a list (for single variable polynomials) or a sum of monomials.
symb2poly is a synonym for e2r.

- e2r takes two arguments:
  - P, a symbolic polynomial.
  - vars, the variable name (for one variable polynomials) or a list of variable names (for multivariable polynomials).
    For one variable polynomials, this is optional and defaults to x.
- e2r(P ⟨,vars⟩) returns:
  the representation of the polynomial as a list of coefficients written in decreasing order, if vars is a variable name.
  a sum of monomials (sparse representation of multivariate polynomials) if vars is a list.

#### Examples:

- Input:
  e2r(x^2-1)
  or:
  symb2poly(x^2-1)
  or:
  symb2poly(y^2-1,y)
  or:
  e2r(y^2-1,y)
  Output:

  ▯ 1,0,−1 ▯

- Input:
  e2r(x^2-x*y+y, [x,y])
  or:
  symb2poly(x^2-x*y+2*y, [x,y])
  Output:
  %%%{1,[2,0]%%%}+%%%{-1,[1,1]%%%}+%%%{2,[0,1]%%%}