Integrate $\int_{0}^{1}{x^{-x}(1-x)^{x-1}\sin{\pi x}dx}$

Evaluate integral $$\int_{0}^{1}{x^{-x}(1-x)^{x-1}\sin{\pi x}dx}$$ Well,I think we have $$\int_{0}^{1}{x^{-x}(1-x)^{x-1}\sin{\pi x}dx}=\frac{\pi}{e}$$

and

$$\int_{0}^{1}{x^{x}(1-x)^{1-x}\sin{\pi x}dx}=\frac{e\pi}{24}$$

With such nice result of these integral,why isn't worth to evaluate it?

I found a solution about the second one,but I wonder it will work for the first one 2

Note $$ S=\int_{0}^{1}{\sin{\pi x}x^{x}(1-x)^{1-x}dx}-\int_{0}^{1}{(1-x)e^{(i\pi+\ln{x}-\ln{(1-x)})x}dx} $$ Let $t=\ln{x}-\ln{(1-x)}$,$x=\frac{e^{t}}{1+e^{t}}$ Thus \begin{align} S&=\int_{-\infty}^{+\infty}{\frac{1}{e^{t}+1}e^{(i\pi+t)\frac{e^{t}}{1+e^t}}\frac{e^{t}}{(1+e^{t})^{2}}dt}\\ &=\int_{-\infty+i\pi}^{-\infty-i\pi}{e^{\frac{te^{t}}{e^{t}-1} } \frac{e^{t}}{(e^{t}-1)^{3}}dt} \end{align} Due to $$ f(z)=e^{\frac{te^{t}}{e^{t}-1} } \frac{e^{t}}{(e^{t}-1)^{3}},\qquad D=\{Z\in C|-\pi\leq Im(z) \leq \pi\}$$ Therefore $res(f,0)=-\frac{e}{24}$when $z=0$ with $ \zeta_{R}=\gamma_{R}+o_{R}+\tau_{R}$ $$\oint_{\zeta_{R}}{f(z)dz}=-2\pi i\cdot res(f,0)=\frac{2i\pi e}{24}$$ because $$ \{z_{n}\}\subset D,\qquad |z_{n}|\rightarrow\infty $$ Therefore $$ 2S=2\lim_{R\rightarrow \infty}\int_{\gamma_{R}}{f(z)dz} $$ gives $$ \int_{0}^{1}{\sin{\pi x}x^{x}(1-x)^{1-x}dx}=Im(S)=\frac{e\pi}{24} $$

My friend tian_275461 told me he use a simliar method to deal with the first one to obtain the result $\frac{\pi}{e}$,but I am not figure it out.


Solution 1:

Exactly the same method works for the other case. $$ \int_0^1 x^{-x} (1-x)^{x-1}\sin{\pi x} dx = \mathrm{Im}\left[\int_0^1 \frac{e^{(i\pi+\ln(1-x)-\ln x)x}}{1-x}dx\right] $$ Write $t=\ln((1-x)/x)$ and $z=t+i\pi$ as you did above to get $$ S = \int_0^1 \frac{e^{(i\pi+\ln(1-x)-\ln x)x}}{1-x}dx =\int_{-\infty+i\pi}^{\infty+i\pi} \frac{e^{\frac{z}{1-e^z}}}{1-e^z}dz $$

Then with $$f(z)=\frac{e^{\frac{z}{1-e^z}}}{1-e^z}$$ the only pole is at $z=0$, $res(f,0)=-\frac{1}{e}$ and in the limit $2S = \oint f(z)dz=-2\pi i \cdot res(f,0) = 2\pi i/e$ and your answer follows.