TITLE: What's happening at $a=-1$ in $\int x^a dx$?
QUESTION [9 upvotes]: If we take the right limit 
$$\lim_{a\to-1}\int x^a dx=\lim_{a\to-1}\frac{x^{a+1}}{a+1}=+\infty$$
but on the other hand
$$\int\lim_{a\to-1} x^a dx=\ln x$$
I'm aware you can't just commute the limit and the integral, but I'd still like an explanation here.
To me this is analogous to someone saying "The right limit of $1/x$ is $+\infty$ and the left one is $-\infty$ but $1/0$ is $7$ (or something)"
Is there an intuitive explanation to this break in continuity?

REPLY [5 votes]: If $z>y>0$, then 
$$\lim \int_y^z x^a dx = \lim \frac {z^{a+1} - y^{a+1}}{a+1} \\
= \lim \left(\frac {\exp ((a+1)\log z) - \exp 0}{a+1} - \frac{\exp((a+1)\log y) - \exp 0}{a+1} \right) = \log z - \log y$$ by definition of what $\exp'(0)=1$ means.
So $\lim \int_y^z x^a dx = \int_y^z x^{-1} dx$ and so the function $a \mapsto \int_y^z x^a dx$ is continuous at $a= -1$ .
In your "choices" of indefinite integrals, you tried to choose alternatively $y=0$ and have $z$ vary  (for $a > -1$) ; and then choose $z= \infty$  and have $y$ vary (for $a < -1$). So this is why you got nonsense when you looked at $a=-1$