I have problem with determining about convergence of integral below.I firstly tried to determine about absolute convergence by limit test but i cannot find relation between parameter $p$ and $q$.For absolute convergence i used dirichlet's test but i got wrong result.Can anybody show me how to proceed analytically in case of two parameters.
$$ \int_{0}^{\infty} \frac{x^{p}\sin{x}}{1+x^{q}}\ dx $$
Assuming $q>0$, in a right neighbourhood of the origin the integrand function behaves like $x^{p+1}$, so $p>-2$ must hold to ensure integrability. In a left neighbourhood of $+\infty$ the integrand function behaves like $x^{p-q}\sin(x)$: if $p\geq q$ this is not integrable, if $p<q$ this is integrable by Dirichlet's test. Summarizing, assuming $q>0$ the integrability constraints are $q>p>-2$.
If $q=0$ the integrability constraint clearly is $0>p>-2$.
If $q<0$, by setting $r=-q$ we have to study the integrability of $\frac{x^{p+r}}{1+x^r}\sin(x)$. Proceeding like in the first paragraph, the integrability constraints are $p+r>-2$ and $p<0$, i.e. $0>p>q-2$.
These cases can be condensed into $$ \max(0,q)> p >\min(0,q)-2. $$