I want to solve $\int \frac{2}{x^2(x^2+1)^2}dx$ I want to solve this primitive $$I=\int \frac{2}{x^2(x^2+1)^2}dx.$$
I substitute $u=x^2$ then,
$$I=\int \frac{2}{x^2(x^2+1)^2}dx=\int \frac{du}{u^{3/2}(u+1)^2}=\cdots$$
How do I use partial fraction decomposition? Is there another idea to compute this primitive?
 A: In case you're looking for a way that doesn't involve splitting into partial fractions, you can use the substitution $\tan t=x$ so that $\sec^2t\,\mathrm{d}t=\mathrm{d}x$, giving
$$\int\frac{2}{x^2(x^2+1)^2}\,\mathrm{d}x=2\int\frac{\sec^2t}{\tan^2t(\tan^2t+1)^2}\,\mathrm{d}t=2\int\frac{\cos^4t}{\sin^2t}\,\mathrm{d}t=2\int(\csc^2t-2+\sin^2t)\,\mathrm{d}t$$
The first two integrands are trivial, and I suppose you can consider the third trivial as well if you know how to handle even powers of sine. If not, recall the power reduction (or half-angle) formula,
$$\sin^2t=\frac{1-\cos2t}{2}$$
so that the integral is simply
$$\int\frac{2}{x^2(x^2+1)^2}\,\mathrm{d}x=2\int\left(\csc^2t-\frac{3}{2}-\frac{1}{2}\cos2t\right)\,\mathrm{d}t$$
A: Since both factors are repeated, the partial fractions decomposition of the integrand has the form
$$\frac{1}{x^2 (x^2 + 1)^2} = \frac{A}{x^2} + \frac{B}{x} + \frac{C x + D}{(x^2 + 1)^2} + \frac{E x + F}{x^2 + 1} .$$
The resulting linear system is somewhat complicated (six equations in six variables), but we can streamline solving it by noticing that the integrand is an even function, and hence so is its partial fractions decomposition, which forces $B = C = E = 0$. So, the above simplifies to the more tractable $3 \times 3$ system:
$$\frac{1}{x^2 (x^2 + 1)^2} = \frac{A}{x^2} + \frac{D}{(x^2 + 1)^2} + \frac{F}{x^2 + 1} .$$
Cross-multiplying gives the (even) polynomial equation
$$(A + F) x^4 + (2 A + D + F) x^2 + A = 1 .$$
Alternatively, one can immediately use trigonometric substitution here (the form $x^2 + 1$ suggests $x = \tan \theta$, $dx = \sec^2 \theta\,d\theta$), but I'm not sure that turns out to be any faster in this case.
A: HINT:
$$\int\frac{2}{x^2\left(x^2+1\right)^2}\space\text{d}x=$$
$$2\int\left[\frac{1}{x^2}-\frac{1}{x^2+1}-\frac{1}{(x^2+1)^2}\right]\space\text{d}x=$$
$$2\left[\int\frac{1}{x^2}\space\text{d}x-\int\frac{1}{x^2+1}\space\text{d}x-\int\frac{1}{(x^2+1)^2}\space\text{d}x\right]=$$
$$2\left[-\frac{1}{x}-\arctan(x)-\int\frac{1}{(x^2+1)^2}\space\text{d}x\right]=$$

Substitute $x=\tan(u)$ and $\text{d}x=\sec^2(u)\space\text{d}u$.
Then $(x^2+1)^2=(\tan^2(u)+1)^2=\sec^4(u)$ and $u=\arctan(x)$:

$$2\left[-\frac{1}{x}-\arctan(x)-\int\cos^2(u)\space\text{d}u\right]=$$
$$2\left[-\frac{1}{x}-\arctan(x)-\int\left[\frac{1}{2}+\frac{\cos(2u)}{2}\right]\space\text{d}u\right]=$$
$$2\left[-\frac{1}{x}-\arctan(x)-\int\frac{1}{2}\space\text{d}u+\int\frac{\cos(2u)}{2}\space\text{d}u\right]=$$
$$2\left[-\frac{1}{x}-\arctan(x)-\frac{1}{2}\int1\space\text{d}u+\frac{1}{2}\int\cos(2u)\space\text{d}u\right]=$$

Substitute $s=2u$ and $\text{d}s=2\space\text{d}u$.

$$2\left[-\frac{1}{x}-\arctan(x)-\frac{1}{2}\int1\space\text{d}u+\frac{1}{4}\int\cos(s)\space\text{d}s\right]$$
A: $\displaystyle\frac{1}{x^2(x^2+1)^2}=\frac{x^2+1}{x^2(x^2+1)^2}-\frac{x^2}{x^2(x^2+1)^2}=\frac{1}{x^2(x^2+1)}-\frac{1}{x^2+1)^2}$
$\hspace{.9 in}\displaystyle=\left[\frac{x^2+1}{x^2(x^2+1)}-\frac{x^2}{x^2(x^2+1)}\right]-\left[\frac{x^2+1}{(x^2+1)^2}-\frac{x^2}{(x^2+1)^2}\right]$
$\hspace{.9 in}\displaystyle=\frac{1}{x^2}-\frac{2}{x^2+1}+\frac{x^2}{(x^2+1)^2}$,
so $\displaystyle\int\frac{2}{x^2(x^2+1)^2}dx=-\frac{2}{x}-4\tan^{-1}x+\int\frac{2x^2}{(x^2+1)^2}dx$.  
Now let $\displaystyle u=x,\; dv=\frac{2x}{(x^2+1)^2}dx,\;\;  du=dx,\; v=-\frac{1}{x^2+1}$ to get
$\hspace{.3 in}\displaystyle-\frac{2}{x}-4\tan^{-1}x-\frac{x}{x^2+1}+\tan^{-1}x+C=\color{blue}{-\frac{2}{x}-3\tan^{-1}x-\frac{x}{x^2+1}+C}$
