<s>[INST] Trying to integrate $\int_0^1 x(1-x)(2-x) e^{-(1-x)^2}\ln(1-x)\,dx$ Buenos Dias, Ciao, Hello!
My fellow math stack users, I will try to solve this integral
$$
\int_0^1 x(1-x)(2-x) e^{-(1-x)^2}\ln(1-x)\,dx
$$
I did this $u=1-x$
$$
-\int_0^1 (u-1)u(u+1)e^{-u^2}\ln u \, du=\\
-\int_0^1 (u^2-u)(u+1)e^{-u^2}\ln u \, du=\\
-\int_0^1 (u^3-u)e^{-u^2}\ln u \, du=\\
-\int_0^1 u^3e^{-u^2}\ln u \, du+\int_0^1 ue^{-u^2}\ln u \, du.
$$
But this seems like it is related to a Gaussian integral but the bounds of integration aren't the Gaussian limits.  I am quite baffled at this step. 
Thank you, Gracias, Grazie
 [/INST] The integral is of the form 
\begin{equation*}
\int e^{-(1-x)^{2}}x(1-x)(2-x)\ln (1-x)dx=\int e^{g(x)}h(x)dx.
\end{equation*} 
This form recalls the well-known formula 
\begin{equation*}
\int e^{g(x)}\left( g^{\prime }(x)f(x)+f^{\prime }(x)\right)
dx=f(x)e^{g(x)}+C.
\end{equation*} 
So we are done if we find a function $f(x)$ such that 
\begin{equation*}
h(x)=x(1-x)(2-x)\ln (1-x)=g^{\prime }(x)f(x)+f^{\prime }(x).
\end{equation*} 
We have $g(x)=-(1-x)^{2}$ and $g^{\prime }(x)=2(1-x).$ Note that 
\begin{equation*}
h(x)=2(1-x)\times \frac{x(2-x)\ln (1-x)}{2}=g^{\prime }(x)\times \frac{1}{2} 
x(2-x)\ln (1-x)
\end{equation*} 
Let $f_{1}(x)=\frac{1}{2}x(2-x)\ln (1-x)$ and then add and subtract $ 
f_{1}^{\prime }(x)$ to $h(x)$ 
\begin{equation*}
h(x)=\left( g^{\prime }(x)\times f_{1}(x)+f_{1}^{\prime }(x)\right)
-f_{1}^{\prime }(x).
\end{equation*} 
Easy computation shows that $-f_{1}^{\prime }(x)=-(1-x)\ln \left( 1-x\right)
+\frac{x\left( x-2\right) }{2(x-1)}.$ Note that 
\begin{equation*}
-f_{1}^{\prime }(x)=2(1-x)\times \left( -\frac{\ln (1-x)}{2}\right) +\frac{ 
x\left( x-2\right) }{2(x-1)}=g^{\prime }(x)\times \left( -\frac{\ln (1-x)}{2} 
\right) +\frac{x\left( x-2\right) }{2(x-1)}.
\end{equation*} 
Let $f_{2}(x)=-\frac{1}{2}\ln (1-x),$ then 
\begin{equation*}
h(x)=\left( g^{\prime }(x)\times f_{1}(x)+f_{1}^{\prime }(x)\right)
+g^{\prime }(x)\times f_{2}(x)+\frac{x\left( x-2\right) }{2(x-1)}.
\end{equation*}
Now we add and subtract $f_{2}^{\prime }(x)=\frac{1}{2(1-x)}$ to obtain 
\begin{eqnarray*}
h(x) &=&\left( g^{\prime }(x)\times f_{1}(x)+f_{1}^{\prime }(x)\right)
+\left( g^{\prime }(x)\times f_{2}(x)+f_{2}^{\prime }(x)\right) +\frac{ 
x\left( x-2\right) }{2(x-1)}-\frac{1}{2(1-x)} \\
&& \\
&=&\left( g^{\prime }(x)\times f_{1}(x)+f_{1}^{\prime }(x)\right) +\left(
g^{\prime }(x)\times f_{2}(x)+f_{2}^{\prime }(x)\right) +\frac{x-1}{2}.
\end{eqnarray*}
We can write $\frac{x-1}{2}=2(1-x)\left( \frac{-1}{4}\right) =g^{\prime
}(x)\times \frac{-1}{4}.$ Let $f_{3}(x)=-\frac{1}{4}.$ Since $f_{3}^{\prime
}(x)=0,$ then we can write 
\begin{equation*}
\frac{x-1}{2}=g^{\prime }(x)\times f_{3}(x)+f_{3}^{\prime }(x).
\end{equation*} 
It follows that 
\begin{eqnarray*}
h(x) &=&\left( g^{\prime }(x)\times f_{1}(x)+f_{1}^{\prime }(x)\right)
+\left( g^{\prime }(x)\times f_{2}(x)+f_{2}^{\prime }(x)\right) +\left(
g^{\prime }(x)\times f_{3}(x)+f_{3}^{\prime }(x)\right)  \\
&& \\
&=&\left( f_{1}(x)+f_{2}(x)+f_{3}(x)\right) +g^{\prime }(x)\times \left(
f_{1}(x)+f_{2}(x)+f_{3}(x)\right) ^{\prime } \\
&& \\
&=&f^{\prime }(x)+g^{\prime }(x)\times f(x)
\end{eqnarray*} 
where 
\begin{equation*}
f(x)=f_{1}(x)+f_{2}(x)+f_{3}(x)=\frac{-1}{2}\left( \frac{1}{2}+\left(
1-x\right) ^{2}\ln \left( 1-x\right) \right) .
\end{equation*} 
According to the formula above, we have 
\begin{equation*}
\int e^{-(1-x)^{2}}x(1-x)(2-x)\ln (1-x)dx=\frac{-1}{2}\left( \frac{1}{2} 
+\left( 1-x\right) ^{2}\ln \left( 1-x\right) \right) e^{-(1-x)^{2}}+C.\ \color{red} \blacksquare  
\end{equation*}
</s>