# Integral of Logarithm

## Contents

## Theorem

- $\displaystyle \int \ln x \ \mathrm d x = x \ln x - x + C$

- $\displaystyle \int \log_a x \ \mathrm d x = \frac 1 {\ln a}\left({x \ln x - x}\right) + C$

for $x > 0$.

## Proof

### Base $e$

- $\displaystyle \int \ln x \ \mathrm d x = \int 1 \cdot \ln x \ \mathrm d x$

From Integration by Parts:

- $\displaystyle \int fg' \, \mathrm dx = fg - \int f'g \, \mathrm dx$

Here:

\(\displaystyle f\) | \(=\) | \(\displaystyle \ln x\) | $\quad$ | $\quad$ | |||||||||

\(\displaystyle \implies \ \ \) | \(\displaystyle f'\) | \(=\) | \(\displaystyle \frac 1 x\) | $\quad$ Derivative of Natural Logarithm Function | $\quad$ | ||||||||

\(\displaystyle g'\) | \(=\) | \(\displaystyle 1\) | $\quad$ | $\quad$ | |||||||||

\(\displaystyle \implies \ \ \) | \(\displaystyle g\) | \(=\) | \(\displaystyle x\) | $\quad$ Integral of Constant | $\quad$ |

So:

\(\displaystyle \int \ln x \ \mathrm d x\) | \(=\) | \(\displaystyle x \cdot \ln x -\int x \cdot \frac 1 x \ \mathrm dx\) | $\quad$ | $\quad$ | |||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle x \ln x - x + C\) | $\quad$ | $\quad$ |

$\blacksquare$

### Base $a$

Follows from Linear Combination of Integrals and Linear Operator on General Logarithm.

$\blacksquare$