# How to find constant term of binomial

There is supposed to be a command or set of commands to find the constant term of a binomial expression like

$$\left(-2x^4 + \dfrac{-5}{x}\right)^{25}$$

(-2*x^4 - 5/x)^25


but I can manage to find it. Help would be greatly appreciated.

• Cases[([Minus]2 x^4 [Minus] 5/x)^25 // Expand, x_ /; NumericQ[Simplify[x]]] Jan 28 at 11:58
• Also: In[127]:= Residue[1/x*(-2*x^4 - 5/x)^25, {x, 0}] Out[127]= -162139892578125000000 Jan 28 at 14:07
• Moreover (and I make this as a general remark), when you want to find such a term it often pays to look where you last remember having seen it, and retrace your steps from there. Jan 29 at 23:00

Coefficient[(-2*x^4 - 5/x)^25, x, 0]
(*    -162139892578125000000    *)

• Superb, thank you!!
– Orm
Jan 28 at 21:51
• Note: SeriesCoefficient is a much safer option (e.g., Coefficient[Exp[x],x,0] returns Exp[x] while SeriesCoefficient returns the expected answer). Jan 29 at 10:47

The following, also, works:

(-2*x^4 - 5/x)^25 // SeriesCoefficient[#, {x, 0, 0}] &


Output is

-162139892578125000000

(-2*x^4 - 5/x)^25 // First @* ExpandAll

-162139892578125000000

• Interesting. Simple way of doing it. Thanks!
– Orm
Jan 28 at 21:52