Integrate $\ln (x)$ without integration by parts

In order to prove $\int \log x \, \mathrm{d}x = x \log x - x + \mathsf{C}$, it suffices to show that

$$ \int_{1}^{x} \log t \, \mathrm{d}t = x \log x - x + 1. $$

We establish this with different methods, avoiding integration by parts technique and 'guessing the antiderivative' strategy.


Method 1. Assume $a \geq 1$. Then by Fubini's theorem,

\begin{align*} \int_{1}^{a} \log x \, \mathrm{d}x &= \int_{1}^{a} \int_{1}^{x} \frac{1}{t} \, \mathrm{d}t\mathrm{d}x \\ &= \int_{1}^{a} \int_{t}^{a} \frac{1}{t} \, \mathrm{d}x\mathrm{d}t \\ &= \int_{1}^{a} \left( \frac{a}{t} - 1 \right) \, \mathrm{d}t \\ &= a \log a - a + 1 \end{align*}

Similar computation shows that the above result continues to hold for $0 < a < 1$.

(In reality, however, this computation still bears the flavor of integration-by-parts technique.)


Method 2. (Regularizing) It can be shown that $(x^{\epsilon} - 1)/\epsilon$ converges uniformly to $\log x$ as $\epsilon \to 0^+$ on any compact subset of $(0, \infty)$. Then

$$ \int_{1}^{x} \log t \, \mathrm{d}t = \lim_{\epsilon \to 0^+} \int_{1}^{x} \frac{t^{\epsilon} - 1}{\epsilon} \, \mathrm{d}t = \lim_{\epsilon \to 0^+} \left( \frac{x^{\epsilon+1}-1}{\epsilon(\epsilon+1)} - \frac{x-1}{\epsilon} \right) = x\log x - x + 1. $$


Method 3. (Solving functional equation) Define the function $f : (0, \infty) \to \mathbb{R}$ by $f(x) = \int_{1}^{x} \log t \, \mathrm{d}t$. Then for $a, b > 0$,

\begin{align*} f(ab) &= \int_{1}^{a} \log t \, \mathrm{d}t + \int_{a}^{ab} \log t \, \mathrm{d}t \\ &= \int_{1}^{a} \log t \, \mathrm{d}t + \int_{1}^{b} a \log (as) \, \mathrm{d}s \tag{$t = as$}\\ &= f(a) + a(b-1) \log a + a f(b). \end{align*}

By switching the role of $a$ and $b$, we also get $f(ab) = f(b) + b(a-1)\log b + bf(a)$, and so,

$$ f(a) + a(b-1)\log a + af(b) = f(b) + b(a-1)\log b + b f(a). $$

Rearranging the identity, for $a, b \neq 1$ we get

$$ \frac{f(a) - a\log a}{a-1} = \frac{f(b) - b\log b}{b-1}. $$

The right-hand side can be further simplified, using $f(1) = 0$ あand $\log 1 = 0$, as

$$ = \frac{f(b) - f(1)}{b-1} - \frac{\log b - \log 1}{b-1} - \log b. $$

Together with $f'(1) = \log 1 = 0$ and $(\log x)'|_{x=1} = 1$, this converges to $-1$ as $b \to 1$. So it follows that

$$ f(a) = a \log a - (a - 1). $$


Compute it via the Riemann sums over the subdivision $x_k=aq^k$ with $x_N=aq^N=b$. Then \begin{align} \int_a^b\ln(x)dx=\lim_{N\to\infty}\sum_{n=0}^{N-1}(\ln(a)+n\ln(q))aq^n(q-1) \end{align} and using the sum formulas for geometric sums $\sum_{n=0}^{N-1}q^n=\frac{q^N-1}{q-1}$ and $\sum_{n=0}^{N-1}nq^n=\frac{q-Nq^N+(N-1)q^{N+1}}{(q-1)^2}$ we get \begin{align} \sum_{n=0}^{N-1}(\ln(a)+n\ln(q))aq^n(q-1) &=a(q^N-1)\ln(a)+a\frac{q-Nq^N+(N-1)q^{N+1}}{q-1}\ln(q) \\ &=(b-a)\ln(a)+\frac{qa-Nb+(N-1)qb}{q-1}\ln(q) \\ &=b(\ln(a)+N\ln(q))-a\ln(a)+\frac{q(a-b)}{q-1}\ln(q) \\ &=b\ln(b)-a\ln(a)-q(b-a)\frac{\ln(q)-\ln(1)}{q-1} \end{align}

Now for $N\to\infty$ we get $q\to 1$ and thus $\ln(q)\to0$, and in the last term the difference quotient converges to the derivative $1$ in $q=1$, so that $$ \int_a^b\ln(x)\,dx=b\ln(b)-a\ln(a)-(b-a) $$ remains.


Graph $y=\ln x$. The area under the curve from $x=1$ to $x=x_0$ is an anti-derivative of $\ln x_0$.

Make the rectangle with base on the $x$-axis from $x=0$ to $x=x_0$ and height equal to $\ln x_0$. The area you want is $x_0 \ln x_0$ minus the area above the curve and inside the rectangle. That is:

$$\int_1^{x_0} \ln x \; dx = x_0\ln x_0 - \int_0^{\ln x_0} e^y \; dy.$$