Question: If $a$ and $b$ are positive numbers, what is the value of $\displaystyle \int\_0^\infty \frac{e^{ax}-e^{bx}}{(1+e^{ax})(1+e^{bx})}dx$. 

A: $0$

B: $1$

C: $a-b$

D: $(a-b)\log 2$

E: $\frac{a-b}{ab}\log 2$

I really don't see how to start this one, I'm not so great with integrals.

Answer: 
*One indirect approach:*

Write 

$$f(a,b) = \int\_0^\infty \frac{e^{ax}-e^{bx}}{(1+e^{ax})(1+e^{bx})}dx$$

Then changing variables by $x = ku$, for some positive $k$,

$$f(a,b) = k \int\_0^\infty \frac{e^{kau}-e^{kbu}}{(1+e^{kau})(1+e^{kbu})}du = k\, f(ka,kb) $$

The only$^\*$ answer which obeys the relation $$f(a,b) = k \,f(ka,kb)$$ is Option E. 

---

*$^\*$Footnote:* As pointed out in the comments, Option A does follow this relation as well but is easy to rule out on other grounds. 

To unpack my original thinking:

* Option A is not possible as we can make the integrand positive: for $a > b$, $f(a,b) > 0$
* Option B is not possible as $f(a,b)$ cannot be independent of $a$ and $b$, e.g., without explicitly calculating, it looks clear that $\partial\_a f(a,b) \neq 0$.
* Now we're down to Options C, D or E. Since this is a question from a timed test and mathematicians are ruthlessly efficient (aka lazy), I don't want to evaluate the integral. Instead, can I find quickly some sort of scaling argument to rule out Options C and D? My 'fear' is that $f(ka,kb) = k\,f(a,b)$ which will instead rule out Option E and then I'll be stuck having to calculate the integral in order to differentiate between C and D.
* But no! Instead $f(a,b) = k\,f(ka,kb)$. Good!
A slight variation of the accepted solution begins on line $3$:

\begin{align}
I &= \int\_{0}^{\infty} \frac{e^{ax}-e^{bx}}{(1+e^{ax})(1+e^{bx})}dx \\
&= \int\_{0}^{\infty} \frac{dx}{1 + e^{bx}} - \int\_{0}^{\infty} \frac{dx}{1 + e^{ax}} \\
&= \int\_{0}^{\infty} \frac{e^{-bx} dx}{(1 + e^{bx})e^{-bx}} - \int\_{0}^{\infty} \frac{e^{-ax}dx}{(1 + e^{ax})e^{-ax}} \\
&=\int\_{0}^{\infty} \frac{e^{-bx} dx}{(1 + e^{-bx})} - \int\_{0}^{\infty} \frac{e^{-ax}dx}{(1 + e^{-ax})} \\
\end{align}

For the integral involving $b$, let $u=1+e^{-bx}$ so that $\frac{-1}{b}du=e^{-bx}dx$. Then $x=0 \implies u=2$, and $x \to \infty \implies u \to 1^+$. With a similar result for the integral involving $a$, and changing the order of integration, we end up with

\begin{align}
I &= \left( \frac{1}{b} - \frac{1}{a} \right) \lim \_{\epsilon \to 0^+}\int\_{1+\epsilon}^{2}\frac{1}{u}du = \left( \frac{1}{b} - \frac{1}{a} \right) \ln 2 \ . \\
\end{align}