find $f^{(15)}(0)$ if $f = \frac{10x^2+12x+4}{(x+2) (x^2 +1)}$ $$f = \frac{10x^2+12x+4}{(x+2)(x^2 +1)}=\frac{4}{x+2}+\frac{6x}{x^2+1}=\frac{2}{1-\left(-\frac x 2 \right)}+\frac{6x}{1-(-x^2)}$$
So we end up with $$2 \sum_{n=0}^{15} \left(-\frac x 2 \right)^n + 6x \sum_{n=0}^{15} (-x^2)^n$$ but because we are looking for $f^{(15)}(0)$ we get the result of $2$?

It is more precise to write $$\begin{align*} f(x) &=  \sum_{n=0}^\infty 2\left(-\frac{x}{2}\right)^n + 6x(-x^2)^n \\
&= \sum_{n=0}^\infty 2 (-1/2)^n x^n + \sum_{m=0}^\infty 6(-1)^m x^{2m+1} \\
&= \sum_{k=0}^\infty \frac{f^{(k)}(0)}{k!} x^k.
\end{align*}$$  Thus, $f^{(15)}(0)$ is $15!$ times the coefficient of $x^{15}$ in the series expansion.  Note this corresponds to the choices $n = 15$ and $m = 7$; i.e., $$f^{(15)}(0) = 15! \left( 2 (-1/2)^{15} + 6 (-1)^{7} \right).$$  This is because the coefficient of $x^{15}$ is found at different values of the indices of the series expansion of each term.
