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}$

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
$$
