# How to compute the definite integral $\int _0^{\infty }\:\frac{\left(2e^x+1\right)}{e^{2x}+2e^x+2}dx$

Good evening to everyone. I have an integral that I don't know how to compute: $$\int _0^{\infty }\:\frac{\left(2e^x+1\right)}{e^{2x}+2e^x+2}dx$$.I've never computed integrals with $\infty$ before so I don't know how to start. Thanks for any possibile answers.

• Substitute $e^x=t$ – Qwerty Jun 26 '16 at 9:12
• actually so called "improper integrals" are simply the limit of a standard integral, this one is the integral of a fractional "polynomial" with $e^x$ instead of $x$ – Renato Faraone Jun 26 '16 at 9:15
• Ok. I think I got it! Thanks! – T4yl0r Jun 26 '16 at 9:17

With the substitutions $e^t=u, u=\frac{1}{v}, v=t-\frac{1}{2},t=\frac{s}{2}$ the integral becomes: $$\int_{1}^{+\infty}\frac{(2u+1)\,du}{u((1+u)^2+1)} = \int_{0}^{1}\frac{(2+v)\,dv}{2v^2+2v+1}=\int_{1/2}^{3/2}\frac{t+3/2}{2t^2+1/2}\,dt=\frac{1}{2}\int_{1}^{3}\frac{s+3}{s^2+1}\,ds.$$ The last integral is elementary: it depends on a combination of $\frac{1}{2}\log(s^2+1)$ and $\arctan(s)$: $$\int_{0}^{+\infty}\frac{2e^x+1}{e^{2x}+2e^x+2}\,dx = \color{red}{\frac{12\arctan(3)+2\log(5)-3\pi}{8}}.$$