# Finding coefficient of a term in power series expansion of some function [duplicate]

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

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}$
• In current versions, you can even use D[] with symbolic order directly. – J. M.'s discontentment Aug 18 '17 at 3:40