Eufisky - The lost book

西西爆难积分题求解

在这里,主要展示西西12年7月在百度贴吧数学吧中贴出的30个积分题的求解,本文中主要参考的是自己以前的摘录,不知何故,与西哥的版本有些出入,但基本包含了西哥的所有问题,来源于网友的解答均会注明出处。

1. \[\int_0^1 {\frac{{\ln \left( {1 + {x^{2 + \sqrt 3 }}} \right)}}{{1 + x}}dx}  = \frac{{{\pi ^2}}}{{12}}\left( {1 - \sqrt 3 } \right) + \ln 2 \cdot \ln \left( {1 + \sqrt 3 } \right)\]
2. \[\int_0^1 {\frac{{\ln \left( {1 + {x^{4 + \sqrt {15} }}} \right)}}{{1 + x}}dx}  = \frac{{{\pi ^2}}}{{12}}\left( {2 - \sqrt {15} } \right) + \ln \frac{{1 + \sqrt 5 }}{2} \cdot \ln \left( {2 + \sqrt 3 } \right) +  + \ln 2 \cdot \ln \left( {\sqrt 3  + \sqrt 5 } \right)\]
3. \[\int_0^1 {\frac{{\ln \left( {1 + {x^{6 + \sqrt {35} }}} \right)}}{{1 + x}}dx}  = \frac{{{\pi ^2}}}{{12}}\left( {3 - \sqrt {35} } \right) + \ln \frac{{1 + \sqrt 5 }}{2} \cdot \ln \left( {8 + 3\sqrt 7 } \right) +  + \ln 2 \cdot \ln \left( {\sqrt 5  + \sqrt 7 } \right)\]
4. \[\int_0^1 {\frac{{ar\tanh x\ln x}}{{x\left( {1 - x} \right)\left( {1 + x} \right)}}dx} \]
5. \[\int_0^1 {\frac{{\arctan {x^{3 + \sqrt 8 }}}}{{1 + {x^2}}}dx} \]
6. \[\int_0^{\frac{\pi }{3}} {x{{\ln }^2}\left( {2\sin \frac{x}{2}} \right)dx} \]
7. \[\int_0^{\frac{\pi }{2}} {{{\ln }^n}\sin xdx} \]
8. \[\int_0^\infty  {\frac{{\sin x}}{{\cosh x - \cos x}} \cdot \frac{{{x^n}}}{{n!}}dx} \]
9. \[\int_0^\infty  {\frac{{\sin x}}{{\cosh x + \cos x}} \cdot \frac{{{x^n}}}{{n!}}dx} \]
10. \[\int_{\frac{\pi }{4}}^{\frac{\pi }{2}} {\ln \ln \left( {\tan x} \right)dx} \]
11. \[\int_0^\infty  {\frac{{x - \sin x}}{{\left( {{\pi ^2} + {x^2}} \right){x^3}}}dx}  = \frac{1}{{2{\pi ^3}}}\left( {1 + \frac{{{\pi ^2}}}{2} - \pi  - \frac{1}{{{e^\pi }}}} \right)\]
12. \[\int_0^\infty  {\frac{1}{{{a^2} + {x^2}}}\frac{{x - \sin x}}{{{x^3}}}dx}  = \frac{{{a^2} - 2a + 2 - 2{e^{ - a}}}}{{4{a^3}}},a > 0\]
13. \[\prod\limits_{k = 4}^\infty  {\left[ {1 - {{\left( {\frac{3}{k}} \right)}^3}} \right]}  = \frac{8}{{15561}} \cdot \frac{{\cos \left( {\frac{{3\sqrt 3 }}{2}\pi } \right)}}{\pi }\]
14. \[\sum\limits_{m = 1}^\infty  {\sum\limits_{n = {2^{m - 1}}}^{{2^m} - 1} {\frac{m}{{\left( {2n + 1} \right)\left( {2n + 2} \right)}}} }  = 1 - \gamma \]
15. \[\int_0^1 {\frac{{\left( {1 - x} \right)\ln x \cdot {e^{ - x}}}}{{\pi  - x}}dx} \]
16. \[\mathop {\lim }\limits_{n \to \infty } \left[ { - \frac{1}{{2m}} + \ln \left( {\frac{e}{m}} \right) + \sum\limits_{n = 2}^m {\left( {\frac{1}{n} - \frac{{\varsigma \left( {1 - n} \right)}}{{{m^n}}}} \right)} } \right] = \gamma \]
17. \[\int_0^\infty  {\frac{1}{{x{e^x}\left( {{\pi ^2} + {{\ln }^2}x} \right)}}dx} \]
18. \[\int_0^\infty  {\frac{{\ln \left( {1 + {x^2}} \right)}}{{{e^{2\pi x}} - 1}}dx} \]
19. \[\sum\limits_{n = 1}^\infty  {\frac{{\sum\limits_{k = 1}^n {\frac{1}{{{k^4}}}} }}{{{n^2}}}} \]
20. \[\int_0^1 {\int_0^1 {\int_0^1 {\int_0^1 {\frac{{dwdxdydz}}{{\left( {wxy - 1} \right)\left( {zwx - 1} \right)\left( {yzw - 1} \right)\left( {xyz - 1} \right)}}} } } } \]
21. \[\int_0^\infty  {\frac{{{e^{ - {x^2}}}}}{{{\pi ^2} + {{\left( {\gamma  + x} \right)}^2}}}dx} \]
22. \[\sqrt[3]{{1 + \sqrt[3]{{1 + \sqrt[3]{{1 + \sqrt[3]{{1 + \sqrt[3]{{1 +  \cdots }}}}}}}}}} = \frac{2}{{\sqrt 3 }}\cos \left( {\frac{1}{3}\arccos \frac{{3\sqrt 3 }}{2}} \right)\]
23. \[\int_0^{2ar\cosh \pi } {\frac{{dx}}{{1 + \frac{{{{\sinh }^2}x}}{{{\pi ^4}}}}}} \]
24. \[\int_0^\infty  {\frac{{x{e^x}}}{{\sqrt {4{e^x} - 3} \left( {1 + 2{e^x} - \sqrt {4{e^x} - 3} } \right)}}dx} \]
25. \[\int_0^{\frac{\pi }{2}} {\frac{{{{\ln }^2}\left( {2\cos x} \right)}}{{{{\ln }^2}\left( {2\cos x} \right) + {x^2}}}dx} \]
26. \[\mathop {\lim }\limits_{n \to \infty } \frac{{n!}}{{{n^n}}}\left( {\sum\limits_{k = 0}^n {\frac{{{n^k}}}{{k!}}}  - \sum\limits_{k = n + 1}^\infty {\frac{{{n^k}}}{{k!}}} } \right)\]
27. \[\sum\limits_{k = 1}^\infty  {\frac{1}{{{k^2}}}\cos \left( {\frac{9}{{k\pi  + \sqrt {{k^2}{\pi ^2} - 9} }}} \right)} \]
28. \[\sum\limits_{n =  - \infty }^\infty  {\frac{{{{\left( { - 1} \right)}^n}}}{{{{\left( {n\pi  + \phi } \right)}^2}}}\cos \left( {\sqrt {{n^2}{\pi ^2} + {a^2} - {\phi ^2}} } \right)}  = \frac{{a\cos a\cot \phi  + \phi \sin a}}{{a\sin \phi }}\]
29. \[\sum\limits_{n = 0}^\infty  {\frac{{{n^2}{\pi ^2} + {\phi ^2}}}{{{{\left( {{n^2}{\pi ^2} - {\phi ^2}} \right)}^2}}}{{\left( { - 1} \right)}^n}\cos \left( {\sqrt {{n^2}{\pi ^2} + {a^2} - {\phi ^2}} } \right)}  = \frac{{\cos \sqrt {{a^2} - {\phi ^2}} }}{{2{\phi ^2}}} + \frac{{a\cos a\cot \phi  + \phi \sin a}}{{2a\sin \phi }}\]
30. \[\sum\limits_{n = 0}^\infty  {\frac{{{{\left( { - 1} \right)}^n}\left( {n + \frac{1}{2}} \right)}}{{{{\left( {n + \frac{1}{3}} \right)}^2}{{\left( {n + \frac{2}{3}} \right)}^2}}}} \cos \left[ {\pi \sqrt {\left( {n + \frac{1}{6}} \right)\left( {n + \frac{5}{6}} \right)} } \right] = {\pi ^2}{e^{\frac{{\pi \sqrt 3 }}{6}}}\]
31. \[\int_{ - 1}^1 {\frac{{\arctan x}}{{1 + x}}\ln \left( {\frac{{1 + {x^2}}}{2}} \right)dx} \]
32. \[\int_0^1 {\sin \left( {\pi x} \right){x^x}{{\left( {1 - x} \right)}^{1 - x}}dx} \]
33. \[\int_0^{\frac{\pi }{2}} {{x^2}{{\ln }^2}\left( {2\cos x} \right)dx} \]
34. \[\int_0^{\frac{\pi }{2}} {\frac{{{x^2}}}{{{x^2} + {{\ln }^2}\left( {2\cos x} \right)}}dx} \] 
35. \[\int_0^{\frac{\pi }{2}} {\frac{{{x^2}{{\ln }^2}\left( {2\cos x} \right)}}{{{x^2} + {{\ln }^2}\left( {2\cos x} \right)}}dx}\]
36. \[\mathop {\lim }\limits_{n \to \infty } \frac{n}{{\ln n}}\left[ {\frac{1}{\pi }{{\left( {\sum\limits_{k = 1}^n {\sin \frac{\pi }{{\sqrt {{n^2} + k} }}} } \right)}^n} - \frac{1}{{\sqrt[4]{e}}}} \right]\]
37. \[\int_0^1 {{x^{ - x}}{{\left( {1 - x} \right)}^{ - 1 + x}}\sin \left( {\pi x} \right)dx = \frac{\pi }{e}}  = 1.15573\]
38. \[\int_0^{ + \infty } {\frac{{dx}}{{1 + x\left| {\sin x} \right|}}} \]
39. \[\int_0^{ + \infty } {\frac{{dx}}{{{x^2} + {{\left( {{n^2}{x^2} - 1} \right)}^2}}}}\]

参阅:[1]http://tieba.baidu.com/p/2114477017

[2]http://tieba.baidu.com/p/3148596990

[3]http://tieba.baidu.com/p/2121721064

[4]http://tieba.baidu.com/p/2908551228

[5]http://tieba.baidu.com/p/1700279486?qq-pf-to=pcqq.c2c

有关反三角和三角函数组合的虐心积分求解

昨天在数学爱好者群有位自称准粗二的网友发来两道有关反三角和三角函数组合的虐心积分题,顿感无措!

\begin{align*}&\int_0^{\frac{\pi }{3}} {\arccos \frac{{1 - \cos x}}{{2\cos x}}dx} \\&\int_0^{\frac{\pi }{2}} {\arccos \sqrt {\frac{{\cos x}}{{1 + 2\cos x}}} dx} .\end{align*}

一些亟待解决的问题

今天回家,11:00的车,临走前写几个要解决的问题,虽然第三个积分在潘承洞的素数定理的初等证明里看到过.
\begin{align*}\gamma&=- \int_0^1 {\ln \ln \frac{1}{x}dx}  = \int_0^1 {\left( {\frac{1}{{1 - x}} + \frac{1}{{\ln x}}} \right)dx}  = \int_0^\infty  {{e^{ - x}}\ln xdx} \\\beta \left( 3 \right) &= \frac{{{{\left( { - 1} \right)}^{n - 1}}}}{{{{\left( {2n - 1} \right)}^3}}} = \frac{{{\pi ^3}}}{{32}}.\end{align*}
接下来是一个恒等式的证明:
\begin{align*}&\frac{1}{{\left( {{x_1} - {x_2}} \right)\left( {{x_1} - {x_3}} \right) \cdots \left( {{x_1} - {x_n}} \right)}} = \frac{1}{{{x_1} - {x_2}}}\left[ {\frac{1}{{\left( {{x_2} - {x_3}} \right)\left( {{x_2} - {x_4}} \right) \cdots \left( {{x_2} - {x_n}} \right)}}} \right] \\&+ \frac{1}{{{x_1} - {x_3}}}\left[ {\frac{1}{{\left( {{x_3} - {x_2}} \right)\left( {{x_3} - {x_4}} \right) \cdots \left( {{x_3} - {x_n}} \right)}}} \right] +  \cdots \frac{1}{{{x_1} - {x_n}}}\left[ {\frac{1}{{\left( {{x_n} - {x_2}} \right)\left( {{x_n} - {x_3}} \right) \cdots \left( {{x_n} - {x_{n - 1}}} \right)}}} \right].\end{align*}
也祝愿自己和亲们假期愉快!

涉及到一个有意思的方程的积分

求证:\begin{align*}&2{\left( {\int_0^\pi  {\frac{x}{{{x^2} + {{\ln }^2}\left( {2\sin x} \right)}}dx} } \right)^7} + 53{\left( {\int_0^\pi  {\frac{x}{{{x^2} + {{\ln }^2}\left( {2\sin x} \right)}}dx} } \right)^5} + {\left( {\int_0^\pi  {\frac{x}{{{x^2} + {{\ln }^2}\left( {2\sin x} \right)}}dx} } \right)^4}\\&+ {\left( {\int_0^\pi  {\frac{x}{{{x^2} + {{\ln }^2}\left( {2\sin x} \right)}}dx} } \right)^3} + 19\int_0^\pi  {\frac{x}{{{x^2} + {{\ln }^2}\left( {2\sin x} \right)}}dx}  = 2014\end{align*}

证明:Here is a proof, using complex analysis, that the integral is equal to $2$. Put

$$f(z) = {1\over\log{(i(1-e^{i2z}))}},$$
the logarithm being the principal branch. As can be deduced from the comments, the original integral is equal to
$$\int_0^\pi \operatorname{Re}{f(x)}\,dx.$$
Next consider, for $R>\epsilon > 0$, the following contour:
 
 
It is straightforward to check that for each fixed $\epsilon$ and $R$, the function $f$ is analytic on an open set containing this contour (just consider where $i(1-e^{i2z})\leq0$; this can only happen when $\operatorname{Im}{z}<0$ or when $\operatorname{Im}{z} = 0$ and $\operatorname{Re}{z}$ is an integer multiple of $\pi$). It then follows from Cauchy's theorem that $f$ integrates to zero over it. First let's see that the integrals over the quarter-circular portions of the contour vanish in the limit $\epsilon \to 0$. I'll look at the quarter circle near $\pi$ (near the bottom right corner of the contour) but the one near zero is similar, if not easier. Writing $i(1-e^{i2z}) = i(1-e^{i2(z-\pi)})$, it is clear that $i(1-e^{i2z}) = O(z-\pi)$ as $z\to\pi$. It follows from this that $f(z) = O(1/\log{|z-\pi|})$ as $z\to0$, and therefore that the integral of $f$ over the bottom right quarter circle is $O(\epsilon/\log{\epsilon})$ as $\epsilon \to0$, hence it vanishes in the limit as claimed.
 
Thus for fixed $R$, we can let $\epsilon \to 0$ to see that $f$ integrates to zero over the rectangle with corners $0,\pi, \pi +iR,$ and $iR$. Now the vertical sides of this rectangle give the contribution
\begin{align*}-\int_0^R f(iy)\,idy + \int_0^R f(iy+\pi)\,idy = 0,\end{align*}
since $f(iy) = f(iy+\pi)$. It follows at once that for each $R$, we can set the contribution from the horizontal sides equal to zero, giving
\begin{align*}\int_0^{\pi} f(x)\,dx - \int_0^\pi f(x+iR)\,dx=0, \qquad R>0. \tag{1}\end{align*}
(Note that the above equation implies that the integral in $x$ of $f(x+iR)$ over the interval $[0,\pi]$ is constant as a function of $R$; another way to evaluate the integral is to prove this directly, which I'll add below in a moment.) Now $f(x+iR) \to 1/\log{i} = 2/\pi$ as $R\to\infty$, uniformly for $x\in[0,\pi]$. Thus
\begin{align*}\lim_{R\to\infty} \int_0^\pi f(x+iR)\,dx = \pi\cdot {2\over \pi} = 2,\end{align*}
and it follows from $(1)$ that the original integral is equal to $2$ as well.
(By the way, the above idea is basically a replication of the technique I used here and here, and which I originally got from Ahlfors' book on complex analysis.)
 
选自:http://math.stackexchange.com/questions/625456/what-is-int-0-pi-fracxx2-ln22-sin-x-mathrmdx?lq=1

Euler积分的一个延伸

求解$$\int_0^{\frac{\pi }{2}} {{{\ln }^2}\sin xdx}  = \int_0^{\frac{\pi }{2}} {{{\ln }^2}\cos xdx} $$的值.
显然\[\int_0^{\frac{\pi }{2}} {{{\ln }^2}\sin xdx} \underline{\underline {{\text{令}x = \frac{\pi }{2} - t}}} \int_0^{\frac{\pi }{2}} {{{\ln }^2}\cos xdx}.\]
记待求积分为$I$,注意到
 
(1)$\int_0^\pi  {{{\ln }^2}\sin \left( x \right)dx}  = 2\int_0^{\frac{\pi }{2}} {{{\ln }^2}\sin xdx}  = 2I$;
 
(2)$\int_0^\pi  {\ln \sin xdx}  = 2\int_0^{\frac{\pi }{2}} {\ln \sin xdx} \text{(Euler 积分)} =  - \pi \ln 2$;
 
(3)$\sum\limits_{n = 1}^\infty  {\frac{{{{\left( { - 1} \right)}^{n - 1}}}}{{{{\left( {2n - 1} \right)}^3}}}}=\beta(3)  = \frac{{{\pi ^3}}}{32}$,其中$\beta(s)$是Dirichlet beta 函数;
 
(4)$\int_0^{\frac{\pi }{2}} {{{\ln }^2}\tan xdx}  = \int_0^{\frac{\pi }{2}} {{{\ln }^2}\cot xdx}  = \frac{{{\pi ^3}}}{8}.$
 
事实上,我们有
\begin{align*}\int_0^{\frac{\pi }{2}} {{{\ln }^2}\tan xdx}  &= \int_0^\infty  {\frac{{{{\ln }^2}x}}{{1 + {x^2}}}dx}  = 2\int_0^1 {\frac{{{{\ln }^2}x}}{{1 + {x^2}}}dx}  = 2\int_0^1 {{{\ln }^2}x\sum\limits_{n = 1}^\infty  {{{\left( { - {x^2}} \right)}^{n - 1}}} dx} \\&= 2\sum\limits_{n = 1}^\infty  {{{\left( { - 1} \right)}^{n - 1}}\int_0^1 {{x^{2n - 2}}{{\ln }^2}xdx} }  = 4\sum\limits_{n = 1}^\infty  {\frac{{{{\left( { - 1} \right)}^{n - 1}}}}{{{{\left( {2n - 1} \right)}^3}}}}  = \frac{{{\pi ^3}}}{8}.\end{align*}
 
\begin{align*}2I &= \int_0^{\frac{\pi }{2}} {{{\left[ {\left( {\ln \sin \left( {2x} \right) - \ln 2} \right)} \right]}^2}dx}  - \int_0^{\frac{\pi }{2}} {2\ln \sin x\ln \cos xdx} \\&{ = \int_0^{\frac{\pi }{2}} {{{\ln }^2}\sin \left( {2x} \right)dx}  - 2\ln 2\int_0^{\frac{\pi }{2}} {{\rm{lnsin}}\left( {2x} \right)dx}  + \frac{{{{\ln }^2}2}}{2}\pi  - \int_0^{\frac{\pi }{2}} {2\ln \sin x\ln \cos xdx} }\\&{ = \frac{1}{2}\int_0^\pi  {{{\ln }^2}\sin \left( x \right)dx}  - \ln 2\int_0^\pi  {\ln \sin xdx}  + \frac{{{{\ln }^2}2}}{2}\pi  - \int_0^{\frac{\pi }{2}} {2\ln \sin x\ln \cos xdx} }\\&{ = I + \frac{{3{{\ln }^2}2}}{2}\pi  - 2\int_0^{\frac{\pi }{2}} {\ln \sin x\ln \cos xdx} }.\end{align*}
 
 
\[2I = \int_0^{\frac{\pi }{2}} {{{\ln }^2}\tan xdx}  + 2\int_0^{\frac{\pi }{2}} {\ln \sin x\ln \cos xdx} .\]
因此
\begin{align*}3I &= \int_0^{\frac{\pi }{2}} {{{\ln }^2}\tan xdx}  + \frac{{3{{\ln }^2}2}}{2}\pi  = \frac{{{\pi ^3}}}{8} + \frac{{3{{\ln }^2}2}}{2}\pi \\I &= \frac{{{\pi ^3}}}{{24}} + \frac{{{{\ln }^2}2}}{2}\pi.\end{align*}
同时我们有
\[\int_0^{\frac{\pi }{2}} {\ln \sin x\ln \cos xdx}  = \frac{{{{\ln }^2}2}}{2}\pi  - \frac{{{\pi ^3}}}{{48}}.\]
这题挺好的,哈哈,是Euler积分的一个延伸吧.
关于Dirichlet beta 函数可参阅:
http://mathworld.wolfram.com/DirichletBetaFunction.html或是http://en.wikipedia.org/wiki/Dirichlet_beta_function
 
解法二:$$ \beta(x,y) = 2\int_0^{\frac{\pi}{2}} \sin^{2x-1}(t) \cos^{2y-1}(t) \ dt $$
$$ \frac{\partial }{\partial x} \beta(x,y) = 4\int_0^{\frac{\pi}{2}} \sin^{2x-1}(t)\ln(\sin t) \cos^{2y-1}(t) \ dt$$
$$ \frac{\partial}{\partial y} \left( \frac{\partial}{\partial x} \beta(x,y) \right) = 8\int_0^{\frac{\pi}{2}} \sin^{2x-1}(t) \ln(\sin t ) \ln(\cos t) \cos^{2y-1}(t) \ dt $$
and we have $$ \beta(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} $$
so differentiate and put $ x =\frac{1}{2} , y = \frac{1}{2} $
$$ \psi \left(\frac{1}{2} \right) = -2\ln 2 - \gamma $$
$$ \psi(1) = -\gamma $$
$$ \psi^{(1)}(1) = \frac{\pi^2}{6} $$
$$ \beta \left( \frac{1}{2} , \frac{1}{2} \right) = \frac{\Gamma \left( \frac{1}{2} \right)^2}{\Gamma(1)} = \pi $$ 
thus you'll have the integral $ = \frac{\pi}{8} \left(4\ln(2)^2 - \frac{\pi^2}{6} \right) $
参阅:http://math.stackexchange.com/questions/492878/find-int-0-frac-pi2-ln-sinx-ln-cosx-mathrm-dx?rq=1
解法三:A third approach would be the Fourier series:   
Namely, consider  
$$\ln \left (2\sin \frac{x}{2}\right )=-\sum_{n=1}^{\infty}\frac{\cos nx}{n};(0<x<2\pi)$$   
After squared:  
$$\ln^2\left (2\sin \frac{x}{2}\right )=\sum_{n=1}^{\infty} \sum_{k=1}^{\infty}\frac{\cos kx\cos nx}{kn}$$     
Now, integrate the last equation from $x=0$ to $x=\pi$  
On the right side, we get:  
$$\frac{\pi}{2}\sum_{k=1}^{\infty}\frac{1}{k^2}=\frac{\pi}{2}\frac{\pi^2}{6}=\frac{\pi^3}{12}$$    
because $$I=\int_{0}^{\pi}\cos kx\cos nx\,dx=0;k\neq n$$ $$I=\frac{\pi}{2};k=n$$
On the left side:  
$$\int_{0}^{\pi}\ln^2\left (2\sin \frac{x}{2}\right )\,dx= \ln^22 \int_{0}^{\pi}dx + 4\ln 2 \int_{0}^{\frac{\pi}{2}} \ln \left (\sin x\right )dx+2 \int_{0}^{\frac{\pi}{2}} \ln^2 \left (\sin x\right )dx $$  
Since we  know that $ \int_{0}^{\frac{\pi}{2}} \ln(\sin x)dx=-\frac{\pi}{2}\ln(2) $ then we get $ \int_{0}^{\frac{\pi}{2}}\ln^{2}(\sin x)dx $ from the equation.
解法四:
Here is a completely different way to approach this integral, which relies on some elementary complex analysis (Cauchy's theorem). It is based on an approach which I have seen several times employed to compute $\int_0^{\pi/2}\log{(\sin{x})}\,dx$ (particularly, in Ahlfors's book).
The idea is to integrate the principal branch of $f(z) := \log^2{(1 - e^{2iz})} = \log^2{(-2ie^{iz}\sin{z})}$ over the contour below, and then let $R \to \infty$ and $\epsilon \to 0$.  
First of all, $1 - e^{2iz} \leq 0$ only when $z = k\pi + iy$, where $k$ is integral and $y \leq 0$. Thus, in the region of the plane which is obtained by omitting the lines $\{k\pi + iy: y\leq 0\}$ for $k \in \mathbb Z$, the principal branch of $\log{(1-e^{2iz})}$ is defined and analytic. Note that, for each fixed $R$ and $\epsilon$, the contour we wish to integrate over is contained entirely within this region.
By Cauchy's theorem, the integral over the contour vanishes for each fixed $R$. Since $f(x + iR) = \log^2{(1 - e^{2ix}e^{-2R})} \to 0$ uniformly as $R \to \infty$, the integral over the segment $[iR,\pi/2 + iR]$ vanishes in the limit. Similarly, since $1 - e^{2iz} = O(z)$ as $z \to 0$, we have $f(z) = O(\log^2{|z|})$ for small enough $z$, which, since $\epsilon \log^2{\epsilon} \to 0$ with $\epsilon$, means that the  the integral over the circular arc from $i\epsilon$ to $\epsilon$ vanishes as $\epsilon \to 0$. 
From the vertical sides of the contour, we get the contribution
\begin{align*}\int_{[\pi/2,\pi/2 + iR]} + \int_{[iR,i\epsilon]} f(z)\,dz & = i\int_0^R f(\pi/2 + iy)\,dy -i\int_\epsilon^R f(iy)\,dy.\end{align*}
Since $f(iy)$ and $f(\pi/2 + iy)$ are real, this contribution is purely imaginary. 
Finally, the contribution from the bottom side of the contour, after letting $\epsilon \to 0$, is
\begin{align*}\int_0^{\pi/2} f(x)\,dx = \int_0^{\pi/2} \log^2{(-2ie^{ix}\sin{x})}\,dx,\end{align*}
and we know from the preceding remarks that the real part of this integral must vanish. For $x$ between $0$ and $\pi/2$, the quantity $2\sin{x}$ is positive. Writing $-ie^{ix} = e^{i(x - \pi/2)}$, we see that $x - \pi/2$ is the unique value of $\arg{(-2ie^{ix}\sin{x})}$ which lies in $(-\pi,\pi)$. Since we have chosen the principal branch of $\log{z}$, it follows from these considerations that $\log{(-2ie^{ix}\sin{x})} = \log{(2\sin{x})} + i(x-\pi/2)$, and therefore that 
\begin{align*}\text{Re}{f(x)} &= \log^2{(2\sin{x})} - (x-\pi/2)^2 \\&= \log^2{(\sin{x})} + 2\log{2}\log{(\sin{x})} + \log^2{2} - (x - \pi/2)^2.\end{align*}
By setting $\int_0^{\pi/2} \text{Re}f(x)\,dx = 0$ we get
\begin{align*}\int_0^{\pi/2} \log^2{(\sin{x})}\,dx &= \int_0^{\pi/2}(x-\pi/2)^2\,dx - 2\log{2}\int_0^{\pi/2} \log{(\sin{x})}\,dx -\frac{\pi}{2}\log^2{2} \\& = \frac{1}{3}\left(\frac{\pi}{2}\right)^3 + \frac{\pi}{2} \log^2{2}\end{align*}
as expected
By similar methods, one can compute a variety of integrals of this form with little difficulty. Here are some examples I have computed for fun. All are proved by the same method, with the same contour, but different functions $f$.
1. Take $f(z) = \log{(1 + e^{2iz})} = \log{(2e^{iz}\cos{z})}$ and compare imaginary parts to get
$$\int_0^\infty \log{(\coth{y})}\,dy = \frac{1}{2}\left(\frac{\pi}{2}\right)^2.$$
2. Related to this question of yours (which incidentally led me here), one can show by taking $f(z) = \log^4(1 + e^{2iz})$ and comparing real parts that
$$\int_0^{\pi/2} x^2\log^2{(2\cos{x})}\,dx = \frac{1}{30}\left(\frac{\pi}{2}\right)^5 + \frac{1}{6}\int_0^{\pi/2} \log^4{(2\cos{x})}\,dx.$$Assuming the result of the other question, we then get
$$\int_0^{\pi/2} \log^4{(2\cos{x})}\,dx = \frac{19}{15}\left(\frac{\pi}{2}\right)^5.$$
3.Also related to the question cited in 2., taking $f(z) = z^2\log^2{(1 + e^{2iz})}$ and comparing real parts gives
$$\int_0^{\pi/2}x^2\log^2{(2\cos{x})}\,dx = \frac{1}{5}\left(\frac{\pi}{2}\right)^5 + \pi \int_0^\infty y\log^2{(1- e^{-2y})}\,dy.$$
Once more, assuming the result of the other question, we get
$$\int_0^\infty y\log^2{(1- e^{-2y})}\,dy = \frac{1}{45}\left(\frac{\pi}{2}\right)^4.$$
Actually, the integral in 3. has several interesting series expansions, and I would be very interested if someone could compute it without using the result from the question I cited. For one thing, that would give us a different proof of that result (which is why I started investigating it in the first place).
参阅:http://math.stackexchange.com/questions/58654/integrate-square-of-the-log-sine-integral-int-0-frac-pi2-ln2-sinx/58672#58672
 
再看一下推广:
 
\[\int_0^{\frac{\pi }{2}} {{{\ln }^n}\sin xdx}  = \frac{{\sqrt \pi  }}{{{2^{n + 1}}}}\frac{{{d^k}}}{{d{\alpha ^k}}}{\left( {\frac{{\Gamma \left( {\frac{{2\alpha  + 1}}{2}} \right)}}{{\Gamma \left( {\frac{{2\alpha  + 2}}{2}} \right)}}} \right)_{\alpha  = 0}}.\]
证明.注意到\[\int_0^{\frac{\pi }{2}} {{{\ln }^n}\sin xdx}  = \int_0^{\frac{\pi }{2}} {\frac{{{{\ln }^n}t}}{{\sqrt {1 - {t^2}} }}dt}. \]
令\[I\left( \alpha  \right) = \int_0^1 {\frac{{{t^{2\alpha }}}}{{\sqrt {1 - {t^2}} }}dt}  = \frac{1}{2}B\left( {\frac{1}{2},\frac{{2\alpha  + 1}}{2}} \right) = \frac{{\sqrt \pi  }}{2}\frac{{\Gamma \left( {\frac{{2\alpha  + 1}}{2}} \right)}}{{\Gamma \left( {\frac{{2\alpha  + 2}}{2}} \right)}},\]
则有\[{I^{\left( n \right)}}\left( \alpha  \right) = \int_0^1 {\frac{{{t^{2\alpha }}{2^n}{{\ln }^n}t}}{{\sqrt {1 - {t^2}} }}dt}  .\]
故有
\[\int_0^{\frac{\pi }{2}} {{{\ln }^n}\sin xdx}  = \int_0^{\frac{\pi }{2}} {\frac{{{{\ln }^n}t}}{{\sqrt {1 - {t^2}} }}dt}  = \frac{{{I^{\left( n \right)}}\left( 0 \right)}}{{{2^n}}} = \frac{{\sqrt \pi  }}{{{2^{n + 1}}}}\frac{{{d^k}}}{{d{\alpha ^k}}}{\left( {\frac{{\Gamma \left( {\frac{{2\alpha  + 1}}{2}} \right)}}{{\Gamma \left( {\frac{{2\alpha  + 2}}{2}} \right)}}} \right)_{\alpha  = 0}}.\]
另一种解法
Use generating series.  Consider the function $$f(z)=\sum_{k=0}^{\infty}S_{k}\frac{z^{k}}{k!}.$$ Then $$f(z)=\int_0^1 \left(\sum_{k=0}^\infty (-1)^k \log^k(\sin(\pi x)) z^k \right)dx=\int_{0}^{1}\frac{1}{\sin\left(\pi x\right)^{z}}dx=\frac{\Gamma\left(\frac{1-z}{2}\right)}{\sqrt{\pi}\Gamma\left(1-\frac{z}{2}\right)}.$$  The last equality follows from an identity of the Beta Function and then applying the Duplication Formula. From here, differentiating and plugging in $z=0$ allows you to conclude. 
 
参阅:http://math.stackexchange.com/questions/121473/solve-the-integral-s-k-1k-int-01-log-sin-pi-xk-dx?rq=1
 
关于此类问题还可参阅:
http://math.stackexchange.com/questions/307593/a-hard-log-definite-integral-int-0-pi-4-ln3-sin-x-mathrm-dx?lq=1
或是http://math.stackexchange.com/questions/289587/log-sin-and-log-cos-integral-maybe-relate-to-fourier-series/309781#309781
http://math.stackexchange.com/questions/330057/how-to-evaluate-i-displaystyle-int-0-pi-2x2-ln-sin-x-ln-cos-xdx