<s>[INST] Integral with partial fractions I'm trying to calculate the following integral:

$$I=\int \frac{\arctan(x)}{x^4}dx$$

My steps so far are:
Per partes:
$$\frac{-\arctan(x)}{3x^3}+\int{\frac{1}{1+x^2} \frac{1}{3x^3}}dx
=\frac{-\arctan(x)}{3x^3}+\frac{1}{3}\int{\frac{1}{1+x^2} \frac{1}{x^3}}dx$$
and now I want to do partial fractions. However, with this integral, I fail to do partial fractions. Could you help me?
Thanks
 [/INST] A rational function $P(x)/Q(x)$ can be rewritten using Partial Fraction Decomposition:
$$
\frac{P(x)}{Q(x)} = \frac{A_1}{a\,x + b} + \dots + \frac{A_2\,x + B_2}{a\,x^2 + b\,x + c} + \dots
$$
where for each factor of $Q(x)$ of the form $(a\,x + b)^m$ introduce terms: 
$$
\frac{A_1}{a\,x + b} + \frac{A_2}{(a\,x + b)^2} + \dots + \frac{A_m}{(a\,x + b)^m}
$$
and for each factor of $Q(x)$ of the form $\left(a\,x^2 + b\,x + c\right)^m$ introduce terms:
$$
\frac{A_1\,x + B_1}{a\,x^2 + b\,x + c} + \frac{A_2\,x + B_2}{\left(a\,x^2 + b\,x + c\right)^2} + \dots + \frac{A_m\,x + B_m}{\left(a\,x^2 + b\,x + c\right)^m}\,.
$$

In light of all this, you have:
$$
\frac{1}{x^3\left(x^2+1\right)} = \frac{A_1}{x} + \frac{A_2}{x^2} + \frac{A_3}{x^3} + \frac{A_4\,x + B_4}{x^2 + 1}
$$
i.e.
$$
\frac{1}{x^3\left(x^2+1\right)} = \frac{\left(A_1 + A_4\right)x^4 + \left(A_2 + B_4\right)x^3 + \left(A_1 + A_3\right)x^2 + A_2\,x + A_3}{x^3\left(x^2+1\right)}
$$
which turns out to be an identity if and only if:
$$
\begin{cases}
A_1 + A_4 = 0 \\
A_2 + B_4 = 0 \\
A_1 + A_3 = 0 \\
A_2 = 0 \\
A_3 = 1
\end{cases}
\; \; \; \; \; \; 
\Leftrightarrow 
\; \; \; \; \; \;
\begin{cases}
A_1 = -1 \\
A_2 = 0 \\
A_3 = 1 \\
A_4 = 1 \\
B_4 = 0
\end{cases}
$$
from which what you want:
$$
\frac{1}{x^3\left(x^2+1\right)} = -\frac{1}{x} + \frac{1}{x^3} + \frac{x}{x^2+1}\,.
$$
</s>