<s>[INST] Splitting the function $ \frac{x}{(1+x^2)^2}$ into partial fractions. I have a function that I am trying to split into partial fractions in order to integrate the function. 
The function is:

$$\int \frac{x}{(1+x^2)^2}dx$$

I am trying to split $\dfrac{x}{(1+x^2)^2}$ into partial fractions. 
While trying I am splitting it into these fractions:
$\dfrac{Ax+D}{1+x^2}+\dfrac{Cx+D}{(1+x^2)^2}$
I get $C=1$ which ends up again where I started from. I am confused on what to do here.  
 [/INST] Since
$1+x^2
=(1+ix)(1-ix)
$,
if we ask Wolfy for
$\dfrac{1}{(1+ax)^2(1+bx)^2}
$
we get
$-\dfrac{2 a^2 b}{(a - b)^3 (a x + 1)} 
+ \dfrac{a^2}{(a - b)^2 (a x + 1)^2} 
+ \dfrac{2 a b^2}{(a - b)^3 (b x + 1)}
 + \dfrac{b^2}{(a - b)^2 (b x + 1)^2}
$.
Putting $a=i, b=-i$,
we get both
$\dfrac{i}{4 (x + i)}
 - \dfrac{1}{4 (x + i)^2} 
- \dfrac{i}{4 (x - i)}
 - \dfrac{1}{4 (x - i)^2}
$
and
$\dfrac{2 x^2}{(x^2 + 1)^4}
 + \dfrac{1}{(x^2 + 1)^4}
 + \dfrac{x^4}{(x^2 + 1)^4}
$.
</s>