TITLE: Integrate $\int_{-\infty}^{\infty} \frac{e^{2020x}-e^{x}}{x\left(e^{2020x}+1\right)\left(e^x+1\right)} \mathop{dx}$
QUESTION [5 upvotes]: A challenge problem says integrate $$\int_{-\infty}^{\infty} \frac{e^{2020x}-e^{x}}{x\left(e^{2020x}+1\right)\left(e^x+1\right)} \mathop{dx}$$
I thought $u=-x$ helps but I get $I$ so it is even.  I also try partial fraction to $$\int_{-\infty}^{\infty} -\frac{1}{x\left(e^{2020x}+1\right)} + \frac{1}{x\left(e^{x}+1\right)} \mathop{dx}$$
Now what?  Help please thanks

REPLY [3 votes]: Let $f(x) =\frac1{e^x+1}$. Then
\begin{align}
&\int_{-\infty}^{\infty} \frac{e^{2020x}-e^{x}}{x\left(e^{2020x}+1\right)\left(e^x+1\right)} \mathop{dx}\\
= & \>2\int_{0}^{\infty} \frac{e^{2020x}-e^{x}} {x\left(e^{2020x}+1\right)\left(e^x+1\right)} \mathop{dx} \\
= & \>2\int_{0}^{\infty} \frac{f(x)-f(2020x)}x dx \\
= & \>2[f(0)-f(\infty)] \ln \frac{2020}1\\
=&\> \ln 2020
\end{align}
where the Frullani integral is applied.