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$.
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)}$.