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.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityCoefficient[(-2*x^4 - 5/x)^25, x, 0]
(* -162139892578125000000 *)
SeriesCoefficient
is a much safer option (e.g., Coefficient[Exp[x],x,0]
returns Exp[x]
while SeriesCoefficient
returns the expected answer).
$\endgroup$
Jan 29, 2022 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
In[127]:= Residue[1/x*(-2*x^4 - 5/x)^25, {x, 0}] Out[127]= -162139892578125000000
$\endgroup$