TITLE: $\int{x^k dx}$ as $k \rightarrow -1$ "paradox"
QUESTION [7 upvotes]: While I was studying integrals by my own, I learnt these two rules for integrating $f(x) = x^k$:

if $k \neq -1$, then $\int{x^k dx}=\frac {x^{k+1}}{k+1}+c$;
if $k =- 1$, then $\int{x^{-1} dx} = \ln {|x|} + c$.

What I find interesting is that, for a fixed $x_0$, the function $g(x_0, k)$ (defined below) has a discontinuity at $-1$, but it is still defined.
Let $g(x_0,k)=\int_1^{x_0} {x^k dx}$ and $x_0 \in (0, +\infty)$. Notice that $\lim_{k\rightarrow -1} g(x_0, k) = \pm\infty$, but $g(x_0, -1) = \ln x_0 +c$.
If you graph$^1$ $g(x_0, k)$ (with $x_0 = e$ and $k$ represented by the $x$-axis), you get this:

My question is: why? Why is $g(x_0, -1)$ well defined?
I mean:

it makes sense that $1/x$ should have a primitive; also I can graphically calculate the area underneath it
I understand the proofs for $\int{x^{-1} dx} = \ln {|x|} + c$
$\int{x^{-1} dx} = \ln {|x|} + c$ just works, so it must be correct

But it seems like this result is completely out of context when you study $x^k$.
What am I missing out? And, is there any relationship between $\int{x^k dx}$ (with $x\ne -1$) and $\int{x^{-1} dx}$ at all? If there are none, what's special about $x^{-1}$?

NOTES:

graph$^1$: done with GeoGebra. I added the point manually, as GeoGebra was graphing $h(x) = \frac {e^{x+1}} {x + 1}$ for every $x$, instead of $h(x) = \ln e$ when $x = -1$.

REPLY [3 votes]: The graph of the alleged function $g(x_0,k)$ for $x_0=e$ is a composite of the graphs of three different definite integrals.
For $k > -1$ you have graphed
$$ y = \int_0^e x^k \;\mathrm dx. $$
For $k = -1$ you have graphed
$$ y = \int_1^e x^k \;\mathrm dx. $$
For $k < -1$ you have graphed
$$ y = \int_\infty^e x^k \;\mathrm dx = -\int_e^\infty x^k \;\mathrm dx. $$
For a fixed $k,$
the indefinite integral really gives you a family of functions to evaluate at $x=x_0$
(a different function for each value of $C$), not a single function.
You don't get a function $g(x_0,k)$ until you have chosen a value of $C$ to use in each integral's solution.
If you insist on using indefinite integrals, to make your graph continuous
simply select $C=-1/(k+1)$ for each $k\neq -1,$
but $C=0$ when $k=-1.$
{"set_name": "stack_exchange", "score": 7, "question_id": 4361175}