# Convergence of $\int_0^\infty x^\alpha \cos e^x \, dx$

I tried to solve whether this integral is convergent or not and whether that convergence is conditional or absolute for a given $\alpha$.

$$\int _0^{\infty }\:\:x^{\alpha \:}\cos\left(e^x\right)\, dx$$

I tried this:

$$\int _0^{\infty }\:\:x^{\alpha \:}\cos\left(e^x\right)dx\le \int _0^{\infty }\:\left|x^{\alpha \:\:}\cos\left(e^x\right)\right|dx\le \int _0^{\infty }\left|x^{\alpha }\right|dx\:=\int _0^1\left|x^{\alpha }\right|dx\:+\int _1^{\infty }\left|x^{\alpha}\right|dx\:$$ So to make the integral converge absolutely $\alpha$ must be between $\alpha<-1$ but what about the other integral from $1$ to $\infty$? There, $\alpha$ must be greater than $-1$.

I don't know how to solve it. Please help me.

For the integral from $0$ to $1$ to exist, we need, as was pointed out in the OP, $\alpha\gt -1$. We now deal with the integral from $1$ to $\infty$.
Rewrite the integrand as $\frac{x^\alpha}{e^x}e^x\cos(e^x)$, and integrate by parts, letting $u=\frac{x^\alpha}{e^x}$ and $dv=e^x\cos(e^x)\,dx$. Then $du=e^{-x}\left(\alpha x^{\alpha-1}-x^\alpha\right)\,dx$, and we can take $v=\sin(e^x)$.
The function $uv$ vanishes at $\infty$, and we end up looking at $$\int_1^\infty e^{-x}\left(\alpha x^{\alpha-1}-x^\alpha\right)\sin(e^x)\,dx.\tag{1}$$ Since $\sin(e^x)$ is bounded, the integral (1) converges (the $e^{-x}$ term crushes $\alpha x^{\alpha-1}-x^\alpha$). So the integral from $1$ to $\infty$ gives no trouble for any $\alpha$.
We must have $\alpha>-1$, otherwise we have a non-integrable singularity in a right neighbourhood of the origin. Given that, we have: $$\int_{0}^{M}x^\alpha \cos(e^x)\,dx = \int_{1}^{e^M}\frac{\log^\alpha(t)\cos t}{t}\,dt$$ that is not absolutely converging, but is conditionally converging by Dirichlet's test, integral version, since $\cos t$ has a bounded primitive and $\frac{\log^\alpha(t)}{t}$ is eventually decreasing to zero. You can check that also through integration by parts.