0

How to find this integral:$$\int_{0}^{\frac{\pi}{2}}\left(\ln(\sin{x})\right)^2\, dx$$ I tried to solve this by using integration by parts, but it become too complicated for me, I somewhere find its solution by using Fourier series but

I don't understand that (I am just a 1st year student). Help me!

TShiong
  • 1,270
Sushil
  • 161

4 Answers4

10

Let $\displaystyle I:=\int_0^{\tfrac{\pi}{2}}\log^2(\sin x) \mathrm{d}x$

$\displaystyle I=\int_0^{\tfrac{\pi}{4}}\log^2(\sin x) \mathrm{d}x+\int_{\tfrac{\pi}{4}}^{\tfrac{\pi}{2}}\log^2(\sin x) \mathrm{d}x$

In the second integral, set $u=\dfrac{\pi}{2}-x$,

$\displaystyle I=\int_0^{\tfrac{\pi}{4}}\log^2(\sin x) \mathrm{d}x+\int_{0}^{\tfrac{\pi}{4}}\log^2(\cos x) \mathrm{d}x$

$\displaystyle 2I=\int_0^{\tfrac{\pi}{4}}\Big(\log(\sin x)+\log(\cos x)\Big)^2 \mathrm{d}x+\int_0^{\tfrac{\pi}{4}}\Big(\log(\sin x)-\log(\cos x)\Big)^2 \mathrm{d}x$

$\displaystyle \int_0^{\tfrac{\pi}{4}}\Big(\log(\sin x)+\log(\cos x)\Big)^2 dx=\int_0^{\tfrac{\pi}{4}}\Big(\log(\sin(2x))-\log 2\Big)^2 \mathrm{d}x$

Consider the RHS and set $t=2x$,

$\displaystyle \int_0^{\tfrac{\pi}{4}}\Big(\log(\sin(2x))-\log 2\Big)^2 \mathrm{d}x=\dfrac{1}{2}I-\log 2 \int_0^{\tfrac{\pi}{2}}\log(\sin x)\mathrm{d}x+\dfrac{1}{2}\int_0^{\tfrac{\pi}{2}}(\log 2)^2\mathrm{d}x$

Since:

$\displaystyle \int_0^{\tfrac{\pi}{2}}\log(\sin x)\mathrm{d}x=-\dfrac{\pi}{2}\log 2$

$\displaystyle \int_0^{\tfrac{\pi}{4}}\Big(\log(\sin x)-\log(\cos x)\Big)^2 \mathrm{d}x=\dfrac{\pi^3}{16}$

It follows

$\displaystyle 2I=\dfrac{1}{2}I+\dfrac{\pi}{2}\log^2 2+\dfrac{\pi}{4}\log^2 2+\dfrac{\pi^3}{16}$

$\displaystyle I=\dfrac{1}{3}\left(\dfrac{3\pi}{2}\log^2 2+\dfrac{\pi^3}{8}\right)$

6

$\newcommand{\d}{\mathrm{d}}$The mathematics that drives many polygamma identities is non-trivial, perhaps the most complicated compared to other techniques shown here, but once you know the results (whether or not you care about their derivation) they make integration much easier! See this and this for the results (not the proofs). This method happily generalises to arbitrary natural exponents, e.g. I could use this approach to (very tediously) express: $$\int_0^1\log^{10}(\sin x)\,\d x$$In terms of the Euler-Mascheroni constant, $\pi$ and integer values of the Riemann zeta function.


Let $x\mapsto\arcsin(x)$ and $x\mapsto\sqrt{x}$ in two successive substitutions to get the equivalent problem: $$\frac{1}{8}\int_0^1\frac{\log^2x}{\sqrt{x}\sqrt{1-x}}\,\d x=\frac{1}{8}\int_0^1\log^2(x)(1-x)^{-1/2}x^{-1/2}\,\d x$$Consider the function: $$\begin{align}J:(-1/2,\infty)&\longrightarrow\Bbb R\\s&\mapsto\frac{1}{8}\int_0^1x^{s-1/2}(1-x)^{-1/2}\,\d x=\frac{1}{8}\mathfrak{B}\left(s+\frac{1}{2},\frac{1}{2}\right)=\frac{\sqrt{\pi}}{8}\frac{\Gamma(s+1/2)}{\Gamma(s+1)}\end{align}$$Where appears the beta and gamma functions. Now, using the polygamma functions: $$J'(s)=\frac{\sqrt{\pi}}{8}\frac{\Gamma(s+1/2)}{\Gamma(s+1)}(\psi(s+1/2)-\psi(s+1))\\J''(s)=\frac{\sqrt{\pi}}{8}\frac{\Gamma(s+1/2)}{\Gamma(s+1)}[(\psi(s+1/2)-\psi(s+1))^2+[\psi^{(1)}(s+1/2)-\psi^{(1)}(s+1)]]$$Since: $$J''(0)=\frac{1}{8}\int_0^1\frac{\log^2(x)}{\sqrt{x}\sqrt{1-x}}\,\d x=\int_0^1\log^2(\sin x)\,\d x$$We just need to evaluate the above at $s=0$. This gives: $$\frac{\pi}{8}[(-\gamma-2\log2-(-\gamma))^2+(\pi^2/2-\pi^2/6)]=\frac{\pi}{2}\log^22+\frac{\pi^3}{24}$$Using knowledge of the Basel problem, the Gauss multiplication theorem and general familiarity with polygamma identities.

FShrike
  • 46,840
  • 3
  • 35
  • 94
4

For what it's worth, here's a solution with Fourier series. I know you said you don't understand it, but let's see if I can make it clearer for you.

If a function $f$ defined on $(0, 2\pi)$ is square integrable on that interval, then you can compute its Fourier coefficients: $$a_n=\frac 1 {\pi}\int_{0}^{2\pi}f(x)\cos(nx)dx \,\,\text{ and } \,\,b_n=\frac 1 {\pi}\int_{0}^{2\pi}f(x)\sin(nx)dx$$ Moreover, by the Plancherel-Parseval theorem, the $L^2$ norm of that function on $(0, 2\pi)$ is equal to the sum of the squares of the Fourier coefficients. That means: $$\frac 1 \pi \int_0^{2\pi} |f(x)|^2dx = \frac {a_0^2} 2 +\sum_{n\geq 1}(a_n^2+b_n^2)$$

Now, consider the function $f:x\mapsto \ln \sin \left(\frac x2\right)$ on $(0, 2\pi)$. It is square integrable on that interval. You can verify that $$a_0=2\ln 2 \,\text{ and }\, a_n=\frac 1 n \,\text{ and }\, b_n=0\,\text{ for all }n\geq 1$$ Applying Plancherel gives

$$\frac 1 {\pi} \int_0^{2\pi}\left(\ln \sin \frac x2\right)^2dx = 2\ln^2 2 + \sum_{n\geq 1}\frac 1 {n^2}\tag{1}$$ Also, it is known that $$\sum_{n\geq 1} \frac 1 {n^2} = \frac {\pi^2}6\tag{2}$$ Thus, combining $(1)$ and $(2)$, we obtain $$\int_0^{2\pi}\left(\ln \sin \frac x2\right)^2dx = 2\pi \ln^2 2 + \frac{\pi^3}{6}$$ Changing the variable $x\rightarrow 2x$ and using symmetries gives $$\begin{split} \int_{0}^{2\pi} \left(\ln \sin \frac x2\right)^2dx&=2\int_0^\pi \left(\ln \sin x\right)^2dx\\ &=2\left ( \int_0^{\frac \pi 2} \left(\ln \sin x\right)^2dx+\int_{\frac \pi 2}^\pi \left(\ln \sin x\right)^2dx\right)\\ &=4 \int_0^{\frac \pi 2} \left(\ln \sin x\right)^2dx \end{split}$$ We conclude $$\boxed{\int_0^{\frac \pi 2}\left(\ln \sin x\right)^2dx = \frac \pi 2 \ln^2 2 + \frac{\pi^3}{24}}$$

Stefan Lafon
  • 13,728
2

Using $$ \log(\sin x)=-\log2-\sum_{n=1}^\infty\frac{\cos(2nx)}{n}$$ one has \begin{eqnarray} I&=&\int_0^{\tfrac{\pi}{2}}\log^2(\sin x) \mathrm{d}x\\ &=&\int_0^{\tfrac{\pi}{2}}\bigg[-\log2+\sum_{n=1}^\infty\frac{\cos(2nx)}{n}\bigg]^2 \mathrm{d}x\\ &=&\frac\pi2\log^22+\sum_{n=1}^\infty\int_0^{\tfrac{\pi}{2}}\frac{\cos^2(2nx)}{n^2} \mathrm{d}x\\ &=&\frac\pi2\log^22+\frac{\pi}{4}\sum_{n=1}^\infty\frac{1}{n^2}\\ &=&\frac\pi2\log^22+\frac{\pi^3}{24} \end{eqnarray}

xpaul
  • 47,821