What's the nth integral of $\frac1{x}$?

It can be shown by simple induction that $\dfrac{\mathrm d^n}{\mathrm dx^n}\left(\dfrac1{x}\right) = \dfrac{(-1)^n n!}{x^{n+1}}$.

But what about the nth integral of $\dfrac1{x}$? Finding the first few primitives, I can't discern a pattern.


Solution 1:

As Isaac noted, repeated integration seems to give the following pattern

$$ \frac{x^{n-1} \log x}{(n-1)!} - C_n x^{n-1}$$

Note that the value of $\displaystyle C_n$ does not really matter, as differentiating $n$ times nukes it. Also, note that, we can add any arbitrary $\displaystyle (n-1)^{th}$ degree polynomial to this, without changing the $\displaystyle n^{th}$ derivative.

In order to prove that the $\displaystyle n^{th}$ derivative of $\displaystyle \frac{x^{n-1} \log x}{(n-1)!}$ is $\displaystyle \frac{1}{x}$, we can use induction.

$$ \frac{1}{(n-1)!} \frac{d (x^{n-1} \log x)}{dx} = \frac{x^{n-2}}{(n-1)!} + \frac{x^{n-2} \log x}{(n-2)!}$$

Since adding an arbitrary $\displaystyle (n-2)^{th}$ degree polynomial does not change the $\displaystyle (n-1)^{th}$ derivative of $\displaystyle \frac{x^{n-2} \log x}{(n-2)!}$ we are done using induction.

Note that if $\displaystyle f(x)$ is another function such that $\displaystyle \frac{d^n f}{dx} = \frac{1}{x}$, then we have that $\displaystyle \phi(x) = f(x) - \frac{x^{n-1} \log x}{(n-1)!}$ has it's $\displaystyle n^{th}$ derivative to be zero, and hence it is a polynomial of degree $\displaystyle n-1$ or lower (can be proved using induction, again).

Thus all the functions you are looking for are of the form

$$\frac{x^{n-1} \log x}{(n-1)!} + \sum_{j=0}^{n-1} c_j x^j$$

where $\displaystyle c_j$ are arbitrary constants.

Solution 2:

If we use the repeated integral formula on the reciprocal function, with $1$ as the lower limit, we get

$$\begin{align*} \underbrace{\int_1^x\int_1^{t_{n-1}}\cdots\int_1^{t_1}}_{n} \frac1{t}\;\mathrm dt\cdots\mathrm dt_{n-2}\mathrm dt_{n-1}&=\frac1{(n-1)!}\int_1^x\frac{(x-t)^{n-1}}{t}\mathrm dt\\ &=(-1)^n \frac{x^{n-1}}{(n-1)!}B_{1-x}(n,1-n) \end{align*}$$

where $B_x(a,b)$ is the incomplete beta function.

Letting

$$g_n(x)=(-1)^n \frac{x^{n-1}}{(n-1)!}B_{1-x}(n,1-n)$$

the following more "elementary" representation can be derived:

$$g_n(x)=\frac{x^{n-1}}{(n-1)!}(\ln\,x-H_{n-1})-\sum_{j=1}^{n-1}\frac{(-1)^j}{j\cdot j!}\frac{x^{n-j-1}}{(n-j-1)!}$$

where $H_n=\sum\limits_{j=1}^n\frac1{j}$ is a harmonic number.

As Aryabhata mentions in his answer,

$$\frac{\mathrm d^n}{\mathrm dx^n}\left(\frac{x^{n-1}}{(n-1)!}\ln\;x+p_{n-1}(x)\right)=\frac1{x}$$

where $p_{n-1}(x)$ is any polynomial of degree $n-1$; $g_n(x)$, however, has the special property (by virtue of how it was constructed) that

$$\left.\frac{\mathrm d^k}{\mathrm dx^k}g_n(x)\right|_{x=1}=0\quad \text{if}\quad k < n$$

Solution 3:

We can solve this problem by the use of fractional derivatives.

$\forall q < 0$, using the Riemann Liouville formula and substituting $v = \frac{x-y}{x}$:

$$ \frac{d^q}{dx^q}\log x = \\ \frac{1}{\Gamma(-q)} \int_0^x \frac{\log (y)}{(x-y)^{q+1}}\, dy=\\ \frac{x^{-q} \log x}{\Gamma(-q)}\int_0^1 \frac{dv}{v^{q+1}} + \frac{x^{-q}}{\Gamma(-q)}\int_0^1 \frac{\log(1-v)}{v^{q+1}}\, dv $$

The first integral equals $-\frac{1}{q}$, while the second one is evaluated by parts:

$$\int_0^1 \frac{\log(1-v)}{v^{q+1}}\, dv = \\ \frac{1}{q} \int_0^1 \log(1-v)\,d(1-v^{-q}) = \\ \frac{\log(1-v^{-q}) \log(1-v)}{q}\big|_0^1 - \frac{1}{q} \int_0^1 \frac{1-v^{-q}}{1-v}\, dv = \\ \frac{\psi(1-q)+\gamma}{q} $$

Then

$$\frac{d^q}{dx^q}\log x = \frac{x^{-q}}{\Gamma(1-q)}(\log x - \gamma - \psi(1-q))$$

Letting $q \mapsto -q$ and letting $q$ be an integer, and differentiating once we obtain:

$$\boxed{I^q \frac{1}{x} = \frac{x^{q-1}}{q!}\left(q\log x + q\sum_{n=1}^q \frac{1}{n}+1\right)+P_{n-1}(x)}$$

where $I^q$ represents the $q^{th}$ integral and $P_{n-1} (x)$ represents a polynomial of degree $n-1$. Note that the sum above is for the $n^{th}$ harmonic number.

Reference: The Fractional Calculus (Oldham & Spanier)

Solution 4:

After replacing the variable x with t, the first step is to start the iterative integration at the log(t) rather than 1/t. The nth antiderivative of the natural logarithm is given by the following.

If $ n\geq 0\in \mathbb{Z}\land t>0\in \mathbb{R} $ then, $$ \displaystyle \log ^{(-n)}(t)=\frac{t^n}{(n!)^2}(n! \log (t)+\cos (n \pi ) S_{n+1}^{(2)}) $$

Proof, by induction on n.

Proposition at n:

$ \displaystyle \log ^{(-n)}(t)=\frac{\cos (n \pi ) S_{n+1}^{(2)} t^n}{(n!)^2}+\frac{t^n \log (t)}{n!} $

Proposition at n=0:

The Stirling number of the first kind term evaluates to zero, $ S_1^{(2)}=0 $ .

Substitute and simplify.

$ \displaystyle \log ^{(0)}(t)=0+\frac{t^0 \log (t)}{0!}=\log (t) $

Proposition at n+1: Integrate the proposition at n with suitable antiderivative limits.

$$ \displaystyle \int_0^t \log ^{(-n)}(u) \, du=\frac{\cos (n \pi ) S_{n+1}^{(2)}}{(n!)^2}\int_0^t u^n \, du+\frac{1}{n!}\int _0^tu^n \log (u)du $$

Evaluate the first integral.

$ \int_0^t \log ^{(-n)}(u) \, du=\log ^{(-(n+1))}(t)-\log ^{(-(n+1))}(0) $

If n>0, then the following is true.

$ \displaystyle \lim_{t\to 0} \, \log ^{(-n)}(t)=\log ^{(-n)}(0) $

$ \displaystyle \log ^{(-n)}(0)=\lim_{t\to 0} \, \left(\frac{\cos (n \pi ) S_{n+1}^{(2)} t^n}{(n!)^2}+\frac{t^n \log (t)}{n!}\right) $

$ \displaystyle \log ^{(-n)}(0)=\lim_{t\to 0} \, \frac{\cos (n \pi ) S_{n+1}^{(2)} t^n}{(n!)^2}+\lim_{t\to 0} \, \frac{t^n \log (t)}{n!} $

$ \displaystyle \log ^{(-n)}(0)=0+0 $

$ \displaystyle \log ^{(-(n+1))}(0)=0 $

Substituting,

$ \displaystyle \int_0^t \log ^{(-n)}(u) \, du=\log ^{(-(n+1))}(t) $

Evaluate the second integral.

$ \displaystyle \frac{\cos (n \pi ) S_{n+1}^{(2)}}{(n!)^2}\int_0^t u^n \, du=\frac{\cos (n \pi ) S_{n+1}^{(2)}}{(n!)^2} \frac{t^{n+1}}{(n+1)} $

Evaluate the third integral.

$ \displaystyle \frac{1}{n!}\int _0^tu^n \log (u)du=-\frac{t^{n+1}}{(n+1)^2 n!}+\frac{t^{n+1} \log (t)}{(n+1)!} $

Assemble the proposition at n+1 equation.

$ \displaystyle \log ^{(-(n+1))}(t)=\frac{\cos (n \pi ) S_{n+1}^{(2)}}{(n!)^2} \frac{t^{n+1}}{(n+1)}-\frac{t^{n+1}}{(n+1)^2 n!}+\frac{t^{n+1} \log (t)}{(n+1)!} $

Now the strategy is to show that the following is true.

$ \displaystyle \frac{\cos ((n+1)\pi ) S_{n+2}^{(2)} t^{n+1}}{((n+1)!)^2}=\frac{\cos (n \pi ) S_{n+1}^{(2)}}{(n!)^2} \frac{t^{n+1}}{(n+1)}-\frac{t^{n+1}}{(n+1)^2 n!} $

Simplify the preceding equation.

$ \displaystyle \frac{\cos ((n+1)\pi ) S_{n+2}^{(2)} t^{n+1}}{((n+1)!)^2}=\frac{\cos (n \pi ) S_{n+1}^{(2)}}{(n!)^2} \frac{(n+1) t^{n+1}}{(n+1)^2}-\frac{n! t^{n+1}}{(n+1)^2 (n!)^2} $

$ \displaystyle -\cos (n \pi ) S_{n+2}^{(2)}=\cos (n \pi ) S_{n+1}^{(2)} (n+1)-n! $

$ \displaystyle n! \cos (n \pi )= (n+1) S_{n+1}^{(2)}+S_{n+2}^{(2)} $

Utilize the following identities from the Digital Library of Mathematical Functions.

  • (1) $ \displaystyle \quad S_n^{(1)}=(-1)^{n-1} (n-1)!$
  • (2) $ \displaystyle \quad S_n^{(k)}=S_{n-1}^{(k-1)}-(n-1) S_{n-1}^{(k)}$

Shift and apply the first identity.

$ \displaystyle n=n+1 $

$ \displaystyle S_{n+1}^{(1)}=n! \cos (n \pi ) $

$ \displaystyle S_{n+1}^{(1)}=(n+1) S_{n+1}^{(2)}+S_{n+2}^{(2)} $

Shift, rearrange, and compare the second identity..

$ \displaystyle n=n+2 $

$ \displaystyle S_{n+2}^{(k)}=S_{n+1}^{(k-1)}-(n+1) S_{n+1}^{(k)} $

$ \displaystyle S_{n+1}^{(k-1)}=(n+1) S_{n+1}^{(k)}+S_{n+2}^{(k)} $

The proposition at n+1 is equivalent to the preceding identity with the variable k=2. Therefore, the proposition at n+1 is true. $ \displaystyle \Box $

Quite possibly for the first time in human history, we are now able to gaze upon the googolplexth antiderivative of the natural logarithm:)

$$ \displaystyle \frac{t^{10^{10^{100}}}}{\left(10^{10^{100}}!\right)^2} \left(10^{10^{100}}! \log (t)+S_{10^{10^{100}}+1}^{(2)} \cos \left(\pi 10^{10^{100}}\right)\right)+C $$

History: It's odd! I must have looked at this problem a zillion times before and never saw it. But this time the solution just fell out. I generated the following repeated integration table.

$ t^k \log (t)\\ \frac{t^{k+1} \log (t)}{k+1}-\frac{t^{k+1}}{(k+1)^2}\\ \frac{t^{k+2} \log (t)}{k^2+3 k+2}-\frac{(2 k+3) t^{k+2}}{(k+1)^2 (k+2)^2}\\ \frac{t^{k+3} \log (t)}{k^3+6 k^2+11 k+6}-\frac{\left(3 k^2+12 k+11\right) t^{k+3}}{(k+1)^2 (k+2)^2 (k+3)^2}\\ \frac{t^{k+4} \log (t)}{(k+1) (k+2) (k+3) (k+4)}-\frac{2 \left(2 k^3+15 k^2+35 k+25\right) t^{k+4}}{(k+1)^2 (k+2)^2 (k+3)^2 (k+4)^2}\\ \frac{t^{k+5} \log (t)}{(k+1) (k+2) (k+3) (k+4) (k+5)}-\frac{\left(5 k^4+60 k^3+255 k^2+450 k+274\right) t^{k+5}}{(k+1)^2 (k+2)^2 (k+3)^2 (k+4)^2 (k+5)^2}\\ \frac{t^{k+6} \log (t)}{(k+1) (k+2) (k+3) (k+4) (k+5) (k+6)}-\frac{\left(6 k^5+105 k^4+700 k^3+2205 k^2+3248 k+1764\right) t^{k+6}}{(k+1)^2 (k+2)^2 (k+3)^2 (k+4)^2 (k+5)^2 (k+6)^2}\\ \frac{t^{k+7} \log (t)}{(k+1) (k+2) (k+3) (k+4) (k+5) (k+6) (k+7)}-\frac{\left(7 k^6+168 k^5+1610 k^4+7840 k^3+20307 k^2+26264 k+13068\right) t^{k+7}}{(k+1)^2 (k+2)^2 (k+3)^2 (k+4)^2 (k+5)^2 (k+6)^2 (k+7)^2} $

I wondered if the Online Encyclopedia of Integer Sequences had any information on the following. $ \displaystyle \{7,168,1610,7840,20307,26264,13068\} $

At oeis.org/A196837 I found a formula for a Stirling Triangle. It was all downhill form there. I figured out a formula for the constant coefficient terms and let k goto zero.

In conclusion, here is a table of the first seven antiderivatives of the natural logarithm. $ \displaystyle \begin{array}{ll} \text{n} & \text{antiderivative} \\ \hline 0 & \log (t) \\ 1 & t (\log (t)-1) \\ 2 & t^2 \left(\frac{\log (t)}{2}-\frac{3}{4}\right) \\ 3 & t^3 \left(\frac{\log (t)}{6}-\frac{11}{36}\right) \\ 4 & t^4 \left(\frac{\log (t)}{24}-\frac{25}{288}\right) \\ 5 & t^5 \left(\frac{\log (t)}{120}-\frac{137}{7200}\right) \\ 6 & t^6 \left(\frac{\log (t)}{720}-\frac{49}{14400}\right) \\ 7 & t^7 \left(\frac{\log (t)}{5040}-\frac{121}{235200}\right) \end{array} $

Peace

Solution 5:

The $n^{th}$ integration of $ln(x)$ from $x$ to $1$ is equal to $\frac{x^{n}}{n!}(ln(x)-H_n)+\sum_{k=1}^{n}\frac{H_{n+k-1}}{(n+k-1)!}*\frac{x-1}{(k-1)!}.$

Where $H_{n}$ is the $n^{th}$ harmonic number.

The $x-1$ terms suggest that there is a function whose value at $1$ equals $\frac{H_{n}}{n!}$, derivative at $1=\frac{H_{n-1}}{(n-1)!}$, second derivative at $1=\frac{H_{n-2}}{(n-2)!}$,... ect. This is because the sum resembles the Taylor expansion at $a=1.$ Very interesting.