>

$p\u22542{x}^{2}+3{y}^{3}5\:$

coeff(p, x^n) is equivalent to coeff(p, x, n) for n<>0.
>

$\mathrm{coeff}\left(p\,x\,2\right)$

>

$\mathrm{coeff}\left(p\,{x}^{2}\right)$

To find the constant term of the equation, let the exponent of x be zero.
>

$\mathrm{coeff}\left(p\,x\,0\right)$

${3}{}{{y}}^{{3}}{}{5}$
 (3) 
The command coeff works with any variable.
>

$\mathrm{coeff}\left(p\,{y}^{3}\right)$

However, the following form is not allowed:
>

$r\u2254{x}^{2}+4x6xy+9$

${r}{\u2254}{{x}}^{{2}}{}{6}{}{x}{}{y}{+}{4}{}{x}{+}{9}$
 (5) 
>

$\mathrm{coeff}\left(r\,xy\right)$

A more difficult example: the polynomial does not need to be expanded for coeff(p, x^n) to work.
>

$q\u22543a{\left(x+1\right)}^{2}+\mathrm{sin}\left(a\right){x}^{2}y{y}^{2}x+xa$

${q}{\u2254}{3}{}{a}{}{\left({x}{+}{1}\right)}^{{2}}{+}{\mathrm{sin}}{}\left({a}\right){}{{x}}^{{2}}{}{y}{}{{y}}^{{2}}{}{x}{+}{x}{}{a}$
 (6) 
>

$\mathrm{coeff}\left(q\,x\right)$

${}{{y}}^{{2}}{+}{6}{}{a}{+}{1}$
 (7) 
>

$\mathrm{expand}\left(q\right)$

${3}{}{a}{}{{x}}^{{2}}{+}{6}{}{a}{}{x}{+}{2}{}{a}{+}{\mathrm{sin}}{}\left({a}\right){}{{x}}^{{2}}{}{y}{}{{y}}^{{2}}{}{x}{+}{x}$
 (8) 