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$$

  • 1
    $\begingroup$ To get rid of the integration constants, you can consider successively computing the antiderivative $\int_0^x f(t)\,dt$. $\endgroup$ – Semiclassical Jun 15 '16 at 15:01
  • $\begingroup$ In fact, I think the question was posed such that we were supposed to ignore integration constants. I'll edit that in, thanks! (: $\endgroup$ – anonymouse Jun 15 '16 at 15:02
  • 1
    $\begingroup$ See Cauchy's repeated integral formula. $\endgroup$ – Rahul Jun 15 '16 at 15:04
  • 1
    $\begingroup$ @nospoon: please include this as answer. $\endgroup$ – Cheerful Parsnip Jun 15 '16 at 15:47
  • $\begingroup$ A related question. $\endgroup$ – 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.

  • $\begingroup$ 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! $\endgroup$ – 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$:


Hence by identification,


  • 1
    $\begingroup$ 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! (: $\endgroup$ – anonymouse Jun 15 '16 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.