Can someone help me evaluate this: $$\int \frac{\cos^2(x)}{1 + \text{e}^x}dx\;?$$
I need it for determining whether the improper integral $\int_0^\infty {\frac{{\cos^2{{(x)}}}}{{1 + {{\text{e}}^x}}}}$ is convergent or not.
Using the software Maple is not possible to determine symbolically, but it is possible to evaluate it numerically:
$$\int_0^\infty {\frac{{\cos^2{{(x)}}}}{{1 + {{\text{e}}^x}}}}=0.3831765832$$
So apparently it converges, but how would show whether such an integral converges or diverges?
Using Wolfram Alpha I get symbolic result in terms of hypergeometric functions, but I want to know if it is possible to calculate in terms of elementary functions.
A nondecreasing, bounded function always converges. So let $f(x) = \frac{\cos^2x}{1+e^x}$. Clearly $f(x) > 0\, \forall x$, so $\int_0^t f(x) dx$ is nondecreasing in $t$. We need to show it's bounded. $\int _0^t f(x)dx < \int_0^\infty \frac{dx}{1+e^x} < \int_0^\infty \frac{dx}{e^x} = 1$. Done.
It's unlikely to be expressible as an elementary function. This can be determined using Risch's algorithm.