Computing $\int_{-2}^{2}\frac{1+x^2}{1+2^x} dx$ I am trying to compute the following integral by different methods, but I have not been able to come up with the result analytically.
$$\int_{-2}^{2}\frac{1+x^2}{1+2^x}dx$$
First I tried something like: $2^{x}=e^{x\ln{2}}\Rightarrow u=x\ln{2} \iff x=\frac{u}{\ln{2}}$ $\Rightarrow$ $\frac{du}{\ln{2}}=dx$.
On the other hand, $1+x^{2}=(x-1)^{2}-2x$
Replacing
$$\int_{-2}^{2}\frac{1+x^2}{1+2^x}dx=\int_{-2}^{2}\frac{(x-1)^{2}-2x}{1+e^{x\ln{2}}}dx=\int_{-2}^{2}\frac{(x-1)^{2}-2x}{1-(-e^{x\ln{2}})}dx$$
$$\int_{-2}^{2}\frac{1+x^2}{1+2^x}dx=\int_{-2}^{2}((x-1)^{2}-2x)\sum_{n=0}^{\infty}(-e^{x\ln{2}})^{n}dx$$
$$\int_{-2}^{2}\frac{1+x^2}{1+2^x}dx=\int_{-2}^{2}((x-1)^{2}-2x)\sum_{n=0}^{\infty}((-1)^{n}e^{nx\ln{2}})dx=\int_{-2}^{2}((x-1)^{2}-2x)\sum_{n=0}^{\infty}\frac{((-1)^{n}n^{n}x^{n}\ln^{n}{2})}{n!}dx$$
$$\int_{-2}^{2}\frac{1+x^2}{1+2^x}dx=\sum_{n=0}^{\infty}\frac{((-1)^{n}n^{n}\ln^{n}{2})}{n!}\int_{-2}^{2}(1+x^2)x^{n}dx$$
I do not know if the reasoning is correct. I hope someone can help me.
Note: By symmetry the integral can be reduced to $f(-x)=2^{x}f(x)$ so $2I=I+I=\int_{-2}^{2}(1+2^{x})\frac{1+x^2}{1+2^x}dx=\frac{14}{3}$
 A: My approach:
$$\int_{-2}^{2}\frac{1+x^2}{1+2^x} dx = \int_{-2}^{0}\frac{1+x^2}{1+2^x}dx + \int_{0}^{2}\frac{1+x^2}{1+2^x} dx $$$$ \overset{t = -x}= \int_{0}^{2}\frac{1+t^2}{1+2^{-t}} dt+\int_{0}^{2}\frac{1+x^2}{1+2^x}dx =  \int_{0}^{2}x^2 + 1 dx =\frac{14}{3}. $$
A: Note that $\frac{1}{1+2^x}= \frac12 - \frac12 \tanh (\frac x2\ln2)
$,
where the odd function $\tanh(\cdot)$ vanishes under integration. Thus
$$\int_{-2}^{2}\frac{1+x^2}{1+2^x}dx= \int_{-2}^{2}\frac12(1+x^2)dx=\frac{14}3
$$
A: It may be useful to put in mind: By a theorem in the book Advanced Calculus Explored:
$$
\int_{-\alpha}^{\alpha}{\frac{f(x)}{1+b^{g(x)}}dx} = \int_{0}^{\alpha}{f(x)dx},\space where  \space f(x)\space must \space be \space an \space even \space function,$$
$$
\space g(x)\space must\space be \space an \space odd\space function,\space and \space b \in \mathbb{R}^+.
$$
This theorem works only for Riemann integrable functions.$$\\$$
So, for this integral since x=y is an odd function, 2 is a real positive number, and the numerator is an even function, we have:
$$\int_{-2}^{2}{\frac{1+x^2}{1+2^x}dx}=\int_{0}^{2}{1+x^2dx} = 2 \space +\space \frac{8}{3}$$
You can find its proof on the internet. If you can't find it, give me a shout.
