<s>[INST] Integrating $\frac{1}{(x^4 -1)^2}$ How to solve the the following integral? $$\int{\frac{1}{(x^4 -1)^2}}\, dx$$
 [/INST] Let $$\displaystyle I = \int\frac{1}{(x^4-1)^2}dx = \frac{1}{4}\int \left[\frac{-3}{(x^4-1)}+\frac{3x^4+1}{(x^4-1)^2}\right]dx$$
$$\displaystyle I = \frac{1}{4}\int\left[\frac{-3}{2(x^2-1)}+\frac{3}{2(x^2+1)}+\frac{3x^2+\frac{1}{x^2}}{\left(x^3-\frac{1}{x}\right)^2}\right]dx$$
Now Here $\bf{1^{st}}$ and $\bf{2^{nd}}$ can be Calculated Direct Formulas and for third put
$$\displaystyle \left(x^3-\frac{1}{x}\right) = t\;,$$ Then $$\displaystyle \left(3x^2+\frac{1}{x^2}\right)dx = dt$$
so we get $$\displaystyle I = \frac{3}{16}\ln \left|\frac{1+x}{1-x}\right|+\frac{3}{8}\tan^{-1}(x)-\frac{1}{4}\cdot \frac{x}{(x^4-1)}+\mathcal{C}$$
</s>