<s>[INST] Evaluating$\int\frac{1}{(x^2-1)^2}$ This is the integral:
$\int\frac{1}{(x^2-1)^2}$
I have tried several ways to solve this but I always end up that last parameter equals 1 and all others equals 0 so I end up where I started. Examples over the internet with similar fraction have more than $1$ in the numerator which makes the example simplier.
Here's what I tried
$\frac{A}{(x-1)^2}+\frac{B}{(x+1)^2}+\frac{C}{(x+1)^2(x-1)^2}$ as ${(x^2-1)^2}=(x+1)(x-1)(x+1)(x-1)$
from there I got to point where
$A+B+C=1\\4B+C=1\\4A+C=1$
but this leads to $A=0,\ B=0$ and $C=1$ so to nowhere
I also tried this way:
$\frac{Ax+B}{(x^2-1)}+\frac{Cx+D}{(x^2-1)^2}$
but this resulted into
$A = 0\\B=0\\-A+C=0\\-B+D=1$ 
so again I got $A=0,\ B=0,\ C=0$ and $D=1$ which led to nowhere.
How to tackle this problem?
 [/INST] Since:
$$\frac{1}{x^2-1}=\frac{1}{(x-1)(x+1)}=\frac{1}{2}\left(\frac{1}{x-1}-\frac{1}{x+1}\right),$$
then:
$$\frac{1}{(x^2-1)^2}=\frac{1}{4}\left(\frac{1}{(x-1)^2}-\frac{2}{(x-1)(x+1)}+\frac{1}{(x+1)^2}\right)$$
or:
$$\frac{1}{(x^2-1)^2}=\frac{1}{4}\left(\frac{1}{(x-1)^2}-\frac{1}{x-1}+\frac{1}{x+1}+\frac{1}{(x+1)^2}\right).$$
Better now?
</s>