# Does the repeated intergral of $\ln x$ have a pattern?

I was reminiscing with a friend and we remembered a question asked to us in our high school calculus class.

Find an expression for the $n^{\text{th}}$ derivative and the $n^{\text{th}}$ integral of $\ln x$ (ignoring integration constants$^1$).

The first part is easy:

$$f(x) = \ln x$$ $$f'(x) = \frac{1}{x}$$ $$f''(x) = -\frac{1}{x^2}$$ $$f'''(x) = \frac{2}{x^3}$$ $$\vdots$$ $$f^{(n)}(x) = \frac{(-1)^{n-1}\cdot(n-1)!}{x^n}$$

The second part seems to have no pattern:

$$f(x) = \ln x$$ $$\int f(x)\ dx = x\ln x - x$$ $$\iint f(x) \ dx^2 = \frac12x^2\ln x - \frac34x^2$$ $$\iiint f(x) \ dx^3 = \frac16x^3\ln x - \frac{11}{36}x^3$$ $$\vdots$$

It looks like the answer is something like:

$$f^{(-n)}(x) = \frac{1}{n!}x^n\ln x - \ ?x^n$$

From the looks of it, I think the question boils down to finding a general term for:

$$\int x^n \ln x \ dx$$

And then also trying to figure out what pattern the coefficients $?$ take.

$^1$As user Semiclassical points out, this is just equivalent to computing successive antiderivatives of:

$$\int_0^x f(t) \ dt$$

• To get rid of the integration constants, you can consider successively computing the antiderivative $\int_0^x f(t)\,dt$. – Semiclassical Jun 15 '16 at 15:01
• In fact, I think the question was posed such that we were supposed to ignore integration constants. I'll edit that in, thanks! (: – anonymouse Jun 15 '16 at 15:02
• – Rahul Jun 15 '16 at 15:04
• @nospoon: please include this as answer. – Cheerful Parsnip Jun 15 '16 at 15:47
• A related question. – J. M. is a poor mathematician Jun 16 '16 at 0:32

I guess @GrumpyParsnip is right, I should refrain from answering questions in the comments.

Here is what i wrote in the comment.

Yes, it has a pattern. I brightly remember reading that on some Wikipedia page, but for the life of me, I can't find the source (hence i write this as a comment). So here's the answer: Define $$f_n(x)=\frac{x^n}{n!}(\ln x- H_n).$$ Then by differentiation we find that $$\frac{d}{dx} f_n(x)=f_{n-1}(x)$$, and since $f_0(x)=\ln x$, this answers your question.

• Wow, I was not going to notice the $\frac{H_n}{n!}$ pattern. Brownie points for using a method that high-schoolers could possibly think of! – anonymouse Jun 15 '16 at 15:51

As you have established that $$\log^{(-n)}(x)=\frac{x^n}{n!}(\log(x)-c_n),$$ you can find a recurrence for $c_n$:

$$\left(\log^{(-n)}(x)\right)'=\frac{x^{n-1}}{(n-1)!}\log(x)+\frac{x^{n-1}}{n!}(1-nc_n)=\frac{x^{n-1}}{(n-1)!}(\log(x)-c_{n-1}).$$

Hence by identification,

$$c_n=c_{n-1}+\frac1n.$$

• This is a really clever approach, especially since I was so close to figuring out the answer. This provides great intuition for problems of this type, so thanks! (: – anonymouse Jun 15 '16 at 16:51