# An easy method to solve this definite integral?

I have this definite integral $$\int_{-3}^3 \frac{1+x^2}{1+2^x} \, dx$$

But I'm not sure how to calculate this integral in an easy and direct way. Using calculators like Wolfram Alpha I found the answer to be 12 but I needed some hints on how to solve this further using pen and paper.

• Use the King property. Commented Aug 23, 2021 at 14:28

Given an even function $$e(x)$$, an odd function $$o(x)$$ and parameters $$a,b>0$$, we will show that $$\int_{-a}^a\frac{e(x)}{1+b^{o(x)}}\,\mathrm dx=\int_0^ae(x)\,\mathrm dx,$$ which gives you a very quick method of evaluating your integral.

Set $$f(x)=\frac{e(x)}{1+b^{o(x)}}$$ as well as $$E(x)=\frac12(f(x)+f(-x))$$ and $$O(x)=\frac12(f(x)-f(-x))$$. This is the even-odd-decomposition of $$f$$, meaning $$f=E+O$$, $$E$$ is even and $$O$$ is odd. Thus we get \begin{align*}\int_{-a}^af(x)\,\mathrm dx&=\int_{-a}^aE(x)\,\mathrm dx=\int_{0}^a(f(x)+f(-x))\,\mathrm dx\\&=\int_0^ae(x)\left(\frac{1}{1+b^{o(x)}}+\frac1{1+b^{-o(x)}}\right)\,\mathrm dx=\int_0^ae(x)\,\mathrm dx.&\blacksquare\end{align*}

Now just notice that your integral is of the given form with $$a=3,b=2,e(x)=1+x^2,o(x)=x$$, and evaluate $$\int_0^3(1+x^2)\,\mathrm dx$$.

The substitution $$y=-x$$ yields $$\int_{-3}^3 \frac{1+x^2}{1+2^x} dx = \int_{-3}^3 \frac{1+y^2}{1+2^{-y}} dy.$$ Thus $$2\int_{-3}^3 \frac{1+x^2}{1+2^x} dx = \int_{-3}^3 (1+x^2)\left(\frac{1}{1+2^x} + \frac{1}{1+2^{-x}}\right) dx$$ $$= \int_{-3}^3 (1+x^2) dx = 2\int_{0}^3 (1+x^2) dx= 2(3+27/3)=24.$$ Thus indeed $$\int_{-3}^3 \frac{1+x^2}{1+2^x} dx =12$$

Use the fact that $$\int_a^b f(x)dx$$ is same as $$\int_a^b f(a+b-x)dx$$

Define, $$I = \int_{-3}^3 {{1+x^2}\over{1+2^x}}dx$$

Now, use the fact stated above and add both the integrals to get $$2I = \int_{-3}^3 {1+x^2} dx$$ Evaluating which, should be pretty straightforward.

Note that $$\frac1{1+2^x} =\frac12-\frac12\tanh\frac {x\ln2}2$$, where only the even term $$\frac12$$ contributes to the integral, i.e.

$$\int_{-3}^3 \frac{1+x^2}{1+2^x} \, dx=\frac12 \int_{-3}^3 (1+x^2)\, dx = 12$$

$$I=\int_{-3}^3\frac{1+x^2}{1+2^x}dx=\int_{-3}^3\frac{1+x^2}{1+2^{-x}}dx$$ $$2I=\int_{-3}^3\left(\frac1{1+2^x}+\frac{1}{1+2^{-x}}\right)(1+x^2)dx$$ now use the fact that: $$\frac1{1+2^x}+\frac{1}{1+2^{-x}}=\frac1{1+2^x}+\frac{2^x}{1+2^x}=\frac{1+2^x}{1+2^x}=1$$ which gives you: $$I=\frac12\int_{-3}^3(1+x^2)dx=\int_0^3(1+x^2)dx$$