Closed expression for an integral involving harmonic numbers

119 Views Asked by At

Recently, I stumbled on an interesting class of integrals, and here is one example.

Problem: find the closed form of the integral

$$I = \int_{-\frac{\pi }{2}}^{\frac{\pi }{2}} \frac{\cos (x)}{\gamma ^{H_x-H_{-x}}+1} \, dx$$

Here $\gamma$ is Euler's gamma and $H_x$ is the harmonic number.

Hint: here is the graph of the integrand

enter image description here

EDIT

Hint #2

Consider also the integrals

$$I_2 = \int_{-\frac{\pi }{2}}^{\frac{\pi }{2}} \frac{\cos (x)}{e^{x}+1} \, dx$$

$$I_3 = \int_{-\frac{\pi }{2}}^{\frac{\pi }{2}} \frac{\cos (x)}{e^{\sin(x)}+1} \, dx$$

$$I_4 = \int_{-\frac{\pi }{2}}^{\frac{\pi }{2}} \frac{\cos (x)}{e^{\frac{1}{\sin ^3(x)}}+1} \, dx$$

2

There are 2 best solutions below

1
On BEST ANSWER

Consider the following result: let $f(x)$ be an even Riemann-integrable function on $[-a,a]$ and $g(x)$ an odd Riemann-integrable function, then for any $b\in \Bbb R^+$ we have $$\int_{-a}^a\frac{f(x)}{b^{g(x)}+1}\mathrm{d}x=\int_0^a f(x)\mathrm{d}x $$ In this case, $f=\cos x$ is even and $g=H_x-H_{-x}$ is odd, moreover $\gamma>0$; hence the integral is: $$\int_{-\pi/2}^{\pi/2}\frac{\cos x}{\gamma^{H_x-H_{-x}}+1}\mathrm{d}x=\int_{0}^{\pi/2}\cos x \mathrm{d}x =\sin x\bigg|_0^{\pi/2}=1$$

0
On

I found this nice surprise in the treasure chest of Maths 505 as this problem

"This OP trick solves IMPOSSIBLE integrals!"
https://www.youtube.com/watch?v=25dQUgpeX74

Although a solution has been given here, and I have accepted it, I'd like to write down the derivation in more detail.

The integral to be considered is

$$I=\int_{-a}^{a} \frac{f(x)}{c^{g(x)} + 1}\,dx$$

If $f(x)$ is even and $g(x)$ is odd the integral over a symmetric integration region admits a suprising general solution in which the function $g(x)$ drops out.

Indeed, using the notation of the reference, we have

$$I \overset{x\to -t} = \int_{a}^{-a} \frac{f(-t)}{c^{g(-t)} + 1}\,(-dt) \overset{t\to x} =\int_{-a}^{a} \frac{f(x)}{c^{-g(x)} + 1}\,dx\\ =\int_{-a}^{a} \frac{f(x)}{c^{-g(x)} + 1}\frac{c^{g(x)}}{c^{g(x)}}\,dx = \int_{-a}^{a} \frac{f(x)c^{g(x)} }{1+c^{g(x)}}\,dx$$

hence, adding the two forms of $I$, we get

$$2 I = \int_{-a}^{a} \frac{f(x)}{c^{g(x)} + 1}\,dx+\int_{-a}^{a} \frac{f(x)c^{g(x)} }{1+c^{g(x)}}\,dx =\int_{-a}^{a} \frac{f(x)(1+c^{g(x)})}{1+c^{g(x)}}\,dx\\ =\int_{-a}^{a} f(x)\,dx= \int_{-a}^{0} f(x)\,dx+\int_{0}^{a} f(x)\,dx\overset{f(x)\text{ even}}= 2 \int_{0}^{a} f(x)\,dx$$

from which we find that

$$I=\int_{-a}^{a} \frac{f(x)}{c^{g(x)} + 1}\,dx= \int_{0}^{a} f(x)\,dx$$

For the three examples in the OP this gives simply

$$I = \int_{0}^{\frac{\pi}{2}} \cos(x) = \sin (x)\bigg|_0^{\pi/2}=1$$

Remark: there are many more nice problem and derivations in Maths 505.