I have been puzzled by the following since I have learned about the logarithm, though I never tried to express what puzzled me more precisely. Here is an attempt.
$\int x^n = \frac{x^{n+1}}{n+1}$ if $n \neq -1$
and
$\int x^{-1} = \ln(x)$
This brings up the following question. Is there a sense in which the limit as $n \to -1$ of $x^{n+1}/(n+1)$ is $\ln(x)$? Here is a non-rigorous attempt to make sense of this. Let us replace $n+1$ by a complex variable $z$. We are interested in the limit, as $z$ goes to $0$, of the function
$f(x,z) = \frac{x^z}{z} = \frac{e^{z \ln(x)}}{z}$
For $z$ close to $0$, I expect something like
$f(x,z) = \frac{1}{z} + \ln(x) + O(z)$
So somehow, Mathematics decides to completely ignore the term $1/z$, which would give $\infty$, and focus on the "constant" term $\ln(x)$. This reminds me of divergent series and QFT. I used to frown at Physicists when they would throw away an "infinite" term, and keep a finite term, thinking that this did not really happen in the Mathematical world, albeit with some very important exceptions consisting of people like Euler, Ramanujan and Witten (who is both a Mathematician and a Physicist). But here is an example of that at the heart of basic calculus.
Can someone explain to me in a precise and rigorous way what is going on? Thank you.
Edit: I guess one can get something close to the interchange of an indefinite integral with a limit by modifying the meaning of limit in this case. Namely, you would like to take the limit as $z$ goes to $0$ of $f(x,z)$ but modulo functions of $z$ alone (that is to say, elements of the kernel of the partial $x$-derivative). This actually makes sense (I think) for linear operators depending on a parameter. To be able to interchange the limit with respect to the parameter with the general solution "operator", one has to take the limit of the entire family of solutions with respect to that parameter. These are some elementary thoughts, but I think my curiosity is more or less satisfied.