The natural logarithm allows simple
integration of functions of the form g(x) = \frac{f'(x)}{f(x)}: an
antiderivative of is given by \ln (|f(x)|). This is the case because of the
chain rule and the following fact: \frac{d}{dx}\ln \left| x \right| = \frac{1}{x}, \ \ x \ne 0 In other words, when integrating over an interval of the real line that does not include x=0, then \int \frac{1}{x} \,dx = \ln|x| + C where is an
arbitrary constant of integration. Likewise, when the integral is over an interval where f(x) \ne 0, :\int { \frac{f'(x)}{f(x)}\,dx} = \ln|f(x)| + C. For example, consider the integral of \tan (x) over an interval that does not include points where \tan (x) is infinite: \int \tan x \,dx = \int \frac{\sin x}{\cos x} \,dx = -\int \frac{\frac{d}{dx} \cos x}{\cos x} \,dx = -\ln \left| \cos x \right| + C = \ln \left| \sec x \right| + C. The natural logarithm can be integrated using
integration by parts: \int \ln x \,dx = x \ln x - x + C. Let: u = \ln x \Rightarrow du = \frac{dx}{x} dv = dx \Rightarrow v = x then: \begin{align} \int \ln x \,dx & = x \ln x - \int \frac{x}{x} \,dx \\ & = x \ln x - \int 1 \,dx \\ & = x \ln x - x + C \end{align} ==Efficient computation== For \ln (x) where , the closer the value of is to 1, the faster the rate of convergence of its Taylor series centered at 1. The identities associated with the logarithm can be leveraged to exploit this: \begin{align} \ln 123.456 &= \ln(1.23456 \cdot 10^2)\\ &= \ln 1.23456 + \ln(10^2)\\ &= \ln 1.23456 + 2 \ln 10\\ &\approx \ln 1.23456 + 2 \cdot 2.3025851. \end{align} Such techniques were used before calculators, by referring to numerical tables and performing manipulations such as those above.
Natural logarithm of 10 The natural logarithm of 10, a transcendental number approximately equal to , plays a role for example in the computation of natural logarithms of numbers represented in
scientific notation, as a
mantissa multiplied by a power of 10: \ln(a\cdot 10^n) = \ln a + n \ln 10. This means that one can effectively calculate the logarithms of numbers with very large or very small
magnitude using the logarithms of a relatively small set of decimals in the range .
High precision To compute the natural logarithm with many digits of precision, the Taylor series approach is not efficient since the convergence is slow. Especially if is near 1, a good alternative is to use
Halley's method or
Newton's method to invert the exponential function, because the series of the exponential function converges more quickly. For finding the value of to give \exp(y)-x=0 using Halley's method, or equivalently to give \exp(y/2) -x \exp(-y/2)=0 using Newton's method, the iteration simplifies to y_{n+1} = y_n + 2 \cdot \frac{ x - \exp ( y_n ) }{ x + \exp ( y_n ) } which has
cubic convergence to \ln (x). Another alternative for extremely high precision calculation is the formula \ln x \approx \frac{\pi}{2 M(1,4/s)} - m \ln 2, where denotes the
arithmetic-geometric mean of 1 and , and s = x 2^m > 2^{p/2}, with chosen so that bits of precision is attained. (For most purposes, the value of 8 for is sufficient.) In fact, if this method is used, Newton inversion of the natural logarithm may conversely be used to calculate the exponential function efficiently. (The constants \ln 2 and pi| can be pre-computed to the desired precision using any of several known quickly converging series.) Or, the following formula can be used: \ln x = \frac{\pi}{M\left(\theta_2^2(1/x),\theta_3^2(1/x)\right)},\quad x\in (1,\infty) where \theta_2(x) = \sum_{n\in\Z} x^{(n+1/2)^2}, \quad \theta_3(x) = \sum_{n\in\Z} x^{n^2} are the
Jacobi theta functions. Based on a proposal by
William Kahan and first implemented in the
Hewlett-Packard HP-41C calculator in 1979 (referred to under "LN1" in the display, only), some calculators,
operating systems (for example
Berkeley UNIX 4.3BSD or
log1p An identity in terms of the
inverse hyperbolic tangent, \mathrm{log1p}(x) = \log(1+x) = 2 ~ \mathrm{artanh}\left(\frac{x}{2+x}\right)\,, gives a high precision value for small values of on systems that do not implement .
Computational complexity The
computational complexity of computing the natural logarithm using the
arithmetic-geometric mean (for both of the above methods) is \text{O}\bigl(M(n) \ln n \bigr). Here, is the number of digits of precision at which the natural logarithm is to be evaluated, and is the computational complexity of multiplying two -digit numbers. ==Continued fractions==