Showing that $\int\limits_{-a}^a \frac{f(x)}{1+e^{x}} \mathrm dx = \int\limits_0^a f(x) \mathrm dx$, when $f$ is even

Solution 1:

You have

\begin{align*} I &=\int\limits_{-a}^{a}\frac{f(x)}{1+e^{x}} \ dx \qquad\qquad \cdots (1)\\\ I &= \int\limits_{-a}^{a} \frac{f(x)}{1+e^{-x}} \ dx \qquad\qquad \Bigl[ \small\because \int\limits_{a}^{b}f(x)\ dx = \int\limits_{a}^{b}f(a+b-x)\ dx \ \Bigr] \quad \cdots (2) \\\ \Longrightarrow 2I &= \int\limits_{-a}^{a} \biggl[ \frac{f(x)}{1+e^{x}} + \frac{e^{x}\cdot f(x)}{1+e^{x}} \biggr] \ dx \quad\qquad \cdots (1) + (2)\\\ &=\int\limits_{-a}^{a} f(x) \ dx = 2 \int\limits_{0}^{a} f(x) \ dx \qquad \Bigl[ \small \text{since}\ f \ \text{is even so} \ \int\limits_{-a}^{a} f(x) = 2\int\limits_{0}^{a} f(x) \Bigr] \end{align*}


$\textbf{Note.}$ A similar problem, which uses result $(2)$ can be found here:

  • Integration of a trigonometric function

Solution 2:

This works because the even part of $\displaystyle{\frac{1}{1+e^x}}$ is $\frac{1}{2}$.

If $g:[-a,a]\to \mathbb R$ is a function, then $g$ has a unique representation as a sum of an even and an odd function, $g=h+k$, with $h(-x)=h(x)$ and $k(-x)=-k(x)$. If $f:[-a,a]\to\mathbb R$ is even, then $g(x)f(x)=h(x)f(x)+k(x)f(x)$ has even part $h(x)f(x)$ and odd part $k(x)f(x)$. Since the integral of an odd function on $[-a,a]$ is zero and the integral of an even function on $[-a,a]$ is twice the integral on $[0,a]$, this yields

$$\int_{-a}^a g(x)f(x)dx=\int_{-a}^ah(x)f(x)dx=2\int_0^a h(x)f(x)dx.$$

As has been seen in previous questions on this site (like this one) the formula for $h$ is $h(x)=\frac{1}{2}(g(x)+g(-x))$. In this problem, $\displaystyle{g(x)=\frac{1}{1+e^x}}$, and $h(x)=\frac{1}{2}$.