A problem with $\int _{0}^{\infty} \cos(x^m) x^n \ \mathrm dx$ I was trying to solve:
$$\tag*{}\int _{0}^{\infty} \cos(x^m) x^n \ \mathrm dx$$
Where $m, n \in \mathbb{Z}$. I have tried to substitute $x^m=t$ but couldn't proceed further. And also can someone please state the conditions for the convergence of integral? Thank you.
 A: The integral is divergent if $m=0$. Assume that $m\neq 0$. With the substitution $x^m=t$, as you proposed, we get
$$
\int_0^{ + \infty } {\cos (x^m )x^n dx}  = \frac{1}{m}\int_0^{ + \infty } {\cos (t)t^{(n + 1)/m - 1} dt} .
$$
Using the known Mellin transform formula for the cosine, we then find
$$
\frac{1}{m}\int_0^{ + \infty } {\cos (t)t^{(n + 1)/m - 1} dt}= \frac{1}{m}\Gamma \!\left( {\frac{{n + 1}}{m}} \right)\cos \left( {\frac{{n + 1}}{{2m}}\pi } \right)
$$
provided that $0<\frac{n+1}{m}<1$.
A: You can also do it using the exponential integral function
$$\int \cos (x^m )\,x^n\, dx= \frac 1m\int\cos (t )\,t^k\, dt \qquad \text{with}\quad k=\frac{n-m+1}{m}$$
$$I(t)= \frac 1m\int\cos (t )\,t^k\, dt=-\frac{1}{2m} t^{k+1} \Big[E_{-k}(-i t)+E_{-k}(i t)\Big]$$
$$I(0)=-\frac i {2m} \left(e^{+\frac{1}{2} i \pi  k}-e^{-\frac{1}{2} i \pi  k}\right)\Gamma(k+1)=\frac 1m\sin \left(\frac{\pi  k}{2}\right) \Gamma (k+1)$$
Back to $k$
$$I(0)=-\frac 1m \cos \left(\frac{  n+1}{2 m}\pi\right)\, \Gamma \left(\frac{n+1}{m}\right)$$
At the upper bound, the convergence (to $0$) requires $k < 0$ that is to say $\frac {n+1} m <1$. As @Gary explained in comment, there is another bound. Then
$$\text{if} \quad  0<\frac {n+1} m <1 \quad \text{then} \quad \int_0^\infty \cos (x^m )\,x^n\, dx=\frac 1m \cos \left(\frac{  n+1}{2 m}\pi\right)\, \Gamma \left(\frac{n+1}{m}\right)$$
