Integrating $\frac{1}{(x^4 -1)^2}$ How to solve the the following integral? $$\int{\frac{1}{(x^4 -1)^2}}\, dx$$
 A: HINT:  Integrate by parts
$$\int\dfrac{dx}{(x^4-1)^2}=\dfrac1{x^3}\int\dfrac{x^3}{(x^4-1)^2}-\int\left(\dfrac{d(1/x^3)}{dx}\cdot\int\dfrac{x^3}{(x^4-1)^2}\right)dx$$
$$=-\dfrac1{x^3}\cdot\dfrac1{4(x^4-1)}-\dfrac34\int\dfrac{dx}{x^4(x^4-1)}$$
Now $\dfrac1{x^4(x^4-1)}=\dfrac{x^4-(x^4-1)}{x^4(x^4-1)}=\dfrac1{x^4-1}-\dfrac1{x^4}$
Again, $\dfrac1{x^4-1}=\dfrac12\cdot\dfrac{x^2+1-(x^2-1)}{(x^2+1)(x^2-1)}=?$
A: 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}$$
A: HINT: prove that $$\frac{1}{(x^4-1)^2}=1/4\, \left( {x}^{2}+1 \right) ^{-2}+1/16\, \left( x-1 \right) ^{-2}+3
/16\, \left( x+1 \right) ^{-1}+1/16\, \left( x+1 \right) ^{-2}-3/16\,
 \left( x-1 \right) ^{-1}+1/4\, \left( {x}^{2}+1 \right) ^{-1}
$$
A: In general, the following method will always work. Solve for the roots of the denominator in the complex plane:
$$
\begin{split}
z^4 &= 1 \Longrightarrow\\
z&=z_{n}\equiv\exp\left(\frac{i\pi n}{2}\right)
\end{split}
$$
In this case things are simple, you have $z_0=1$, $z_1=i$, $z_2=-1$, $z_3 = -i$.
Then the trick is to consider the function $\frac{1}{x^4-1}$ instead of its square first. A partial fraction expansion of a rational function that tends to zero at infinity can be obtained by writing down the expansion around all the singularities, keeping only the singular terms and adding them up. This works because the difference between the sum of the terms you obtain and the rational function then only has removable singularities left, it is therefore some polynomial, but it still tends to zero at infinity (because both the rational function and the singular terms from the expansions tend to zero at infinity). But the only polynomial that tends to zero at infinity is identical to zero.
Now, each expansion of $\frac{1}{\left(z^4-1\right)^2}$around each singularity $z_n$, is more easily computed by expanding $\frac{1}{z^4-1}$ instead and the squaring both sides. The expansion around $z_n$ only has one singular term, but because we want to square both sides we need to also compute the constant term. If we put $z = z_n + t$ and expand in powers of $t$ we get:
$$\frac{1}{z^4-1} = \frac{1}{4 z_n^3 t + 6 z_n^2 t^2 +\mathcal{O}(t^3)}=\frac{1}{4 z_n^3 t}-\frac{3}{8} +\mathcal{O}(t)$$  
Squaring both sides and keeping only the singular terms yields:
$$\frac{1}{\left(z^4-1\right)^2} = \frac{1}{64 z_n^6 t^2}-\frac{3}{16 z_n^3 t} +\mathcal{O}(1)$$  
So, the partial fraction expansion is:
$$\frac{1}{\left(x^4-1\right)^2} =\sum_{n=0}^3 \frac{1}{64 z_n^6}\frac{1}{\left(x-z_n\right)^2} - \sum_{n=0}^3 \frac{3}{16 z_n^3}\frac{1}{x-z_n} $$
We thus have:
$$\int \frac{dx}{\left(x^4-1\right)^2} = -\sum_{n=0}^3 \frac{1}{64 z_n^6}\frac{1}{x-z_n} - \sum_{n=0}^3 \frac{3}{16 z_n^3}\log\left(x-z_n\right) $$
Then the fractions with the imaginary terms are easily simplified so that they become manifestly real. You can deal with the logarithms of complex arguments as follows. The sum of the logarithmic terms with the complex arguments in this case is:
$$\frac{3 i}{16}\log\left(\frac{x+i}{x-i}\right)$$
If we write:
$$x + i = r\exp(i\alpha)$$
then since $x-i$ is the complex conjugate, we have:
$$x - i = r\exp(-i\alpha)$$
Therefore:
$$\frac{x+i}{x-i} = \exp(2 i\alpha)$$
Since $\alpha = \arctan\left(\frac{1}{x}\right)$, the sum of the two terms is:
$$-\frac{3}{8}\arctan\left(\frac{1}{x}\right)$$
