Difficult, possibly symmetric, integral I went to a competition 2 weeks ago and it was time to review. This integral keeps bugging me $$\int_{-\infty}^{\infty}\frac{e^{2017x}-e^x}{x(e^{2017x}+1)(e^x+1)}\,\mathrm{d}x$$ This practically screams symmetry at me and I can't figure out how to apply it. I started with a u-sub $u=e^x$ but that $x$ term on the bottom creates a problematic $\ln x$. I tried to split it at 0 and then make the substitution $x=\frac{1}{u}$ but again not prosperous. Edit In response to Justin's comment, the integral can now be split up into $$\int_{-\infty}^{\infty}\frac{1}{x(e^x+1)}-\frac{1}{x(e^{2017x}+1)}\,\mathrm{d}x$$ and I don't know what to do here either. 
 A: Following @Justin's suggestion, we find the general result that
$$ \int_{-\infty}^{\infty}  \frac{ e^{ax}-e^{bx} }{(e^{ax}+1)(e^{bx}+1)} \frac{dx}{x} = \int_{-\infty}^{\infty} \left( \frac{1}{e^{bx}+1} - \frac{1}{e^{ax}+1} \right) \frac{dx}{x}. $$
Any seasoned integrator will roll their eyes at this point, bang it on the head with this, and go about their business. Slightly more care than usual is required here, because the integral is over the whole of $\mathbb{R}$, rather than just the positive part, so let's go carefully. The integrand can be written as
$$ \left( \frac{1}{e^{bx}+1} - \frac{1}{e^{ax}+1} \right) \frac{1}{x} = \int_b^a \frac{e^{tx}}{(e^{tx}+1)^2} \, dt, $$
and thankfully the integrand of this is positive, so we can use Tonelli's theorem to change the order of integration,
$$ \int_{-\infty}^{\infty}\int_b^a \frac{e^{tx}}{(e^{tx}+1)^2} \, dt \, dx = \int_b^a \int_{-\infty}^{\infty} \frac{e^{tx}}{(e^{tx}+1)^2} \, dx \, dt $$
The inner integral is thankfully quite straightforward: it has antiderivative
$$ -\frac{1}{t} \frac{1}{e^{tx}+1}, $$
and evaluating at $\pm \infty$, only $-\infty$ contributes and we are left with
$$ \int_b^a \frac{dt}{t} = \log{(a/b)}. $$
In our case $a=2017$ and $b=1$, so the answer is $\log{2017}$ (of course!).
A: Hint. One may recall that, for $a>0$ and $s>-1$,
$$
\int_{0}^{\infty}\frac{x^{s}}{e^{ax}+1}\:dx=\left(1-2^{-s} \right) a^{-s-1} \zeta (s+1) \Gamma (s+1)
$$ giving, for $b>0$,
$$
\begin{align}
&\int_{-\infty}^{\infty}\frac{e^{ax}-e^{bx}}{x(e^{ax}+1)(e^{bx}+1)}\,\mathrm{d}x
\\\\&=2\int_{0}^{\infty}\frac{e^{ax}-e^{bx}}{x(e^{ax}+1)(e^{bx}+1)}\,\mathrm{d}x
\\\\&=2\int_{0}^{\infty}\frac1{x}\left(\frac{1}{e^{bx}+1}-\frac{1}{e^{ax}+1} \right)\,\mathrm{d}x
\\\\&=2\lim_{s \to -1^+}\int_{0}^{\infty}\left(\frac{x^s}{e^{bx}+1}-\frac{x^s}{e^{ax}+1} \right)\,\mathrm{d}x
\\\\&=2\lim_{s \to -1^+}\left[(b^{-s-1}-a^{-s-1})\left(1-2^{-s}\right) \zeta (s+1) \Gamma (s+1) \right]
\\\\&=\log \frac ba.
\end{align}
$$
