<s>[INST] Finding $\int^{\infty}_{0}\frac{\ln^2(x)}{(1-x^2)^2} dx$ 
Calculate  $$\int^{\infty}_{0}\frac{\ln^2(x)}{(1-x^2)^2}dx$$

I have tried to put $\displaystyle x=\frac{1}{t}$ and $\displaystyle dx=-\frac{1}{t^2}dt$
$$ \int^{\infty}_{0}\frac{t^2\ln^2(t)}{(t^2-1)^2}dt$$
$$\frac{1}{2}\int^{\infty}_{0}t\ln^2(t)\frac{2t}{(t^2-1)^2}dt$$
$$ \frac{1}{2}\bigg[-t\ln^2(t)\frac{1}{t^2-1}+\int^{\infty}_{0}\frac{\ln^2(t)}{t^2-1}+2\int^{\infty}_{0}\frac{\ln(t)}{t^2-1}dt\bigg]$$
How can I solve it?
 [/INST] Here is yet another slight variation on a theme.
Let
$$I = \int_0^\infty \frac{\ln^2 x}{(1 - x^2)^2} \, dx$$
then
\begin{align}
I &= \int_0^1 \frac{\ln^2 x}{(1 - x^2)^2} \, dx + \int_1^\infty \frac{\ln^2 x}{(1 - x^2)^2} \, dx = \int_0^1 \frac{(1 + x^2) \ln^2 x}{(1 - x^2)^2} \, dx \tag1,
\end{align}
after a substitution of $x \mapsto 1/x$ has been enforced in the second of the integrals.
As
$$\frac{1}{1 - x^2} = \sum_{n = 0}^\infty x^{2n}, \qquad |x| < 1,$$
differentiating with respect to $x$ gives
$$\frac{1}{(1 - x^2)^2} = \sum_{n = 1}^\infty n x^{2n - 2}.$$
On substituting the above series expansion in (1), after interchanging the order of the summation with the integration we have
$$I = \sum_{n = 1}^\infty n \int_0^1 (x^{2n - 2} + x^{2n}) \ln^2 x \, dx.$$
Integrating by parts twice, we are left with
$$I = \sum_{n = 1}^\infty \left (\frac{2n}{(2n - 1)^3} + \frac{2n}{(2n + 1)^3} \right ).$$
As the series is absolutely convergent, terms can be rearranged without changing its sum. Doing so we have
\begin{align}
I &= \sum_{n = 1}^\infty \left [\frac{1}{(2n - 1)^2} + \frac{1}{(2n - 1)^3} + \frac{1}{(2n + 1)^2} - \frac{1}{(2n + 1)^3} \right ]\\
&= \sum_{n = 1}^\infty \left [\frac{1}{(2n - 1)^2} + \frac{1}{(2n - 1)^3} \right ] + \sum_{n = 1}^\infty \left [\frac{1}{(2n + 1)^2} - \frac{1}{(2n + 1)^3} \right ]\\
&= \sum_{n = 0}^\infty \left [\frac{1}{(2n + 1)^2} + \frac{1}{(2n + 1)^3} \right ] + \sum_{n = 1}^\infty \left [\frac{1}{(2n + 1)^2} - \frac{1}{(2n + 1)^3} \right ]\\
&= 2 + 2 \sum_{n = 1}^\infty \frac{1}{(2n + 1)^2}\\
&= 2 \sum_{n = 0}^\infty \frac{1}{(2n + 1)^2}\\
&= 2 \left [\sum_{n = 1}^\infty \frac{1}{n^2} - \sum_{n = 1}^\infty \frac{1}{(2n)^2} \right ]\\
&= 2 \left (1 - \frac{1}{4} \right ) \sum_{n = 1}^\infty \frac{1}{n^2}\\
&= \frac{3}{2} \sum_{n = 1}^\infty \frac{1}{n^2}\\
&= \frac{3}{2} \cdot \frac{\pi^2}{6}\\
&= \frac{\pi^2}{4},
\end{align}
as expected.
</s>