4

I need to find $$I=\int^{\infty}_0\frac{\sin(x)}{e^x+1}\text{ d}x$$


I have tried using Feynman's method by introducing $$I(t)=\int^{\infty}_0\frac{\sin(tx)}{e^x+1}\text{ d}x$$ but this has led me nowhere.

I tried using parts to see if I can change this to anything useful but in both cases the result is a mess.

I tried then substituting the exponential equivalent of $\sin(x)$ into the integral which at first seemed ot make progress but ultimately ended up in an integral involving the hypergeometric function (something I am not comfortable in using) so it would be a pain trying to find the definite integral:

$$\int_0^{\infty}\frac{\sin(x)}{e^x+1}\text{ d}x=\frac{1}{2i}\int_0^{\infty}\frac{e^{ix}-e^{-ix}}{e^x+1}\text{ d}x$$ $$\implies u=e^x+1,\qquad\text{d}x=\frac{du}{u-1}$$ $$\implies\frac{1}{2i}\int^{\infty}_2\frac{(u-1)^{i-1}-(u-1)^{-i-1}}{u}\text{ d}u=\text{hypergeometric junk with bounds}$$

I also tried integrating about a rectangular contour with semi/quarter-circles cut out about the poles that appear on $\Im(z)$ every $2\pi$ as the rectangular contour goes to positive infinity on $\Re(z)$ but that did not really go well (I am also bad at complex analysis so rip)

So I am completely out of ideas. Any help would be appreciated!


Edit: I now see how you can use series to solve this but I’m wondering if you can use residue theorem or contours as well?

Quanto
  • 97,352
Max0815
  • 3,505

5 Answers5

4

Consider $$I(a)=\int_0^{\infty}\frac{\sin(x)}{e^x+a}\,dx=\Im\Bigg[\int_0^{\infty}\frac{e^{ix}}{e^x+a}\,dx\Bigg]$$ $$\frac{e^{ix}}{e^x+a}=\sum_{n=0}^\infty (-1)^n e^{-(n+1-i) x} a^n$$ $$\int_0^\infty (-1)^n e^{-(n+1-i) x} a^n=\frac{(-1)^n}{n+1-i}\,a^n$$ Making $a=1$ $$\sum_{n=0}^\infty \frac{(-1)^n}{n+1-i}=\frac{1}{2} \left(\psi \left(\frac{2-i}{2}\right)-\psi \left(\frac{1-i}{2}\right)\right)$$ and $$\frac{1}{2}\Im\Bigg[\psi \left(\frac{2-i}{2}\right)-\psi \left(\frac{1-i}{2}\right) \Bigg]=\frac{1}{2} (1-\pi \,\text{csch}(\pi ))$$

3

Note \begin{align} I(a)=\int^{\infty}_0\frac{\sinh ax}{e^x+1}\overset{t=e^x}{dx} =&\ \frac12\int_1^\infty\frac{t^a}{t(t+1)}\overset{t\to 1/t}{dt} -\frac12\int_1^\infty\frac{t^{-a}}{t(t+1)}dt\\ =& \ \frac12\int_0^1 \frac{t^{-a}}{t+1}dt -\frac12\int_1^\infty{t^{-a}}\left(\frac1t -\frac1{t+1}\right)dt\\ =& \ \frac12\int_0^\infty\frac{t^{-a}}{t+1}dt - \frac12\int_1^\infty{t^{-a-1}}dt =\frac\pi2 \csc \pi a - \frac1{2a} \end{align} Then $$\int^{\infty}_0\frac{\sin x}{e^x+1}dx =-iI(i) = \frac12 - \frac\pi 2\text{csch}\ \pi $$

Quanto
  • 97,352
  • 1
    this is actually very smart woah – Max0815 May 20 '22 at 13:15
  • 1
    wait how did you go from $\int^{\infty}_0\frac{t^{-a}}{t+1}\text{ d}t$ to $\pi\csc(\pi a)$? Is this a well known integral? a theorem? – Max0815 May 20 '22 at 14:19
  • @Max0815 - This integral is ubiquitous $$ \int_{0}^{\infty} \frac{x^{\mu-1}}{1+x} ; dx = \beta \left( \mu, 1 - \mu\right) = \Gamma \left( \mu\right) \Gamma \left( 1 - \mu \right) = \pi \csc \pi \mu $$ – Quanto May 20 '22 at 15:00
  • ah that makes sense. thank you! – Max0815 May 20 '22 at 15:28
  • Wait a second. When integrating the last two integrals, there is a restriction that stats $\Re(a)>0$. However plugging in $i$ violates this. Why does this method still work? – Max0815 May 23 '22 at 12:59
  • Consider integrating the regulated integrand $\frac{e^{-\epsilon}\sinh ax}{e^x+1}$, which is equivalent to $R(a)>0$ – Quanto Jul 14 '22 at 14:38
  • I still kind of don't see how this helps, but I do now get the original answer, since you can use DCT to prove the equivalence of the two integrals. – Max0815 Jul 14 '22 at 20:39
2

Using geometric series, $I$ can be rewritten as :

$$I=\int_0^\infty\sin(x)\sum_{n=0}^\infty(-1)^n e^{-(n+1)x}\,dx$$

Termwise integration gives, after re-indexing :

$$I=\sum_{n=1}^\infty(-1)^{n-1}J_n$$

with :

$$J_n=\int_0^\infty\sin(x)e^{-nx}\,dx=\Im\left(\int_0^\infty e^{(-n+i)x}\,dx\right)=\frac1{n^2+1}$$

Hence :

$$I=\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n^2+1}$$

Now, applying the Dirichlet theorem to the $2\pi$-periodic even function defined on $[0,\pi]$ by $t\mapsto e^{\alpha t}$ (for some $\alpha\in\mathbb{R})$, we get : $$\forall t\in[-\pi,\pi],e^{\alpha t}=\frac{e^{\alpha\pi}-1}{\alpha \pi}+\frac{2\alpha}\pi\sum_{n=1}^\infty\frac{(-1)^n e^{\alpha\pi}-1}{n^2+\alpha^2}\cos(nt)\tag{$\star$}$$ Consider the functions $F,G$ defined by :

$$F(\alpha)=\sum_{n=1}^\infty\frac{1}{n^2+\alpha^2}\text{ and }G(\alpha)=\sum_{n=1}^\infty\frac{(-1)^n}{n^2+\alpha^2}$$ Choosing successively $t=0$ and $t=\pi$ in $(\star)$ gives the following equations : $$\frac{e^{\alpha\pi}-1}{\alpha \pi}+\frac{2\alpha}\pi\left(e^{\alpha\pi}G(\alpha)-F(\alpha)\right)=1$$ $$\frac{e^{\alpha\pi}-1}{\alpha \pi}+\frac{2\alpha}\pi\left(e^{\alpha\pi}F(\alpha)-G(\alpha)\right)=e^{\alpha\pi}$$

which can be solved into :

$$F(\alpha)=\frac{e^{\alpha\pi}-1}{2\alpha^2}+\frac\pi{\alpha(e^{2\alpha\pi}-1)}$$ and $$G(\alpha)=\frac{\pi e^{\alpha\pi}}{\alpha(e^{2\alpha\pi}-1)}-\frac1{2\alpha^2}$$

Finally : $$\boxed{I=-G(1)=\frac12-\frac{\pi e^\pi}{e^{2\pi}-1}}$$

Adren
  • 7,515
  • 10
  • 26
2

As an option, you can consider the integral along a rectangular contour in the complex plane: $0\to R\to R+2\pi i\to 2\pi i\to 0$. There is also the pole at $z=\pi i$, we are going around it clockwise, adding a small half-circle.

Let's denote $\displaystyle I=\int_0^\infty\frac{e^{itx}}{e^x+1}dx$ - our integral is the imaginary part of $I$. Considering the integral along this rectangular contour (with the added small semi-circle around $z=\pi i$), we get: $$\oint\frac{e^{itz}}{e^z+1}dz=I+I_R-Ie^{-2\pi t}+P.V.\int_{2\pi i}^0\frac{e^{itz}}{e^z+1}dz+I_r$$ where we denoted $I_R=\int_R^{R+2\pi i}\frac{e^{itz}}{e^z+1}dz$, and $I_r$ - the integral along a small semi-circle around $z=\pi i$, clockwise (leaving this pole outside our contour). $I_R\sim e^{-R}$ and tends to zero at $R\to\infty$. P.V. means integration in the principal value sense.

There are no poles inside our closed contour; therefore, $\displaystyle\oint\frac{e^{itz}}{e^z+1}dz=0$, and we get $$I(1-e^{-2\pi t})=-I_r+P.V.i\int_0^{2\pi}\frac{e^{-tx}}{e^{ix}+1}dx \qquad(1)$$ To get $I_r$, we just have to evaluate the residue at $z=\pi i$. In more details, we decompose the integrand near $z=\pi i$: $z=\pi i+ire^{i\phi}; \phi\in[0;-\pi]$ $$I_r=\lim_{r\to 0}\int_0^{-\pi}\frac{e^{-\pi t+ire^{i\phi}}}{e^{ire^{i\phi}}-1}(ir)e^{i\phi}id\phi=\pi ie^{-\pi t}$$ Taking the imaginary part of (1) $$\Im I=-\frac{\pi e^{-\pi t}}{1-e^{-2\pi t}}+\Re P.V.\frac{1}{1-e^{-2\pi t}}\int_0^{2\pi}\frac{e^{-tx}}{e^{ix}+1}dx\qquad(2)$$ Using $$\Re\frac{1}{e^{ix}+1}=\frac{1}{2}\Big(\frac{1}{e^{ix}+1}+\frac{1}{e^{-ix}+1}\Big)=\frac{1}{2}\frac{2+e^{ix}+e^{-ix}}{(e^{ix}+1)(e^{-ix}+1)}=\frac{1}{2}$$ and performing integration in (2), $$\Im I=\int_0^\infty\frac{\sin tx}{e^x+1}dx=-\frac{\pi}{2\sinh\pi t}+\frac{1}{2t}$$

Svyatoslav
  • 15,657
  • 1
    Thank you for this method as well! I tried integrating with a rectangular contour but it seems i still somehow set my contour up wrong which was why I couldn’t get this lol – Max0815 May 20 '22 at 10:46
1

Not very rigorous but I hope it helps in some way

$$\frac{1}{e^x + 1} = e^{-x} - e^{-2x} + e^{3x} - e^{-4x} + \ldots$$

$$\int_0^\infty \sin(x) e^{-nx} dx = \frac{1}{n^2+1}$$

Integrating term by term, then your problem is the same as finding the sum

$$\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^2+1}$$

which is solved in this answer

Bio
  • 835
  • 6
  • 13