Problem with evaluating $\int_0^{\frac{\pi}{2}} \ln(\sin(\theta))d\theta$ using Beta Function

565 Views Asked by At

Recently I've been trying to tackle the integral $\int_0^{\frac{\pi}{2}} \ln(\sin(\theta))d\theta$ using the Beta function $$\frac{B(\frac{x}{2},\frac{1}{2})}{2}=\int_0^{\frac{\pi}{2}} \sin^{x-1}(\theta)d\theta=\frac{\sqrt{\pi}}{2}\left(\Gamma\left(\frac{x+1}{2}\right)\right)^{-1}$$ Differentiating both sides $$\int_0^{\frac{\pi}{2}} \ln(\sin(\theta))\sin^{x-1}(\theta)d\theta=-\frac{\sqrt{\pi}}{4}\frac{\psi(\frac{x+1}{2})}{\Gamma(\frac{x+1}{2})}$$ However, at $x=1$ $$\int_0^{\frac{\pi}{2}} \ln(\sin(\theta))d\theta\ne\frac{\gamma\sqrt{\pi}}{4}$$

Where did I go wrong?

4

There are 4 best solutions below

0
On BEST ANSWER

You forgot the $\Gamma(x/2)$ factor.

0
On

Cleaner approach: for any $\alpha\geq 0$,

$$ \int_{0}^{\pi/2}\left(\sin\theta\right)^{\alpha}\,d\theta = \int_{0}^{1}\frac{u^\alpha}{\sqrt{1-u^2}}\,du = \frac{1}{2}\int_{0}^{1}v^{\frac{\alpha-1}{2}}(1-v)^{-1/2}\,dv = \frac{\Gamma\left(\frac{\alpha+1}{2}\right)}{\Gamma\left(\frac{\alpha+2}{2}\right)}\cdot\frac{\sqrt{\pi}}{2}$$ Now we differentiate both sides with respect to $\alpha$. In order to differentiate the RHS, we multiply it by its logarithmic derivative. We get:

$$ \int_{0}^{\pi/2}\left(\sin\theta\right)^{\alpha}\log\sin\theta\,d\theta = \frac{\sqrt{\pi}}{4}\cdot \frac{\Gamma\left(\frac{\alpha+1}{2}\right)}{\Gamma\left(\frac{\alpha+2}{2}\right)}\cdot\left[\psi\left(\tfrac{\alpha+1}{2}\right)-\psi\left(\tfrac{\alpha+2}{2}\right)\right]. $$ Now we evaluate at $\alpha=0$, recalling that $\Gamma(1)=1,\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$ and $$ \sum_{n\geq 0}\frac{1}{(n+1)\left(n+\tfrac{1}{2}\right)}=\frac{\psi(1)-\psi(1/2)}{1-1/2}= 4\log 2.$$ The final outcome is: $$ \int_{0}^{\pi/2}\log\sin\theta\,d\theta = -\frac{\pi}{2}\log 2.$$

0
On

Another way that only requires knowledge of the beta function (and expansion of the gamma function) is given as follows. Consider the integral

$$\begin{aligned}\int_{0}^{\pi/2}\sin^{\epsilon}x\,\mathrm{d}x &= \int_{0}^{\pi/2}e^{\epsilon\ln\sin x}\,\mathrm{d}x = \sum_{n=0}^{\infty}\frac{\epsilon^{n}}{n!}\int_{0}^{\infty}\ln^{n}\sin x\,\mathrm{d}x \\ &= \frac{\Gamma(1/2)\Gamma(1/2+\epsilon/2)}{2\,\Gamma(1+\epsilon/2)}. \end{aligned}$$

We have to match the appropriate coefficient of $\epsilon$ found by expanding the latter expression to the coefficient of the series in the first line. The integral we are interested in is the $n=1$ term. $\epsilon^{2}$ and higher order terms can then be neglected. Due to the trigonometric form of the beta function, integrals of this type often require the use of Legendre's duplication formula

$$ \frac{\Gamma(1+\epsilon)}{\Gamma(1/2+\epsilon)} = \frac{2^{2\epsilon}}{\sqrt{\pi}}\frac{\Gamma^{2}(1+\epsilon)}{\Gamma(1+2\epsilon)}, $$

derived also by using the beta function. The expansion of the gamma function around $1$ is given as

$$ \ln\Gamma(1+\epsilon) = -\gamma\epsilon + \sum_{k=2}^{\infty}\frac{(-1)^{k}\zeta(k)}{k}\epsilon^{k} $$

which is highly useful. Here $\gamma$ is the Euler-Mascheroni constant and $\zeta(k)$ is the Riemann zeta function. Note that the form of the expansion of the gamma function and the ratio of gamma functions $\Gamma(1+\epsilon)/\Gamma^{2}(1+\epsilon/2)$ means that the first order term of this ratio cannot contribute (it is just $1$), so up to first order,

$$\begin{aligned} \frac{\Gamma(1/2)\Gamma(1/2+\epsilon/2)}{2\,\Gamma(1+\epsilon/2)} &= \frac{\sqrt{\pi}}{2}\frac{\sqrt{\pi}}{2^{\epsilon}}\frac{\Gamma(1+\epsilon)}{\Gamma^{2}(1+\epsilon/2)} \\ &\approx \frac{\pi}{2}\frac{1}{e^{(\ln 2)\epsilon}} \approx \frac{\pi}{2}(1 - (\ln 2)\epsilon). \end{aligned}$$

In general, if we look for the coefficient of the $n$th term, we have to multiply by $n!$ to account for the factorial in the original expansion. First order term is trivial: $1! = 1$, so the first order coefficient is the answer

$$ \int_{0}^{\pi/2}\ln\sin x\,\mathrm{d}x = -\frac{\pi}{2}\ln 2. $$

0
On

With the other answers we can find a recurrence relation for the general log-sine integral, $$I_n=\int_0^{\pi/2}\log^n(\sin x)\ dx$$ Define the exponential generating function $G(t)$, $$G(t)=\sum_{n=0}^{\infty}\frac{I_n}{n!}t^n=\int_0^{\pi/2}\sum_{n=0}^\infty\frac{(t\log(\sin x))^n}{n!}\ dx=\int_{0}^{\pi/2}\sin^t x\ dx$$ using Beta function identities, $$G(t)=B\left(\frac{t+1}{2},\frac{1}{2}\right)=\frac{\sqrt\pi}{2}\frac{\Gamma\left(\dfrac{t+1}{2}\right)}{\Gamma\left(\dfrac{t}{2}+1\right)}$$ by Legendre's duplication formula, $$\frac{\sqrt\pi}{2}\frac{\Gamma\left(\dfrac{t+1}{2}\right)}{\Gamma\left(\dfrac{t}{2}+1\right)}=\frac{\pi}{2^{t+1}}\frac{\Gamma(t+1)}{\Gamma\left(\dfrac{t}{2}+1\right)^2}$$ taking the logarithmic derivative, $$\frac{G'(t)}{G(t)}=-\log(2)+\psi(t+1)-\psi\left(\frac{t}{2}+1\right)$$ the difference of two Digamma functions has a power series expansion, $$\psi(t+1)-\psi\left(\frac{t}{2}+1\right)=\sum_{n=1}^\infty(-1)^{n+1}\left(1-\frac{1}{2^n}\right)\zeta(n+1)t^n$$ substituting, $$\frac{G'(t)}{G(t)}=-\log(2)-\sum_{n=1}^\infty(-1)^{n}\left(1-\frac{1}{2^n}\right)\zeta(n+1)t^n.\tag{1}$$ Now note that, $$G'(t)=\sum_{n=1}^\infty\frac{I_n}{(n-1)!}t^{n-1}=\sum_{n=0}^\infty\frac{I_{n+1}}{n!}t^n$$ so by multiplying both sides of $(1)$ by $G(t)=\sum_{n=0}^\infty\frac{I_n}{n!}t^n$, $$\begin{align*}\sum_{n=0}^\infty\frac{I_{n+1}}{n!}t^n=-\log(2)\sum_{n=0}^\infty\frac{I_n}{n!}t^n-\left(\sum_{n=0}^\infty\frac{I_n}{n!}t^n\right)\left(\sum_{n=1}^\infty(-1)^{n}\left(1-\frac{1}{2^n}\right)\zeta(n+1)t^n\right) \end{align*}$$ letting all sums start at $n=1$, $$\color{red}{I_{0}}+\sum_{n=1}^\infty\frac{I_{n+1}}{n!}t^n=\color{red}{-\log(2)I_{0}}-\log(2)\sum_{n=1}^\infty\frac{I_n}{n!}t^n-\frac{1}{t}\left(\sum_{n=1}^\infty\frac{I_{n-1}}{(n-1)!}t^n\right)\left(\sum_{n=1}^\infty(-1)^{n}\left(1-\frac{1}{2^n}\right)\zeta(n+1)t^n\right)$$ here $$I_0=\frac{\pi}{2},\quad I_{1}=-\frac{\pi}{2}\log(2)$$ hence the red terms vanish and employing the Cauchy product, $$\sum_{n=1}^\infty\frac{I_{n+1}}{n!}t^n=-\log(2)\sum_{n=1}^\infty\frac{I_n}{n!}t^n-\sum_{n=1}^\infty\left(\sum_{k=1}^n(-1)^k\left(1-\frac{1}{2^k}\right)\frac{n!\zeta(k+1)}{(n-k)!}I_{n-k}\right)\frac{t^n}{n!}$$ finally comparing coefficients of $t^n/n!$ we obtain the recurrence relation, $$\boxed{I_{n+1}=-\log(2)I_n-\sum_{k=1}^n(-1)^k\left(1-\frac{1}{2^k}\right)\frac{n!\zeta(k+1)}{(n-k)!}I_{n-k}}$$ which is subject to the initial conditions given above.