Leading coefficient of a polynomial : lcoeff

### 5.25.6 Leading coefficient of a polynomial : lcoeff

lcoeff takes as argument a polynomial given by a symbolic expression or by the list of its coefficients.
lcoeff returns the leading coefficient of this polynomial, that is the coefficient of the monomial of highest degree.
Input :

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

Output :

2

Input :

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

Output :

3

Input :

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

Output :

5*x