Expressing the $n$–th derivative of $y=\frac{1}{(1+x^2)^2}$ In an attempt to find a way to express the n-th derivative of $y=\frac{1}{(1+x^2)^2}$ using the binomial theorem I got stuck in the last computation.
I'll explain what I did:
$$f(x)=\frac{1}{(1+x^2)^2}=\frac{1}{(x+i)^2(x-i)^2}=\\
\frac{i}{4}\left( \frac{1}{x+i} \right)-\frac{1}{4}\left( \frac{1}{(x+i)^2} \right)-\frac{i}{4}\left( \frac{1}{x-i} \right)-\frac{1}{4}\left( \frac{1}{(x-i)^2} \right)$$
Then I used $y=\frac{1}{ax+b} \Rightarrow y_{n}=\frac{(-1)^nn!a^n}{(ax+b)^{n+1}}$ and $y=\frac{1}{(ax+b)^2} \Rightarrow y_{n}=\frac{(-1)^n(n+1)!a^n}{(ax+b)^{n+2}}$ to get:
$$\frac{(-1)^n}{4}\left( in!\left( \frac{(x-i)^{n+1}-(x+i)^{n+1}}{(x^2+1)^{n+1}} \right)-(n+1)!\left( \frac{(x-i)^{n+2}+(x+i)^{n+2}}{(x^2+1)^{n+2}} \right) \right)$$
Then I stopped for a second and I analized $(x-i)^{n+1}-(x+i)^{n+1}$ and $(x-i)^{n+2}+(x+i)^{n+2}$ using the binomial theorem:
-
$(x-i)^{n+1}-(x+i)^{n+1}$ = $$\sum_{k=0}^{n+1}\binom{n+1}{k}x^{n+1-k}\cdot i^k((-1)^k-1)$$
$i^k((-1)^k-1) =0$ for $k=2n$ ,whereas for $k=2n+1$ $\longrightarrow$$-2i(-1)^{\frac{k-1}{2}}$
-
$(x-i)^{n+2}+(x+i)^{n+2}$ = $$\sum_{k=0}^{n+2}\binom{n+2}{k}x^{n+2-k}\cdot i^k((-1)^k+1)$$
$i^k((-1)^k+1) =0$ for $k=2n+1$ , whereas for $k=2n$ $\longrightarrow$$2(-1)^{\frac{k}{2}}$.
And now I got stuck sorting out the indeces $n,k$ of summations; what I obtain is:
$$\frac{d^n}{dx^n}(f(x))=\\
 \frac{(-1)^nn!}{2(x^2+1)^{n+1}}\cdot \sum_{k=1}^{n+1}\binom{n+1}{k}x^{n+1-k}(-1)^{\frac{k-1}{2}} - \frac{(-1)^n(n+1)!}{2(x^2+1)^{n+2}}\cdot \sum_{k=2}^{n+2}\binom{n+2}{k}x^{n+2-k}(-1)^{\frac{k}{2}}$$
But testing it I can see it’s wrong.
Can anyone help me please sorting the $n,k$ indices and perhaps have a look at my computations also?
Thank you

I am sorry, i haven't comprehend everything in detail, but you have to be very careful, when you would like to use $(a\cdot b)^n=a^n\cdot b^n$ for complex numbers $a,b$ instead of positive real numbers. There is a popular example here Why $\sqrt{-1 \cdot {-1}} \neq \sqrt{-1}^2$?
However, you can find the power series. We know $\frac{1}{1-t}=\sum_{k=0}^\infty t^k$ for $|t|<1$. If we calculate the derivative, we get
$$
\frac{1}{(1-t)^2}=\sum_{k=0}^\infty kt^{k-1}=\sum_{k=0}^\infty (k+1)t^{k}.
$$
Now, let $t=-x^2$, then
\begin{align}
\frac{1}{(1+x^2)^2}
&=\sum_{k=0}^\infty (k+1)(-x^2)^{k}\\
&=\sum_{k=0}^\infty (-1)^k(k+1)x^{2k}\\
&=\sum_{2\mid n}^\infty (-1)^{n/2}\left(\frac{n}{2}+1\right)x^{n}\\
&=\sum_{2\mid n}^\infty \frac{n!(-1)^{n/2}(\frac{n}{2}+1)}{n!}x^{n}.
\end{align}
Hence by taylor's formula the $n$-th derivative of $f$ is $$f^{(n)}(0)=\begin{cases}0&2\nmid n\\ n!\cdot (-1)^{n/2}\cdot \left(\frac{n}{2}+1\right)&2\mid n \end{cases}.$$
