Eufisky - The lost book

## 与$\sum \arctan$有关的一些问题

\begin{align*}S&=\sum\limits_{n=1}^{\infty} \arctan \frac{10n}{(3n^2+2)(9n^2-1)} \\&= \sum\limits_{n=1}^{\infty} \arg \left(1+\frac{10in}{(3n^2+2)(9n^2-1)}\right)\\&= \arg \prod\limits_{n=1}^{\infty}\left(1+\frac{10in}{(3n^2+2)(9n^2-1)}\right)\\&= \arg \prod\limits_{n=1}^{\infty}\left(\frac{(3n^2+2)(9n^2-1)+10in}{27n^4\left(1+\frac{2}{3n^2}\right)\left(1-\frac{1}{9n^2}\right)}\right).\end{align*}

\begin{align*}S&= \arg \prod\limits_{n=1}^{\infty}\left(\frac{(3n^2+2)(9n^2-1)+10in}{27n^4}\right).\end{align*}

$$(3n^2+2)(9n^2-1)+10in = (n-i)(3n+i)(3n+i+1)(3n+i-1).$$

$$S = \arg \prod\limits_{n=1}^{\infty}\frac{\left(1+\frac{i}{3n}\right)\left(1+\frac{i+1}{3n}\right)\left(1+\frac{i-1}{3n}\right)}{\left(1+\frac{i}{n}\right)}.$$

$$S = \arg \frac{-\Gamma(i)}{\Gamma\left(\frac{i}{3}\right)\Gamma\left(\frac{i+1}{3}\right)\Gamma\left(\frac{i-1}{3}\right)}.$$

$$\Gamma(3z) = \frac{1}{2\pi}3^{3z - \frac{1}{2}}\Gamma\left(z\right)\Gamma\left(z+\frac{1}{3}\right)\Gamma\left(z+\frac{2}{3}\right).$$

$$\Gamma\left(\frac{i-1}{3}\right)\Gamma\left(\frac{i}{3}\right)\Gamma\left(\frac{i+1}{3}\right) = 2\pi 3^{-i+\frac{3}{2}}\Gamma(i-1)$$

\begin{align*}&1+\frac{10in}{\left(3n^2+2\right)\left( 9n^2-1\right)}\\=&\frac{\left(1-\frac in\right)\left(1+\frac i{3n-1}\right)\left(1+\frac i{3n+1}\right)\left(1+\frac i{3n}\right)}{1+\frac2{3n^2}}.\end{align*}

\begin{align*}&\arctan\left(\frac{10n}{\left(3n^2+2\right)\left( 9n^2-1\right)}\right)\\=&\arctan\left(\frac1{3n-1}\right)+\arctan\left(\frac1{3n}\right)+\arctan\left(\frac1{3n+1}\right)-\arctan\left(\frac1n\right).\end{align*}

\begin{align*}&\sum_{n=1}^\infty\arctan\left(\frac{10n}{\left(3n^2+2\right)\left( 9n^2-1\right)}\right)\\=&\lim_{m\to\infty}\sum_{n=1}^m\left[\arctan\left(\frac1{3n-1}\right)+\arctan\left(\frac1{3n}\right)+\arctan\left(\frac1{3n+1}\right)-\arctan\left(\frac1n\right)\right]\\=&-\arctan(1)+\lim_{m\to\infty}\sum_{n=m+1}^{3m+1}\arctan\left(\frac1n\right)\\=&-\arctan(1)+\lim_{m\to\infty}\sum_{n=m+1}^{3m+1}\left[\frac1n+O\left(\frac1{n^3}\right)\right]\\=&\log(3)-\frac\pi4.\end{align*}

## 谢之题解：一道综合性的解几题

$\overrightarrow {{n_i}} \cdot \overrightarrow {{n_j}} = {a^2}{x_i}{x_j} + {b^2}{y_i}{y_j} + {c^2}{z_i}{z_j} = 0\left( {i \ne j} \right).$

$\frac{1}{{\sqrt {{a^2}{x_i}^2 + {b^2}{y_i}^2 + {c^2}{z_i}^2} }}\left( {i = 1,2,3} \right).$

${x^2} + {y^2} + {z^2} = \sum\limits_{i = 1}^3 {\frac{1}{{\left( {{a^2}{x_i}^2 + {b^2}{y_i}^2 + {c^2}{z_i}^2} \right)}}} .$

$1 = \left( {\begin{array}{*{20}{c}}{a{x_i}}&{b{y_i}}&{c{z_i}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}x\\y\\z\end{array}} \right) = \left( {\begin{array}{*{20}{c}}{a{x_i}}&{b{y_i}}&{c{z_i}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}{a{x_1}}&{a{x_2}}&{a{x_3}}\\{b{y_1}}&{b{y_2}}&{b{y_3}}\\{c{z_1}}&{c{z_2}}&{c{z_3}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}{{t_1}}\\{{t_2}}\\{{t_3}}\end{array}} \right) = {t_i}\left( {{a^2}{x_i}^2 + {b^2}{y_i}^2 + {c^2}{z_i}^2} \right).$

\begin{align*}&{x^2} + {y^2} + {z^2} = \left( {\begin{array}{*{20}{c}}x&y&z\end{array}} \right)\left( {\begin{array}{*{20}{c}}x\\y\\z\end{array}} \right) = \left( {\begin{array}{*{20}{c}}{{t_1}}&{{t_2}}&{{t_3}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}{a{x_1}}&{b{y_1}}&{c{z_1}}\\{a{x_2}}&{b{y_2}}&{c{z_2}}\\{a{x_3}}&{b{y_3}}&{c{z_3}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}{a{x_1}}&{a{x_2}}&{a{x_3}}\\{b{y_1}}&{b{y_2}}&{b{y_3}}\\{c{z_1}}&{c{z_2}}&{c{z_3}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}{{t_1}}\\{{t_2}}\\{{t_3}}\end{array}} \right)\\=& \sum\limits_{i = 1}^3 {{t_i}^2\left( {{a^2}{x_i}^2 + {b^2}{y_i}^2 + {c^2}{z_i}^2} \right)} = \sum\limits_{i = 1}^3 {\frac{1}{{\left( {{a^2}{x_i}^2 + {b^2}{y_i}^2 + {c^2}{z_i}^2} \right)}}} = \sum\limits_{i = 1}^3 {\frac{{a{x_i}^2 + b{y_i}^2 + c{z_i}^2}}{{\left( {{a^2}{x_i}^2 + {b^2}{y_i}^2 + {c^2}{z_i}^2} \right)}}} \\=& a\left( {\frac{{{x_1}^2}}{{\left( {{a^2}{x_1}^2 + {b^2}{y_1}^2 + {c^2}{z_1}^2} \right)}} + \frac{{{x_2}^2}}{{\left( {{a^2}{x_2}^2 + {b^2}{y_2}^2 + {c^2}{z_2}^2} \right)}} + \frac{{{x_3}^2}}{{\left( {{a^2}{x_3}^2 + {b^2}{y_3}^2 + {c^2}{z_3}^2} \right)}}} \right)\\+& b\left( {\frac{{{y_1}^2}}{{\left( {{a^2}{x_1}^2 + {b^2}{y_1}^2 + {c^2}{z_1}^2} \right)}} + \frac{{{y_2}^2}}{{\left( {{a^2}{x_2}^2 + {b^2}{y_2}^2 + {c^2}{z_2}^2} \right)}} + \frac{{{y_3}^2}}{{\left( {{a^2}{x_3}^2 + {b^2}{y_3}^2 + {c^2}{z_3}^2} \right)}}} \right)\\+& c\left( {\frac{{{z_1}^2}}{{\left( {{a^2}{x_1}^2 + {b^2}{y_1}^2 + {c^2}{z_1}^2} \right)}} + \frac{{{z_2}^2}}{{\left( {{a^2}{x_2}^2 + {b^2}{y_2}^2 + {c^2}{z_2}^2} \right)}} + \frac{{{z_3}^2}}{{\left( {{a^2}{x_3}^2 + {b^2}{y_3}^2 + {c^2}{z_3}^2} \right)}}} \right).\end{align*}

\begin{align*}a\left( {\frac{{{x_1}^2}}{{\left( {{a^2}{x_1}^2 + {b^2}{y_1}^2 + {c^2}{z_1}^2} \right)}} + \frac{{{x_2}^2}}{{\left( {{a^2}{x_2}^2 + {b^2}{y_2}^2 + {c^2}{z_2}^2} \right)}} + \frac{{{x_3}^2}}{{\left( {{a^2}{x_3}^2 + {b^2}{y_3}^2 + {c^2}{z_3}^2} \right)}}} \right) &= \frac{1}{a},\\b\left( {\frac{{{y_1}^2}}{{\left( {{a^2}{x_1}^2 + {b^2}{y_1}^2 + {c^2}{z_1}^2} \right)}} + \frac{{{y_2}^2}}{{\left( {{a^2}{x_2}^2 + {b^2}{y_2}^2 + {c^2}{z_2}^2} \right)}} + \frac{{{y_3}^2}}{{\left( {{a^2}{x_3}^2 + {b^2}{y_3}^2 + {c^2}{z_3}^2} \right)}}} \right) &= \frac{1}{b},\\c\left( {\frac{{{z_1}^2}}{{\left( {{a^2}{x_1}^2 + {b^2}{y_1}^2 + {c^2}{z_1}^2} \right)}} + \frac{{{z_2}^2}}{{\left( {{a^2}{x_2}^2 + {b^2}{y_2}^2 + {c^2}{z_2}^2} \right)}} + \frac{{{z_3}^2}}{{\left( {{a^2}{x_3}^2 + {b^2}{y_3}^2 + {c^2}{z_3}^2} \right)}}} \right) &= \frac{1}{c}.\end{align*}

$\frac{a^2x_1^2}{d_1^2}+\frac{a^2x_2^2}{d_2^2}+\frac{a^3x_3^2}{d_3^2}=1\Rightarrow \frac{ax_1^2}{d_1^2}+\frac{ax_2^2}{d_2^2}+\frac{ax_3^2}{d_3^2}=\frac{1}{a}.$

$\frac{1}{a}+\frac{1}{b}+\frac{1}{c}=\frac{ax_1^2+by_1^2+cz_1^2}{d_1^2}+\frac{ax_2^2+by_2^2+cz_2^2}{d_2^2}+\frac{ax_3^2+by_3^2+cz_3^2}{d_3^2}=\frac{1}{d_1^2}+\frac{1}{d_2^2}+\frac{1}{d_3^2}.$

## 又一道二元反常积分题

$\int_0^\infty {dr} \int_0^{\frac{\pi }{2}} {r{e^{ - ar}}\cos \left( {\alpha r\cos \theta } \right)\cos \left( {\beta r\sin \theta } \right)d\theta } .$

## 求和的一些估计式

Use $\sqrt{n} = \sum_{k=1}^n \left( \sqrt{k} - \sqrt{k-1} \right)$, then
\begin{align*}&2 \sqrt{n} - \sum_{k=1}^n \frac{1}{\sqrt{k}} \\=& \sum_{k=1}^n \left( 2 \sqrt{k} - 2 \sqrt{k-1} - \frac{1}{\sqrt{k}} \right) = \sum_{k=1}^n \frac{1}{\sqrt{k}}  \left( \sqrt{k}-\sqrt{k-1} \right)^2\\=& \sum_{k=1}^n \frac{1}{\sqrt{k}} \left( \frac{(\sqrt{k}-\sqrt{k-1})(\sqrt{k}+\sqrt{k-1})}{(\sqrt{k}+\sqrt{k-1})} \right)^2 \\=& \sum_{k=1}^n \frac{1}{\sqrt{k} \left(\sqrt{k}+\sqrt{k-1}\right)^2}.\end{align*}

This shows the limit does exist and $\lim_{n \to \infty} \left( 2 \sqrt{n} - \sum_{k=1}^n \frac{1}{\sqrt{k}} \right) = \sum_{k=1}^\infty \frac{1}{\sqrt{k} \left(\sqrt{k}+\sqrt{k-1}\right)^2}$.

The value of this sums equals $-\zeta\left(\frac{1}{2} \right) \approx 1.4603545$. This value is found by other means, though:
$$2 \sqrt{n} - \sum_{k=1}^n \frac{1}{\sqrt{k}} = 2 \sqrt{n} - \left( \zeta\left(\frac{1}{2}\right) - \zeta\left(\frac{1}{2}, n+1\right)\right) \sim -\zeta\left(\frac{1}{2}\right) - \frac{1}{2\sqrt{n}} + o\left( \frac{1}{n} \right) .$$

## 取整函数的求和问题

where $\lfloor\cdot\rfloor$ is greatest integer function.

Lemma Summation by Pasts (1)http://en.wikipedia.org/wiki/Summation_by_parts

$$\sum_{k=a}^b f_k\Delta g_k=f_kg_k\Bigg|_{k=a}^{b+1}-\sum_{k=a}^b g_{k+1}\Delta f_k=f_{b+1}g_{b+1}-f_ag_a-\sum_{k=a}^b g_{k+1}\Delta f_k$$
$\displaystyle \text{with difference operator }\Delta :\qquad \Delta f_k=f_{k+1}-f_k$.

My solution

$\text{Get }j=\left\lfloor \sqrt{kn}\right\rfloor\Rightarrow j\le \sqrt{kn}<j+1\Rightarrow \dfrac{j^2}{n}\le k<\dfrac{(j+1)^2}{n}$

Therefore if $\left\lfloor\dfrac{j^2}{n}\right\rfloor+1\le k\le \left\lfloor\dfrac{(j+1)^2}{n}\right\rfloor$ then $\sqrt{kn}=j$

Note:

$j=0\Rightarrow \left\lfloor\dfrac{j^2}{n}\right\rfloor+1=1$

$j=n-2\Rightarrow \left\lfloor\dfrac{(j+1)^2}{n}\right\rfloor=n-2$

$j=n-1\Rightarrow \left\lfloor\dfrac{(j+1)^2}{n}\right\rfloor=n>n-1$

So that sum became

\begin{align*}S&=\sum_{k=1}^{n-1}\sin\left(\dfrac{\left(2\lfloor\sqrt{kn}\rfloor+1\right)\pi}{2n}\right)\\&=\sin\left(\dfrac{\left(2\lfloor\sqrt{(n-1)n}\rfloor+1\right)\pi}{2n}\right)+\sum_{k=1}^{n-2}\sin\left(\dfrac{\left(2\lfloor\sqrt{kn}\rfloor+1\right)\pi}{2n}\right)\\ &=\sin\left(\frac{(2n-1)\pi}{2n}\right)+\sum_{j=0}^{n-2}\left(\left\lfloor\frac{(j+1)^2}{n}\right\rfloor-\left\lfloor\frac{j^2}{n}\right\rfloor\right)\sin\left(\frac{(2j+1)\pi}{2n}\right)\\ &=\sin\left(\frac{\pi}{2n}\right)+\sum_{j=0}^{n-2}\Delta\left(\left\lfloor\frac{j^2}{n}\right\rfloor\right)\sin\left(\frac{(2j+1)\pi}{2n}\right)\end{align*}
Using the [1], we get

With sum A, using reverse summand property we get
\begin{align*}A&=\sum_{j=1}^{n-1}\left\lfloor\frac{j^2}{n}\right\rfloor\cos\left(\frac{j\pi}{n}\right)\\&=\sum_{j=1}^{n-1}\left\lfloor\frac{(n-j)^2}{n}\right\rfloor\cos\left(\frac{(n-j)\pi}{n}\right)\\ &=-\sum_{j=1}^{n-1}\left\lfloor n-2j+\frac{j^2}{n}\right\rfloor\cos\left(\frac{j\pi}{n}\right)\\ &=-A+\sum_{j=1}^{n-1}(2j-n)\cos\left(\frac{j\pi}{n}\right)\\ \Rightarrow A&=\frac{1}{2}\sum_{j=1}^{n-1}(2j-n)\cos\left(\frac{j\pi}{n}\right)\end{align*}

We get

$\displaystyle\cos\left(\frac{j\pi}{n}\right)=\dfrac{1}{2\sin\left(\frac{\pi}{2n}\right)}\left[\sin\left(\frac{(2j+1)\pi}{2n}\right)-\sin\left(\frac{(2j-1)\pi}{2n}\right)\right]=\dfrac{1}{2\sin\left(\frac{\pi}{2n}\right)}\Delta\left[\sin\left(\frac{(2j-1)\pi}{2n}\right)\right]$

continue using [1] :)

$\displaystyle A =\left.\dfrac{(2j-n)}{4\sin\left(\frac{\pi}{2n}\right)}\sin\left(\frac{(2j-1)\pi}{2n}\right)\right|_{j=1}^{n}-\dfrac{1}{4\sin\left(\frac{\pi}{2n}\right)}\sum_{j=1}^{n-1}2\sin\left(\frac{(2j+1)\pi}{2n}\right)$

\begin{align*}A&=\frac{n-1}{2}+\dfrac{1}{4\sin^2\left(\frac{\pi}{2n}\right)}\sum_{j=1}^{n-1}\Delta\left[\cos\left(\frac{j\pi}{n}\right)\right]\\ &=\frac{n-1}{2}+\dfrac{1}{4\sin^2\left(\frac{\pi}{2n}\right)}\cdot\left.\cos\left(\frac{j\pi}{n}\right)\right|_{j=1}^n\\ &=\frac{n-1}{2}-\dfrac{1+\cos\left(\frac{\pi}{n}\right)}{4\sin^2\left(\frac{\pi}{2n}\right)}\\&=\frac{n-1}{2}-\dfrac{2\cos^2\left(\frac{\pi}{2n}\right)}{4\sin^2\left(\frac{\pi}{2n}\right)}\end{align*}

Therefore:

\begin{align*}S&=(n-1)\sin\left(\frac{\pi}{2n}\right)-2\sin\left(\frac{\pi}{2n}\right)A\\ &=(n-1)\sin\left(\frac{\pi}{2n}\right)-(n-1)\sin\left(\frac{\pi}{2n}\right)+\dfrac{\cos^2\left(\frac{\pi}{2n}\right)}{\sin\left(\frac{\pi}{2n}\right)}\\ &=\boxed{\displaystyle\cot\left(\frac{\pi}{2n}\right)\cos\left(\frac{\pi}{2n}\right)}\end{align*}

## 又两个积分

Let $u = \ln \tan x$, so that $\frac{\pi}{4} < x< \frac{\pi}{2}$ is mapped to $u>0$, $x=\arctan(\exp(u))$ and $\mathrm{d}x = \frac{\mathrm{d}u}{2 \cosh(u)}$. Then
$$\int_{\pi/4}^{\pi/2} \ln( \ln(\tan x))\, \mathrm{d}x = \frac{1}{2} \int_0^\infty \frac{\ln (u)}{\cosh(u)} \mathrm{d}u = \frac{1}{2} \lim_{s \to 0^+}\frac{\mathrm{d}}{\mathrm{d} s} \int_0^\infty \frac{u^s}{\cosh(u)} \mathrm{d}u$$
The latter parametric integral is evaluated by expanding $\cosh(u)$ into exponential and using Euler's gamma-integral:
\begin{align*}\int_0^\infty \frac{u^s}{2\cosh(u)} \mathrm{d}u &= \int_0^\infty u^s \frac{\exp(-u)}{1+\exp(-2u)}\mathrm{d}u = \sum_{n=0}^\infty (-1)^n \int_0^\infty u^{s} \exp(-(2n+1)u) \,\mathrm{d}u \\&= \Gamma(s+1)  \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^{s+1}} = \Gamma(s+1) 2^{-2s-2} \left( \zeta\left(s+1,\frac{1}{4}\right) - \zeta\left(s+1,\frac{3}{4}\right) \right)\end{align*}
Near $s=0$:
$$\zeta(1+s,a) = \frac{1}{s} - \psi(a) - \gamma_1(a) s + \mathcal{o}(s)$$
where $\psi(a)$ is the digamma function (http://en.wikipedia.org/wiki/Digamma_function), and $\gamma_1(a)$ is the first generalized Stieltjes constant (http://en.wikipedia.org/wiki/Stieltjes_constants). Differentiating and taking the limit we have
\begin{align*}\int_{\pi/4}^{\pi/2} \ln( \ln(\tan x))\, \mathrm{d}x &= \frac{1}{4} \left( \left(\log(4) + \gamma\right)\left(\psi\left(\frac{1}{4}\right)-\psi\left(\frac{3}{4}\right)\right) - \left(\psi_1\left(\frac{1}{4}\right)-\psi_1\left(\frac{3}{4}\right)\right)\right) \\&= \frac{\pi}{4} \log \left( \frac{4 \pi^3}{\Gamma\left(\frac{1}{4}\right)^4} \right) \approx -0.260443\end{align*}
where the latter equality is given my Mathematica.

I'm posting an asnwer (of the $2$ I have) using real analysis methods:

\begin{align*}\int_{0}^{\infty}\sin x \sin \sqrt{x}\,dx &\overset{\sqrt{x}=u}{=\! =\! =\!}2\int_{0}^{\infty}u\sin u \sin u^2 \,du \\&=-\int_{0}^{\infty}u\cos \left ( u^2+u \right )\,du+\int_{0}^{\infty}u\cos(u^2-u)\,du \\&\overset{u \mapsto u+1}{=\! =\! =\! =\!}-\int_{0}^{\infty}u\cos(u^2+u)\,du+\int_{-1}^{\infty}\left ( u+1 \right )\cos\left ( u^2+u \right )\,du \\&= \int_{0}^{\infty}\cos\left ( u^2+u \right )\,du+\int_{-1}^{0}\left ( u+1 \right )\cos\left ( u^2+u \right )\,du\\&\overset{u={\rm v}-\frac{1}{2}}{=\! =\! =\! =\!}\int_{1/2}^{\infty}\cos\left ( {\rm v}^2-\frac{1}{4} \right )\,d{\rm v}+\int_{-1/2}^{1/2}\left ( {\rm v}+\frac{1}{2} \right )\cos \left ( {\rm v}^2-\frac{1}{4} \right )\,d{\rm v} \\&= \int_{0}^{\infty}\cos \left ( {\rm v}^2-\frac{1}{4} \right )\,d{\rm v}+\\& \left [ \int_{-1/2}^{1/2}{\rm v}\cos \left ( {\rm v}^2-\frac{1}{4} \right )\,d{\rm v}+\frac{1}{2}\int_{-1/2}^{0}\cos\left ( {\rm v}^2-\frac{1}{2} \right )\,d{\rm v}- \frac{1}{2}\int_{0}^{1/2}\cos\left ( {\rm v}^2-\frac{1}{2} \right )\,d{\rm v} \right ]\end{align*}

However, the equation in the bracket equals zero due to symmetry.

Hence:

\begin{align*}\int_{0}^{\infty}\sin x \sin x^2\,dx&=\int_{0}^{\infty}\cos\left ( {\rm v}^2-\frac{1}{2} \right )\,d{\rm v}\\&=\cos \frac{1}{4}\int_{0}^{\infty}\cos {\rm v}^2\,d{\rm v}+\sin \frac{1}{4}\int_{0}^{\infty}\sin {\rm v}^2\,d{\rm v}\\&\overset{(*)}{=}\int_{0}^{\infty}\sin {\rm v}^2\,d{\rm v}\left ( \cos \frac{1}{4}+\sin \frac{1}{4} \right )\\&=\frac{\sqrt{\pi}}{2}\sin \left ( \frac{3\pi-1}{4} \right )\;\; \;\;\;\; \square\end{align*}

$(*)$ We used the Frensel integrals stating that $\displaystyle \int_{0}^{\infty}\cos x^2 \,dx=\int_{0}^{\infty}\sin x^2 \,dx=\frac{1}{2}\sqrt{\frac{\pi}{2}}$.

## 两个奇怪的积分

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
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.

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.

This one can be done with "residue at infinity" calculation. This method is shown in the Example VI of http://en.wikipedia.org/wiki/Methods_of_contour_integration

First, we use $z^z = \exp ( z \log z )$ where $\log z$ is defined for $-\pi\leq \arg z < \pi$.

For $(1-z)^{1-z} = \exp ( (1-z)\log (1-z) )$, we use $\log (1-z)$ defined for $0\leq \arg(1-z) <2\pi$.

Then, let  $f(z)= \exp( i\pi z + z \log z + (1-z) \log (1-z) )$.

As shown in the Ex VI in the wikipedia link, we can prove that $f$ is continuous on $(-\infty, 0)$ and $(1,\infty)$, so that the cut of $f(z)$ is $[0,1]$.

We use the contour: (consisted of upper segment: slightly above $[0,1]$, lower segment: slightly below $[0,1]$, circle of small radius enclosing $0$, and circle of small radius enclosing $1$, that looks like a dumbbell having knobs at $0$ and $1$, can someone edit this and include a picture of it please? In fact, this is also the same contour as in Ex VI, with different endpoints.)

On the upper segment, the function $f$ gives, for $0\leq r \leq 1$,
$$\exp(i\pi r) r^r (1-r)^{1-r} \exp( (1-r) 2\pi i ).$$

On the lower segment, the function $f$ gives, for $0\leq r \leq 1$,
$$\exp(i\pi r) r^r(1-r)^{1-r}.$$

Since the functions are bounded, the integrals over circles vanishes when the radius tend to zero.

Thus, the integral of $f(z)$ over the contour, is the integral over the upper and lower segments, which contribute to

$$\int_0^1 \exp(i\pi r) r^r (1-r)^{1-r} dr - \int_0^1 \exp(-i\pi r) r^r(1-r)^{1-r} dr$$

which is
$$2i \int_0^1 \sin(\pi r) r^r (1-r)^{1-r} dr.$$

By the Cauchy residue theorem, the integral over the contour is
$$-2\pi i \textrm{Res}_{z=\infty} f(z) = 2\pi i \textrm{Res}_{z=0} \frac{1}{z^2} f(\frac 1 z).$$

From a long and tedious calculation of residue, it turns out that the value on the right is
$$2i \frac{\pi e}{24}.$$
Then we have the result:
$$\int_0^1 \sin(\pi r) r^r (1-r)^{1-r} dr = \frac{\pi e}{24}.$$

## 曾经的两道矩阵正定问题的解答

$\left( {\begin{array}{*{20}{c}}{{X^T}AX}&{{I_m}}\\{{I_m}}&{{X^T}{A^{ - 1}}X}\end{array}} \right) = \left( {\begin{array}{*{20}{c}}{{X^T}AX}&{{X^T}X}\\{{X^T}X}&{{X^T}{A^{ - 1}}X}\end{array}} \right) = \left( {\begin{array}{*{20}{c}}{{X^T}}&0\\0&{{X^T}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}A&{{I_n}}\\{{I_n}}&{{A^{ - 1}}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}X&0\\0&X\end{array}} \right).$

$\left( {\begin{array}{*{20}{c}}{{I_n}}&0\\{ - {A^{ - 1}}}&{{I_n}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}A&{{I_n}}\\{{I_n}}&{{A^{ - 1}}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}{{I_n}}&{ - {A^{ - 1}}}\\0&{{I_n}}\end{array}} \right) = \left( {\begin{array}{*{20}{c}}A&0\\0&0\end{array}} \right).$

$$\left(\min\{x_i,x_j\}\right)_{n\times n}= \begin{pmatrix} x_1&x_1&x_1&\cdots&x_1\\ x_1&x_2&x_2&\cdots &x_2\\ x_1&x_2&x_3&\cdots&x_3\\ \cdots&\cdots&\cdots&\cdots\\ x_1&x_2&x_3&\cdots&x_n \end{pmatrix}$$

\begin{align*}&\begin{pmatrix} a_1&\\ a_1&a_2\\ a_1&a_2&a_3\\ \cdots&\cdots&\cdots&\cdots\\ a_1&a_2&a_3&\cdots&a_n \end{pmatrix} \begin{pmatrix} a_1&a_1&a_1&\cdots&a_1\\ 0&a_2&a_2&\cdots &a_2\\ 0&0&a_3&\cdots&a_3\\ \cdots&\cdots&\cdots&\cdots\\ 0&0&0&\cdots&a_n \end{pmatrix}\\=& \begin{pmatrix} a_1^2&a_1^2&a_1^2&\cdots&a_1^2\\ a_1^2&a_1^2+a_2^2&a_1^2+a_2^2&\cdots &a_1^2+a_2^2\\ a_1^2&a_1^2+a_2^2&a_1^2+a_2^2+a_3^2&\cdots&a_1^2+a_2^2+a_3^2\\ \cdots&\cdots&\cdots&\cdots\\ a_1^2&a_1^2+a_2^2&a_1^2+a_2^2+a_3^2&\cdots&a_1^2+a_2^2+a_3^2+\cdots+a_n^2 \end{pmatrix}.\end{align*}

$$\left(\min\{x_i,x_j\}\right)_{n\times n}= \begin{pmatrix} x_1&x_1&x_1&\cdots&x_1\\ x_1&x_2&x_2&\cdots &x_2\\ x_1&x_2&x_3&\cdots&x_3\\ \cdots&\cdots&\cdots&\cdots\\ x_1&x_2&x_3&\cdots&x_n \end{pmatrix}$$

\begin{align*} &\sum_{i,j=1}^Na_{i}a_{j}\min\{x_{\sigma(i)},x_{\sigma(j)}\}=\sum_{i=1}^N\left(\sum_{j=1}^Na_{i}a_{j}\min\{x_{\sigma(i)},x_{\sigma(j)}\}\right)\\=&\sum_{i=1}^N\left(\sum_{j=1}^Na_{i}a_{\sigma^{-1}(j)}\min\{x_{\sigma(i)},x_{j}\}\right)=\sum_{j=1}^N\left(\sum_{i=1}^Na_{i}a_{\sigma^{-1}(j)}\min\{x_{\sigma(i)},x_{j}\}\right)\\=&\sum_{j=1}^N\left(\sum_{i=1}^Na_{\sigma^{-1}(i)}a_{\sigma^{-1}(j)}\min\{x_{i},x_{j}\}\right)=\sum_{i,j=1}^Na_{\sigma^{-1}(i)}a_{\sigma^{-1}(j)}\min\{x_{i},x_{j}\}. \end{align*}

$$\left(e^{x_i+x_j-|x_i-x_j|}\right)_{n\times n}= \begin{pmatrix} e^{2x_1}&e^{2x_1}&e^{2x_1}&\cdots&e^{2x_1}\\ e^{2x_1}&e^{2x_2}&e^{2x_2}&\cdots &e^{2x_2}\\ e^{2x_1}&e^{2x_2}&e^{2x_3}&\cdots&e^{2x_3}\\ \cdots&\cdots&\cdots&\cdots\\ e^{2x_1}&e^{2x_2}&e^{2x_3}&\cdots&e^{2x_n} \end{pmatrix}$$

$$\left(\frac{1}{1+\theta(x_i+x_j)+(1-\theta)|x_i-x_j|}\right)_{n\times n}$$

\begin{align*} &\sum_{i,j=1}^N\frac{a_ia_j}{1+\theta(x_i+x_j)+(1-\theta)|x_i-x_j|}\\=&\sum_{i,j=1}^Na_ia_j\int_0^\infty e^{-t(1+\theta(x_i+x_j)+(1-\theta)|x_i-x_j|)}dt\\ =&\int_0^\infty e^{-t}\left(\sum_{i,j=1}^N(a_ie^{-tx_i})(a_je^{-tx_j})e^{t(1-\theta)(x_i+x_j-|x_i-x_j|)}\right)dt. \end{align*}

$$\left( {\frac{{\ln \left( {1 + {x_i} + {x_j}} \right) - \ln \left( {1 + \left| {{x_i} - {x_j}} \right|} \right)}}{{{x_i} + {x_j} - \left| {{x_i} - {x_j}} \right|}}} \right)_{n \times n}$$

$${\frac{{\ln \left( {1 + {x_i} + {x_j}} \right) - \ln \left( {1 + \left| {{x_i} - {x_j}} \right|} \right)}}{{{x_i} + {x_j} - \left| {{x_i} - {x_j}}\right|}}}=\int_0^1 \frac{1}{1+\theta(x_i+x_j)+(1-\theta)|x_i-x_j|} d\theta.$$