TITLE: $\int_{- \infty}^{\infty} \frac{f(x)}{1+\exp{g(x)}}dx=\int_{0}^{\infty} f(x) dx$ for $f(x)=f(-x),~g(x)=-g(-x)$ - are there other formulas like that?
QUESTION [20 upvotes]: If $f(x)$ any even function, integrable on $(0,\infty)$ and $g(x)$ any odd function, then we have:

$$\int_{- \infty}^{\infty} \frac{f(x)}{1+e^{g(x)}}dx=\int_{0}^{\infty} f(x) dx \tag{1}$$

The proof is elementary:
$$I(a)=\int_{- \infty}^{\infty} \frac{f(x)}{a+e^{g(x)}}dx$$
$$I(1/a)=\int_{- \infty}^{\infty} \frac{f(x)}{1/a+e^{g(x)}}dx=a \int_{- \infty}^{\infty} \frac{e^{-g(x)}f(x)}{e^{-g(x)}+a}dx= \\ = a \int_{- \infty}^{\infty} f(x)dx-a^2\int_{- \infty}^{\infty} \frac{f(x)}{a+e^{g(x)}}dx$$
$$\frac{1}{a} I(1/a)+aI(a)=\int_{- \infty}^{\infty} f(x)dx$$
$$I(1)=\int_{0}^{\infty} f(x)dx$$

With this formula we can write some crazy looking integrals to scare people, like:
$$\int_{- \infty}^{\infty} \frac{e^{-x^2}}{1+e^{\sin (\sinh x)+x^3-\arctan x}}dx=\frac{\sqrt{\pi}}{2}$$
To be fair, it might also be useful for some quatum statistics applications (i.e. Fermi-Dirac distribution).


I want to know, what other formulas like $(1)$ exist? Maybe with the exponential function, or some other functions

I also know of Glasser's Theorem, but I wonder if some more interesting cases exist.
To be more specific, I mean the non-trivial formulas of the following kind:
$$\int_{a}^b g(x) f(x) dx=k \int_{A}^B f(x) dx$$
With $k$ being some constant, independent on $f(x)$, $f(x)$ is a general function (with some restricitions), $g(x)$ is some interesting function. $A,B$ might be different from $a,b$, but also should not depend on $f(x)$.

REPLY [3 votes]: Here is a slightly different variation to OPs example, followed by another one.

Suppose $p$ is an even function, i.e. $p(x)=p(-x)$ and $q(x)q(-x)=1$.
Then
  \begin{align*}
\int_{-a}^{a}\frac{p(x)}{1+q(x)}\,dx=\int_{0}^{a}p(x)\,dx
\end{align*}

A proof of the statement together with an application can be found in this answer.
Note: This technique can be found e.g. in Inside Interesting Integrals  by P.J. Nahin. He applies it to the seemingly complicated integral
\begin{align*}
 \int_{-1}^{1}\frac{\cos(x)}{1+e^{(1/x)}}\,dx
 \end{align*}
which becomes easy if you know the trick.

Suppose $p$ satisfies the functional equation $p\left(\frac{1}{x}\right)=p(x)$.
Then the following integral is independent of $s$:
  \begin{align*}
\int_{0}^{\infty}\frac{p(x)}{x^s+1}\,\frac{dx}{x}=\int_{0}^{1}p(x)\,\frac{dx}{x}
\end{align*}

Proof: Splitting the LHS integral into two pieces on $[0,1]$ and $[1,\infty)$ and substituting $x\rightarrow \frac{1}{x}$ in the second one gives
\begin{align*}
\int_{0}^{\infty}\frac{p(x)}{x^s+1}\,\frac{dx}{x}&
=\int_{0}^{1}\frac{p(x)}{x^s+1}\,\frac{dx}{x}+\int_{1}^{\infty}\frac{x^s p(1/x)}{x^s+1}\,\frac{dx}{x}\\
&=\int_{0}^{1}p(x)\,\frac{dx}{x}
\end{align*}
Note: This integral can be found e.g. in Irresistible Integrals  by G. Boros and V.H. Moll.