Test the convergence of $$\int_0^{\pi/2}\frac{\sin x}{x^n}\,dx$$
I tried doing it by comparison test by taking $\phi(x)=\dfrac{1}{x^n}$. Then
$$\lim_{n\rightarrow 0}\frac{f(x)}{\phi(x)}=\lim_{n\rightarrow 0}\sin x=0$$ This implies that if $\phi(x)$ converges then $f(x)$ also converges. We can see that $\phi(x)$ converges for $n<1$
But the answer in the book is “$f(x)$ converges for $n<2$”
Have I missed out something?
The only problem is at $0$ and since $$\frac{\sin x}{x^n}\sim_0 \frac{1}{x^{n-1}}$$ so the integral is convergent if and only if $n-1<1\iff n<2$.