# List of integrals of logarithmic functions

The following is a list of integrals (antiderivative functions) of logarithmic functions. For a complete list of integral functions, see list of integrals.

Note: x>0 is assumed throughout this article, and the constant of integration is omitted for simplicity.

## Integrals involving only logarithmic functions

${\displaystyle \int \log _{a}x\;dx={\frac {x\ln x-x}{\ln a}}}$
${\displaystyle \int \ln ax\;dx=x\ln ax-x}$
${\displaystyle \int \ln(ax+b)\;dx={\frac {(ax+b)\ln(ax+b)-ax}{a}}}$
${\displaystyle \int (\ln x)^{2}\;dx=x(\ln x)^{2}-2x\ln x+2x}$
${\displaystyle \int (\ln x)^{n}\;dx=x\sum _{k=0}^{n}(-1)^{n-k}{\frac {n!}{k!}}(\ln x)^{k}=\Theta (x(\ln x)^{n})}$
${\displaystyle \int {\frac {dx}{\ln x}}=\ln |\ln x|+\ln x+\sum _{k=2}^{\infty }{\frac {(\ln x)^{k}}{k\cdot k!}}}$
${\displaystyle \int {\frac {dx}{\ln x}}={\text{li}}(x)}$ = the logarithmic integral (asymptotically, ${\displaystyle {\text{li}}(x)=\Theta ({\frac {x}{\ln x}})}$).
${\displaystyle \int {\frac {dx}{(\ln x)^{n}}}=-{\frac {x}{(n-1)(\ln x)^{n-1}}}+{\frac {1}{n-1}}\int {\frac {dx}{(\ln x)^{n-1}}}\qquad {\mbox{(for }}n\neq 1{\mbox{)}}}$

## Integrals involving logarithmic and power functions

${\displaystyle \int x^{m}\ln x\;dx=x^{m+1}\left({\frac {\ln x}{m+1}}-{\frac {1}{(m+1)^{2}}}\right)\qquad {\mbox{(for }}m\neq -1{\mbox{)}}}$
${\displaystyle \int x^{m}(\ln x)^{n}\;dx={\frac {x^{m+1}(\ln x)^{n}}{m+1}}-{\frac {n}{m+1}}\int x^{m}(\ln x)^{n-1}dx\qquad {\mbox{(for }}m\neq -1{\mbox{)}}}$
${\displaystyle \int {\frac {(\ln x)^{n}\;dx}{x}}={\frac {(\ln x)^{n+1}}{n+1}}\qquad {\mbox{(for }}n\neq -1{\mbox{)}}}$
${\displaystyle \int {\frac {\ln {x^{n}}\;dx}{x}}={\frac {(\ln {x^{n}})^{2}}{2n}}\qquad {\mbox{(for }}n\neq 0{\mbox{)}}}$
${\displaystyle \int {\frac {\ln x\,dx}{x^{m}}}=-{\frac {\ln x}{(m-1)x^{m-1}}}-{\frac {1}{(m-1)^{2}x^{m-1}}}\qquad {\mbox{(for }}m\neq 1{\mbox{)}}}$
${\displaystyle \int {\frac {(\ln x)^{n}\;dx}{x^{m}}}=-{\frac {(\ln x)^{n}}{(m-1)x^{m-1}}}+{\frac {n}{m-1}}\int {\frac {(\ln x)^{n-1}dx}{x^{m}}}\qquad {\mbox{(for }}m\neq 1{\mbox{)}}}$
${\displaystyle \int {\frac {x^{m}\;dx}{(\ln x)^{n}}}=-{\frac {x^{m+1}}{(n-1)(\ln x)^{n-1}}}+{\frac {m+1}{n-1}}\int {\frac {x^{m}dx}{(\ln x)^{n-1}}}\qquad {\mbox{(for }}n\neq 1{\mbox{)}}}$
${\displaystyle \int {\frac {dx}{x\ln x}}=\ln \left|\ln x\right|}$
${\displaystyle \int {\frac {dx}{x\ln x\ln \ln x}}=\ln \left|\ln \left|\ln x\right|\right|}$, etc.
${\displaystyle \int {\frac {dx}{x\ln \ln x}}={\text{li}}(\ln x)}$ where li is the logarithmic integral.
${\displaystyle \int {\frac {dx}{x^{n}\ln x}}=\ln \left|\ln x\right|+\sum _{k=1}^{\infty }(-1)^{k}{\frac {(n-1)^{k}(\ln x)^{k}}{k\cdot k!}}}$
${\displaystyle \int {\frac {dx}{x(\ln x)^{n}}}=-{\frac {1}{(n-1)(\ln x)^{n-1}}}\qquad {\mbox{(for }}n\neq 1{\mbox{)}}}$
${\displaystyle \int \ln(x^{2}+a^{2})\;dx=x\ln(x^{2}+a^{2})-2x+2a\tan ^{-1}{\frac {x}{a}}}$
${\displaystyle \int {\frac {x}{x^{2}+a^{2}}}\ln(x^{2}+a^{2})\;dx={\frac {1}{4}}\ln ^{2}(x^{2}+a^{2})}$

## Integrals involving logarithmic and trigonometric functions

${\displaystyle \int \sin(\ln x)\;dx={\frac {x}{2}}(\sin(\ln x)-\cos(\ln x))}$
${\displaystyle \int \cos(\ln x)\;dx={\frac {x}{2}}(\sin(\ln x)+\cos(\ln x))}$

## Integrals involving logarithmic and exponential functions

${\displaystyle \int e^{x}\left(x\ln x-x-{\frac {1}{x}}\right)\;dx=e^{x}(x\ln x-x-\ln x)}$
${\displaystyle \int {\frac {1}{e^{x}}}\left({\frac {1}{x}}-\ln x\right)\;dx={\frac {\ln x}{e^{x}}}}$
${\displaystyle \int e^{x}\left({\frac {1}{\ln x}}-{\frac {1}{x\ln ^{2}x}}\right)\;dx={\frac {e^{x}}{\ln x}}}$

## n consecutive integrations

For ${\displaystyle n}$ consecutive integrations, the formula

${\displaystyle \int \ln x\;dx=x\;(\ln x-1)+C_{0}}$

generalizes to

${\displaystyle \int \cdot \cdot \cdot \int \ln x\;dx\cdot \cdot \cdot \;dx={\frac {x^{n}}{n!}}\left(\ln \,x-\sum _{k=1}^{n}{\frac {1}{k}}\right)+\sum _{k=0}^{n-1}C_{k}{\frac {x^{k}}{k!}}}$