### 11.1.10 Leading coefficient of a polynomial

The lcoeff command finds the leading coefficient of a polynomial; that is, the coefficient of the monomial of highest degree.

- lcoeff takes one mandatory argument and one optional argument:
  - P, a polynomial given by a symbolic expression or by its list of coefficients.
  - Optionally, x, a variable name (by default x).
- lcoeff(P⟨,x⟩) returns the leading coefficient of P.

#### Examples

lcoeff([2,1,-1,0])

2 |  |  |  |  |  |  |  |  |  |

lcoeff(3*x^2+5*x,x)

3 |  |  |  |  |  |  |  |  |  |

lcoeff(3*x^2+5*x*y^2,y)

5 x |  |  |  |  |  |  |  |  |  |