2
$\begingroup$

This question already has an answer here:

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?

Series[1/(1+x)^2,{x,0,30}]

$\endgroup$

marked as duplicate by J. M. will be back soon Aug 18 '17 at 10:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

301

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}$

$\endgroup$
  • $\begingroup$ In current versions, you can even use D[] with symbolic order directly. $\endgroup$ – J. M. will be back soon Aug 18 '17 at 3:40

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