Say I have a function like $\dfrac{1}{(1+x)^2}$ and I wish to find the coefficient of $x^{300}$ if the above function is expanded about $x=0$. Is there a command in Mathematica for this?

Using the command below doesn't seem to be fine with me, for it calculates all the terms till $300$ and is so infeasible. Is there a simpler way?


SeriesCoefficient[1/(1 + x)^2, {x, 0, 300}]


SeriesCoefficient[1/(1 + x)^2, {x, 0, n}]

$\begin{cases} \begin{array}{cc} (-1)^n (n+1) & n\geq 0 \\ 0 & \text{True} \\ \end{array} \end{cases}$

| improve this answer | |
  • $\begingroup$ In current versions, you can even use D[] with symbolic order directly. $\endgroup$ – J. M.'s discontentment Aug 18 '17 at 3:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.