Easier approach to $\int_0^{\infty} \frac{\mathrm{e}^{-x} \cosh(2x/5)}{1 + \mathrm{e}^{-2x}} \, \mathrm{d}x$

complex integrationdefinite integralsintegration

After playing with this integral for a little bit last night, I eventually resorted to complex analysis to solve it.

Can this be solved without complex analysis? It feels like there ought to be a way. If not, is there an easier way with complex analysis? (I'm still pretty beginner tier at this sort of thing.)

My solution is somewhat involved and it is as follows:

First, get rid of the cosh.

$$
\begin{split}
I &= \int_0^{\infty} \frac{\mathrm{e}^{-x} \cosh(2x/5)}{1 + \mathrm{e}^{-2x}} \, \mathrm{d}x \\
&= \frac1{2} \int_0^{\infty} \frac{\mathrm{e}^{-3/5 x} + \mathrm{e}^{-7/5 x}}{1 + \mathrm{e}^{-2x}} \, \mathrm{d}x \\
\frac{\mathrm{e}^{-7/5 x}}{1 + \mathrm{e}^{-2x}} &= \frac{\mathrm{e}^{3/5 x}}{1 + \mathrm{e}^{2x}} \\
2I &= \int_0^{\infty} \frac{\mathrm{e}^{-3/5 x}}{1 + \mathrm{e}^{-2x}} \, \mathrm{d}x + \int_0^{\infty} \frac{\mathrm{e}^{3/5 x}}{1 + \mathrm{e}^{2x}} \, \mathrm{d}x
\end{split}
$$

Next, do some u-subs to make it nicer.

$$\begin{split}
u = \mathrm{e}^{-x} & \qquad \mathrm{d}u = – \mathrm{e}^{-x} \, \mathrm{d}x \\
\int_0^{\infty} \frac{\mathrm{e}^{-3/5 x}}{1 + \mathrm{e}^{-2x}} \, \mathrm{d}x &= \int_{0}^{1} \frac{u^{-2/5}}{1 + u^2} \, \mathrm{d}u \\
\\
u = \mathrm{e}^{x} & \qquad \mathrm{d}u = \mathrm{e}^{x} \, \mathrm{d}x \\
\int_0^{\infty} \frac{\mathrm{e}^{3/5 x}}{1 + \mathrm{e}^{2x}} \, \mathrm{d}x &= \int_{1}^{\infty} \frac{u^{-2/5}}{1 + u^2} \, \mathrm{d}u \\
\\
2I &= \int_{0}^{\infty} \frac{u^{-2/5}}{1 + u^2} \, \mathrm{d}u \\
\end{split}
$$

Our contour is the counterclockwise semicircular arc of radius $R > 1$ in the upper half of the complex plane.

$$
\begin{split}
\oint_C \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z &= \int_{-R}^0 \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z + \int_0^{R} \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z + \int_0^{\pi} \frac{{\left(R \mathrm{e}^{i \phi}\right)}^{-2/5}}{1 + {\left(R \mathrm{e}^{i \phi}\right)}^2} \, iR\mathrm{e}^{i \phi} \, \mathrm{d}\phi \\
\lim_{R \rightarrow \infty} \int_0^{\pi} \frac{{\left(R \mathrm{e}^{i \phi}\right)}^{-2/5}}{1 + {\left(R \mathrm{e}^{i \phi}\right)}^2} \, iR\mathrm{e}^{i \phi} \, \mathrm{d}\phi &= 0 \\
\oint_{C, R \rightarrow \infty} \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z &= \int_{-\infty}^0 \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z + \int_0^{\infty} \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z \\
\int_{-\infty}^0 \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z &= – \int_0^{\infty} \frac{(-z)^{-2/5}}{1 + (-z)^2} \, \mathrm{d}(-z) \\
\oint_{C, R \rightarrow \infty} \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z &= \left(1 + \mathrm{e}^{-2\pi i/5}\right) \int_0^{\infty} \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z \\
\end{split}
$$

Finally, take the residue and solve for the original integral.

$$
\begin{split}
\oint_{C, R \rightarrow \infty} \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z &= 2 \pi i \operatorname{Res}_{z = i} \left( \frac{z^{-2/5}}{1+z^2} \right) \\
&= 2 \pi i \left( \frac{i^{-2/5}}{2 i} \right) \\
&= \pi i^{-2/5} \\
\int_0^{\infty} \frac{z^{-2/5}}{1 + z^2} \, \mathrm{d}z &= \pi \left(\frac{i^{-2/5}}{1 + \mathrm{e}^{-2 \pi i / 5}}\right) \\
&= \frac{\pi}{2} \left(\sqrt{5} – 1 \right) \\
2I &= \frac{\pi}{2} \left(\sqrt{5} – 1 \right) \\
I &= \frac{\pi}{4} \left(\sqrt{5} – 1 \right)
\end{split}
$$

Best Answer

Starting from @Luis Sierra's answer

$$\begin{equation} I=\frac{1}{2}\int\limits_{0}^{1} \frac{t^{\frac{2}{5}}}{1+t^{2}} \,dt +\frac{1}{2}\int\limits_{0}^{1} \frac{t^{-\frac{2}{5}}}{1+t^{2}}\,dt \end{equation}$$

Using the quite standard

$$J_a=\int_0^1 \frac {t^a}{1+t^2}\, dt=\frac{1}{4} \left(\psi \left(\frac{a+3}{4}\right)-\psi \left(\frac{a+1}{4}\right)\right)\qquad \text{if} \qquad \Re(a)>-1$$ So, rearranging, $$8I=\Big[\psi\left(\frac{17}{20}\right)-\psi\left(\frac{3}{20}\right)\Big]+\Big[\psi \left(\frac{13}{20}\right)-\psi\left(\frac{7}{20}\right)\Big]=\pi \cot \left(\frac{3 \pi }{20}\right)+\pi \tan \left(\frac{3 \pi }{20}\right)$$ that is to say $$8I=\pi\csc\left(\frac{3 \pi }{20}\right)\,\sec\left(\frac{3 \pi }{20}\right)=2 \left(\sqrt{5}-1\right)\, \pi \implies I=\frac{\sqrt{5}-1}{4} \pi$$

Related Question