# Is there any other method to compute $\int_{0}^{\frac{\pi}{4}} y \ln (\cos y) d y$?

After investigating the integral

$$\int_{0}^{\frac{\pi}{2}} y \ (\cos y) d y$$ in the post. I keep on finding the integral with smaller limit $$I:=\int_{0}^{\frac{\pi}{4}} y \ln (\cos y) d y.$$

As before, I use the Fourier series of $$\ln(\cos y)$$

$$\ln (\cos y)=-\ln 2+\sum_{k=1}^{\infty} \frac{(-1)^{k+1} \cos (2 k y)}{k}$$ Multiplying it by $$y$$ followed by integrating from $$0$$ to $$\frac{\pi}{4}$$yields $$\int_{0}^{\frac{\pi}{4}} y \ln (\cos y) d y=-\int_{0}^{\frac{\pi}{4}} y \ln 2 d y+\sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k} \int_{0}^{\frac{\pi}{4}} y \cos (2 k y) dy= -\frac{\pi^{2}}{32} \ln 2+J$$

Applying integration by parts gives \begin{aligned} J &=\sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{2 k^{2}}\left([y \sin 2 k y]_{0}^{\frac{\pi}{4}}-\int_{0}^{\frac{\pi}{4}} \sin 2 k y d y\right) \\ &=\frac{1}{2} \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k^{2}}\left(\frac{\pi}{4} \sin \frac{k \pi}{2}+\left[\frac{\cos 2 k y}{2 k}\right]_{0}^{\frac{\pi}{4}}\right) \\ &=\frac{\pi}{8} \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k^{2}} \sin \frac{k \pi}{2}+\frac{1}{4} \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k^{3}} \left(\cos \frac{k \pi}{2}-1\right) \\&= \frac{\pi}{2} \sum_{k=0}^{\infty} \frac{(-1)^{k}}{(2 k+1)^{2}}+\left[\frac{1}{32} \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k^{3}}-\frac{1}{4} \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k^{3}}\right]\\&=\frac{\pi G}{8}- \frac{7}{32}\left(\zeta(3)-2 \sum_{k=1}^{\infty} \frac{1}{(2 k)^{3}}\right)\\&= \frac{\pi G}{8}-\frac{21}{128} \zeta(3),\end{aligned} where $$G$$ is the Catalan’s Constant. Now we can conclude that $$\boxed{I= \frac{\pi G}{8}-\frac{\pi^{2}}{32} \ln 2-\frac{21}{128} \zeta(3)}$$ Noting that, \begin{aligned} \int_0^{\frac{\pi}{4}} x \ln (\sin x) d x+I & =\int_0^{\frac{\pi}{4}} x \ln (\sin x \cos x) d x \\ & =\int_0^{\frac{\pi}{4}}[x \ln (\sin 2 x)-x \ln 2] d x \\ & =\frac{1}{4} \int_0^{\frac{\pi}{2}} x \ln (\sin x) d x-\frac{\pi^2}{32} \ln 2 \\ & =\frac{7}{64}\zeta(3)-\frac{\pi^2}{16} \ln 2 \end{aligned}

Hence $$\boxed{\int_0^{\frac{\pi}{4}} x \ln (\sin x) d x=-\frac{\pi}{8} G-\frac{\pi^2}{32} \ln 2+\frac{35}{128} \zeta(3)}$$ and

$$\boxed{\int_0^{\frac{\pi}{4}} x \ln (\tan x)dx=-\frac{\pi}{4} G+\frac{7}{16} \zeta(3)}$$ Suggestions and alternative methods are highly appreciated.

To avoid infinite series, let $$S=\int_{0}^{\frac{\pi}{4}} y \ln (2\sin y) d y,\>\>\> C=\int_{0}^{\frac{\pi}{4}} y \ln (2\cos y) d y$$ and $$K=\int_{0}^{\frac{\pi}{2}} y \ln (\tan y) d y$$. Then \begin{align} S+C=&\int_{0}^{\frac{\pi}{4}} y \ln (2\sin 2y) d y \overset{2y\to y}=\frac14 \int_{0}^{\frac{\pi}{2}} y \ln (2\sin y)\overset{y\to \frac\pi2-y}{ d y}= \frac18K\\ S-C =& \int_{0}^{\frac{\pi}{4}} y \ln (\tan y) d y = K - \int_{\frac{\pi}{4}}^{\frac{\pi}{2}} y \ln (\tan y) \overset{y\to \frac\pi2-y}{d y}=\frac12K-\frac\pi4G \end{align} Evaluate \begin{align} K&\overset{t=\tan y}=\int_{0}^{\infty} \frac{\ln t\tan^{-1}t}{1+t^2}dt = \int_{0}^{1} \int_0^\infty \frac{t\ln t}{(1+t^2 )(1+x^2 t^2)} \overset{t\to \frac1{xt}}{dt}dx\\ &=\int_{0}^{1} \int_0^\infty \frac{-t\ln x}{(1+t^2 )(1+x^2 t^2)} dt\>dx-K= \frac12 \int_0^1\frac{\ln^2x}{1-x^2}dx=\frac78\zeta(3) \end{align} Thus, $$C= \frac\pi8G -\frac3{16}K$$ and $$\int_{0}^{\frac{\pi}{4}} y \ln (\cos y) d y= C-\ln2\int_0^{\frac\pi4}ydy = \frac{\pi}{8}G-\frac{21}{128} \zeta(3)-\frac{\pi^{2}}{32} \ln 2$$