Find all the values of $p$ for which the integral converges $$\int_0^{\pi/2} \frac{\sin x}{x^p} dx$$
First, we can note that $$\int_0^{\pi/2} \frac{\sin x}{x^p} dx \leq \int_0^{\pi/2} \frac{1}{x^p} dx$$
Let's find the values $p$ so as to have the upper bound converging:
Case 1: When $p = 1$ $$\int_0^{\pi/2} \frac{1}{x^p} dx = \lim\limits_{t \rightarrow 0^+}[ \ln(x)]_t^{\pi/2}= - \infty $$
Case 2: When $p \neq 1$ $$\int_0^{\pi/2} \frac{1}{x^p} dx = \lim\limits_{t \rightarrow 0^+} \left[\frac{1}{1-p} x^{1-p} \right]_t^{\pi/2}= \lim\limits_{t \rightarrow 0^+} \left( \frac{1}{1-p} \right) \left( \left(\frac{\pi}{2}\right)^{1-p} - t^{1-p} \right) $$
If $p<1$: as $t \rightarrow 0^+$, we have $t^{1-p} \rightarrow 0$ $=>$ the limit exists.
If $p>1$: as $t \rightarrow 0^+$, we have $t^{1-p} \rightarrow \infty $ $=>$ the limit does not exist.
It follows that the upper integral converges when $p<1$, By the comparison test theorem the original integral converges when $p<1$
Not overly confident about my approach. If it is correct, is there a more formal efficient approach to discriminate the values of $p$?
Note that $\frac{2}{\pi}x\leq \sin(x)\leq x$ for all $x\in [0, \pi/2]$, so we have $$\frac{(2/\pi)x}{x^p} = \frac{2}{\pi}x^{1-p}\leq \frac{\sin(x)}{x^p}\leq \frac{x}{x^p} = x^{1-p}$$ on this interval. Therefore, $$\frac{2}{\pi}\int_0^{\pi/2} x^{1-p}\,\mathrm{d}x\leq \int_0^{\pi/2} \frac{\sin(x)}{x^p}\,\mathrm{d}x\leq \int_0^{\pi/2} x^{1-p}\,\mathrm{d}x$$ For $p < 2$, this implies $$\frac{(\pi/2)^{1-p}}{2-p}\leq \int_0^{\pi/2} \frac{\sin(x)}{x^p}\,\mathrm{d}x\leq \frac{(\pi/2)^{2-p}}{2-p}$$ and thus the integral is finite. For $p\geq 2$, $\int_0^{\pi/2} x^{1-p}\,\mathrm{d}x$ diverges, and therefore so does $\int_0^{\pi/2} \frac{\sin(x)}{x^p}\,\mathrm{d}x$.