An integral which could be split into even and odd functions I found this integral in an old book of mine :

$$\int_{-a}^{a} \frac{1}{1+x^{2x}} dx$$
where $|a| \lt 1$

A hint was given that we could split this integral into even and odd functions but I don't know how to. I tried using WolframAlpha for the same but it doesn't help me out. If the exponent of $x$ would have been $2n$ then it wouldn't have been a problem but that $2x$ in the exponent really drives me out. I don't actually want an answer to this problem, I just want the even and odd functions, the integral should be split into. Any help regarding the same is appreciated :)
Thanks in advance
 A: 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.
A: $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 \, .
$$
