# Solving $\int_0^1(\ln x)^{2024}dx$ [duplicate]

Evaluate
$$I=\int_0^1(\ln x)^{2024}dx$$

I solved this by finding a pattern with "Integration By Parts" but ran into a few issues with the lower bound being $$0$$.

After doing "Integration By Parts" a few times I was left with: $$I=-(2024)(2023)(2022)\int_0^1(\ln x)^{2021}dx$$ $$I=-2024!\int_0^1\ln x\,dx=2024![x]_0^1=2024!$$

I left out some steps but in the end, it boils down to $$2024!$$ which seems like the intended solution as this is a 2024 competition problem.

My confusion lies in the $$0$$ in the lower bound. The function isn't even defined at $$0$$ so how can it be on the lower bound? Is it implied that it means the limit as $$x$$ approaches $$0$$? Also, the simplification requires you to call $$\ln(0)=0$$ which I know is technically not correct.

Is this a poorly written problem or is my fundamental knowledge in definite integrals lackluster?

If what you said is right and: $$I(a)=\int_0^1 \ln^a(x) dx\implies I(a)=-aI(a-1)$$ Just becomes a recurrence relationship: $$I(a)={(-1)^n}n!\binom{a}{n} I(a-n)\implies I(a)=(-1)^a a! I(0)$$ And since $$I(0)=1$$: $$I(a)=(-1)^aa!$$ In your case: $$I(2024)=2024!$$

The function isn't even defined at $$0$$ so how can it be on the lower bound? Is it implied that it means the limit as $$x$$ approaches $$0$$?

Yup, exactly. More broadly, if $$f$$ has a "problem point" at $$a$$ (say, a singularity or discontinuity), then $$\int_a^b f(x) \, \mathrm{d}x \stackrel{\text{def.}}{=} \lim_{t \to a} \int_t^b f(x) \, \mathrm{d}x$$ and similar if $$b$$ is the problem point. If there is some middle point $$c$$ that's a problem, then you instead break it up into two integrals at that point, say \begin{align*} \int_a^b f(x) \, \mathrm{d}x &= \int_a^c f(x) \, \mathrm{d}x + \int_c^b f(x) \, \mathrm{d}x \\ &= \lim_{t \to c} \int_a^t f(x) \, \mathrm{d}x + \lim_{s \to c} \int_s^b f(x) \, \mathrm{d}x \end{align*} Some more notes on these so-called "improper integrals" can be found in various places online (e.g. Paul's Online Math Notes).

Also, the simplification requires you to call $$\ln(0)=0$$ which I know is technically not correct.

So, it's hard to determine where that issue arises without seeing your calculation explicitly. But I calculated a integration by parts by hand, and I think I know where the confusion might arise.

So, for my pleasantry, let instead $$\newcommand{\II}{\mathcal{I}} \newcommand{\dd}{\mathrm{d}} \mathcal{I}_n := \int_0^1 \ln^n x \, \dd x$$ Note that you seek $$\II_{2024}$$. Rewrite this as $$\II_n = \int_0^1 \ln^{n-1} x \cdot \ln x \, \dd x$$ and then apply integration by parts, wherein $$\ln^{n-1} x$$ ends up differentiated. Then you get (using the tabular method)

and in turn

$$\II_n = x \ln^{n-1} x (\ln x - 1) \bigg|_0^1 - (n-1) \II_{n-1} + (n-1) \II_{n-2}$$

The issue I suspect arises with the evaluation at $$0$$; that is, we want to know: $$\lim_{x \to 0} x \ln^{n-1} x (\ln x - 1)$$ In fact, considering the form of this, we can slightly tweak it anyways and ask instead: for positive integers $$m$$, what is this limit: $$L_m := \lim_{x \to 0} x \ln^m x$$ Well, there are a number of ways to look at this one; perhaps the most basic to a calculus student would be L'Hopital's rule. Note that $$L_m$$ takes a $$0\cdot (-\infty)$$ form, so try this: $$L_m = \lim_{x \to 0} \frac{\ln^m x}{\frac 1 x} \stackrel{\text{LH}}{=} \lim_{x \to 0} \frac{m \ln^{m-1} x \cdot \frac 1 x}{-\frac{1}{x^2}} = - m L_{m-1}$$ Naturally, we can extrapolate this limit as far back as the $$m=1$$ case, so that $$L_m = (-m)(-(m-1))(-(m-2)) \cdots (-2) L_1$$ Then $$L_1 = \lim_{x \to 0} x \ln x = \lim_{x \to 0} \frac{\ln x}{\frac 1 x} \stackrel{\text{LH}}{=} \lim_{x \to 0} \frac{\frac 1 x}{- \frac{1}{x^2}} = - \lim_{x \to 0} x = 0$$ so $$L_m = 0$$ too for all $$m$$ too.

There is no treating $$\ln(0)$$ as being $$0$$ here, it all just comes down to $$\lim_{x \to 0} x \ln x = 0$$

You have the Integral with the right value.
Your confusion is with the lower bound.

Here are 2 ways to confirm that the lower bound is indeed $$0$$.

## Change of variables :

The Integral of $$\ln x$$ is $$L=x \ln x - x$$ Let us take $$y=1/x$$ , hence $$x=1/y$$ , where $$y$$ goes to $$\infty$$ when $$x$$ goes to $$0$$.
Hence $$L=x [\ln x - 1]=[\ln [1/y] - 1]/[y]$$
That will give us $$L=[\ln [1]-\ln [y] - 1]/[y]=-[\ln [y] + 1]/[y]$$
We know that $$\ln y$$ goes to $$\infty$$ much slower than $$y$$ , hence $$L=0$$ at $$\infty$$.

## Limit :

The Integral of $$\ln x$$ is $$L=x \ln x - x$$
Let us make it $$L=x [\ln x - 1]=[\ln x - 1]/[1/x]$$ which is Indeterminate at $$x=0$$.
Since it is $$\infty/\infty$$ , we can use LH Rule.
Differentiate Numerator & Denominator to get :
$$L=[1/x]/[-1/x^2]=-[x^2]/[x]=-[x]$$
Hence limit is $$0$$ at $$x=0$$

## SUMMARY :

Which-ever way we calculate , the lower bound is indeed $$0$$.
Same thinking gives the Same limits when you are trying the Integration By Parts.
The Integral value you have is totally right.

• Could the downvoter tell me where this answer is wrong ??
– Prem
Commented Jul 22 at 4:34

$$I=\int_0^1\ln^{2024}x\,dx$$ is an improper integral, since the integrand function $$\ln^{2024}x$$ is defined and continuous on $$(0,1]$$ but not on $$[0,1]$$. Its value is defined by $$\lim_{\epsilon\to0^+}\int_{\epsilon}^1\ln^{2024}xdx.$$ After IBP, to complete the induction and computation, we need to show that the limits $$\lim_{\epsilon\to0^+}\epsilon\ln^k\epsilon$$ are zero. The L'Hospital rule can be used. Or, by $$\epsilon=e^{-t}$$ substitution, we can evaluate it by the Squeeze theorem: $$0\leq\lim_{t\to\infty}\frac{t^k}{e^t}\leq\lim_{t\to\infty}\frac{t^k}{t^{k+1}}=0$$ since we know that $$\exists M$$ such that $$e^t>t^{k+1}$$ for $$t>M.$$