\begin{equation}
\int \frac{dx}{x(x^2+1)^2}
\end{equation}
\begin{equation}
\frac{1}{x(x+i)^2(x-i)^2}=\dfrac{A}{x}+\dfrac{B}{x+i}+\dfrac{C}{x-i}+\dfrac{D}{(x+i)^2}+\dfrac{E}{(x-i)^2}
\end{equation}
- Let $x=0$. Then $A=\dfrac{1}{(0+i)^2(0-i)^2}=1$\
- Let $x=-i$. Then $B=\dfrac{1}{-i(-i-i)^2}=-\dfrac{1}{2}$\
- Let $x=i$. Then $C=\dfrac{1}{i(i+i)^2}=-\dfrac{1}{2}$\
Therefore we have
\begin{eqnarray}
\frac{1}{x(x^2+1)^2}&=&\dfrac{1}{x}-\dfrac{1}{2}\left(\dfrac{1}{x+i}+\dfrac{1}{x-i}\right)+\dfrac{D}{(x+i)^2}+\dfrac{E}{(x-i)^2}\\
&=&\dfrac{1}{x}-\dfrac{x}{x^2+1}+\dfrac{D(x^2-2ix-1)+E(x^2+2ix-1)}{(x^2+1)^2}\\
&=&\dfrac{1}{x}-\dfrac{x}{x^2+1}+\dfrac{(D+E)x^2+2(E-D)ix-(D+E)}{(x^2+1)^2}\\
&=&\dfrac{1}{x}-\dfrac{x}{x^2+1}+\dfrac{2Eix}{(x^2+1)^2}
\end{eqnarray}
Note that since the $x^2$ term must vanish it must be the case that $D=-E$.
Thus we only have to find the value of $E$.
\begin{eqnarray}
\frac{1}{x(x^2+1)^2}&=&\dfrac{1}{x}-\dfrac{x}{x^2+1}+\dfrac{2Eix}{(x^2+1)^2}
\end{eqnarray}
This equation holds for every value of $x$ with the exception of $x=0,i,-i$. Therefore, when $x=1$ it is true that
\begin{eqnarray}
\frac{1}{4}&=&1-\dfrac{1}{2}+\dfrac{E}{2}i\\
E&=&\dfrac{i}{2}
\end{eqnarray}
Therefore
\begin{equation}
\frac{1}{x(x^2+1)^2}=\dfrac{1}{x}-\dfrac{x}{x^2+1}-\dfrac{x}{(x^2+1)^2}
\end{equation}