# How can we show that $\int_{0}^{\pi/2}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx={\pi\over 12}?$

Consider the integral $(1)$

$$\int_{0}^{\pi/2}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx={\pi\over 12}\tag1$$

An attempt:

Rewrite $(1)$ as

$$\int_{0}^{\pi/2}x\cos(8x)\ln\tan\left(x+{\pi\over 4}\right)\mathrm dx\tag2$$

$$\int_{0}^{\pi/2}x\cdot{1-\tan^2(4x)\over 1+\tan^2(4x)}\ln\tan\left(x+{\pi\over 4}\right)\mathrm dx\tag3$$

Or we can rewrite $(1)$ as

$$\color{red}{\int_{0}^{\pi/2}x\cos^2(4x)\ln\tan\left(x+{\pi\over 4}\right)\mathrm dx}-\int_{0}^{\pi/2}x\sin^2(4x)\ln\tan\left(x+{\pi\over 4}\right)\mathrm dx=I_1+I_2\tag4$$

Applying $\ln\tan x$ series to the red part

$I_1$ becomes

$$I_1=\int_{0}^{\pi/2}x\cos^2(4x)\ln\left(x+{\pi\over 4}\right)\mathrm dx+\sum_{n=1}^{\infty}{2^{2n}(2^{2n-1}-1)B_n\over n(2n)!}\int_{0}^{\pi/2}x(x+\pi/4)^{2n}\cos^2(4x)\mathrm dx\tag5$$

This looked too complicate, how else can we prove $(1)?$

• If $x>\pi/4, \tan x>1$ right? Is it a problem on Complex calculus? – lab bhattacharjee Apr 5 '17 at 6:22
• @lab Oh thats why I was getting $\ln(-1)$ when solving this. – samjoe Apr 5 '17 at 6:23
• have you tried $x\rightarrow x-\pi/2$? – tired Apr 5 '17 at 6:59
• additionally @labbhattacharjee is right: something is fishy here – tired Apr 5 '17 at 7:02
• If you change the interval of integration for $[0;\tfrac{\pi}{4}]$ the result is probably $\dfrac{13}{72}$ – FDP Apr 5 '17 at 9:16

What you need is to split the integral into two parts and use integration by parts for the second part. Let $x\to\frac{\pi}{2}-x$ and then \begin{eqnarray} I&=:&\int_{0}^{\pi/2}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx\\ &=&\int_{0}^{\pi/4}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx+\int_{\pi/4}^{\pi/2}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx\\ &=&\int_{0}^{\pi/4}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx-\int_{\pi/4}^{0}(\frac{\pi}{2}-x)\cos(8x)\ln\left(1+\cot x\over 1-\cot x\right)\mathrm dx\\ &=&\int_{0}^{\pi/4}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx+\int^{\pi/4}_{0}(\frac{\pi}{2}-x)\cos(8x)\ln\left(1+\tan x\over \tan x-1\right)\mathrm dx\\ &=&\int_{0}^{\pi/4}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx+\int^{\pi/4}_{0}(\frac{\pi}{2}-x)\cos(8x)\left[\ln\left(1+\tan x\over 1-\tan x\right)+\pi i\right]\mathrm dx\\ &=&\int_{0}^{\pi/4}x\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx+\int^{\pi/4}_{0}(\frac{\pi}{2}-x)\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx\\ &&+\pi i\int^{\pi/4}_{0}(\frac{\pi}{2}-x)\cos(8x)\mathrm dx\\ &=&\frac{\pi}{2}\int^{\pi/4}_{0}\cos(8x)\ln\left(1+\tan x\over 1-\tan x\right)\mathrm dx\\ &=&\frac{\pi}{16}\int^{\pi/4}_{0}\ln\left(1+\tan x\over 1-\tan x\right)\mathrm d\sin(8x)\\ &=&\frac{\pi}{16}\left[\ln\left(1+\tan x\over 1-\tan x\right)\sin(8x)\bigg|_0^{\pi/4}-\int^{\pi/4}_{0}\sin(8x)\mathrm{d}\ln\left(1+\tan x\over 1-\tan x\right)\right]\\ &=&-\frac{\pi}{16}\int^{\pi/4}_{0}\sin(8x)\left(\frac1{1+\tan x}+\frac1{ 1-\tan x}\right)\sec^2x\mathrm d x\\ &=&-\frac{\pi}{8}\int^{\pi/4}_{0}\frac{\sin(8x)}{\cos(2x)}\mathrm d x\\ &=&\frac{\pi}{12}. \end{eqnarray} Here $$\int^{\pi/4}_{0}(\frac{\pi}{2}-x)\cos(8x)\mathrm dx=0.$$
$\newcommand{\bbx}[1]{\,\bbox[8px,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}$
I'll assume the $\ds{\ln}$-argument is 'enclosed' in an absolute value !!!.