# Does the integral converge? Indeterminate limits

So, I was just toying around with integrals and happened to come across two that I am curious as to their convergence. I can't determine a definite way to test if the integral converges or diverges. I would expect them to converge:

$\displaystyle\int^{\infty}_0\left(\frac{1+\sin x}{2}\right)^{x}{\rm d}x$

and

$\displaystyle\int^{\infty}_0\left(\frac{1+\cos x}{2}\right)^{x}{\rm d}x.$

Do these integrals converge or diverge? The limit test gave me nothing, since there are always peaks that have a local maximum of 1 occurring at every integer multiple of $2\pi.$

Also, if these integrals do indeed converge, what values do they converge to?

The only obstacle to the convergence would be $x \rightarrow +\infty$ are there is no problem on a compact interval.
The second one can be rewritten as: $$2 \int_0^\infty \cos(x)^{4x} dx = 2 \sum_{k=0}^\infty \int_{k \pi}^{(k+1) \pi} \cos(x)^{4x} dx$$ and: $$I_k=\int_{k \pi}^{(k+1) \pi} \cos(x)^{4x} dx = \int_0^{\pi} \cos(x)^{4 k \pi+4 x} dx$$ Thus: $$I_k \geq \int_{0}^\pi \cos(x)^{4 \pi (k+1)}$$ using Wallis' integrals we have: $$\int_0^\pi \cos(x)^{4 \pi (k+1)} \sim 2 \sqrt{\frac{\pi}{8 \pi k}}$$ so: $$\sum_k I_k = +\infty$$ and the integrals diverges.
• Both integrals have the same behavior as up to a linear change of variables $\sin(x)$ and $\cos(x)$ are the same. Apr 11 '18 at 19:30