TITLE: Integral $\int _{0}^{\pi /2}x\cos (8x)\ln \tan x \, \text{d}x$
QUESTION [7 upvotes]: Inspired by this topic, can I easily prove the result below?
$$\int _{0}^{\pi /2}x\cos (8x)\ln \tan x \, \text{d}x=\frac{13}{36}$$
The elementary antiderivative exists, but it seems masochist if one wants compute it.

REPLY [2 votes]: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

$\ds{\int_{0}^{\pi/2}x\cos\pars{8x}\ln\pars{\tan\pars{x}}\,\dd x =
{13 \over 36}:\ {\large ?}}$.

\begin{equation}\bbx{%
\mbox{Note that}\ 
\int_{0}^{\pi/2}\!\!\!\!\!\!\!\!x\cos\pars{8x}\ln\pars{\tan\pars{x}}\,\dd x =
\left.\partiald{}{\nu}\bbox[#ffd]{\ds{\int_{0}^{\pi/2}\!\!\!\!\!\!\!
\sin\pars{\nu x}\ln\pars{\tan\pars{x}}\,\dd x}}\,\right\vert_{\,\,\nu\ =\ 8}}
\label{1}\tag{1}
\end{equation}
\begin{align}
&\left.\bbox[#ffd,10px]{\ds{\int_{0}^{\pi/2}
\sin\pars{\nu x}\ln\pars{\tan\pars{x}}\,\dd x}}
\right\vert_{\ \nu\ \in\ \mathbb{R}_{\ >\ 0}} =
\Im\int_{0}^{\pi/2}\expo{\ic\nu x}\ln\pars{\tan\pars{x}}\,\dd x
\\[5mm] = &\
\left.\Im\int_{x\ =\ 0}^{x\ =\ \pi/2}z^{\nu}\ln\pars{{1 - z^{2} \over 1 + z^{2}}\,\ic}{\dd z \over \ic z}\,
\right\vert_{\ z\ =\ \exp\pars{\ic x}}\qquad\pars{~\substack{\ds{z^{\nu}\ \mbox{and}\ \ln\
\mbox{are defined as}}\\[1mm] \ds{Principal\ Branches}}~}
\\[5mm] = &\
\left.-\,\Re\int_{x\ =\ 0}^{x\ =\ \pi/2}z^{\nu - 1}
\ln\pars{{1 - z^{2} \over 1 + z^{2}}\,\ic}\dd z\,
\right\vert_{\ z\ =\ \exp\pars{\ic x}}
\\[5mm] \stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\sim}\,\,\,&
\Re\int_{1}^{0}\pars{\ic y}^{\nu - 1}
\ln\pars{{1 + y^{2} \over 1 - y^{2}}\,\ic}\ic\,\dd y +
\Re\int_{0}^{1}x^{\nu - 1}
\ln\pars{{1 - x^{2} \over 1 + x^{2}}\,\ic}\,\dd x
\end{align}

The integration was performed in a quarter circle in the first quadrant. The 'contributions' from indented paths 'around' $\ds{z = \ic}$ and $\ds{z = 1}$ were omitted because they vanishes out as $\ds{\epsilon \to 0^{+}}$.

Then,
\begin{align}
&\left.\bbox[#ffd,10px]{\ds{\int_{0}^{\pi/2}
\sin\pars{\nu x}\ln\pars{\tan\pars{x}}\,\dd x}}
\right\vert_{\ \nu\ \in\ \mathbb{R}_{\ >\ 0}}
\\[5mm] = &\
-\Re\int_{0}^{1}\expo{\ic\nu\pi/2}y^{\nu - 1}
\bracks{\ln\pars{1 + y^{2} \over 1 - y^{2}} + \ic\,{\pi \over 2}}\,\dd y +
\Re\int_{0}^{1}x^{\nu - 1}
\bracks{\ln\pars{1 - x^{2} \over 1 + x^{2}} + \ic\,{\pi \over 2}}\,\dd x
\\[5mm] = &\
-\cos\pars{\nu\pi \over 2}\int_{0}^{1}y^{\nu - 1}
\ln\pars{1 + y^{2} \over 1 - y^{2}}\,\dd y +
{\pi \over 2}\sin\pars{\nu\pi \over 2}\int_{0}^{1}y^{\nu - 1}\,\dd y +
\int_{0}^{1}x^{\nu - 1}\ln\pars{1 - x^{2} \over 1 + x^{2}}\,\dd x
\\[5mm] & =
2\cos^{2}\pars{\nu\pi \over 4}
\int_{0}^{1}x^{\nu - 1}\ln\pars{1 - x^{2} \over 1 + x^{2}}\,\dd x +
{\pi\sin\pars{\nu\pi/2} \over 2\nu}
\end{align}

\eqref{1} is reduced to:

\begin{align}
&\int_{0}^{\pi/2}x\cos\pars{8x}\ln\pars{\tan\pars{x}}\,\dd x =
2\int_{0}^{1}x^{7}\ln\pars{x}\ln\pars{1 - x^{2} \over 1 + x^{2}}\,\dd x +
{\pi^{2} \over 32}
\\[5mm] = &\
4\int_{0}^{1}x^{7}\ln\pars{x}\ln\pars{1 - x^{2}}\,\dd x -
2\int_{0}^{1}x^{7}\ln\pars{x}\ln\pars{1 - x^{4}}\,\dd x + {\pi^{2} \over 32}
\\[5mm] = &\
\underbrace{\int_{0}^{1}x^{3}\ln\pars{x}\ln\pars{1 - x}\,\dd x}
_{\ds{{35 \over 72} - {\pi^{2} \over 24}}}\ -\
{1 \over 8}\
\underbrace{\int_{0}^{1}x\ln\pars{x}\ln\pars{1 - x}\,\dd x}
_{\ds{1 - {\pi^{2} \over 12}}}\ +\ {\pi^{2} \over 32} =
\bbx{13 \over 36} \approx 0.3611
\end{align}