The deep reason why $\int \frac{1}{x}\operatorname{d}x$ is a transcendental function ($\log$)

In general, the indefinite integral of $x^n$ has power $n+1$. This is the standard power rule. Why does it "break" for $n=-1$? In other words, the derivative rule $$\frac{d}{dx} x^{n} = nx^{n-1}$$ fails to hold for $n=0$. Is there some deep reason for this discontinuity?

• Well it is obvious that it should fail, since the slope of $1/x$ is non-constant. But this is a neat question. – The Count Feb 23 '17 at 4:05
• See whether this helps you: google.co.in/amp/s/arcsecond.wordpress.com/2011/12/17/… – Rohan Feb 23 '17 at 4:10
• It does hold for n=0 right? The derivative of 1 w.r.t. x is zero. – Newton Feb 23 '17 at 4:26
• Thanks. Some of the answers explain why the integral is log but doesn't explain why there is a discontinuity for integral of x^n when n is -1. – Shuheng Zheng Feb 23 '17 at 5:14
• This link might be a bit helpful : math.stackexchange.com/questions/2118082/… – user399078 Feb 23 '17 at 5:40

I'll try to give a soft answer to what I see as the spirit of the question, which is not why you get exactly log, but why the behaviour is different when integrating $x^{k}$ for $k=-1$.

The way I see it is that the logarithm would actually be there for other powers of $x$ too, but it's "hidden" by the fact that in a geometric series one term "gobbles up" all the others together, except in the very special case when all terms are equal. Put in other words, the intuition is very close to the reason why $\sum_{i=a}^b c^i$ can be reasonably approximated by just the first term of the sum ($c^a$) if $c<1$, and just by the last ($c^b$) if $c>1$, regardless of how large $b-a$ is, i.e. of how many terms you have in the sum. But if $c=1$ no single term dominates all the others, and that's when you have to count them all, and you end up seeing the $b-a$ term "emerge" in $\sum_{i=a}^b 1^i=b-a+1$.

Informally, you can see how this applies to the case at hand writing $\int_{x_0}^{x_f} x^k dx$ as $\int_{x_0}^{2 x_0} x^k dx + \int_{2x_0}^{4x_0} x^k dx + ...$. Each of the $\approx \log_2 \frac{x_f}{x_0}$ terms has the same weight as the others if, and only if, $k$ has a very specific value (which?), in which case $\int_{x_0}^{x_f} x^k dx$ equals $\approx \log_2 \frac{x_f}{x_0}$ times $\int_{x_0}^{2 x_0} x^k dx$. If it's just an $\epsilon$ smaller, or larger, you get the sum within a constant factor of either $\int_{x_0}^{2 x_0} x^k dx$ or of $\int_{\frac{1}{2}x_f}^{x_f} x^k dx$, respectively, regardless of $\frac{x_f}{x_0}$. Note that instead of using $2$ as a base, we could have used $3$, or $e$, or $7.24$, or $\pi$, and the critical value of $k$ would have remained the same: it's the value that ensures that if you integrate $x^k$ over an interval $7.24$ longer, but with a starting point $7.24$ times larger, the integral does not change, $k=-1$.

This is actually a phenomenon that I've seen pop up really really often in math, physics, and computer science. You often have a sum of many terms, and a parameter that, for small values, makes the first term of the sum dominate all the others put together, and for large values, makes the last term dominate all the others put together, regardless of how many terms you have in the sum. But when the parameter equals exactly the critical value at which the transition between the two regimes occurs, all sort of strange quantities related to the number of terms in the sum appear in any approximation of it.

• This is a very interesting answer, I'm glad you chose to elaborate! – pjs36 Feb 23 '17 at 5:26
• If i am not mistaken, the third term (which is not currently written) of that series expansion is $\int_{4x_0}^{8x_0}$? That makes sense. – Shuheng Zheng Feb 23 '17 at 5:29
• @JohnZheng Yes, in the example given, at every term you'd double the integration interval. But because this also means that the starting x is doubled, what you integrate is multiplied by $2^{k}$. If, and only if, $k=-1$ the doubling of the interval exactly compensates the halving of the integrand. – Anonymous Feb 23 '17 at 5:34
• This "phenomenon" is quite frankly a natural consequence of the fact that a lot of things can be expressed in terms of their Taylor expansion about a point, which is a power series. And when you supply values $|x-a|<1$, the low powers dominate, while when $|x-a|>1$ the high powers do. At $|x-a| = 1$ all powers of $(x-a)^n = 1^n = 1$, so none dominate. – Iwillnotexist Idonotexist Feb 23 '17 at 15:39
• There is no "phenomenon" whatsoever. Note simply that $$x^{n+1}=e^{(n+1)\log(x)}=1+(n+1)\log(x)+O((n+1)^2)$$And that is all that is happening here. What do you mean by "phase transition?" There is no transition. – Mark Viola Feb 23 '17 at 17:46

The so-called "deep reason" is not deep at all. The term $\displaystyle \log(x)$ is simply the constant term in the expansion of $\displaystyle \frac{x^{n+1}}{n+1}$ around $n=-1$. To see this, we simply write \begin{align}\frac{x^{n+1}}{n+1}&=\frac{e^{(n+1)\log(x)}}{n+1}\\\\&=\frac{1}{n+1}\sum_{k=0}^\infty \frac{(n+1)^k\,\log^k(x)}{k!}\\\\&=\sum_{k=0}^\infty\frac{(n+1)^{k-1}\log^k(x)}{k!}\\\\&=\frac{1}{n+1}+\log(x)+\frac12(n+1)\log^2(x)+O((n+1)^2)\end{align}

whence we see the leading terms in the asymptotic ($n\sim -1$) expansion of $\displaystyle \frac{x^{n+1}}{n+1}$. Obviously, we see that $\lim_{n\to -1}\frac{x^{n+1}-1}{n+1}=\log(x)$.

More simply, let $f(x,n)$ be given by the integral

\begin{align} f(x,n)&=\int_1^x t^n\,dt\\\\ &=\frac{x^{n+1}-1}{n+1}\tag 1 \end{align}

Note that $f(x,n)$ is continuos on $(0,\infty)\times \mathbb{R}$ (i.e., $n$ need not be restricted to the integers).

Then, note that the limit as $n\to -1$ of $f(x,n)=f(x,-1)$ is

\begin{align} \int_1^x \frac1t\,dt&=f(x,-1)\\\\ &=\lim_{n\to -1}f(x,n)\\\\ &=\lim_{n\to -1} \frac{x^{n+1}-1}{n+1}\\\\ &=\lim_{n\to -1}\frac{e^{(n+1)\log(x)}-1}{n+1}\\\\ &=\log(x) \end{align}

So, we can recover the expected result, $\int_1^x \frac{1}{t}\,dt=\log(x)$, by taking the limit in $(1)$ for $n\ne -1$.

• This isn't a "deep" reason. You're just doing some computations to derive the result. Moreover, you're overlooking the fact that $\log$ is often defined as $\int_1^x t^{-1} \ dt$. – MathematicsStudent1122 Feb 23 '17 at 14:21
• @MathematicsStudent1122 That is not correct. The so-called "deep meaning" isn't deep at all. Note that $$x^{n+1}=e^{(n+1)\log(x)}=\sum_{k=0}^\infty \frac{((n+1)\log(x))^k}{k!}$$Now, subtract $1$, divide by $n+1$, and let $n\to -1$. And if we start with the integral definition of the logarithm, then there is nothing to discuss. "Overlooking?" Stand down! – Mark Viola Feb 23 '17 at 14:49
• This argument is not quite circular exactly, but it is just moving the problem to they relationship between powers and exponentials along with the calculus of exponentials. I think the real point is that power functions are intimately related with exponential functions, and that relationship is through $x^y=\exp(y \log(x))$. – Ian Feb 23 '17 at 17:04
• I think it maybe just needs a bit more commentary, because it has not quite addressed the differential side of the issue, but merely reduced the integration side of the issue to the differential side of the issue. It is also worth mentioning that $f(x,y)=\int_1^x z^y dz$ is a continuous function on $(0,\infty) \times \mathbb{R}$. There is some sense in which this means that $\frac{x^{n+1}}{n+1}$ is a "bad" antiderivative of $x^n$, and that we should instead look at $\frac{x^{n+1}-1}{n+1}$, at least if we want to think of $n$ as a variable. – Ian Feb 23 '17 at 17:22
• Just to add that $f_n$ is a continuous function of both its arguments, and that (1) is its value at $n=-1$. (I mainly mention this because John phrased this disparity as being a discontinuity, which it is not. Exactly the same thing happens in differential equations: for example, the solution to the IVP $y''+y=\sin(kx),y(0)=0,y'(0)=0$ is a continuous function of $k$ for each fixed $x$. Yet its formula looks completely different when $k=-1$.) – Ian Feb 23 '17 at 17:27

The paradox disappears when you consider the antiderivatives having the common point $(1,0)$, i.e. the functions

$$\int_1^x t^{\alpha-1}dt=\frac{x^\alpha-1}\alpha,$$

which are plotted below for exponents $-\dfrac12,-\dfrac14,-\dfrac18,0,\dfrac18,\dfrac14,\dfrac12$.

The blue curve corresponds to $\alpha=0$ but is evaluated as the limit

$$\lim_{\alpha\to0}\frac{x^\alpha-1}\alpha=\ln(x).$$

It perfectly blends with the others. • Thanks. Yes I see. I guess we just say "log" is the transcendental function denoting the limit of that function. – Shuheng Zheng Feb 23 '17 at 21:35
• @JohnZheng: yep. Maybe in that sense it shouldn't be called transcendental anymore (or the non-integer powers should be). – Yves Daoust Feb 24 '17 at 8:04
• This is my favorite answer. Also, consider the graph of the integrand $y = x^{\alpha-1}$: The area under this graph and to the right of $1$ is finite iff $\alpha < 0$; the area to the left of $1$ is finite iff $\alpha > 0$. The case $\alpha = 0$ is in between: the graph is a hyperbola and both areas to the sides of $1$ are infinite. So your blue curve is the shallowest curve which lacks a horizontal asymptote, and also it is the steepest curve which has a vertical asymptote. And $log$ sits right between the positive and negative powers, but we need to scale by $1/\alpha$ to see this. – Yakov Shklarov Feb 28 '17 at 4:29
• Similar to Dr.MV's answer, I very much like this approach. I have also stumbled upon this, as shown here.. :-) – Simply Beautiful Art Mar 2 '17 at 15:49
• This is my favourite answer too, although I would add what @YakovShklarov writes: Even though one sees the blue curve nicely fitting in, there is a break in the pattern there if one zooms to the left and right endpoints of the interval $(0,\infty)$: The curves under the blue one (excluded) have a horizontal asymptote $y=-1/\alpha$, the others go to $\infty$ for $x\to \infty$; the curves over the blue one (excluded) have a $y$-intercept at $y=-1/\alpha$, the others go to $-\infty$ for $x\to 0^+$. – Torsten Schoeneberg Jun 8 '18 at 1:23

Take any real $r$, and any real parameter $x > 0$.

I believe the key to understanding the phenomenon in this question is to grasp: $\def\lfrac#1#2{{\large\frac{#1}{#2}}}$

1. Why $\lfrac{d(\ln(x))}{dx} = x^{-1}$, based on the definition of $\ln$ as the inverse of $\exp$ on $\mathbb{R}$.

2. Why $\lfrac{d(x^r)}{dx} = r x^{r-1}$ and why it only allows us to obtain $\int x^r\ dx$ if $r \ne -1$.

3. A combined explanation for $\int x^r\ dx$ that allows us to see where the cases split.

I shall demonstrate these three points in order from basic principles using basic properties of $\exp$ instead of 'ad-hoc' limit arguments. These properties are:

• $\exp' = \exp$.

• $\exp(x+y) = \exp(x) \exp(y)$ for any reals $x,y$.

• $x^r$ is defined as $\exp(r\ln(x))$. The reason for this is a topic for another post.

(1)

Let $y = \ln(x)$.

Then $x = \exp(y)$.   [By definition of $\ln$.]

Thus $\lfrac{dx}{dy} = \lfrac{d(\exp(y))}{dy} = \exp(y)$.   [Note that $\lfrac{d(\exp(y))}{dy}$ is defined since $x,y$ are bijectively related.]

And $\lfrac{dy}{dx} \lfrac{dx}{dy} = 1$.   [By the generalized chain rule.]

Thus $\lfrac{dy}{dx} = \exp(y)^{-1} = x^{-1}$.

(2)

$\lfrac{d(x^r)}{dx} = \lfrac{d(\exp(r\ln(x)))}{dx} = \exp(r\ln(x)) \lfrac{d(r\ln(x))}{dx} = x^r r x^{-1} = r x^{r-1}$.

(3)

To find $\int x^r\ dx$, we wish to find an anti-derivative for $x^r$ with respect to $x$.

From (1) and (2) we can already obtain the answer. But why? Note that in the above derivation it is the derivative of $\ln$ that is actually causing the power of $x$ to decrease in the derivative of $x^r$. Interesting, isn't it! Now one might say, wait a minute, doesn't the power decrease because of the binomial theorem in the standard proof where $(x+h)^r = x^r + r x^{r-1} h + \cdots$? But look again; we have proven (2) for arbitrary real $r$, so if you wish to use the binomial theorem instead you would have to have proven it for arbitrary real powers! That is non-trivial, and at its core requires proving (2) or solving some related differential equation or proving that term-wise differentiation for power series works!

So I would say that (1), rather than being a special case that fills the 'discontinuity' at $r = -1$ in the anti-derivative formula for $x^r$ with respect to $x$, is actually the underlying reason for the general case via the derivative of $x^r$ for arbitrary real $r$. Since $\ln$ is the sort of 'base case' here, it cannot be derived from the general case, and there is sort of a logically inevitable split.

• In short, the reason that the derivative of $\ln(x)$ with respect to $x$ is $\lfrac1x$ is that the derivative of $\exp(y)$ with respect to $y$ is $\exp(y)$, where $y = \ln(x)$, due to the chain rule. The whole special phenomenon arises from the specialness of $\exp$. – user21820 Feb 23 '17 at 12:55
• This shows up again in complex analysis where integrating a Laurent series over a closed curve eliminates everything except residues due to the $z^{-1}$ term, out from which also pops a $2πi$ factor which is precisely due to the period of $\exp$. – user21820 Feb 23 '17 at 13:21
• I think this is a very good point, often missed: $r=-1$ looks like a weird special case when one looks at integers, but when you actually think about how non-integer powers are best defined, and how one can take limits of the (definite) integral, the logarithm inevitably plops out. – Chappers Feb 23 '17 at 13:40
• I think this one answer here hits the bull's eye. Your point about the role of $\log x$ in deriving formula $(x^{r}) '=rx^{r-1}$ is very true. +1 – Paramanand Singh Feb 23 '17 at 14:21

There are already great answers showing why $\int \frac{1}{x}=\ln(x) (+C)$. But it's fun to ask why integrating other powers of $x$ does not produce a logarithmic answer.

We'll need integration by parts: $$\int u \frac{dv}{dx} dx = uv - \int v \frac{du}{dx} dx \ .$$

Let's start by finding a result we'll need later, $\int x^m\ln(x)dx$, by making $u=\ln(x)$ and $\frac{dv}{dx}=x^m$ (i.e. $\frac{du}{dx}=\frac{1}{x}$ and $v=\frac{x^{m+1}}{m+1}$): $$\int x^m\ln(x)dx = \frac{x^{m+1}}{m+1}\ln(x) - \int \frac{x^{m+1}}{m+1} \frac{1}{x}dx$$ $$= \frac{x^{m+1}}{m+1}\ln(x) - \frac{x^{m+1}}{(m+1)^2} \ .$$

Now we can work out $\int x^ndx$ by setting $u=x^{n+1}$ and $\frac{dv}{dx}=\frac{1}{x}$ (i.e. $\frac{du}{dx}=(n+1)x^n$ and $v=\ln(x)$). We get $$\int x^ndx = \int x^{n+1}x^{-1}dx = x^{n+1}\ln(x) - (n+1)\int x^n\ln(x)dx$$ If $n=-1$ then the entire second term vanishes because of the $(n+1)$ factor, so we are left with $x^{n+1}\ln(x) = x^{0}\ln(x) = \ln(x)$. But in all other cases, we have to evaluate it by using our previous result: $$\int x^ndx = x^{n+1}\ln(x) - (n+1)\Bigg( \frac{x^{n+1}}{n+1}\ln(x) - \frac{x^{n+1}}{(n+1)^2} \Bigg)$$ $$= x^{n+1}\ln(x) - x^{n+1}\ln(x) + \frac{x^{n+1}}{(n+1)}$$ $$= \frac{x^{n+1}}{(n+1)} \ .$$

We can interpret this as meaning that the $\ln(x)$s are always "somewhere" in the integration of powers of $x$, but in almost all circumstances they are cancelled out by another term. For $x^{-1}$, uniquely, the cancelling term itself vanishes, and we are left with only the logarithm function.

Note that this argument was entirely circular, and thus doesn't "prove" anything. And we should probably worry slightly about dismissing that second term before it is evaluated. But I hope it was useful to see the problem from another direction.

Constructive criticism welcome.

the indefinite integral of $x^n$ has power $n+1$

Note that this hold also for $cx^n$ for $c\neq0$.

the derivative rule $\frac{d}{dx} x^{n} = nx^{n-1}$ fails to hold for $n=0$.

As Newton already noted in a comment, it actually holds: $\frac{d}{dx} x^{0} = \frac{d}{dx} 1 = 0 = 0x^{-1}$ (if you consider $0^0=1$, the latter equality is only tru if $x\neq 0$).

So if you want an intuitive explanation, I would say the problem is that the pattern for the derivative rule introduces a constant factor of $0$ here that you cannot get rid of, i.e. "the indefinite integral of $cx^n$ has power $n+1$" is "true" for $n=-1$ only if $c=0$ to begin with, which covers only a degenerate case of $\int cx^{-1}$ and is not terribly helpful when evaluating $\int c'x^{-1}$ for $c'\neq 0$.

$\int x^n = \frac {x^{n+1}}{n+1} +c$

clearly is undefined if $n = -1$ so the rule is breaking down.

but since $x^{-1}$ is bounded and continuous if $x>0$ the integral should exist.

Lets tackle this from the other direction.

What is $\frac {d}{dx} \log x$?

First, $e = \lim_\limits{n\to\infty}(1+\frac 1n)^n$

From the definition of derivative.

$\frac {d}{dx} \log x =$$\lim_\limits {h\to 0} \frac {\log (x+h) - \log x}{h}\\ \lim_\limits {h\to 0} \frac {\log (\frac {x+h}{x})}{h} \\ \lim_\limits {h\to 0}\frac {\log (1+\frac hx)}h\\ \lim_\limits {h\to 0} \frac 1x \frac xh \log (1+\frac hx)\\ \frac 1x\lim_\limits {h\to 0} \log (1+\frac hx)^\frac xh\\ \frac 1x \log (\lim_\limits {h\to 0} (1+\frac hx)^\frac xh) We can say n = \frac xh and and as h goes to 0, n goes to \infty \frac {d}{dx} \log x = \frac 1x\log e\\ \frac {d}{dx} \ln x = \frac 1x • Looks like \log (1+\frac xh) should be \log (1+\frac hx) = \log (1+\frac {1}{\frac xh}) – Rolazaro Azeveires Feb 23 '17 at 9:54 We cannot apply the formula$$\int x^b d x = \frac{x^{b+1}}{b+1}+ \mathcal{C}$$for b=-1. However, we can find an anti derivative by integration. If we define \log x for x>0 to be$$\log x = \int_1^x \frac{dt}{t}$$(the base point 0 would not work a priori, so next best choice seems 1) then the equality$$\lim_{a->0} \int_1^x t^{a-1} dt = \int_1^x t^{-1} dt $$is obvious. Now, the great thing about exponent -1 is the following formula$$\int_a^b \frac{dt}{t} = \int_{Ma}^{Mb}\frac{dt}{t}$$One can find a correspondence between Riemann sums of equal value (if a rectangle has base magnified by M and height decreased by M the area does not change). Therefore, we have$$\log x + \log y = \int_1^x \frac{dt}{t}+ \int_1^y \frac{dt}{t}= \int_1^x \frac{dt}{t}+ \int_x^{xy} \frac{dt}{t}= \int_1^{xy} \frac{dt}{t} = \log(x y)$$From this fundamental formula we get$$\log(x^m) = m \log x$$first for m natural, then for m integer, then rational, and finally for m real (and x>0). Define now by e the unique number such that \log e = 1. Clearly e>1. From the above we get$$\lim_{a->0}\int_1^e t^{a-1} dt = \int_0 ^e t^{-1} dt$$that is$$\lim_{a->0} \frac{e^a-1}{a} = 1$$e is uniquely defined by this. Now, we get right away$$\log(e^m) = m \log(e) = m$$for every$m \in \mathbb{R}$. A different approach is provided by considering the effects of substitution on the differential$x^n dx$. Turns out we can blame, or perhaps credit, our old friend zero! Say we put$u=x^a$. Then$x^n=u^{n/a}$and$dx=(1/a)u^{(1/a)-1)}du$. Thus:$x^n dx=(n/a)u^{((n+1)/a-1)}du$We can then trade any original exponent$n$on$x$for q different exponent$m$on$u$by selecting$a=(n+1)/(m+1)$or in product form$a(m+1)=(n+1)$Wait a minute, make that, we can almost interchange any$n$for any$m$. The proposed substitution method will fail for the specific case$n=-1$unless we also accept$m=-1$. Likewise$m=-1$cannot be accessed from any value of$n$other than$-1$. Note that this cutoff at$m=-1$or$n=-1$correlates with the multiplicative property of zero. This means differentials having the form$x^n dx$for different values of$n$are interrelated by algebraic substitution and their integrals will be algebraic functions of each other -- except for$n=-1$which is cut off from this interconvertibility. So, the integral of specifically$x^{-1} dx\$ will have a different, algebraically independent form versus all other power function integrals. And it's all because of zero doing its own totalitarian thing with multiplication!