[Math] Integrate $\ln (x)$ without integration by parts

calculusindefinite-integralsintegration

I know with integration by parts the answer is $x\ln(x) – x$ but I was wondering how to do this without integration by parts.

Best Answer

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

Related Question