How to calculate $\int _0^{\infty }\frac{1}{e^x+e^{-x}}\, dx\ ?$

98 Views Asked by At

How to calculate $$\int _0^{\infty }\frac{1}{e^x+e^{-x}}\, dx\ ?$$

We understand what we need to do in terms of setting the upper bound (infinity) to b and then just integrating as normal. We tried to integrate e-x and ex as normal and our answer was that it was divergent to infinity...

...but when we look at the answer on the textbook (as well as on Symbolab and Wolfram Alpha), it gives a completely different and convergent answer (it converges to pi/4). They approach it by doing u-substitution and dealing with it in terms of arctangent. Why is this the correct way to approach it? It seems so unintuitive to do it this way. Are we missing a crucial piece of information?

2

There are 2 best solutions below

0
On

hint

$$e^x+e^{-x}=2\cosh (x) $$

$$\cosh^2 (x )=1+\sinh^2 (x) $$

put $t=\sinh (x ) $ with $dt=\cosh (x)dx $.

You can take it.

you will find $$\frac {1}{2 }\int_0^{+\infty}\frac {dt}{1+t^2} $$

other method

multiply by $e^x $ and put $u=e^x $. it is easier.

you will get $$\int_1^{+\infty}\frac {du}{1+u^2} $$

0
On

Still another approach: for any $x>0$ we have $$\frac{1}{e^x+e^{-x}} = e^{-x}-e^{-3x}+e^{-5x}-e^{-7x}+e^{-9x}-\ldots\tag{1} $$ hence by termwise integration $$ \int_{0}^{+\infty}\frac{dx}{e^x+e^{-x}} = \sum_{m\geq 0}\frac{(-1)^m}{2m+1} = \int_{0}^{1}\frac{dz}{1+z^2} = \arctan(1) = \color{red}{\frac{\pi}{4}}.\tag{2}$$