Monday, February 28, 2022

Integral of the day XXVII

An integral involving the Gamma function

Integral involving the Gamma functon $\Gamma(\cdot)$


Today we show the proof of this integral posted by @Ali39342137 \[ \int_{0}^{\infty} \left(\sqrt{1+x^4}-x^2\right)^nx^{k-1} dx = \frac{\Gamma\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{k}{2}\right)}{2^{\frac{k}{2}}\Gamma\left(\frac{n}{2}+\frac{k}{4}\right)}\frac{n}{2n+k}\quad n> \frac{k}{2} \] This is a generalization for this other integral posted by @integralsbot with $n=s$ and $k=1$: \[\int_{0}^{\infty} \left(\sqrt{1+x^4}-x^2\right)^s dx = \frac{s}{2s+1}\sqrt{\frac{\pi}{2}} \frac{\Gamma\left(\frac{s}{2}-\frac{1}{4}\right)}{\Gamma\left(\frac{s}{2}+\frac{1}{4}\right)} \] We previously posted another similar generalization here

Proof:

\begin{align*} I = \int_{0}^{\infty} \left(\sqrt{1+x^4}-x^2\right)^nx^{k-1} dx =& \frac{1}{2}\int_{0}^{\infty} \left(\sqrt{1+w^2}-w\right)^nw^{\frac{k}{2}-1} dw \quad ( w \mapsto x^2) \\ =& \frac{1}{2^{\frac{k}{2}+1}}\int_{0}^{\infty} t^{n-\frac{k}{2}-1}(1-t^2)^{\frac{k}{2}-1}(t^2+1) \quad (t \mapsto \sqrt{1+w^2}-w ) \\ =& \frac{1}{2^{\frac{k}{2}+1}}\left[\int_{0}^{\infty} t^{n-\frac{k}{2}+1}(1-t^2)^{\frac{k}{2}-1} dt +\int_{0}^{\infty} t^{n-\frac{k}{2}-1}(1-t^2)^{\frac{k}{2}-1} dt\right]\\ =& \frac{1}{2^{\frac{k}{2}+2}}\left[\int_{0}^{\infty} s^{\frac{n}{2}-\frac{k}{4}}(1-s)^{\frac{k}{2}-1} ds + \int_{0}^{\infty} s^{\frac{n}{2}-\frac{k}{4}-1}(1-s)^{\frac{k}{2}-1} ds\right] \quad ( s \mapsto t^2)\\ =& \frac{1}{2^{\frac{k}{2}+2}}\left[B\left(\frac{n}{2}-\frac{k}{4}+1, \frac{k}{2}\right)+ B\left(\frac{n}{2}-\frac{k}{4}, \frac{k}{2}\right)\right]\\ =& \frac{1}{2^{\frac{k}{2}+2}}\left[\frac{\Gamma\left(\frac{n}{2}-\frac{k}{4}+1\right)\Gamma\left(\frac{k}{2}\right)}{\Gamma\left(\frac{n}{2}+\frac{k}{4}+1\right)} + \frac{\Gamma\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{k}{2}\right)}{\Gamma\left(\frac{n}{2}+\frac{k}{4}\right)}\right]\\ =& \frac{1}{2^{\frac{k}{2}+2}}\left[\frac{\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{k}{2}\right)}{\left(\frac{n}{2}+\frac{k}{4}\right)\Gamma\left(\frac{n}{2}+\frac{k}{4}\right)} + \frac{\Gamma\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{k}{2}\right)}{\Gamma\left(\frac{n}{2}+\frac{k}{4}\right)}\right]\\ =& \frac{\Gamma\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{k}{2}\right)}{2^{\frac{k}{2}+2}\Gamma\left(\frac{n}{2}+\frac{k}{4}\right)}\left[\frac{\left(\frac{n}{2}-\frac{k}{4}\right)}{\left(\frac{n}{2}+\frac{k}{4}\right)} + 1\right]\\ =& \frac{\Gamma\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{k}{2}\right)}{2^{\frac{k}{2}}\Gamma\left(\frac{n}{2}+\frac{k}{4}\right)}\frac{n}{2n+k} \end{align*} \[\boxed{ \int_{0}^{\infty} \left(\sqrt{1+x^4}-x^2\right)^nx^{k-1} dx = \frac{\Gamma\left(\frac{n}{2}-\frac{k}{4}\right)\Gamma\left(\frac{k}{2}\right)}{2^{\frac{k}{2}}\Gamma\left(\frac{n}{2}+\frac{k}{4}\right)}\frac{n}{2n+k}\quad n> \frac{k}{2} }\]

Thursday, February 17, 2022

Golden ratio II

An integral involving the Dirichlet eta function

Nice hypergeometric series involving the Fibonacci numbers $F_{2k+3}$


Today we show the proof of this nice series proposed by @diegorattaggi \[ \sum_{n=1}^{\infty} \binom{n+k-1}{k} \frac{F_{n}}{2^n} = 2^k F_{2k+3} \] For the proof we will use some properties of the rising factorial (Pochhammer polynomial), the Gaussian hypergeometric function and the Binet's formula for Fibonacci numbers.

Proof:

\[ S = \sum_{n=1}^{\infty} \binom{n+k-1}{k} \frac{F_{n}}{2^n} = \sum_{n=1}^{\infty} \frac{(n+k-1)!}{(n-1)!k!} \frac{F_{n}}{2^n} = \sum_{n=1}^{\infty} \frac{\Gamma(n+k)}{(n-1)!k!} \frac{F_{n}}{2^n}\] Recall that the pochhammer polynomial (rising factorial) can be expressed as the quotient of two gamma functions: \[ \frac{\Gamma(n+x)}{\Gamma(x)} = (x)_{n} \] where \[ (x)_{n} = x(x+1)(x+2)\cdots (x+n-1)\] Hence \[ S = \sum_{n=1}^{\infty} \frac{\Gamma(n+k)}{(n-1)!k!} \frac{F_{n}}{2^n} = \frac{\Gamma(k)}{k!}\sum_{n=1}^{\infty} \frac{(k)_{n}}{(n-1)!} \frac{F_{n}}{2^n} = \frac{1}{k}\sum_{n=1}^{\infty} \frac{(k)_{n}}{(n-1)!} \frac{F_{n}}{2^n}\] If we let the change of variable $n=j+1$ \[S = \frac{1}{2k}\sum_{j=0}^{\infty} \frac{(k)_{j+1}}{j!} \frac{F_{j+1}}{2^{j}} \] From the recursion formula for the degree of the Pochhammer polynomial: \[(x)_{n+1} = x(x+1)_{n}\] we have \[ S = \frac{1}{2k}\sum_{j=0}^{\infty} \frac{(k)_{j+1}}{j!} \frac{F_{j+1}}{2^{j}} = \frac{1}{2}\sum_{j=0}^{\infty} \frac{(k+1)_{j}}{j!} \frac{F_{j+1}}{2^{j}} \] From the Binet's formula \[ F_{j+1} = \frac{\phi^{j+1}-\psi^{j+1}}{\sqrt{5}} \] \[ S = \frac{\phi}{2\sqrt{5}}\sum_{j=0}^{\infty} \frac{(k+1)_{j}}{j!} \frac{\phi^{j}}{2^{j}} - \frac{\psi}{2\sqrt{5}}\sum_{j=0}^{\infty} \frac{(k+1)_{j}}{j!} \frac{\psi^{j}}{2^{j}} \] Multiplying and dividing by $(1)_{j}$ we have an hypergeometric representation: \begin{align*} S =& \frac{\phi}{2\sqrt{5}}\sum_{j=0}^{\infty} \frac{(k+1)_{j}}{j!} \frac{\phi^{j}}{2^{j}} - \frac{\psi}{2\sqrt{5}}\sum_{j=0}^{\infty} \frac{(k+1)_{j}}{j!} \frac{\psi^{j}}{2^{j}} \\ =& \frac{\phi}{2\sqrt{5}}\sum_{j=0}^{\infty} \frac{(k+1)_{j}(1)_{j}}{(1)_{j}} \frac{\left(\frac{\phi}{2}\right)^j}{j!} - \frac{\psi}{2\sqrt{5}}\sum_{j=0}^{\infty} \frac{(k+1)_{j}(1)_{j}}{(1)_{j}} \frac{\left(\frac{\psi}{2} \right)^j}{j!}\\ =& \frac{\phi}{2\sqrt{5}}F\left(1,k+1;1;\frac{\phi}{2}\right)- \frac{\psi}{2\sqrt{5}}F\left(1,k+1;1;\frac{\psi}{2}\right) \end{align*} This is a special case of the Gaussian hypergeometric fucntion (generalized Binomial theorem): \[ F(a,b;a;z ) = (1-z)^{-b}\] If we put $a=1, b=k+1$ \[ S = \frac{\phi}{2\sqrt{5}}F\left(1,k+1;1;\frac{\phi}{2}\right)- \frac{\psi}{2\sqrt{5}}F\left(1,k+1;1;\frac{\psi}{2}\right) = \frac{\phi}{2\sqrt{5}}\left(1-\frac{\phi}{2} \right)^{-k-1}-\frac{\psi}{2\sqrt{5}}\left(1-\frac{\psi}{2} \right)^{-k-1}\] Note \begin{align*} \frac{\phi}{2\sqrt{5}}\left(1-\frac{\phi}{2} \right)^{-k-1} =& \frac{\phi}{2\sqrt{5}}\left(\frac{2}{2-\phi} \right)^{k+1}\\ =& \frac{\phi}{2\sqrt{5}}\left(3+\sqrt{5}\right)^{k+1}\\ =& \frac{\phi}{2\sqrt{5}}\left(2+2\phi\right)^{k+1}\\ =& \frac{\phi 2^{k+1}}{2\sqrt{5}}\left(1+\phi\right)^{k+1}\\ =& \frac{\phi 2^{k+1}}{2\sqrt{5}}(\phi^2)^{k+1} \quad (1+\phi = \phi^2)\\ =& \frac{2^k \phi^{2k+3}}{\sqrt{5}} \end{align*} \begin{align*} \frac{\psi}{2\sqrt{5}}\left(1-\frac{\psi}{2} \right)^{-k-1} = & \frac{\psi}{2\sqrt{5}}\left(1-\frac{1-\phi}{2} \right)^{-k-1} \quad (\psi = 1-\phi)\\ =& \frac{\psi}{2\sqrt{5}}\left(\frac{2}{1+\phi} \right)^{k+1}\\ =& \frac{2^k\psi}{\sqrt{5}}\left(\frac{1}{\phi^2} \right)^{k+1} \quad (\phi+1 = \phi^2) \\ =& \frac{2^k\psi}{\sqrt{5}}\left(\psi^2\right)^{k+1}\\ =& \frac{2^k\psi^{2k+3}}{\sqrt{5}} \end{align*} Hence \[ S = \frac{2^k \phi^{2k+3}}{\sqrt{5}} -\frac{2^k}{\sqrt{5}}\psi^{2k+3} = 2^{k}\left[\frac{\phi^{2k+3}}{\sqrt{5}} -\frac{\psi^{2k+3}}{\sqrt{5}}\right] = 2^kF_{2k+3} \] Therefore \[\boxed{ \sum_{n=1}^{\infty} \binom{n+k-1}{k} \frac{F_{n}}{2^n} = 2^k F_{2k+3}}\]

Sunday, February 13, 2022

Integral of the day XXVI

An integral involving the Dirichlet eta function

Integral involving the Dirichlet eta function $\eta(v)$


Today we show the proof of this integral proposed by @Ali39342137: \[ \int_{0}^{\infty} \left(\frac{1}{x} - \frac{1}{\sinh x}\right)\frac{\ln(x)}{x} dx = -\gamma\ln(2) +\frac{1}{2}\ln^2(2) + \ln(\pi)\ln(2) \] For the proof we use the expansion in partial fractions of the hyperbolic cosecant function and the derivative of the Dirichlet eta function.

Proof:

Recall that the hyperbolic cosecant can be expanded as partial fractions: \[ \operatorname{csch} x = \frac{1}{\sinh x} = \frac{1}{x}-\frac{2x}{\pi^2+x^2}+ \frac{2x}{4\pi^2+x^2}-\frac{2x}{9\pi^2+x^2} + \cdots = \frac{1}{x} + 2\sum_{j=1}^{\infty} \frac{(-1)^jx}{j^2\pi^2+x^2} \] Hence, \begin{align*} \int_{0}^{\infty} \left(\frac{1}{x} - \frac{1}{\sinh x}\right)\frac{\ln(x)}{x} dx =& \int_{0}^{\infty} \left(\frac{1}{x} - \frac{1}{x} - 2\sum_{j=1}^{\infty} \frac{(-1)^jx}{j^2\pi^2+x^2}\right)\frac{\ln(x)}{x} dx \\ =& -2\int_{0}^{\infty} \sum_{j=1}^{\infty} \frac{(-1)^j\ln(x)}{j^2\pi^2+x^2} dx \\ =& -2\sum_{j=1}^{\infty}\int_{0}^{\infty} (-1)^j\frac{\ln(x)}{j^2\pi^2+x^2} dx \\ =& -\frac{2}{\pi^2}\sum_{j=1}^{\infty}\frac{(-1)^j}{j^2} \int_{0}^{\infty} \frac{\ln(x)}{1+\left(\frac{x}{j\pi}\right)^2} dx \\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \int_{0}^{\infty} \frac{\ln(j\pi w)}{1+w^2} dx \\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \int_{0}^{\infty} \frac{\ln(j\pi)+\ln(w) }{1+w^2} dw \\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \left[\ln(j\pi)\int_{0}^{\infty} \frac{1}{1+w^2} dw + \int_{0}^{\infty} \frac{\ln(w) }{1+w^2} dw\right] \\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \left[\frac{\pi}{2} \ln(j\pi) + \int_{0}^{\infty} \frac{\ln(w) }{1+w^2} dw\right] \\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \left[\frac{\pi}{2} \ln(j\pi) + \int_{0}^{\infty} \frac{\frac{d}{dt}\Big|_{t=0+} w^t}{1+w^2} dw\right] \\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \left[\frac{\pi}{2} \ln(j\pi) + \frac{d}{dt}\Big|_{t=0+}\int_{0}^{\infty} \frac{ w^t}{1+w^2} dw\right] \\ \end{align*} Recall the integral representation of the secant function: \[ \sec(x) = \frac{2}{\pi} \int_{0}^{\infty} \frac{y^{\frac{2x}{\pi}}}{y^2+1} dy \quad \left|x\right|\lt \frac{\pi}{2} \] If we put $\displaystyle x = \frac{t\pi}{2}$ \[ \sec\left( \frac{t\pi}{2}\right) = \frac{2}{\pi} \int_{0}^{\infty} \frac{y^{t}}{y^2+1} dy\] Hence \[ \int_{0}^{\infty} \frac{y^{t}}{y^2+1} dy = \frac{\pi}{2}\sec\left( \frac{t\pi}{2}\right) \] Therefore \begin{align*} I =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \left[\frac{\pi}{2} \ln(j\pi) + \frac{d}{dt}\Big|_{t=0+}\int_{0}^{\infty} \frac{ w^t}{1+w^2} dw\right]\\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \left[\frac{\pi}{2} \ln(j\pi) + \frac{d}{dt}\Big|_{t=0+} \frac{\pi}{2}\sec\left( \frac{t\pi}{2}\right)\right]\\ =& -\frac{2}{\pi}\sum_{j=1}^{\infty}\frac{(-1)^j}{j} \left[\frac{\pi}{2} \ln(j\pi) + \underbrace{\lim_{t \to 0+} \frac{\pi^2}{4}\sec\left( \frac{t\pi}{2}\right)\tan\left( \frac{t\pi}{2}\right)}_{=0}\right]\\ =& \sum_{j=1}^{\infty}\frac{(-1)^{j+1}\ln(j\pi)}{j} \\ =& \sum_{j=1}^{\infty}\frac{(-1)^{j+1}\left[\ln(j)+ \ln(\pi)\right]}{j} \\ =& \sum_{j=1}^{\infty}\frac{(-1)^{j+1}\ln(j)}{j} + \ln(\pi)\sum_{j=1}^{\infty}\frac{(-1)^{j+1}}{j} \\ =& \sum_{j=1}^{\infty}\frac{(-1)^{j+1}\ln(j)}{j} + \ln(\pi)\ln(2) \\ \end{align*} Recall the definition of the Dirichlet eta funcion: \[ \eta(v) = \sum_{j=1}^{\infty} \frac{(-1)^{j+1}}{j^v} \] Taking the derivative \[ \eta'(v) = \sum_{j=1}^{\infty} \frac{(-1)^{j}\ln(j)}{j^v}\] Therefore \[ \lim_{v \to 1} \eta'(v) = \sum_{j=1}^{\infty} \frac{(-1)^{j}\ln(j)}{j} \] Now recall the relationship: \[ \eta(v) = (1-2^{1-V}) \zeta(v)\] Hence \[ \eta'(v) = 2^{-v}\left[(2^v-2)\zeta'(v) + \ln(4)\zeta(v) \right]\] Taking the limit as $v \to 1$ can be proven that: \[ \lim_{v \to 1} \eta'(v) = \gamma\ln(2) -\frac{1}{2}\ln^2(2) \] Therefore \[\sum_{j=1}^{\infty} \frac{(-1)^{j}\ln(j)}{j} = \gamma\ln(2) -\frac{1}{2}\ln^2(2)\] Then we have \[ I = \sum_{j=1}^{\infty}\frac{(-1)^{j+1}\ln(j)}{j} + \ln(\pi)\ln(2) = -\gamma\ln(2) +\frac{1}{2}\ln^2(2) + \ln(\pi)\ln(2)\] Therefore we can conclude \[ \boxed{ \int_{0}^{\infty} \left(\frac{1}{x} - \frac{1}{\sinh x}\right)\frac{\ln(x)}{x} dx = -\gamma\ln(2) +\frac{1}{2}\ln^2(2) + \ln(\pi)\ln(2)} \]

Saturday, February 12, 2022

Integral of the day XXV

An integral involving the reciprocal beta function

Integral related to the reciprocal beta function


Today we show the proof of this integral posted by @integralsbot \[ \int_{0}^{\pi} \frac{x\left(\sin\left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right)}{\sqrt{\sin x}} dx = 2\pi\ln(2) \] The proof will rely on the integral representation of the reciprocal beta function.

Proof:

Recall the following integral representation of the reciprocal beta function (Proof in the Appendix): \[ \int_{0}^{\pi} \sin^{v-1}x \sin(ax) dx = \frac{\pi \sin\left(\frac{\pi a}{2} \right)}{2^{v-1}vB\left(\frac{1+a+v}{2},\frac{1-a+v}{2}\right)} \quad v,a\in \mathbb{R} , \; \; v>0\] \[ \int_{0}^{\pi} \sin^{v-1}x \cos(ax) dx = \frac{\pi \cos\left(\frac{\pi a}{2} \right)}{2^{v-1}vB\left(\frac{1+a+v}{2},\frac{1-a+v}{2}\right)} \quad v,a\in \mathbb{R} , \; \; v>0\] If we put $\displaystyle v = \frac{1}{2}$ \[ \int_{0}^{\pi} \frac{ \sin(ax)}{\sqrt{\sin x} } dx = \frac{\pi \sin\left(\frac{\pi a}{2} \right)}{2^{\frac{1}{2}-1}vB\left(\frac{1+a}{2}+\frac{1}{4},\frac{1-a}{2}+\frac{1}{4}\right)} \] \[ \int_{0}^{\pi} \frac{ \cos(ax)}{\sqrt{\sin x} } dx = \frac{\pi \cos\left(\frac{\pi a}{2} \right)}{2^{\frac{1}{2}-1}vB\left(\frac{1+a}{2}+\frac{1}{4},\frac{1-a}{2}+\frac{1}{4}\right)} \] Differentiating with respect to $a$: \[ \frac{d}{da} \int_{0}^{\pi} \frac{ \sin(ax)}{\sqrt{\sin x} } dx = \int_{0}^{\pi} \frac{ x\cos(ax)}{\sqrt{\sin x} } dx = \frac{\sqrt{2}\pi^2\cos\left(\frac{\pi a}{2}\right) + \sqrt{2}\pi \sin\left(\frac{\pi a}{2}\right)\psi\left(\frac{3}{4}-\frac{a}{2}\right)-\sqrt{2}\pi \sin\left(\frac{\pi a}{2}\right)\psi\left(\frac{a}{2}+\frac{3}{4}\right)}{B\left(\frac{a}{2}+\frac{3}{4}, \frac{3}{4}-\frac{a}{2}\right)} \] \[ \frac{d}{da} \int_{0}^{\pi} \frac{ \cos(ax)}{\sqrt{\sin x} } dx = -\int_{0}^{\pi} \frac{ x\sin(ax)}{\sqrt{\sin x} } dx = \frac{\sqrt{2}\pi^2\sin\left(\frac{\pi a}{2}\right) - \sqrt{2}\pi \cos\left(\frac{\pi a}{2}\right)\psi\left(\frac{3}{4}-\frac{a}{2}\right)+\sqrt{2}\pi \cos\left(\frac{\pi a}{2}\right)\psi\left(\frac{a}{2}+\frac{3}{4}\right)}{B\left(\frac{a}{2}+\frac{3}{4}, \frac{3}{4}-\frac{a}{2}\right)}\] Taking the limit as $\displaystyle a \to \frac{1}{2}$ \[ \int_{0}^{\pi} \frac{x\cos\left(\frac{x}{2}\right)}{\sqrt{\sin x}} dx = \frac{\pi\gamma+\pi^2+\pi \psi\left(\frac{1}{2}\right)}{2} \] \[ -\int_{0}^{\pi} \frac{ x\sin\left(\frac{x}{2}\right)}{\sqrt{\sin x} } dx = \frac{\pi\gamma-\pi^2+\pi \psi\left(\frac{1}{2}\right)}{2} \] From the formula \[ \psi\left(\frac{1}{2}-J\right) = \psi\left(\frac{1}{2}+J\right) = -\gamma -\ln(4) +\sum_{j=1}^{J} \frac{2}{2j-1} \quad J=0,1,2,...\] if we put $J=0$ we have \[ \psi\left(\frac{1}{2}\right) + \gamma = -\ln(4) \] Therefore \[ \int_{0}^{\pi} \frac{x\cos\left(\frac{x}{2}\right)}{\sqrt{\sin x}} dx = \frac{\pi^2-\pi\ln(4)}{2} \] \[ -\int_{0}^{\pi} \frac{ x\sin\left(\frac{x}{2}\right)}{\sqrt{\sin x} } dx = \frac{-\pi^2-\pi\ln(4)}{2} \] Hence \[ \int_{0}^{\pi} \frac{x\left(\sin\left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right)}{\sqrt{\sin x}} dx = \frac{\pi^2}{2} + \frac{\pi\ln(4)}{2} -\frac{\pi^2}{2} +\frac{\pi\ln(4)}{2} = 2\pi\ln(2) \] Therefore we can conclude \[ \boxed{\int_{0}^{\pi} \frac{x\left(\sin\left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right)}{\sqrt{\sin x}} dx = 2\pi\ln(2) }\]

Appendix:

Here is the proof of the following integrals with $a,b \in \mathbb{R}$: \[ \int_{0}^{\pi} \sin^{v-1}x \sin(ax) dx = \frac{\pi \sin\left(\frac{\pi a}{2} \right)}{2^{v-1}vB\left(\frac{1+a+v}{2},\frac{1-a+v}{2}\right)} \quad v>0\] \[ \int_{0}^{\pi} \sin^{v-1}x \cos(ax) dx = \frac{\pi \cos\left(\frac{\pi a}{2} \right)}{2^{v-1}vB\left(\frac{1+a+v}{2},\frac{1-a+v}{2}\right)} \quad v>0 \]

Proof:

Let $a,b \in \mathbb{R}$ \begin{align*} I= \int_{0}^{\pi} \sin^{v-1}x \; e^{iax}dx =& \int_{0}^{\pi} e^{iax}\left(\frac{e^{ix}+e^{-ix}}{2i} \right)^{v-1}dx \\ =& \frac{1}{(2i)^{v-1}}\int_{0}^{\pi} e^{iax} \sum_{j=0}^{\infty} \binom{v-1}{j}(-1)^j e^{ix(v-1-2j)} dx\\ =&\frac{1}{(2i)^{v-1}} \sum_{j=0}^{\infty} \binom{v-1}{j}(-1)^j\int_{0}^{\pi} e^{ix(a+v-1-2j)} dx\\ =&\frac{1}{(2i)^{v-1}} \sum_{j=0}^{\infty} \binom{v-1}{j}\frac{(-1)^j}{i(a+v-1-2j)}\int_{0}^{i\pi(a+v-1-2j)} e^{w}dw\\ =&\frac{1}{(2i)^{v-1}} \sum_{j=0}^{\infty} \binom{v-1}{j}\frac{(-1)^j\left(e^{i\pi (a+v-1-2j)}-1\right)}{i(a+v-1-2j)}\\ =&\frac{1}{(2i)^{v-1}} \sum_{j=0}^{\infty} \binom{v-1}{j}\frac{(-1)^j\left(e^{i\pi (a+v-1)}-1\right)}{i(a+v-1-2j)}\\ =&\frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v-1}i^v} \sum_{j=0}^{\infty} \binom{v-1}{j}\frac{(-1)^j}{(a+v-1-2j)}\\ =&\frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v-1}i^v} \sum_{j=0}^{\infty} \frac{(v-j)_{j}}{j!}\frac{(-1)^j}{(a+v-1-2j)}\\ =&\frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v-1}i^v} \sum_{j=0}^{\infty} \frac{(1-v)_{j}}{(a+v-1-2j)j!} \end{align*} Note that \[ 2j-a-v+1 = \frac{-(a+v-1)\left(\frac{3-a-v}{2}\right)_{j}}{\left(\frac{-a-v+1}{2}\right)_{j}}\] Hence \begin{align*} I =&\frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v-1}i^v} \sum_{j=0}^{\infty} \frac{(1-v)_{j}}{(a+v-1-2j)j!}\\ =& \frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v-1}i^v}\frac{1}{(a+v-1)} \sum_{j=0}^{\infty} \frac{(1-v)_{j}\left(\frac{-a-v+1}{2}\right)_{j}}{\left(\frac{3-a-v}{2}\right)_{j}}\\ =& \frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v-1}i^v}\frac{1}{(a+v-1)} F\left(1-v,\frac{-a-v+1}{2};\frac{3-a-v}{2};1 \right) \end{align*} From the Gauss's Hypergeometric Theorem: \[ F(a,b;c;1) = \frac{\Gamma(c)\Gamma(c-a-b)}{\Gamma(c-a)\Gamma(c-b)} \quad c>a+b \] Therefore, supposing $v>0$: \begin{align*} I =& \frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v-1}i^v}\frac{1}{(a+v-1)} \frac{\Gamma\left(\frac{3-a-v}{2}\right)\Gamma(v)}{\Gamma\left(\frac{1-a+v}{2}\right)}\\ =&\frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v}i^v}\frac{1}{-\frac{(1-a-v)}{2}} \frac{\left(\frac{1-a-v}{2}\right)\Gamma\left(-\frac{1-a-v}{2}\right)\Gamma(v)}{\Gamma\left(\frac{1-a+v}{2}\right)}\\ =&-\frac{\left(e^{i\pi (a+v-1)}-1\right)}{2^{v}i^v} \frac{\Gamma\left(\frac{1-a-v}{2}\right)\Gamma(v)}{\Gamma\left(\frac{1-a+v}{2}\right)}\\ \end{align*} Note \[ \Im (e^{i\pi (a+v-1)}-1)i^{-v} = -2\sin\left(\frac{\pi a}{2} \right)\cos\left(\frac{\pi(a+v)}{2}\right)\] \[ \Re (e^{i\pi (a+v-1)}-1)i^{-v} = -2\cos\left(\frac{\pi a}{2} \right)\sin\left(\frac{\pi(a+v)}{2}\right)\] and recall the Euler's reflection formula for $\cos(\pi t)$: \[\Gamma\left(\frac{1}{2}+t\right)\Gamma\left(\frac{1}{2}-t\right) = \frac{\pi}{\cos(\pi t)}\] Therefore \begin{align*} \int_{0}^{\pi} \sin^{v-1}x \sin(ax) dx = \Im \left(\int_{0}^{\pi} \sin^{v-1}x \; e^{iax}dx \right) = & \frac{ \sin\left(\frac{\pi a}{2} \right)\cos\left(\frac{\pi(a+v)}{2}\right)}{2^{v-1}} \frac{\Gamma\left(\frac{1-a-v}{2}\right)\Gamma(v)}{\Gamma\left(\frac{1-a+v}{2}\right)}\\ =&\frac{ \sin\left(\frac{\pi a}{2} \right)}{2^{v-1}} \frac{\pi\Gamma\left(\frac{1-a-v}{2}\right)\Gamma(v)}{\Gamma\left(\frac{1+a+v}{2}\right)\Gamma\left(\frac{1-a+v}{2}\right)\Gamma\left(\frac{1-a+v}{2}\right)} \quad \textrm{(Euler's reflection formula)}\\ =&\frac{ \sin\left(\frac{\pi a}{2} \right)}{2^{v-1}} \frac{\pi \Gamma(v)}{\Gamma\left(\frac{1+a+v}{2}\right)\Gamma\left(\frac{1-a+v}{2}\right)}\\ =&\frac{\pi \sin\left(\frac{\pi a}{2} \right)}{2^{v-1}vB\left(\frac{1+a+v}{2},\frac{1-a+v}{2}\right)} \end{align*} In a very similar way we can show : \[ \int_{0}^{\pi} \sin^{v-1}x \cos(ax) dx = \Re \left(\int_{0}^{\pi} \sin^{v-1}x \; e^{iax}dx \right) = \frac{\pi \cos\left(\frac{\pi a}{2} \right)}{2^{v-1}vB\left(\frac{1+a+v}{2},\frac{1-a+v}{2}\right)} \]

Monday, February 7, 2022

Generalized hypergeometric functions VIII

Integral related to the Gauss function

Nice integral related to the Gauss hypergeometric function $F(a,b;c;z)$


Today we show the proof of this nice integral without contour integration as proposed by @AlbahariRicardo. \[ \int_{0}^{\frac{\pi}{2}} \cos(a\theta) \cos^b(\theta) d\theta = \frac{\pi\Gamma(b+1)}{2^{b+1}\Gamma\left(\frac{2-a+b}{2}\right)\Gamma\left(\frac{2+a+b}{2}\right)} \quad a,b\in \mathbb{C}, \quad \Re(b)>-1 \] The proof relies on the Gauss theorem for the function that have his name $F(a,b;c;z)$, the proof of this theorem neither relies on contour integration.

Update: We updated this post to cover the case $a,b\in \mathbb{C}$.

Proof:

Let $a,b \in \mathbb{C}$ \begin{align*} I= \int_{0}^{\frac{\pi}{2}} \cos(a\theta) \cos^b(\theta) d\theta = &\frac{1}{2} \int_{0}^{\frac{\pi}{2}} (e^{ia\theta}+e^{-ia\theta})\left( \frac{e^{i\theta }+e^{-i\theta}}{2}\right)^b d\theta\\ =& \frac{1}{2} \int_{0}^{\frac{\pi}{2}} e^{ia\theta}\left( \frac{e^{i\theta }+e^{-i\theta}}{2}\right)^b d\theta + \frac{1}{2} \int_{0}^{\frac{\pi}{2}} e^{-ia\theta}\left( \frac{e^{i\theta }+e^{-i\theta}}{2}\right)^b d\theta\\ =& \frac{1}{2} \int_{0}^{\frac{\pi}{2}} e^{ia\theta}\left( \frac{e^{i\theta }+e^{-i\theta}}{2}\right)^b d\theta - \frac{1}{2} \underbrace{\int_{0}^{-\frac{\pi}{2}} e^{ia\vartheta}\left( \frac{e^{i\vartheta }+e^{-i\vartheta}}{2}\right)^b d\vartheta}_{\vartheta \mapsto -\theta}\\ =& \frac{1}{2} \int_{0}^{\frac{\pi}{2}} e^{ia\theta}\left( \frac{e^{i\theta }+e^{-i\theta}}{2}\right)^b d\theta + \frac{1}{2} \int_{-\frac{\pi}{2}}^{0} e^{ia\vartheta}\left( \frac{e^{i\vartheta }+e^{-i\vartheta}}{2}\right)^b d\vartheta\\ =& \frac{1}{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} e^{ia\theta}\left( \frac{e^{i\theta }+e^{-i\theta}}{2}\right)^b d\theta \\ =& \frac{1}{2^{b+1}} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} e^{ia\theta}\sum_{j=0}^{\infty}\binom{b}{j} e^{i\theta(b-2j)} d\theta \quad \textrm{(Generalized binomial theorem)} \\ =& \frac{1}{2^{b+1}}\sum_{j=0}^{\infty}\binom{b}{j} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} e^{i\theta(a+b-2j)} d\theta \\ =& \frac{1}{2^{b+1}}\sum_{j=0}^{\infty}\binom{b}{j} \frac{1}{i(a+b-2j)} \int_{-\frac{i\pi(a+b-2j)}{2}}^{\frac{i\pi(a+b-2j)}{2}} e^{w} dw \quad (w \mapsto i\theta(a+b-2j), \quad a+b\neq 2j \quad j\in \mathbb{N})\\ =& \frac{1}{2^{b+1}}\sum_{j=0}^{\infty}\binom{b}{j} \frac{e^{\frac{i\pi(a+b-2j)}{2}}-e^{\frac{-i\pi(a+b-2j)}{2}}}{i(a+b-2j)}\\ =& \frac{1}{2^{b+1}}\sum_{j=0}^{\infty}\binom{b}{j} \frac{e^{\frac{i\pi(a+b)}{2}}e^{-i\pi j} -e^{\frac{-i\pi(a+b)}{2}}e^{i\pi j}}{i(a+b-2j)}\\ =& \frac{1}{2^{b}}\sum_{j=0}^{\infty}\binom{b}{j} \frac{(-1)^j}{(a+b-2j)} \frac{e^{\frac{i\pi(a+b)}{2}} -e^{\frac{-i\pi(a+b)}{2}}}{2i}\\ =& \frac{\sin\left(\frac{\pi(a+b)}{2}\right)}{2^{b}}\sum_{j=0}^{\infty}\binom{b}{j} \frac{(-1)^j}{(a+b-2j)} \\ =& \frac{\sin\left(\frac{\pi(a+b)}{2}\right)}{2^{b}}\sum_{j=0}^{\infty}\frac{(b-j+1)_{j}}{j!} \frac{(-1)^j}{(a+b-2j)} \\ =& \frac{\sin\left(\frac{\pi(a+b)}{2}\right)}{2^{b}}\sum_{j=0}^{\infty} \frac{(-b)_{j}}{(a+b-2j)j!} \\ \end{align*} Note that \[ 2j-a-b = \frac{-(a+b)\left(\frac{2-a-b}{2}\right)_{j}}{\left(\frac{-a-b}{2}\right)_{j}}\] Hence \begin{align*} I = \frac{\sin\left(\frac{\pi(a+b)}{2}\right)}{2^{b}}\sum_{j=0}^{\infty} \frac{(-b)_{j}}{(a+b-2j)j!} = & \frac{\sin\left(\frac{\pi(a+b)}{2}\right)}{2^{b}(a+b)}\sum_{j=0}^{\infty} \frac{(-b)_{j}\left(\frac{-a-b}{2}\right)_{j}}{\left(\frac{2-a-b}{2}\right)_{j}}\frac{1}{j!} \\ =& \frac{\sin\left(\frac{\pi(a+b)}{2}\right)}{2^{b}(a+b)}F\left(-b,\frac{-a-b}{2};\frac{2-a-b}{2};1\right) \\ \end{align*} where $F(a,b;c;z)$ is the Gauss hypergeometric function which satisfies th Gauss theorem: \[F(a,b;c;1) = \frac{\Gamma(c)\Gamma(c-a-b)}{\Gamma(c-a)\Gamma(c-b)} \quad \Re(c-a+b)>0\] Applying the theorem to $\displaystyle F\left(-b,\frac{-a-b}{2};\frac{2-a-b}{2};1\right)$ and supposing $\Re(b)>-1$ \[ F\left(-b,\frac{-a-b}{2};\frac{2-a-b}{2};1\right) = \frac{\Gamma\left(\frac{2-a-b}{2}\right)\Gamma(b+1)}{\Gamma\left(\frac{2-a+b}{2}\right)\Gamma(1)}\] Hence \begin{align*} I =&\frac{\sin\left(\frac{\pi(a+b)}{2}\right)}{2^b(a+b)}\frac{\Gamma\left(\frac{2-a-b}{2}\right)\Gamma(b+1)}{\Gamma\left(\frac{2-a+b}{2}\right)}\\ =& \frac{1}{2^b(a+b)}\left[\frac{\pi}{\Gamma\left(\frac{2-a+b}{2}\right) \Gamma\left(\frac{a+b}{2}\right)}\right]\frac{\Gamma\left(\frac{2-a-b}{2}\right)\Gamma(b+1)}{\Gamma\left(\frac{2-a+b}{2}\right)} \quad \textrm{(Euler reflection formula)} \\ =& \frac{\pi\Gamma(b+1)}{2^b(a+b)\Gamma\left(\frac{2-a+b}{2}\right)\Gamma\left(\frac{a+b}{2}\right)}\\ =& \frac{\pi\Gamma(b+1)}{2^{b+1}\Gamma\left(\frac{2-a+b}{2}\right)\Gamma\left(\frac{2+a+b}{2}\right)} \end{align*} The cases $b=a=2n$, $2m=a>b=2n$ and $2m=a\lt b=2n$ can easily be obtained as limiting cases of \[ \int_{0}^{\frac{\pi}{2}} \cos(a\theta) \cos^b(\theta) d\theta = \frac{\pi\Gamma(b+1)}{2^{b+1}\Gamma\left(\frac{2-a+b}{2}\right)\Gamma\left(\frac{2+a+b}{2}\right) } \quad \Re(b)>-1, a+b\neq 2j \quad j\in \mathbb{N}\] Hence, we can conclude \[ \boxed{\int_{0}^{\frac{\pi}{2}} \cos(a\theta) \cos^b(\theta) d\theta = \frac{\pi\Gamma(b+1)}{2^{b+1}\Gamma\left(\frac{2-a+b}{2}\right)\Gamma\left(\frac{2+a+b}{2}\right)} \quad a,b\in \mathbb{C}, \Re(b)>-1} \]

Wednesday, February 2, 2022

Integral of the day XXIV

Another integral for Lobachvesky

A miserious integral related to Lobachevsky


Today we show the proof of this strange integral posted by @integralsbot \[ \int_{0}^\infty \frac{\sin(\tan(x))}{x} dx = \frac{\pi}{2}\left(1-\frac{1}{e}\right) \] The trick to solve this integral is a variation to the Lobachevsky integral formula for odd functions and the application of the residue theorem.

Proof:

Recall the Lobachevsky integral formula for odd functions:

Theorem. Let $f(x)$ an odd, complex-valued, $\pi$-periodic function such that $\displaystyle \frac{f(x)}{\tan x}$ is absolutely integrable over a single period.

Therefore \[ \int_{0}^{\infty} \frac{f(x) }{x}dx = \int_{0}^{\frac{\pi}{2}} \frac{f(x)}{\tan\left(x \right)} dx \tag{*} \] Back to the integral:

Note that the function \[ f(x) = \sin(\tan(x)) \] is an odd function that satisfies all the hypothesis of the theorem.

Hence \begin{align*} I =& \int_{0}^\infty \frac{\sin(\tan(x))}{x} dx \\ = & \int_{0}^{\frac{\pi}{2}} \frac{\sin(\tan(x))}{\tan(x)} dx \quad \textrm{ from (*) } \\ =& \int_{0}^{\frac{\pi}{2}} \frac{\sin(w)}{w(1+w^2)} dw \quad \left(w \mapsto \tan x\right)\\ =& \int_{0}^\infty \frac{\sin (w)}{w} dw -\int_{0}^{\infty} \frac{w\sin(w)}{1+w^2} dw \\ =& \int_{0}^\infty \frac{\sin (w)}{w} dw -\frac{1}{2}\int_{-\infty}^{\infty} \frac{w\sin(w)}{1+w^2} dw \quad (\textrm{the integrand is even}) \\ =& \underbrace{\int_{0}^\infty \frac{\sin (w)}{w} dw}_{\textrm{Dirichlet integral}} - \Im \left(\underbrace{\int_{-\infty}^{\infty} \frac{we^{iw}}{1+w^2} dw }_{J}\right) \\ =& \frac{\pi}{2}- \Im \left(\underbrace{\int_{-\infty}^{\infty} \frac{we^{iw}}{1+w^2} dw }_{J}\right) \\ \end{align*} The first integral is the classic Dirichlet integral, the second is a little bit more difficult: Let $R>1$ and consider the following complex function \[ f(z)= \frac{ze^{iz}}{1+z^2} \] This function has two poles at $z= \pm i$.

Now consider the following contour (half upper circle): \[ C_{1} = t \quad t\in (-R,R)\] \[ C_{2} = Re^{i\theta} \quad \theta \in \left[0,\pi\right]\] Hence \[ \oint_{C=C_{1}\cup C_{2}} \frac{ze^{iz}}{1+z^2} dz = \int_{C_{1}} f(z) dz + \oint_{C_{2}} f(dz)dz = \int_{-R}^{R} \frac{te^{it}}{1+t^2} dt + \int_{0}^{\pi} \frac{iR^2e^{2i\theta}e^{iRe^{i\theta}}}{1+Re^{i\theta}} d\theta \] We will show that the integral in the right hand side will vanish as $R\to \infty$. For that end we will make use of the Jordan's Lemma:

Jordan's lemma. Consider a complex-valued, continuous function $f$, defined on a semicircular contour \[C_R = \{R e^{i \theta} \mid \theta \in [0, \pi]\}\] of positive radius $R$ lying in the upper half-plane, centered at the origin. If the function $f$ is of the form \[f(z) = e^{i a z} g(z) , \quad z \in C_R ,\] with a positive parameter $a$, then Jordan's lemma states the following upper bound for the contour integral: \[\left| \int_{C_R} f(z) \, dz \right| \le \frac{\pi}{a} M_R \quad \text{where} \quad M_R := \max_{\theta \in [0,\pi]} \left| g \left(R e^{i \theta}\right) \right| \] with equality when $g$ vanishes everywhere, in which case both sides are identically zero.

Applying the lemma to $f(z)$: \[ f(z)= \frac{ze^{iz}}{1+z^2} = e^{iz} g(z) \quad \textrm{ where } g(z) = \frac{z}{1+z^2} \] Hence \[\left| \int_{C_2}\frac{ze^{iz}}{1+z^2} \, dz \right| \le \pi M_{R} \] where \begin{align*} M_R = \max_{\theta \in [0,\pi]} \left| g \left(R e^{i \theta}\right) \right| = &\max_{\theta \in [0,\pi]} \left| \frac{Re^{i\theta}}{1+R^2e^{i2\theta}} \right|\\ =& \max_{\theta \in [0,\pi]} \frac{R}{\left| 1+R^2e^{i2\theta}\right|} \\ =& \max_{\theta \in [0,\pi]} \frac{R}{\left| 1-(-R^2e^{i2\theta})\right|} \\ \leq & \frac{R}{\left| 1-R^2\right|}\\ =& \frac{R}{R^2-1} \quad (R>1) \end{align*} Therefore \[\left| \int_{C_2}\frac{ze^{iz}}{1+z^2} \, dz \right| \le \pi M_{R} \leq \frac{\pi R}{R^2-1} \] Taking the limit as $R \to \infty$ \[ \int_{C_2}\frac{ze^{iz}}{1+z^2} \, dz =\int_{0}^{\pi} \frac{iR^2e^{2i\theta}e^{iRe^{i\theta}}}{1+Re^{i\theta}} d\theta= 0 \] Hence, since the only pole in the upper half circle is $z=i$ we have by the residue theorem \[ J = \int_{-\infty}^{\infty} \frac{te^{it}}{1+t^2} dt = \oint_{C} \frac{ze^{iz}}{1+z^2} dz = 2\pi i \operatorname{Res}(f,i) = \lim_{z \to i } 2\pi i \frac{ze^{iz}}{(z+i)} = \frac{\pi i}{e} \] Therefore \[ I = \frac{\pi}{2} - \Im(J) = \frac{\pi}{2} -\frac{1}{2}\Im \left(\frac{\pi i}{e}\right) = \frac{\pi}{2} - \frac{\pi}{2e} = \frac{\pi}{2}\left(1-\frac{1}{e}\right) \] Hence, we can conclude \[\boxed{ \int_{0}^\infty \frac{\sin(\tan(x))}{x} dx = \frac{\pi}{2}\left(1-\frac{1}{e}\right) } \]

Integral of the day XXIII

An integral involving the Lobachvesky integral formula

Nice integral solved with contour integration


Today we show the proof of this fun integral posted by @integralsbot \[ \int_{0}^{\frac{\pi}{4}} \frac{1}{1+\sqrt{1-\tan^2 (x)}}dx = \frac{-1+2\sqrt{2}}{4}\pi -1 \] The proof will rely on contour integration round the unit complex circle.

Proof

\begin{align*} I = \int_{0}^{\frac{\pi}{4}} \frac{1}{1+\sqrt{1-\tan^2 (x)}}dx =& \int_{0}^{1} \frac{1}{(1+\sqrt{1-w^2})(1+w^2)}dw \quad \left(w \mapsto \tan x \right)\\ =& \int_{0}^{1} \left( \frac{1-\sqrt{1-w^2}}{1-\sqrt{1-w^2}}\right)\frac{1}{(1+\sqrt{1-w^2})(1+w^2)}dw \\ =& \int_{0}^{1} \frac{1-\sqrt{1-w^2}}{w^2(1+w^2)} dw\\ =& \underbrace{\int_{0}^{1} \frac{1-\sqrt{1-w^2}}{w^2} dw}_{J} - \underbrace{\int_{0}^{1} \frac{1}{1+w^2} dw}_{K} + \underbrace{\int_{0}^{1} \frac{\sqrt{1-w^2}}{1+w^2}dw}_{L} \end{align*} \begin{align*} J = \int_{0}^{1} \frac{1-\sqrt{1-w^2}}{w^2} dw \stackrel{IBP}{=}& \frac{\sqrt{1-w^2}-1}{w}\Big|_{0}^{1} + 2\int_{0}^{1} \frac{1}{\sqrt{1-w^2}} dx \\ =& -1 + 2\arcsin(1)\\ =& -1 + \frac{\pi}{2} \end{align*} \begin{align*} K = \int_{0}^{1} \frac{1}{1+w^2} dw = \arctan(1) = \frac{\pi}{4} \end{align*} \begin{align*} L = \int_{0}^{1} \frac{\sqrt{1-w^2}}{1+w^2}dw =& \frac{1}{2} \int_{-1}^{1} \frac{\sqrt{1-w^2}}{1+w^2}dw \quad \textrm{(the integrand is even)}\\ =& \int_{0}^{\pi} \frac{\sin^2 s}{1+ \cos^2 s} ds \\ =& \int_{0}^{\pi} \frac{1-\cos^2 s}{1+ \cos^2 s} ds \\ =& \int_{0}^{\pi} \frac{2-(1+\cos^2 s)}{1+ \cos^2 s} ds \\ =& 2\int_{0}^{\pi} \frac{1}{1+ \cos^2 s} ds- \int_{0}^{\pi} ds\\ =& 4\int_{0}^{\pi} \frac{1}{3+ \cos(2s)} ds- \pi \quad \left( \cos^2 \vartheta = \frac{1+\cos(2\vartheta)}{2} \right)\\ =& 2\underbrace{ \int_{0}^{2\pi} \frac{1}{3+ \cos\theta}d\theta}_{M} - \pi \\ \end{align*} To solve $M$ we can make the following change of variable \[ \cos \theta = \frac{z+z^{-1}}{2} \] \[ d\theta = \frac{dz}{zi} \] with this change the integral is transformed in a contour integral round the unit complex circle \begin{align*} M = \int_{0}^{2\pi} \frac{1}{3+ \cos\theta}d\theta = \frac{2}{i} \oint_{|z|=1} \frac{1}{z^2+6z+1} dz \end{align*} The only pole inside the unit circle is $ z= 2\sqrt{2}-3$. Therefore by the residue theorem: \begin{align*} \oint_{|z|=1} \frac{1}{z^2+6z+1} dz=& 2\pi i \operatorname{Res}\left(\frac{1}{z^2+6z+1},2\sqrt{2}-3\right) \\ =& \lim_{z \to 2\sqrt{2}-3} \frac{2\pi i}{z+3+2\sqrt{2}} \\ =& \frac{\pi i }{\sqrt{2}} \end{align*} Hence \[ M = \frac{2}{i} \oint_{|z|=1} \frac{1}{z^2+6z+1} dz = \frac{2 \pi}{\sqrt{2}} \] Therefore \[ L = \frac{2}{\sqrt{2}}\pi - \pi \] \[ I = J-k+L = -1 + \frac{\pi}{2}- \frac{\pi}{4} + \frac{2}{\sqrt{2}}\pi - \pi = \frac{-1+2\sqrt{2}}{4}\pi -1 \] Finally, we can conclude \[ \boxed{ \int_{0}^{\frac{\pi}{4}} \frac{1}{1+\sqrt{1-\tan^2 (x)}}dx = \frac{-1+2\sqrt{2}}{4}\pi -1 } \]

Series of the day

Series involving the digamma and the zeta functions The sum $ \displaystyle \sum\frac{1}{(n+1)^pn^q}$ ...