Consider the integral $$ I_n = \int_0^\infty x^n \sin(x) dx $$ for $n\in\mathbb R$. The integral exists and is finite for $-2 < n <0$, giving the value $I_n = \Gamma(n+1)\cos\left(\frac{n\pi}{2}\right)$. Compare this with the related integral $$ \tilde I_n(t) = \int_0^\infty x^n \sin(x) e^{-t x} dx $$ for $t>0$. The integral exists and is finite for $n > -2$, taking the value $$ \tilde I_n(t) = \left(\frac{1}{1 + t^2}\right)^{\frac{n+1}{2}} \Gamma(n+1) \sin\left[(n+1)\arctan(1/t)\right]. $$ which, in the limit as $t\to 0^+$ becomes $$ \lim_{t\to 0^+} \tilde I_n(t) = \Gamma(n+1)\cos\left(\frac{n\pi}{2}\right) $$ This looks like $I_n$, but it is valid for $n \ge 0$ as well. Thus it appears that with some slight-of-hand, I have a prescription for extending $I_n$ to $n>0$.
Is there a name for this move? Why does it work? The basic idea of the trick makes sense: for any positive $t$, $e^{-tx}$ decays to $0$ more rapidly than any positive power of $x$, so $\tilde I_n$ is finite for $n>0$. But there's something abut this process that feels a bit... dirty?
Edit: removed second half of the question based on repeated integration. It was half-baked and contained several errors.