<s>[INST] Integrating $\int _0^1\frac{\ln \left(1-x\right)}{x^2+1}\:dx$ When i came across this one i thought of using the substitution $x=\frac{1-t}{1+t}$ that lead to an easy expression.
$$\int _0^1\frac{\ln \left(1-x\right)}{x^2+1}\:dx\overset{x=\frac{1-t}{1+t}}=\ln \left(2\right)\int _0^1\frac{1}{t^2+1}\:dt+\int _0^1\frac{\ln \left(t\right)}{t^2+1}\:dt-\int _0^1\frac{\ln \left(t+1\right)}{t^2+1}\:dt$$
$$=\frac{\pi }{4}\ln \left(2\right)-G-\frac{\pi }{8}\ln \left(2\right)=\boxed{\frac{\pi }{8}\ln \left(2\right)-G}$$
But then i tried to solve it using feynman's trick with the following parameter:
$$I=\int _0^1\frac{\ln \left(1-x\right)}{x^2+1}\:dx$$
$$I\left(a\right)=\int _0^1\frac{\ln \left(1-ax\right)}{x^2+1}\:dx$$
$$I'\left(a\right)=-\int _0^1\frac{x}{\left(x^2+1\right)\left(1-ax\right)}\:dx=\frac{1}{a^2+1}\int _0^1\frac{a-x}{\left(x^2+1\right)}-\frac{a}{1-ax}\:dx$$
$$=\frac{1}{a^2+1}\left(\frac{\pi a}{4}-\frac{\ln \left(2\right)}{2}+\ln \left(1-a\right)\right)\:$$
$$\int _0^1I'\left(a\right)\:da=\frac{\pi }{4}\int _0^1\frac{a}{a^2+1}\:da-\frac{\ln \left(2\right)}{2}\int _0^1\frac{1}{a^2+1}\:da+\int _0^1\frac{\ln \left(1-a\right)}{a^2+1}\:da\:$$
$$I=\frac{\pi }{8}\ln \left(2\right)-\frac{\pi }{8}\ln \left(2\right)+I$$
And everything cancels.
¿Am i doing something wrong?, ¿Should i be using another parameter or other upper and lower bounds?
 [/INST] You are not allowed to switch the integral and derivative. The conditions of the theorem about switching those are not met. Denote $\frac{\ln(1-ax)}{x^2+1}$ by $f(x,a)$, one of the conditions is that  there must exist a function $g:[0,1] \rightarrow \mathbb{C} $ such that $\int_0^1 |g(x)|dx < \infty$ and $| \frac{\partial f}{\partial a}(x,a) |\leq g(x)$ for all $a$. 
</s>