Evaluate the intgral $\int{\frac{dx}{x^2(1-x^2)}}$ (solution verification) I have to solve the following integral
$$\int{\frac{dx}{x^2(1-x^2)}}$$
What I've got:
\begin{split}
\int{\frac{dx}{x^2(1-x^2)}} &=\int{\frac{(1-x^2+x^2)dx}{x^2(1-x^2)}}\\
&=\int{\frac{dx}{x^2}}+\int{\frac{dx}{1-x^2}}\\
&=\int{\frac{dx}{x^2}}+\int{\frac{dx}{(1+(xi)^2)}}\\
&=-x^{-1}+\arctan{xi}+C
\end{split}
Is this correct?
Thanks in advance!
 A: Are you sure that a non-real answer is acceptable? Even if it is, what you should have got as a primitive of $\frac1{1-x^2}$ should have been $-i\arctan(xi)$. But I suggest that you do$$\frac1{1-x^2}=\frac{1/2}{1-x}+\frac{1/2}{1+x}$$instead.
A: Don't forget $\dfrac1i$ before $\arctan$
$$\int{\frac{dx}{x^2(1-x^2)}}=-x^{-1}+\dfrac{1}{i}\arctan{xi}+C$$
Also better to write
$$\int\dfrac{1}{1-x^2}dx=\dfrac12\ln\dfrac{1+x}{1-x}+C$$
A: $x = \tanh(u)$ then $dx = \operatorname{sech}^2(u) du$
$$
\begin{align}
\int \frac{dx}{x^2(1-x^2)}
&= \int \frac{\operatorname{sech}^2(u) du}{\tanh^2(u)(1-\tanh^2(u))}\\
&= \int \frac{\operatorname{sech}^2(u) du}{\tanh^2(u)(\operatorname{sech}^2(u))}\\
&= \int \frac{du}{\tanh^2(u)}\\
&= \int \frac{\cosh^2(u)}{\sinh^2(u)} du\\
&= \int (1 + \operatorname{csch}^2(u))du\\
&= u - \coth(u)\\
&= \operatorname{arctanh}(x) - \frac{1}{x} + C
\end{align}
$$
A: Note that, if $f(x)=\arctan(xi)$, then
$$
f'(x)=i\frac{1}{1+(xi)^2}=\frac{i}{1-x^2}
$$
that's not the required derivative; you are missing $1/i=-i$, so you could write
$$
-\frac{1}{x}-i\arctan(xi)
$$

I'd prefer to avoid complex functions. With partial fractions, we set
$$
\frac{1}{x^2(1-x)^2}=
\frac{a}{x}+\frac{b}{x^2}+\frac{c}{x-1}+\frac{d}{x+1}
$$
Removing the denominators leads to
$$
ax(x^2-1)+b(x^2-1)+cx^2(x+1)+dx^2(x-1)=-1
$$
With $x=0$, we get $-b=-1$; with $x=1$, we get $2c=-1$; with $x=-1$ we get $-2d=-1$. It remains to find $a$, but this is easily seen to be $0$.
Therefore
$$
\int\frac{1}{x^2(1-x^2)}\,dx=
\int\left(
  \frac{1}{x^2}-\frac{1}{2}\frac{1}{x-1}+\frac{1}{2}\frac{1}{x+1}
\right)\,dx=-\frac{1}{x}+\frac{1}{2}\log\left|\frac{x+1}{x-1}\right|+c
$$
A: Another method using  the self-similar substitution
$$x=\frac{1-t}{1+t}$$  
transforms the integral to
$$-\int{\frac{2}{{{\left( t-1 \right)}^{2}}}+\frac{1}{2t}dt}$$
