Why does the integral $$\int_1^2 \frac{1}{(x-1)^a}$$ converge only for $a<1$ and diverge otherwise?
I would compute the integral: $\int_1^2 \frac{1}{(x-1)^a}=\frac{1}{(a-1)}$ and this gives a finite result for any $a$ different from $1$. So I don't understand why the integral would diverge for example for $a=3$ since plugging in this value of a into the integral gives $\int_1^2 \frac{1}{(x-1)^3}=\frac{1}{(3-1)}$ which is finite.
This improper integral can be explicitly computed. The integral is convergent if the following limit exists and is finite. $$ \lim_{k \to 1^+} \int_k^2 \frac{1}{(x-1)^a} dx $$
And the limit can be easily computed. If $a \ne 1$, \begin{align*} \lim_{k \to 1^+} \int_k^2 \frac{1}{(x-1)^a} dx =& \lim_{k \to 1^+} \left[\frac{(x-1)^{-a+1}}{-a+1}\right]_k^2 = \frac{1}{1-a}\lim_{k \to 1^+}(1-(k-1)^{1-a})\\ =&\begin{cases} \frac{1}{1-a}, & a <1\\ \infty, & a >1\end{cases} \end{align*}
If $a=1$, the primitive is a logarithm and you also conclude that the integral is divergent.