Mistake with Integration with Beta, Gamma, Digamma Fuctions

Problem: Evaluate:

$$I=\int_0^{\pi/2} \ln(\sin(x))\tan(x)dx$$

I tried to attempt it by using the Beta, Gamma and Digamma Functions. My approach was as follows:

 Consider $$I(a,b)=\int_0^{\pi/2} \sin^a(x)\sin^b(x)\cos^{-b}(x)dx$$  $$=\dfrac{1}{2}\beta\bigg (\dfrac{a+b+1}{2},\dfrac{1-b}{2}\bigg )= \dfrac{1}{2} \dfrac{\Gamma(\frac{a+b+1}{2})\Gamma(\frac{1-b}{2})}{\Gamma(\frac{a+2}{2})}$$ Now, $$\dfrac{1}{2}\dfrac{\partial}{\partial a} \beta\bigg (\dfrac{a+b+1}{2},\dfrac{1-b}{2}\bigg )\bigg |_{a=0,b=1} = \int_0^{\pi/2}\ln(\sin(x))\sin^a(x)\tan^b(x)dx \bigg |_{a=0,b=1} = I$$ Now, $$\dfrac{\partial}{\partial a} \beta\bigg (\dfrac{a+b+1}{2},\dfrac{1-b}{2}\bigg )$$  $$=\dfrac{1}{2} \dfrac{\Gamma(\frac{1-b}{2})}{(\Gamma(\frac{a+2}{2}))^2}\bigg (\Gamma '\bigg (\frac{a+b+1}{2}\bigg )\Gamma \bigg ( \frac{a+2}{2}\bigg ) - \Gamma '\bigg ( \frac{a+2}{2}\bigg )\Gamma \bigg (\frac{a+b+1}{2}\bigg )\bigg )$$  $$= \dfrac{1}{2}\dfrac{\Gamma(\frac{1-b}{2})}{\Gamma(\frac{a+2}{2})}\bigg (\psi\bigg ( \frac{a+b+1}{2}\bigg )\Gamma \bigg (\frac{a+b+1}{2}\bigg ) - \psi\bigg ( \frac{a+2}{2}\bigg )\Gamma \bigg (\frac{a+b+1}{2}\bigg )\bigg )$$  $$=\dfrac{1}{2} \dfrac{\Gamma(\frac{a+b+1}{2})\Gamma(\frac{1-b}{2})}{\Gamma(\frac{a+2}{2})}\bigg (\psi\bigg ( \frac{a+b+1}{2}\bigg )-\psi\bigg ( \frac{a+2}{2}\bigg )\bigg )$$  $$\Rightarrow\dfrac{\partial}{\partial a} \beta\bigg (\dfrac{a+b+1}{2},\dfrac{1-b}{2}\bigg )=\dfrac{1}{2} \dfrac{\Gamma(\frac{a+b+1}{2})\Gamma(\frac{1-b}{2})}{\Gamma(\frac{a+2}{2})}\bigg (\psi\bigg ( \frac{a+b+1}{2}\bigg )-\psi\bigg ( \frac{a+2}{2}\bigg )\bigg )$$



$$\Longrightarrow \dfrac{1}{2} \dfrac{\partial}{\partial a} \beta \bigg ( \dfrac{a+b+1}{2} ,\dfrac{1-b}{2} \bigg ) \bigg |_{a=0,b=1} = I$$  $$=\dfrac{1}{2}\times \dfrac{1}{2} \dfrac{\Gamma(\frac{a+b+1}{2})\Gamma(\frac{1-b}{2})}{\Gamma(\frac{a+2}{2})}\bigg (\psi\bigg ( \frac{a+b+1}{2}\bigg )-\psi\bigg ( \frac{a+2}{2}\bigg )\bigg ) \bigg |_{a=0,b=1}$$  $$=\dfrac{1}{4}\dfrac{\Gamma(0)\Gamma(1)}{\Gamma(1)}\bigg (\psi\bigg ( 1 \bigg )-\psi\bigg (1\bigg )\bigg )$$  Could somebody please be so kind as to tell me where I have gone wrong? I would be truly grateful for your assistance. Thanks very, very much in advance!

• Not an answer, but isn't it easier to start with $u=\sin t$? – mickep Jun 14 '15 at 8:17
• Probably Sir. but actually I tend to try Differentiating Under the Integral Sign whenever I see $\ln$ integrals. It's just since I'm far more comfortable with Differentiation Under the Integral Sign as compared to getting the right substitution. EDIT: Another factor is that I recently discovered for myself that suppose we have an integrand containing $\ln$, then we can consider any function such that when we take its partial derivatives and plug in certain values, then we get the Integrand. I was really excited by this (small) 'discovery' and have been trying it in every question. – Ishan Jun 14 '15 at 8:20
• Your calculations are correct. Evaluate the derivative at $a=0$ and take the limit when $b\rightarrow 1$ – d.k.o. Jun 14 '15 at 9:12
• Sir, please could you show me how I am to take the limit? I was unable to understand. PS. I was thrilled to read that they were indeed correct! – Ishan Jun 14 '15 at 9:12
• $\dfrac{1}{4}\dfrac{\Gamma(\frac{a+b+1}{2})\Gamma(\frac{1-b}{2})}{\Gamma(\frac{a+2}{2})}\bigg (\psi\bigg ( \frac{a+b+1}{2}\bigg )-\psi\bigg ( \frac{a+2}{2}\bigg )\bigg ) \bigg |_{a=0}= \dfrac{\pi}{4}\Big(\Psi\Big(\frac{1+b}{2}\Big)+\gamma\Big)\times \sin^{-1}\Big(\pi\Big(\frac{1+b}{2}\Big)\Big)$ – d.k.o. Jun 14 '15 at 9:20

OK, I realize this does not really answer your question (but look at the update below), in the sense it does not point at your error. Anyways, I think that you should be flexible with your methods doing integrals, so here is how it can be done with the change of variables I suggested:

You end up with the integral $$I=\int_0^1 \log u\frac{u}{1-u^2}\,du.$$ Now writing $$\frac{1}{1-u^2}=1+u^2+u^4+\cdots,$$ and using that (integrating by parts) \begin{aligned} \int_0^1 u^{2k+1}\log u\,du&=\bigl[\frac{u^{2k+2}}{2k+2}\log u\bigr]_0^1-\frac{1}{2k+2}\int_0^1 u^{2k+2}\frac{1}{u}\,du\\ &=-\frac{1}{4}\frac{1}{(k+1)^2}. \end{aligned} Thus, $$I=-\frac{1}{4}\sum_{k=0}^{+\infty}\frac{1}{(k+1)^2}=-\frac{\pi^2}{24}.$$ The last equality by the Basel problem.

Updated version

The problem in your calculation, by inserting $a=0$ and $b=1$, you get a $\Gamma(0)$ (which is undefined, or as its best $\pm\infty$ depending on if you let $b\to 1$ from left or right) times something that is zero. This is indeterminate, and you must look at limits. One way is as follows:

If you first let $a=0$, and write $b=1+\epsilon$, then you get $$\frac{1}{4}\Gamma(-\epsilon/2)\Gamma(1+\epsilon/2)\bigl(\Psi(1+\epsilon/2)-\Psi(1)\bigr)$$ We multiply and divide by $\epsilon/2$ (lethal weapon number 2), to write this as $$\frac{1}{4}\frac{\epsilon}{2}\Gamma(-\epsilon/2)\Gamma(1+\epsilon/2)\frac{\Psi(1+\epsilon/2)-\Psi(1)}{\epsilon/2}$$ By letting $\epsilon\to 0$, you will find that the limit is $$\frac{1}{4}\times (-1)\times 1 \times \frac{\pi^2}{6}=-\frac{\pi^2}{24}.$$ Here, we have used the facts that $\lim_{x\to 0} x\Gamma(x)=1$ and $\Psi^{(1)}(1)=\pi^2/6$.

• Thanks you Sir. I completely agree with your point on being flexible. However, I faced a similar problem even when trying to integrate $$\int_0^{\pi/2}\ln(\sin(x))\ln(\tan(x))dx$$Unless I rectify this error , I fear I'm making a significant conceptual error. Sir, please could you take the time to check my original problem? I tried for the past 30 minutes, but still couldn't spot the error. – Ishan Jun 14 '15 at 9:09
• I'm cooking food with a baby on my stomach, so I won't have time right now... Hopefully this afternoon. If no one else does it before, of course. – mickep Jun 14 '15 at 9:12
• Anytime that suits you, Sir. Many many thanks in advance! Enjoy the meal you'll have:) – Ishan Jun 14 '15 at 9:13
• I have updated the answer with details for the real question. Also, the integral that you mention with two logarithms looks more interesting. My CAS tells me a value, but I don't see how to get it at the moment... – mickep Jun 14 '15 at 10:58
• Alright Sir, thanks very very much!  Sir, I reached a very similar stage with that Integral too using almost the same method. The only change was that I had to take $$\dfrac{\partial^2}{\partial a\partial b} \dfrac{1}{2} \beta \bigg (\dfrac{a+b+1}{2},\dfrac{1-b}{2} \bigg )\bigg |_{a=b=0}$$ – Ishan Jun 14 '15 at 11:35

$\newcommand{\bbx}{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\expo}{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}{\mathcal{#1}} \newcommand{\mrm}{\mathrm{#1}} \newcommand{\pars}{\left(\,{#1}\,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}{\left\vert\,{#1}\,\right\vert}$ \begin{align} I & = \int_{0}^{\pi/2}\ln\pars{\sin\pars{x}}\tan\pars{x}\,\dd x \,\,\,\stackrel{x\ =\ \arcsin\pars{t}}{=}\,\,\, \int_{0}^{1}\ln\pars{t}{t \over \root{1 - t^{2}}} \,{\dd t \over \root{1 - t^{2}}} \\[5mm] & = \int_{0}^{1}\ln\pars{t}\,{t \over 1 - t^{2}}\,\dd t = \int_{0}^{1}\ln\pars{t}\pars{{1/2 \over 1 - t} - {1/2 \over 1 + t}}\,\dd t \\[5mm] & = -\,{1 \over 2}\int_{0}^{1}\bracks{-\,{{\ln\pars{1 - t} \over t}}}\,\dd t + {1 \over 2}\int_{0}^{-1}{\ln\pars{-t} \over 1 - t}\,\dd t \\[5mm] & = -\,{1 \over 2}\int_{0}^{1}\bracks{-\,{{\ln\pars{1 - t} \over t}}}\,\dd t - {1 \over 2}\int_{0}^{-1}\bracks{-\,{\ln\pars{1 - t} \over t}}\,\dd t \\[5mm] & = -\,{1 \over 2}\int_{0}^{1}\mrm{Li}_{2}'\pars{t}\,\dd t - {1 \over 2}\int_{0}^{-1}\mrm{Li}_{2}'\pars{t}\,\dd t = -\,{1 \over 2}\bracks{\mrm{Li}_{2}\pars{1} + \mrm{Li}_{2}\pars{-1}} \\[5mm] & = -\,{1 \over 2}\sum_{n = 1}^{\infty} \bracks{{1 \over n^{2}} + {\pars{-1}^{n} \over n^{2}}} = -\,{1 \over 2}\sum_{n = 1}^{\infty} \bracks{{1 \over \pars{2n}^{2}} + {1 \over \pars{2n}^{2}}} = -\,{1 \over 4}\ \underbrace{\sum_{n = 1}^{\infty}{1 \over n^{2}}} _{\ds{\pi^{2} \over 6}} = \bbx{-\,{\pi^{2} \over 24}} \end{align}