Find the value of $\displaystyle \int \limits_{0}^{1}\frac{\ln^2{x}+2\ln{x}-2x+2}{\ln^2{x}-x\ln^2{x}} \mathrm dx$ I have a question which askes us to find the value of the integral:
$\displaystyle \tag*{} \int \limits_{0}^{1}\frac{\ln^2{x}+2\ln{x}-2x+2}{\ln^2{x}-x\ln^2{x}} \mathrm dx$
I tried using differentiation under integral using some variable, I couldn't go any further, I even tried the substitution $\ln x=t$, it just reduces the size of integral. I divided the integral with the denominator to get $3$ separate integrals but each of them diverges. Any help would be appreciated. Thanks.
 A: We first begin by enforcing the substitution $e^{-u} = x \, \implies -e^{-u} \, du= dx$
$$I=\int_{0}^{1} \frac{\ln^2 x+2\ln x-2x+2}{\ln^2 x - x \ln^2 x} \, dx \stackrel{x \mapsto e^{-u}}{=}\int_{0}^{\infty} \frac{1}{u^2} \cdot \frac{u^2-2u-2e^{-u} + 2}{e^u-1} \, du$$
Now using the fact that:
$$\zeta(s)\Gamma(s)=\int_{0}^{\infty} \frac{x^{s-1}}{e^x-1} \, dx$$
We can then compute the following Mellin transform:
$$\int_{0}^{\infty} x^{s-1} \frac{x^2-2x-2e^{-x}+2}{e^x-1} \, dx=\Gamma (s) \left(2-2s \zeta (1+s) +s (1+s) \zeta (2+s)\right)$$
We are interested in the case that $s\to -1$ which gives:
$$\boxed{I=\gamma+\ln (2\pi)-2}$$
A: Decompose the integral into three
\begin{align}
I=&\int_{0}^{1} \frac{\ln^2 x+2\ln x-2x+2}{(1- x) \ln^2 x} \, dx \\
=&  \int_0^1 \underset{=\>\ln\frac\pi2}{\frac{x-1}{(x+1) \ln x}} dx +
\int_0^1 \underset{=\>\gamma}{\frac{\ln x+1-x}{(1- x) \ln x} }dx
 -2\int_0^1 \underset{=\>1-\ln2}{\frac{\ln x(1+x^2)+1-x^2}{(1-x^2) \ln^2x} }dx\\
=& \> \ln(2\pi)-2+\gamma
\end{align}
