Closed form of $I=\int_{0}^{\pi/2} \tan^{-1} \bigg( \frac{\cos(x)}{\sin(x) - 1 - \sqrt{2}} \bigg) \tan(x)\;dx$

Solution 1:

Step 1: Introducing an extra parameter

Define $$\phi(\alpha)=\int^\frac{\pi}{2}_0\arctan\left(\frac{\sin{x}}{\cos{x}-\frac{1}{\alpha}}\right)\cot{x}\ {\rm d}x$$ Differentiating yields \begin{align} \phi'(\alpha) =&-\int^\frac{\pi}{2}_0\frac{\cos{x}}{1-2\alpha\cos{x}+\alpha^2}{\rm d}x\\ =&\frac{\pi}{4\alpha}-\frac{1+\alpha^2}{2\alpha(1-\alpha^2)}\int^\frac{\pi}{2}_0\frac{1-\alpha^2}{1-2\alpha\cos{x}+\alpha^2}{\rm d}x \end{align}


Step 2: Evaluation of $\phi'(\alpha)$

For $|\alpha|<1$, the following identity holds. $$\frac{1-\alpha^2}{1-2\alpha\cos{x}+\alpha^2}=1+2\sum^\infty_{n=1}\alpha^n\cos(nx)$$ Therefore, \begin{align} \phi'(\alpha) =&\frac{\pi}{4\alpha}-\frac{1+\alpha^2}{2\alpha(1-\alpha^2)}\left(\frac{\pi}{2}+2\sum^\infty_{n=0}\frac{(-1)^n}{2n+1}\alpha^{2n+1}\right)\\ =&-\frac{\pi\alpha}{2(1-\alpha^2)}-\frac{\arctan{\alpha}}{\alpha}-\frac{2\alpha\arctan{\alpha}}{1-\alpha^2}\tag1 \end{align}


Step 3: The Closed Form

Integrating back, we get \begin{align} &\color{red}{\Large{\phi(\sqrt{2}-1)}}\\ =&\left(\frac{\pi}{4}+\arctan{\alpha}\right)\ln(1-\alpha^2)\Bigg{|}^{\sqrt{2}-1}_0-\int^{\sqrt{2}-1}_0\left[\color{#FF4F00}{\frac{\arctan{\alpha}}{\alpha}}+\color{#00A000}{\frac{\ln(1-\alpha^2)}{1+\alpha^2}}\right]{\rm d}\alpha\tag2\\ =&\frac{3\pi}{8}\ln(2\sqrt{2}-2)\color{blue}{\underbrace{\color{black}{-\int^\frac{\pi}{8}_0\color{#FF4F00}{2x\csc{2x}}\ {\rm d}x+\int^\frac{\pi}{8}_0\color{#00A000}{2\ln(\cos{x})}\ {\rm d}x}}}-\int^\frac{\pi}{8}_0\color{#00A000}{\ln(\cos{2x})}\ {\rm d}x\tag3\\ =&\frac{3\pi}{8}\ln(2\sqrt{2}-2)\color{blue}{-x\ln(\tan{x})\Bigg{|}^\frac{\pi}{8}_0+\int^\frac{\pi}{8}_0\ln\left(\frac{1}{2}\sin{2x}\right)\ {\rm d}x}-\int^\frac{\pi}{8}_0\ln(\cos{2x})\ {\rm d}x\tag4\\ =&\frac{\pi}{4}\ln(2\sqrt{2}-2)+\int^\frac{\pi}{8}_0\ln(\tan{2x})\ {\rm d}x\\ =&\frac{\pi}{4}\ln(2\sqrt{2}-2)-2\sum^\infty_{n=0}\frac{1}{2n+1}\int^\frac{\pi}{8}_0\cos\left((8n+4)x\right)\ {\rm d}x\tag5\\ =&\frac{\pi}{4}\ln(2\sqrt{2}-2)-2\sum^\infty_{n=0}\frac{\cos(n\pi)}{(2n+1)(8n+4)}\\ =&\frac{\pi}{4}\ln(2\sqrt{2}-2)-\frac{1}{2}\sum^\infty_{n=0}\frac{(-1)^n}{(2n+1)^2}\tag6\\ =&\boxed{\color{red}{\Large{\displaystyle\frac{\pi}{4}\ln(2\sqrt{2}-2)-\frac{\mathbf{G}}{2}}}}\tag7 \end{align}


Explanation:

$(2):$ Integrated $(1)$ from $0$ to $\sqrt{2}-1$. Integrated $\dfrac{2\alpha\arctan{\alpha}}{1-\alpha^2}$ by parts.
$(3):$ Applied the substitution $\alpha=\tan{x}$.
$(4):$ Integrated $-2x\csc{2x}$ by parts.
$(5):$ Used the Fourier series of $\ln(\tan{2x})$.
$(6):$ $\cos(n\pi)=(-1)^n$ for $n\in\mathbb{N}$.
$(7):$ Used the definition of Catalan's constant.

Solution 2:

Hello there, this is Cleo who is using Anastasiya's M.S.E. account (>‿◠)✌


Does the integral below have a closed-form?

\begin{equation} I=\int_{0}^{\Large\frac{\pi}{2}} \arctan \left( \frac{\cos x}{\sin x - 1 - \sqrt{2}} \right) \tan x \,\,dx \end{equation}

${\sf\mbox{Yes, it does.}}$

Here is the bonus answer for your question:

\begin{equation}\large I=\frac{\pi\ln\bigg(2\sqrt{2}-2\bigg)-2\,\mathbf{G}}{4}\end{equation}

where $\mathbf{G}$ is Catalan's constant.


Hint :

Let \begin{equation} I(a)=\int_{0}^{\Large\frac{\pi}{2}} \arctan \left( \frac{\cos x}{\sin x -a} \right) \tan x \,\,dx \end{equation} so that $\,I(0)=\dfrac{\pi}{2}\ln2\,$, then \begin{equation} I'(a)=\int_{0}^{\Large\frac{\pi}{2}} \frac{\sin x}{1+a^2-2a\sin x} \,\,dx=\int_{0}^{\Large\frac{\pi}{2}} \frac{\cos x}{1+a^2-2a\cos x} \,\,dx \end{equation} Using identity \begin{equation} 1+2\sum_{n=1}^\infty \frac{\cos(n x)}{a^n}=\frac{a^2-1}{1+a^2-2a\cos x}\qquad,\qquad\mbox{for}\, a>|1| \end{equation} we have \begin{equation} I'(a)=\int_{0}^{\Large\frac{\pi}{2}} \frac{\cos x}{a^2-1} \,\,dx+\int_{0}^{\Large\frac{\pi}{2}} \frac{2\cos^2 x}{a\left(a^2-1\right)} \,\,dx+\frac{2}{a^2-1}\sum_{n=2}^\infty \int_{0}^{\Large\frac{\pi}{2}} \frac{\cos x\cos(n x) }{a^n}\,\,dx \end{equation} I have no much time, so I'll leave it the rest to you. I am sure you can take it from here.

Solution 3:

For $x\in \Big[0,\dfrac{\pi}{2}\Big]$ let $f(x)=\arctan\Big(\dfrac{\cos x}{\sin x-1-\sqrt{2}}\Big)$

$f'(x)=\dfrac{(\sqrt{2}+1)\sin x-1}{2(\sqrt{2}+1)(\sqrt{2}-\sin x)}$

For $x\in \Big[0,\dfrac{\pi}{2}\Big[$ let $g(x)=-\ln(\cos x)$

$g'(x)=\tan x$

Let $\alpha \in \Big[0,\dfrac{\pi}{2}\Big[$

$\displaystyle A(\alpha)=\int_0^{\alpha}f(x)g'(x)dx=\Big[-f(x)\ln(\cos x)\Big]_0^{\alpha}+\int_0^{\alpha}\dfrac{(\sqrt{2}+1)\sin x-1}{2(\sqrt{2}+1)(\sqrt{2}-\sin x)}\ln(\cos x)dx$

$f(0)\ln(\cos 0)=0$

For $x\in \mathbb{R}$, $\cos\Big(\dfrac{\pi}{2}-x\Big)=\sin(x)$

For $x\in \Big[0,\dfrac{\pi}{2}\Big[$ let $h(x)=f\Big(\dfrac{\pi}{2}-x\Big)$

Notice:

$h(0)=f\Big(\dfrac{\pi}{2}\Big)=0$

For $x\in \Big]0,\dfrac{\pi}{2}\Big[$

$h(x)\ln(\sin x)=\dfrac{h(x)}{x}\Big(x\ln x+x\ln\big(\dfrac{\sin x}{x}\big)\Big)$

$\lim_{x\rightarrow \tfrac{\pi}{2}^-}f(x)\ln(\cos x)=\lim_{x\rightarrow 0^+}h(x)\ln(\sin x)=0$

Since:

$\lim_{x\rightarrow 0^+} \dfrac{h(x)}{x}=h'(0)$

$\lim_{x\rightarrow 0} \dfrac{\sin x}{x}=1$

$\lim_{x\rightarrow 0^+}x\ln(x)=0$

Therefore

$\displaystyle I=\lim_{\alpha\rightarrow \tfrac{\pi}{2}^-}A(\alpha)=\int_0^{\tfrac{\pi}{2}}\dfrac{(\sqrt{2}+1)\sin x-1}{2(\sqrt{2}+1)(\sqrt{2}-\sin x)}\ln(\cos x)dx$

$\displaystyle I=\int_0^{\tfrac{\pi}{2}}\dfrac{(\sqrt{2}+1)\Big(-(\sqrt{2}-\sin x)+\sqrt{2}\Big)-1}{2(\sqrt{2}+1)(\sqrt{2}-\sin x)}\ln(\cos x)dx$

$\displaystyle I=\int_0^{\tfrac{\pi}{2}}\dfrac{(\sqrt{2}+1)\sqrt{2}-1}{2(\sqrt{2}+1)(\sqrt{2}-\sin x)}\ln(\cos x)dx-\dfrac{1}{2}\int_0^{\tfrac{\pi}{2}}\ln(\cos x)dx$

$\displaystyle I=\int_0^{\tfrac{\pi}{2}}\dfrac{\ln(\cos x)}{2(\sqrt{2}-\sin x)}dx-\dfrac{1}{2}\int_0^{\tfrac{\pi}{2}}\ln(\cos x)dx$

For the second term a closed form is well known to be $\dfrac{\pi\log2}{4}$

Let $\displaystyle J=\int_0^{\tfrac{\pi}{2}}\dfrac{\ln(\cos x)}{2(\sqrt{2}-\sin x)}dx$

Perform the change of variable $u=\tan\Big(\dfrac{x}{2}\Big)$ it follows:

$\displaystyle J=\dfrac{1}{\sqrt{2}}\int_0^1 \dfrac{\ln\Big(\dfrac{1-x^2}{1+x^2}\Big)}{x^2-\sqrt{2}x+1}dx$

One more step.

Notice: $(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)=x^4+1$

Therefore:

$\displaystyle J=\dfrac{1}{\sqrt{2}}\int_0^1 \dfrac{(x^2+\sqrt{2}x+1)\ln\Big(\tfrac{1-x^2}{1+x^2}\Big)}{1+x^4}dx$

$\displaystyle J=\int_0^1 \dfrac{x\ln\Big(\tfrac{1-x^2}{1+x^2}\Big)}{1+x^4}dx+\dfrac{1}{\sqrt{2}}\int_0^1 \dfrac{(x^2+1)\ln\Big(\tfrac{1-x^2}{1+x^2}\Big)}{1+x^4}dx$

One can get a closed form for the first integral.

Perform the changes of variable $u=x^2$, then $u=\dfrac{1-x}{1+x}$

Finally one get:

$\displaystyle \dfrac{1}{2}\int_0^1 \dfrac{\ln(x)}{1+x^2}dx$

That is a well-known value for

-$\dfrac{1}{2}G$, where $G$ is the Catalan's constant.

I suppose the harder is left.

That's finding a proof for the closed form of

$K=\displaystyle \dfrac{1}{\sqrt{2}}\int_0^1 \dfrac{(x^2+1)\ln\Big(\tfrac{1-x^2}{1+x^2}\Big)}{1+x^4}dx$

Final part. It's magic !

$K=\displaystyle \int_0^1 \dfrac{\log\big(\tfrac{1-x^2}{1+x^2}\big)}{1+\sqrt{2}x+x^2}dx+\int_0^1 \dfrac{\log\big(\tfrac{1-x^2}{1+x^2}\big)}{1-\sqrt{2}x+x^2}dx$

In both integrals perform the change of variable:

$x=\dfrac{1-u}{1+u}$

Therefore:

$K=\displaystyle\dfrac{1}{2(\sqrt{2}-1)}\int_0^1 \dfrac{\log\big(\tfrac{2x}{1+x^2}\big)}{(\sqrt{2}+1)^2x^2+1}dx+\dfrac{1}{2(\sqrt{2}+1)}\int_0^1 \dfrac{\log\big(\tfrac{2x}{1+x^2}\big)}{(\sqrt{2}-1)^2x^2+1}dx$

In the first integral perform the change of variable $y=(\sqrt{2}+1)x$

In the second integral perform the change of variable $y=(\sqrt{2}-1)x$

Therefore:

$K=\displaystyle \dfrac{1}{2}\int_0^{\sqrt{2}+1}\dfrac{\log\Big(\tfrac{2(\sqrt{2}-1)x}{1+(\sqrt{2}-1)^2x^2}\Big)}{1+x^2}dx+\dfrac{1}{2}\int_0^{\sqrt{2}-1}\dfrac{\log\Big(\tfrac{2(\sqrt{2}+1)x}{1+(\sqrt{2}+1)^2x^2}\Big)}{1+x^2}dx$

Knowing that:

$\tan\Big(\dfrac{3\pi}{8}\Big)=\sqrt{2}+1$

$\tan\Big(\dfrac{\pi}{8}\Big)=\sqrt{2}-1$

$(\sqrt{2}+1)(\sqrt{2}-1)=1$

$\displaystyle \int_0^u \dfrac{1}{1+x^2}dx=\arctan(u)$

Therefore:

$K=\dfrac{\pi\log(2)}{4}+\dfrac{\pi\log(\sqrt{2}-1)}{8}+L$

Where $L=\displaystyle\dfrac{1}{2}\int_0^{\sqrt{2}+1}\dfrac{\log\big(\tfrac{x}{1+(\sqrt{2}-1)^2x^2}\big)}{1+x^2}dx+\dfrac{1}{2}\int_0^{\sqrt{2}-1}\dfrac{\log\big(\tfrac{x}{1+(\sqrt{2}+1)^2x^2}\big)}{1+x^2}dx$

In the second integral perform the change of variable $x=\dfrac{1}{u}$

$\displaystyle L=\dfrac{1}{2}\int_0^{\sqrt{2}+1}\dfrac{\log\big(\tfrac{x}{1+(\sqrt{2}-1)^2x^2}\big)}{1+x^2}dx+\dfrac{1}{2}\int_{\sqrt{2}+1}^{+\infty}\dfrac{\log\big(\tfrac{x}{x^2+(\sqrt{2}+1)^2}\big)}{1+x^2}dx$

$\displaystyle L=\dfrac{1}{2}\int_0^{\sqrt{2}+1}\dfrac{\log\big(\tfrac{x}{1+(\sqrt{2}-1)^2x^2}\big)}{1+x^2}dx+\dfrac{1}{2}\int_{\sqrt{2}+1}^{+\infty}\dfrac{\log\big(\tfrac{x(\sqrt{2}-1)^2}{(\sqrt{2}-1)^2x^2+1}\big)}{1+x^2}dx$

$\displaystyle L=\dfrac{1}{2}\int_0^{+\infty}\dfrac{\log\big(\tfrac{x}{1+(\sqrt{2}-1)^2x^2}\big)}{1+x^2}dx+\dfrac{\pi\log(\sqrt{2}-1)}{8}$

Since:

$\displaystyle \int_0^{+\infty}\dfrac{\log(x)}{1+x^2}dx=0$

(consider intervals $[0,1]$, $[1,+\infty]$ and perform the change of variable $u=\dfrac{1}{x}$ )

$\displaystyle \int_0^{+\infty}\dfrac{\log(1+t^2x^2)}{1+x^2}dx=\pi\log(1+t)$

(consider the function: $\displaystyle F(t)=\int_0^{+\infty}\dfrac{\log(1+t^2x^2)}{1+x^2}dx$ and compute its derivative) see here: Integral:$ \int^\infty_{-\infty}\frac{\ln(x^{2}+1)}{x^{2}+1}dx $ )

Then: $L=-\dfrac{\pi\log(2)}{4}+\dfrac{\pi\log(\sqrt{2}-1)}{8}$

Hence:

$K=\dfrac{\pi\log(\sqrt{2}-1)}{4}$

QED

Solution 4:

(It's a comment, i can't connect right now, sorry)

Dementor approach seems to me alright.

Consider rather:

$\displaystyle I(a)=\int_{0}^{\pi/2} \tan^{-1} \bigg( \frac{\cos(x)}{\sin(x) - a^2 }\bigg) \tan(x)\;dx$

Compute derivative, use change of variable $u=\tan(x/2)$ and i think one can get expression of I'(a) without integral sign.

$I(0)$ can be computed using $\arctan(x)+\arctan(1/x)=\dfrac{\pi}{2}$

I hope everything is ok.