An integral which could be split into even and odd functions

Solution 1:

Interpreting $x^{2x} = (x^2)^x$ we have \begin{align*}\frac{1}{1+x^{2x}} &= \frac{1}{2}\left( \frac{1}{1+x^{2x}}+\frac{1}{1+x^{-2x}}\right) + \frac{1}{2}\left( \frac{1}{1+x^{2x}}-\frac{1}{1+x^{-2x}}\right) \\ &= \frac{1}{2}+ \cdots\end{align*} where $\cdots$ denotes the odd part. So $$\int_{-a}^a \frac{1}{1+x^{2x}}\mathrm{d}x = 2\int_0^a \frac{1}{2}\mathrm{d}x = a.$$ Note that the assumption $|a|<1$ is so that $x^{2x}$ is separated from $-1$, so the integral converges.

Solution 2:

$f(x) = (x^2)^x$ satisfies the equation $f(x)f(-x) = 1$, therefore this is a special case of the following:

Let $f: [-a, a] \to \Bbb R$ be continuous with $f(x)f(-x)=1$ and $1+f(x) \ne 0$ for all $x$. Then $$ \int_{-a}^a \frac{1}{1+f(x)} dx = a \, .$$

Proof: With the substitution $x \mapsto -x$ we get $$ I = \int_{-a}^a \frac{1}{1+f(x)} \, dx = \int_{-a}^a \frac{1}{1+f(-x)} \, dx \\ = \int_{-a}^a \frac{f(x)}{f(x)+1} \, dx = 2a - I $$ which implies $I = a$.

Alternatively one can proceed as in Jacobian's answer and show that the even part of $g(x) = \frac{1}{1+f(x)}$ is $$ g_e(x) = \frac 12 \bigl(g(x) + g(-x) \bigr) = \frac 1 2 $$ and therefore $$ I = \int_{-a}^a g_e(x) \, dx = a \, . $$