I want to compute $\int_0^1\ln(1-x)dx$.
Using integration by parts we have: $\int_0^1\ln(1-x)dx=\int_0^1(x)'\ln(1-x)dx=x\ln(1-x)|_0^1-\int_0^1\frac{x}{1-x}dx$ but limit at $1$ of $x\ln(1-x)$ is $-\infty$ and $\int_0^1\frac{x}{1-x}dx$ does not converge.
I know the answer is $-1$ because desired integral is equal to $\int_0^1\ln(x)dx$ or using integration by parts but with $-(1-x)$ not $x$ yields $-1$ but why first approach does not work and produce false equality?