Convergence of $\int_0^\infty \frac{\sin(x+x^2)}{x^n} \, \mathrm d x$ I am trying to decide the values of $n$ for which $$\int_0^\infty \frac{\sin(x+x^2)}{x^n} \, \mathrm d x$$ converges.
I think it might be $0 \le n < 2$ but I am not sure. I clearly need to worry about both limits, but I think the upper limit is fine as long as $n$ is not negative because of the sine function which converges by alternating series test, and the lower limit is safe as long as $n$ is not $2$ or more, since in the limit as $x \to 0$, $\sin (x+x^2) \sim x + x^2 \sim x$. 
 A: In order to ensure integrability in a right neighbourhood of the origin it is enough to have $n<2$. (Improper-Riemann-)Integrability in a left neighbourhood of the origin is a bit more subtle. By Dirichlet's test 
$$\lim_{M\to +\infty}\int_{1}^{M}\frac{\sin(x^2)}{x^n}\,dx =\frac{1}{2}\lim_{M\to +\infty}\int_{1}^{M}\frac{\sin(x)}{x^\frac{n+1}{2}}\,dx $$
is convergent for any $n>-1$, and for any $n\in(-1,3)$ the exact value of $\int_{0}^{+\infty}\frac{\sin(x^2)}{x^n}\,dx $ can be computed through the Laplace transform and the $\Gamma$ function, and it equals $\frac{1}{2}\cos\left(\frac{\pi(n+1)}{4}\right)\Gamma\left(\frac{1-n}{2}\right)$.
Through the substitution $x+x^2=u$ we have
$$ \lim_{M\to +\infty}\int_{0}^{M}\frac{\sin(x+x^2)}{x^n}\,dx = \lim_{M\to +\infty}\int_{0}^{M+M^2}\frac{2^n\sin(u)}{\left(-1+\sqrt{1+4u}\right)^n\sqrt{1+4u}}\,du$$
and By Dirichlet's test again we have that this limit exists iff $\color{red}{n\in(-1,2)}$.
A: You have two limits to worry about: what happens when $x\to\infty$ and what happens when $x\to 0$. Everything in between "doesn't matter", as it contributes something finite. In the limit $x\to 0$ you are correct, and so any $n<2$ will do.  In the limit $x\to \infty$ you can replace a $\sin\theta$  by $\exp i\theta$ which turns that end of the integral into the gamma function $\Gamma(z)$. The Gamma function has an interesting structure on the complex plane. I'll leave it to you to perform the change of variable and turn the crank, but you will find that a large range of $n$ is allowed, provided you are willing to accept analytic continuation as a means for removing the infinities you might otherwise naively encounter, if you just stuck to the real numbers.
