<s>[INST] Why is this incorrect $\int_{0}^{1}{\ln(x)\over (1+x)^3}dx=-\sum_{n=0}^{\infty}{(-1)^n(n+2)\over 2(1+n)}$ $$I=\int_{0}^{1}{\ln(x)\over (1+x)^3}dx$$
Recall
$${1\over (1+x)^3}=\sum_{n=0}^{\infty}{(-1)^n(n+1)(n+2)\over 2}x^n$$
$$\int_{0}^{1}x^n\ln(x)dx=-{1\over (n+1)^2}$$
Substitute in
$$I=\sum_{0}^{\infty}{(-1)^n(n+1)(n+2)\over 2}\int_{0}^{1}x^n\ln(x)dx$$
$$I=-\sum_{n=0}^{\infty}{(-1)^n(n+1)(n+2)\over 2(1+n)^2}$$
$$\int_{0}^{1}{\ln(x)\over (1+x)^3}dx=-\sum_{n=0}^{\infty}{(-1)^n(n+2)\over 2(1+n)}$$
Can somebody help me here. I don't understand why it is incorrect here. Where did I go wrong?

I still don't get it, because these two work perfectly fine
$$\int_{0}^{1}{\ln(x)\over 1+x}dx=\sum_{n=0}^{\infty}(-1)^n\int_{0}^{1}x^n\ln(x)dx=-\sum_{n=0}^{\infty}{(-1)^n\over (n+1)^2}$$
$$\int_{0}^{1}{\ln(x)\over (1+x)^2}dx=\sum_{n=0}^{\infty}(-1)^n(n+1)\int_{0}^{1}x^n\ln(x)dx=-\sum_{n=0}^{\infty}{(-1)^n(n+1)\over (n+1)^2}$$
 [/INST] You are working on the assumption that
\begin{align*}
&\int_{0}^{1} \left( \sum_{n=0}^{\infty} \frac{(-1)^n(n+1)(n+2)}{2} x^n \right) \log x \, \mathrm{d}x \\
&\hspace{5em} = \sum_{n=0}^{\infty} \frac{(-1)^n(n+1)(n+2)}{2} \int_{0}^{1} x^n \log x \, \mathrm{d}x.
\tag{1}
\end{align*}
But this is not true because the latter sum does not converge in ordinary sense. We can, however, give an alternative meaning to this formula, which eventually leads to the correct answer. Notice that for $r \in (0, 1)$ the following holds
\begin{align*}
&\int_{0}^{r} \left( \sum_{n=0}^{\infty} \frac{(-1)^n(n+1)(n+2)}{2} x^n \right) \log x \, \mathrm{d}x \\
&\hspace{5em} = \sum_{n=0}^{\infty} \frac{(-1)^n(n+1)(n+2)}{2} \int_{0}^{r} x^n \log x \, \mathrm{d}x
\end{align*}
by the Fubini's theorem. So the issue of convergence occurs when you take limit as $r \uparrow 1$. However, this also shows that $\text{(1)}$ becomes true in Abel sense. So we have
$$ \text{(1)}
= - \frac{1}{2} \sum_{n=0}^{\infty}(-1)^{n} \left(1 + \frac{1}{n+1} \right)
= - \frac{1}{2} \left( \frac{1}{2} + \log 2 \right) \quad \text{in Abel sense.} $$
Here, we utilized that
$$ 1 - 1 + 1 - 1 + \cdots = \frac{1}{2} \quad \text{in Abel sense.} $$
</s>