# Find : $\int_0^{\pi/4}x\ln(\sin x)\mathrm dx$

I'm try to find this integral

$$\int_0^{\pi/4}x\ln(\sin x)\mathrm dx$$

My try use : $$\ln(\sin x)=-\ln2-\sum\limits_{n=1}^{\infty}\frac{\cos (2nx)}{n}$$ But I don't know how to complete summation ...

I will happy if someone help me
Thanks!

• To compute this integral is not so easy: $$\frac{1}{128} (35 \zeta (3)-4 \pi (4 C+\pi \log (2)))$$ – Dr. Sonnhard Graubner Apr 23 at 15:19
• Thanks! Can my idea work here ! – user666628 Apr 23 at 15:21
• This looks like the sort of definite integrals solved by Feynman integration. – John Wayland Bales Apr 23 at 15:42
• Yes your method perfectly works here. But will need a tedious work to do – Rohan Shinde Apr 23 at 15:56

We can use the Fourier series and integrate by parts to obtain $$I \equiv \int \limits_0^{\pi/4} x [- \ln(\sin(x))] \, \mathrm{d} x = \frac{\pi^2}{32} \ln(2) + \frac{1}{4} \sum \limits_{n=1}^\infty \frac{1}{n^2} \left[\frac{\pi}{2} \sin\left(\frac{\pi}{2} n \right) - \frac{1}{n} \left(1 - \cos\left(\frac{\pi}{2} n \right)\right)\right] \, .$$ $$\sin\left(\frac{\pi}{2} n \right)$$ is non-zero and alternating for odd $$n$$, while $$\cos\left(\frac{\pi}{2} n \right)$$ is non-zero and alternating for even $$n$$. Therefore, $$I = \frac{\pi^2}{32} \ln(2) + \frac{\pi}{8} \sum \limits_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2} - \frac{1}{4} \sum \limits_{n=1}^\infty \frac{1}{n^3} - \frac{1}{32} \sum \limits_{k=1}^\infty \frac{(-1)^{k-1}}{k^3} \, .$$ The first series is Catalan's constant $$\mathrm{G}$$, the second one is $$\zeta(3)$$ and the third one is $$\eta(3) = \frac{3}{4} \zeta(3)$$ (with the Riemann zeta function $$\zeta$$ and the Dirichlet eta function $$\eta$$), so we obtain $$I = \frac{\pi^2}{32} \ln(2) + \frac{\pi}{8} \mathrm{G} - \frac{35}{128} \zeta(3)$$ and your integral is $$- I$$.

• Darn... you beat me to it! +1 – clathratus Apr 23 at 16:55
• Me too.........(+1) – Rohan Shinde Apr 23 at 16:58
• Brilliant sir , thanks! – user666628 Apr 23 at 20:17

\begin{align} I&=\int_0^{\frac{\pi}{4}}x\ln\left( \sin x\right)\,dx\\ J&=\int_0^{\frac{\pi}{4}}x\ln\left( \cos x\right)\,dx\\ I+J&=\int_0^{\frac{\pi}{4}}x\ln\left( \sin x\cos x\right)\,dx\\ &=\int_0^{\frac{\pi}{4}}x\ln\left( \frac{\sin(2x)}{2}\right)\,dx\\ &=\int_0^{\frac{\pi}{4}}x\ln\left( \sin\left (2x\right)\right)\,dx-\frac{\pi^2}{32}\ln 2\\ \end{align} Perform the change of variable $$\displaystyle y=2x$$, \begin{align}I+J&=\frac{1}{4}\int_0^{\frac{\pi}{2}}x\ln\left( \sin x\right)\,dx-\frac{\pi^2}{32}\ln 2\\ &=\frac{1}{4}\int_0^{\frac{\pi}{4}}x\ln\left( \sin x\right)\,dx+\frac{1}{4}\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}x\ln\left( \sin x\right)\,dx-\frac{\pi^2}{32}\ln 2\\ \end{align} In the second integral perform the change of variable $$y=\dfrac{\pi}{2}-x$$, \begin{align}I+J&=\frac{1}{4}\int_0^{\frac{\pi}{4}}x\ln\left( \sin x\right)\,dx+\frac{1}{4}\int_0^{\frac{\pi}{4}}\left(\frac{\pi}{2}-x \right)\ln\left( \cos x\right)\,dx-\frac{\pi^2}{32}\ln 2\\ &=\frac{1}{4}I-\frac{1}{4}J+\frac{\pi }{8}\int_0^{\frac{\pi}{4}}\ln\left( \cos x\right)\,dx-\frac{\pi^2}{32}\ln 2 \end{align} Therefore, \begin{align}3I+5J&=\frac{\pi }{2}\int_0^{\frac{\pi}{4}}\ln\left( \cos x\right)\,dx-\frac{\pi^2}{8}\ln 2\end{align} \begin{align}A&=\int_0^{\frac{\pi}{4}}\ln\left( \sin x\right)\,dx\\ B&=\int_0^{\frac{\pi}{4}}\ln\left( \cos x\right)\,dx\\ A+B&=\int_0^{\frac{\pi}{4}}\ln\left( \frac{\sin(2x)}{2}\right)\,dx\\ &=\int_0^{\frac{\pi}{4}}\ln\left( \sin(2x)\right)\,dx-\frac{\pi}{4}\ln 2 \end{align} Perform the change of variable $$\displaystyle y=2x$$, \begin{align}A+B&=\frac{1}{2}\int_0^{\frac{\pi}{2}}\ln\left( \sin x\right)\,dx-\frac{\pi}{4}\ln 2\\ &=\frac{1}{2}\int_0^{\frac{\pi}{4}}\ln\left( \sin x\right)\,dx+\frac{1}{2}\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}\ln\left( \sin x\right)\,dx-\frac{\pi}{4}\ln 2\\ \end{align} In the second integral perform the change of variable $$y=\dfrac{\pi}{2}-x$$, \begin{align}A+B&=\frac{1}{2}\int_0^{\frac{\pi}{4}}\ln\left( \sin x\right)\,dx+\frac{1}{2}\int_0^{\frac{\pi}{4}}\ln\left( \cos x\right)\,dx-\frac{\pi}{4}\ln 2\\ \end{align} Therefore, \begin{align}A+B&=-\frac{\pi}{2}\ln 2\end{align} \begin{align}A-B&=\int_0^{\frac{\pi}{4}}\ln\left( \tan x\right)\,dx\end{align} Perform the change of variable $$\displaystyle y=\tan x$$, \begin{align}A-B&=\int_0^1\frac{\ln x}{1+x^2}\,dx\\ &=-\text{G}\end{align} $$\text{G}$$ is the Catalan constant.Therefore, \begin{align}A&=-\frac{\pi}{4}\ln 2-\frac{1}{2}\text{G} \\ B&=\frac{1}{2}\text{G}-\frac{\pi}{4}\ln 2\\ 3I+5J&=\frac{1}{4}\pi\text{G}-\frac{1}{4}\pi^2\ln 2 \end{align} \begin{align}I-J&=\int_0^{\frac{\pi}{4}}x\ln\left(\tan x\right)\,dx\end{align} Perform the change of variable $$\displaystyle y=\tan x$$, \begin{align}I-J&=\int_0^1\frac{\arctan x\ln x}{1+x^2}\,dx\end{align} Define the function $$R$$ on $$[0;1]$$ by: \begin{align}R(x)&=\int_0^x \frac{\ln t}{1+t^2}\,dt\\ &=\int_0^1 \frac{x\ln(tx)}{1+t^2x^2}\,dt\\\end{align} Observe that, $$R(0)=0,R(1)=-\text{G}$$. Perform integration by parts, \begin{align}I-J&=\Big[R(x)\arctan x\Big]_0^1-\int_0^1 \frac{R(x)}{1+x^2}\,dx\\ &=-\frac{1}{4}\pi\text{G}-\int_0^1\int_0^1 \frac{x\ln(tx)}{(1+x^2)(1+t^2x^2)}\,dt\,dx\\ &=-\frac{1}{4}\pi\text{G}-\int_0^1 \int_0^1\frac{x\ln t}{(1+x^2)(1+t^2x^2)}\,dt\,dx-\int_0^1\int_0^1 \frac{x\ln x}{(1+x^2)(1+t^2x^2)}\,dt\,dx\\ &=-\frac{1}{4}\pi\text{G}-\int_0^1 \left[\frac{\ln t}{2(1-t^2)}\ln\left(\frac{1+x^2}{1+t^2x^2}\right)\right]_{x=0}^{x=1}\,dt-\int_0^1 \Big[\frac{\ln x\arctan(tx)}{1+x^2}\Big]_{t=0}^{t=1}\,dx\\ &=-\frac{1}{4}\pi\text{G}-\int_0^1 \frac{\ln t}{2(1-t^2)}\ln\left(\frac{2}{1+t^2}\right)\,dt-\int_0^1 \frac{\ln x\arctan x}{1+x^2}\,dx\\ &=-\frac{1}{4}\pi\text{G}-\frac{1}{2}\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\frac{1}{2}\int_0^1 \frac{\ln t\ln(1+t^2)}{1-t^2}\,dt-\left(I-J\right)\end{align} Therefore, \begin{align}I-J&=-\frac{1}{8}\pi\text{G}-\frac{1}{4}\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\frac{1}{4}\int_0^1 \frac{\ln t\ln(1+t^2)}{1-t^2}\,dt\\ C&=\int_0^1 \frac{\ln x\ln(1+x^2)}{1-x^2}\,dx \end{align} Define the function $$S$$ on $$[0;1]$$ by: \begin{align}S(x)&=\int_0^x \frac{\ln t}{1-t^2}\,dt\\ &=\int_0^1 \frac{x\ln(tx)}{1-t^2x^2}\,dt\end{align} Observe that $$\displaystyle S(0)=0$$. Perform integration by parts, \begin{align}C&=\Big[S(x)\ln(1+x^2)\Big]_0^1-\int_0^1 \int_0^1 \frac{2x^2\ln(tx)}{(1-t^2x^2)(1+x^2)}\,dt\,dx\\ &=S(1)\ln 2-\int_0^1 \int_0^1 \frac{2x^2\ln t}{(1-t^2x^2)(1+x^2)}\,dt\,dx-\int_0^1 \int_0^1 \frac{2x^2\ln x}{(1-t^2x^2)(1+x^2)}\,dt\,dx\\ &=S(1)\ln 2-\int_0^1 \left[\frac{2\left(\text{arctanh}(tx)-t\arctan(x)\right)\ln t}{t(1+t^2)}\right]_{x=0}^{x=1}\,dx-\\ &\int_0^1 \left[\frac{2x\text{arctanh}(tx)\ln x}{1+x^2}\right]_{t=0}^{t=1}\,dt\\ &=S(1)\ln 2-2\int_0^1 \frac{\text{arctanh}(t)\ln t}{t(1+t^2)}\,dt-\frac{1}{2}\pi\text{G}-2\int_0^1\frac{x\text{arctanh}(x)\ln x}{1+x^2}\,dx\\ \end{align} Since for $$t \neq 0$$, $$\dfrac{1}{t(1+t^2)}=\dfrac{1}{t}-\dfrac{t}{1+t^2}$$ then, \begin{align} C&=S(1)\ln 2-2\int_0^1 \frac{\text{arctanh}(t)\ln t}{t}\,dt-\frac{1}{2}\pi\text{G}\\ &=\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\int_0^1 \frac{\ln\left(\frac{1-t}{1+t}\right)\ln t}{t}\,dt-\frac{1}{2}\pi\text{G}\\ &=\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\frac{1}{2}\left[\ln^2 t\ln\left(\frac{1-t}{1+t}\right)\right]_0^1+\int_0^1 \frac{\ln^2 t}{1-t^2}\,dt-\frac{1}{2}\pi\text{G}\\ &=\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\int_0^1 \frac{\ln^2 t}{1-t^2}\,dt-\frac{1}{2}\pi\text{G}\\ &=\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\int_0^1 \frac{\ln^2 t}{1-t}\,dt-\int_0^1 \frac{t\ln^2 t}{1-t^2}\,dt- \frac{1}{2}\pi\text{G}\\ \end{align} In the last integral perform the change of variable $$\displaystyle y=t^2$$, \begin{align} C&=\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\frac{7}{8}\int_0^1 \frac{\ln^2 t}{1-t}\,dt- \frac{1}{2}\pi\text{G}\\ &=\ln 2\int_0^1 \frac{\ln t}{1-t^2}\,dt+\frac{7}{4}\zeta(3)- \frac{1}{2}\pi\text{G}\end{align} Therefore, \begin{align} I-J&=\frac{7}{16}\zeta(3)-\frac{1}{4}\pi\text{G}\end{align} Moreover, \begin{align} 3I+5J&=\frac{1}{4}\pi\text{G}-\frac{1}{4}\pi^2\ln 2 \end{align} Therefore, \begin{align} \boxed{I=\frac{35}{128}\zeta(3)-\frac{1}{8}\pi\text{G}-\frac{1}{32}\pi^2\ln 2} \end{align} and, \begin{align}J&=-\frac{21}{128}\zeta(3)+\frac{1}{8}\pi\text{G}-\frac{1}{32}\pi^2\ln 2\end{align} NB: I assume only, \begin{align}\int_0^1 \frac{\ln^2 t}{1-t}\,dt=2\zeta(3)\\ \int_0^1 \frac{\ln t}{1+t^2}\,dt=-\text{G}\\ \end{align} $$\text{G}$$ is the Catalan constant.

PS: To answer to Clathratus One wants to compute: \begin{align} J&=\int_0^1 A(x)B(x)\ln x\,dx \end{align}

Suppose one can compute: \begin{align}\int_0^1 \left(\int_0^1 xA^\prime(x)B(tx)\ln x\,dt\right)\,dx +\int_0^1 \left(\int_0^1 xA^\prime(x)B(tx)\ln t \,dx\right)\,dt\end{align} Moreover,

if for $$x\in [0;1]$$, \begin{align}R(x)=\int_0^x B(t)\ln t\end{align} Suppose that one can compute $$\displaystyle \lim_{x\rightarrow 0}A(x)R(x)$$ and $$\displaystyle \lim_{x\rightarrow 1}A(x)R(x)$$

Therefore one can compute $$J$$.

(Use integration by parts)

Where does it come from?

"reverse engineering"

First time, i was using it: https://math.stackexchange.com/a/1842492/186817

I was wondering how to express $$\pi^3$$ using integral. If you omit rational multiplicative factor, $$\pi^3$$ is $$\displaystyle \arctan(1)\times \int_0^1 \frac{\ln x}{1+x}\,dx$$

That is, \begin{align}\pi^3&=\text{constant}\times \Big[R(x)\arctan(x)\Big]_{x=0}^{x=1}\end{align} $$R$$ is the function defined on $$[0;1]$$ by, \begin{align}R(x)=\int_0^x \frac{\ln t}{1+t}\,dt\end{align} Therefore, \begin{align}\pi^3=\text{constant}\times \int_0^1 \frac{\partial}{\partial x}\left(R(x)\arctan x\right)\,dx\end{align}

• (+1) Everytime I see one of your posts I am stumped... It is fascinating that you are always able, even for the hardest integrals, to find and complete an elementary approach; even though it might take a few lines more to write ;) – mrtaurho Apr 24 at 23:57
• (+1) where did you learn such incredibly brilliant integration strategy? – clathratus Apr 25 at 0:02
• Clathratus: i have completed my answer. – FDP Apr 25 at 9:29

Another way to attack this integral is via Integration By Parts with the help of the Clausen Function $$\operatorname{Cl}_2(z)$$(and its relatives). The natural choice here is $$u=x$$ and $$\mathrm dv=\log(\sin x)$$. The aforementioned Clausen Function allows us to express the anti-derivative of the chosen $$\mathrm dv$$. Eventually we will get

\begin{align*} \int_0^\frac\pi4x\log(\sin x)\mathrm dx&=\left[x\left(-\frac12\operatorname{Cl}_2(2x)-x\log(2)\right)\right]_0^{\frac\pi4}+\int_0^\frac\pi4\frac12\operatorname{Cl}_2(2x)+x\log(2)\mathrm dx\\ &=-\frac\pi8\operatorname{Cl}_2\left(\frac\pi2\right)-\frac{\pi^2}{16}\log(2)+\frac{\pi^2}{32}\log(2)+\frac12\int_0^\frac\pi4\operatorname{Cl}_2(2x)\mathrm dx\\ &=-\frac\pi8G-\frac{\pi^2}{32}\log(2)+\frac14\int_0^{\frac\pi2}\operatorname{Cl}_2(x)\mathrm dx\\ &=-\frac\pi8G-\frac{\pi^2}{32}\log(2)+\frac14\left[\zeta(3)-\operatorname{Cl}_3\left(\frac\pi2\right)\right]\\ &=-\frac\pi8G-\frac{\pi^2}{32}\log(2)+\frac14\left[\zeta(3)+\frac18\eta(3)\right]\\ &=-\frac\pi8G-\frac{\pi^2}{32}\log(2)+\frac{35}{128}\zeta(3) \end{align*}

$$\therefore~\int_0^\frac\pi4x\log(\sin x)\mathrm dx~=~-\frac\pi8\text{G}-\frac{\pi^2}{32}\log(2)+\frac{35}{128}\zeta(3)$$

Here we used several properties of the Clausen Function which overall are quite simple to prove utilizing the integral representation and the series representation of this function. Not only the result coincides with the one given by ComplexYetTrivial, the underlying method is afterall more or less the same. For those who are familiar with the Clausen Function it is rather obvious that the here described method is nothing more than a more conventient way $$-$$ at least in my opinion $$-$$ to deal with the occuring Fourier Series. However, from my experience the Clausen Function is quite helpful in order to deal with similiar integrals to the examined and therefore I wanted to share this approach aswell.

• Wow !! Very beautiful solution thanks sir I need for examples Clausen function (3π/4) how in type digamma – user666628 Apr 23 at 18:52
• @SophiaMaths Thank you! I am sorry, I am not sure if I understood correctly what you are asking. However, the value of $\operatorname{Cl}_2\left(\frac{3\pi}4\right)$ can be also written as $\Im\operatorname{Li}_2\left(e^{i\frac{3\pi}4}\right)$, i.e. as Dilogarithm which opens up many more possibilities. According to WolframAlpha this can be further reduced in terms of $\pi$, Catalan's Constant and suitable Trigamma Functions which is due the inherent quadratic structure. I guess that is the answer to your question ^^ – mrtaurho Apr 23 at 19:17
• yes , I understand you , do you have fb account or ... I need learning from you more – user666628 Apr 23 at 19:20
• I like your ideas! – user666628 Apr 23 at 19:20
• @SophiaMaths Huh, no. I am not on Facebook. I am mainly here, on math.stackexchange, and on ArtofProblemSolving. You could go through some of my older posts if you are interested in the way I am thinking :) – mrtaurho Apr 23 at 19:25