The natural logarithm of a number is its

/ref> or log1p to give more accurate results for logarithms close to zero by passing arguments ''x'', also close to zero, to a function log1p(''x''), which returns the value ln(1+''x''), instead of passing a value ''y'' close to 1 to a function returning ln(''y''). The function log1p avoids in the floating point arithmetic a near cancelling of the absolute term 1 with the second term from the Taylor expansion of the ln. This keeps the argument, the result, and intermediate steps all close to zero where they can be most accurately represented as floating-point numbers. In addition to base the

^{3} × 1.024, the ^{10} × 1.024^{3}, even the natural logarithm of 10 can be computed similarly as:
: $\backslash begin\; \backslash ln\; 10\; \&\; =\; 10\; \backslash ln\backslash left(1+\backslash frac\backslash right)\; +\; 3\backslash ln\backslash left(1+\backslash frac\backslash right)\; \backslash \backslash $

principal branch In mathematics, a principal branch is a function which selects one branch point, branch ("slice") of a multi-valued function. Most often, this applies to functions defined on the complex plane.
Examples
Trigonometric inverses
Principal bran ...

)">
Image:NaturalLogarithmRe.png,
Image:NaturalLogarithmImAbs.png,
Image:NaturalLogarithmAbs.png,
Image:NaturalLogarithmAll.png, Superposition of the previous three graphs
logarithm
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no ...

to the base
Base or BASE may refer to:
Brands and enterprises
* Base (mobile telephony provider), a Belgian mobile telecommunications operator
*Base CRM
Base CRM (originally Future Simple or PipeJump) is an enterprise software company based in Mountain Vie ...

of the mathematical constant
A mathematical constant is a key whose value is fixed by an unambiguous definition, often referred to by a symbol (e.g., an ), or by mathematicians' names to facilitate using it across multiple s. Constants arise in many areas of , with constan ...

, which is an irrational
Irrationality is cognition
Cognition () refers to "the mental action or process of acquiring knowledge and understanding through thought, experience, and the senses". It encompasses many aspects of intellectual functions and processes such as: ...

and transcendental number approximately equal to . The natural logarithm of is generally written as , , or sometimes, if the base is implicit, simply . Parentheses
A bracket is either of two tall fore- or back-facing punctuation
Punctuation (or sometimes interpunction) is the use of spacing, conventional signs (called punctuation marks), and certain typographical devices as aids to the understanding ...

are sometimes added for clarity, giving , , or . This is done particularly when the argument to the logarithm is not a single symbol, so as to prevent ambiguity.
The natural logarithm of is the power
Power typically refers to:
* Power (physics)
In physics, power is the amount of energy transferred or converted per unit time. In the International System of Units, the unit of power is the watt, equal to one joule per second. In older works, p ...

to which would have to be raised to equal . For example, is , because . The natural logarithm of itself, , is , because , while the natural logarithm of is , since .
The natural logarithm can be defined for any positive real number
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no g ...

as the area under the curve
In mathematics, an integral assigns numbers to functions in a way that describes displacement, area, volume, and other concepts that arise by combining infinitesimal data. The process of finding integrals is called integration. Along with Deriv ...

from to (with the area being negative when ). The simplicity of this definition, which is matched in many other formulas involving the natural logarithm, leads to the term "natural". The definition of the natural logarithm can then be extended to give logarithm values for negative numbers and for all non-zero complex number
In mathematics, a complex number is an element of a number system that contains the real numbers and a specific element denoted , called the imaginary unit, and satisfying the equation . Moreover, every complex number can be expressed in the for ...

s, although this leads to a multi-valued function
In mathematics, a multivalued function, also called multifunction, many-valued function, set-valued function, is similar to a function (mathematics), function, but may associate several values to each input. More precisely, a multivalued functio ...

: see Complex logarithm
of the color is used to show the ''arg
Arg or ARG may refer to:
Places
*''Arg'' () means "citadel" in Persian, and may refer to:
**Arg, Iran, a village in Fars Province, Iran
**Arg (Kabul), presidential palace in Kabul, Afghanistan
**Arg, South ...

for more.
The natural logarithm function, if considered as a real-valued function
Mass measured in grams is a function from this collection of weight to positive number">positive
Positive is a property of Positivity (disambiguation), positivity and may refer to:
Mathematics and science
* Converging lens or positive lens, i ...

of a real variable, is the inverse function
In mathematics, the inverse function of a Function (mathematics), function (also called the inverse of ) is a function (mathematics), function that undoes the operation of . The inverse of exists if and only if is Bijection, bijective, and i ...

of the exponential function
The exponential function is a mathematical function
Function or functionality may refer to:
Computing
* Function key
A function key is a key on a computer
A computer is a machine that can be programmed to carry out sequences of ...

, leading to the identities:
:$\backslash begin\; e^\; \&=\; x\; \backslash qquad\; \backslash text\; x\; \backslash text,\; \backslash \backslash \; \backslash ln\; e^x\; \&=\; x\; \backslash qquad\; \backslash text\; x\; \backslash text\; \backslash end$
Like all logarithms, the natural logarithm maps multiplication of positive numbers into addition:
:$\backslash ln(\; x\; \backslash cdot\; y\; )\; =\; \backslash ln\; x\; +\; \backslash ln\; y~.$
Logarithms can be defined for any positive base other than 1, not only . However, logarithms in other bases differ only by a constant multiplier from the natural logarithm, and can be defined in terms of the latter. For instance, the base-2 logarithm (also called the binary logarithm
In , the binary logarithm () is the to which the number must be to obtain the value . That is, for any real number ,
:x=\log_2 n \quad\Longleftrightarrow\quad 2^x=n.
For example, the binary logarithm of is , the binary logarithm of is ...

) is equal to the natural logarithm divided by , the natural logarithm of 2The decimal value of the natural logarithm
The natural logarithm of a number is its logarithm to the base of the mathematical constant
A mathematical constant is a key number
A number is a mathematical object used to counting, count, mea ...

, or equivalently, multiplied by .
Logarithms are useful for solving equations in which the unknown appears as the exponent of some other quantity. For example, logarithms are used to solve for the half-life
Half-life (symbol ''t''1⁄2) is the time required for a quantity to reduce to half of its initial value. The term is commonly used in nuclear physics
Nuclear physics is the field of physics
Physics is the natural science that studies ...

, decay constant, or unknown time in exponential decay
Image:Plot-exponential-decay.svg, upright=1.5, A quantity undergoing exponential decay. Larger decay constants make the quantity vanish much more rapidly. This plot shows decay for decay constant (λ) of 25, 5, 1, 1/5, and 1/25 for x from 0 to 5.
A ...

problems. They are important in many branches of mathematics and scientific disciplines, and are used to solve problems involving compound interest
Compound interest is the addition of interest
Interest, in finance and economics, is payment from a debtor, borrower or deposit-taking financial institution to a lender or depositor of an amount above repayment of the principal sum (that is, ...

.
History

The concept of the natural logarithm was worked out by Gregoire de Saint-Vincent andAlphonse Antonio de Sarasa
Alphonse Antonio de Sarasa was a Jesuit mathematician
A mathematician is someone who uses an extensive knowledge of mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mat ...

before 1649. Their work involved quadrature of the hyperbola
In mathematics, a hyperbola () (adjective form hyperbolic, ) (plural ''hyperbolas'', or ''hyperbolae'' ()) is a type of smooth function, smooth plane curve, curve lying in a plane, defined by its geometric properties or by equations for which it ...

with equation , by determination of the area of hyperbolic sector
A hyperbolic sector is a region of the Cartesian plane bounded by rays from the origin to two points (''a'', 1/''a'') and (''b'', 1/''b'') and by the Hyperbola#Rectangular hyperbola, rectangular hyperbola ''xy'' = 1 (or the corresponding region ...

s. Their solution generated the requisite "hyperbolic logarithm" function
Function or functionality may refer to:
Computing
* Function key
A function key is a key on a computer
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...

, which had the properties now associated with the natural logarithm.
An early mention of the natural logarithm was by Nicholas Mercator
Nicholas (Nikolaus) Mercator (c. 1620, Holstein – 1687, Versailles (city), Versailles), also known by his German language, German name Kauffmann, was a 17th-century mathematician.
He was born in Eutin, Schleswig-Holstein, Germany and educated at ...

in his work ''Logarithmotechnia'', published in 1668, although the mathematics teacher John Speidell had already compiled a table of what in fact were effectively natural logarithms in 1619. It has been said that Speidell's logarithms were to the base , but this is not entirely true due to complications with the values being expressed as integers.
Notational conventions

The notations and both refer unambiguously to the natural logarithm of , and without an explicit base may also refer to the natural logarithm. This usage is common in mathematics, along with some scientific contexts as well as in manyprogramming language
A programming language is a formal language
In logic, mathematics, computer science, and linguistics, a formal language consists of string (computer science), words whose symbol (formal), letters are taken from an alphabet (computer science) ...

s.Including C, C++
C++ () is a general-purpose programming language
In computer software, a general-purpose programming language is a programming language dedicated to a general-purpose, designed to be used for writing software in a wide variety of application ...

, SAS, MATLAB
MATLAB (an abbreviation of "MATrix LABoratory") is a and environment developed by . MATLAB allows manipulations, plotting of and data, implementation of s, creation of s, and interfacing with programs written in other languages.
Althoug ...

, Mathematica
Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning, statistics, Computer algebra, symbolic computation, manipulating Matrix (mathematics), matrices, plotting Fun ...

, Fortran
Fortran (; formerly FORTRAN) is a general-purpose, compiled language, compiled imperative programming, imperative programming language that is especially suited to numerical analysis, numeric computation and computational science, scientific com ...

, and some BASIC
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming language
In computer science
Computer science deals with the theoretical foundations of information, algorithms and the ar ...

dialects In some other contexts such as chemistry
Chemistry is the scientific
Science () is a systematic enterprise that builds and organizes knowledge
Knowledge is a familiarity or awareness, of someone or something, such as facts
A fact is an occurrence in the real world. T ...

, however, can be used to denote the common (base 10) logarithm. It may also refer to the binary (base 2) logarithm in the context of computer science
Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application.
Computer science is the study of computation, automation, a ...

, particularly in the context of time complexity
In computer science
Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application.
Computer science is the study of com ...

.
Definitions

The natural logarithm can be defined in several equivalent ways.Inverse of exponential

The most general definition is as the inverse function of $e^x$, so that $e^=x$. Because $e^x$ is positive and invertible for any real input $x$, this definition of $\backslash ln(x)$ is well defined for any positive ''x''. For thecomplex numbers
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). I ...

, $e^z$ is not invertible, so $\backslash ln(z)$ is a multivalued function
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

. In order to make $\backslash ln(z)$ a proper, single-output function
Function or functionality may refer to:
Computing
* Function key
A function key is a key on a computer
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...

, we therefore need to restrict it to a particular principal branch In mathematics, a principal branch is a function which selects one branch point, branch ("slice") of a multi-valued function. Most often, this applies to functions defined on the complex plane.
Examples
Trigonometric inverses
Principal bran ...

, often denoted by $\backslash operatorname(z)$. As the inverse function of $e^z$, $\backslash ln(z)$ can be defined by inverting the usual definition of $e^z$:
:$e^z\; =\; \backslash lim\_\backslash left(1+\backslash frac\backslash right)^n$
Doing so yields:
:$\backslash ln(z)\; =\; \backslash lim\_n\backslash cdot\; (\backslash sqrt;\; href="/html/ALL/s/.html"\; ;"title="">$
This definition therefore derives its own principle branch from the principal branch of nth roots.
Integral Definition

The natural logarithm of a positive, real number may be defined as the area under the graph of thehyperbola
In mathematics, a hyperbola () (adjective form hyperbolic, ) (plural ''hyperbolas'', or ''hyperbolae'' ()) is a type of smooth function, smooth plane curve, curve lying in a plane, defined by its geometric properties or by equations for which it ...

with equation between and . This is the integral
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...

:$\backslash ln\; a\; =\; \backslash int\_1^a\; \backslash frac\backslash ,dx.$
If is less than , then this area is considered to be negative.
This function is a logarithm because it satisfies the fundamental multiplicative property of a logarithm:
:$\backslash ln(ab)\; =\; \backslash ln\; a\; +\; \backslash ln\; b.$
This can be demonstrated by splitting the integral that defines into two parts, and then making the variable substitution (so ) in the second part, as follows:
:$\backslash begin\; \backslash ln\; ab\; =\; \backslash int\_1^\backslash frac\; \backslash ,\; dx\; \&=\backslash int\_1^a\; \backslash frac\; \backslash ,\; dx\; +\; \backslash int\_a^\; \backslash frac\; \backslash ,\; dx\backslash \backslash $ &=\int_1^a \frac 1 x \, dx + \int_1^b \frac a\,dt\\ &=\int_1^a \frac 1 x \, dx + \int_1^b \frac \, dt\\ &= \ln a + \ln b.
\end
In elementary terms, this is simply scaling by in the horizontal direction and by in the vertical direction. Area does not change under this transformation, but the region between and is reconfigured. Because the function is equal to the function , the resulting area is precisely .
The number can then be defined to be the unique real number such that .
Properties

* $\backslash ln\; 1\; =\; 0$ * $\backslash ln\; e\; =\; 1$ * $\backslash ln(xy)\; =\; \backslash ln\; x\; +\; \backslash ln\; y\; \backslash quad\; \backslash text\backslash ;\; x\; >\; 0\backslash ;\backslash text\backslash ;\; y\; >\; 0$ * $\backslash ln(x^y)\; =\; y\; \backslash ln\; x\; \backslash quad\; \backslash text\backslash ;\; x\; >\; 0$ * $\backslash ln\; x\; <\; \backslash ln\; y\; \backslash quad\backslash text\backslash ;\; 0\; <\; x\; <\; y$ * $\backslash lim\_\; \backslash frac\; =\; 1$ * $\backslash lim\_\; \backslash frac\; =\; \backslash ln\; x\backslash quad\; \backslash text\backslash ;\; x\; >\; 0$ * $\backslash frac\; \backslash leq\; \backslash ln\; x\; \backslash leq\; x-1\; \backslash quad\backslash text\backslash quad\; x\; >\; 0$ * $\backslash ln\; \backslash leq\; \backslash alpha\; x\; \backslash quad\backslash text\backslash quad\; x\; \backslash ge\; 0\backslash ;\backslash text\backslash ;\; \backslash alpha\; \backslash ge\; 1$ The statement is true for $x=0$, and we now show that $\backslash frac\; \backslash ln\; \backslash leq\; \backslash frac\; (\; \backslash alpha\; x\; )$ for all $x$, which completes the proof by thefundamental theorem of calculus
The fundamental theorem of calculus is a theorem
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and ...

. Hence, we want to show that
:$\backslash frac\; \backslash ln\; =\; \backslash frac\; \backslash leq\; \backslash alpha\; =\; \backslash frac\; (\; \backslash alpha\; x\; )$
(Note that we have not yet proved that this statement is true.) If this is true, then by multiplying the middle statement by the positive quantity $(1+x^\backslash alpha)\; /\; \backslash alpha$ and subtracting $x^\backslash alpha$ we would obtain
:$x^\; \backslash leq\; x^\backslash alpha\; +\; 1$
:$x^\; (1-x)\; \backslash leq\; 1$
This statement is trivially true for $x\; \backslash ge\; 1$ since the left hand side is negative or zero. For $0\; \backslash le\; x\; <\; 1$ it is still true since both factors on the left are less than 1 (recall that $\backslash alpha\; \backslash ge\; 1$). Thus this last statement is true and by repeating our steps in reverse order we find that $\backslash frac\; \backslash ln\; \backslash leq\; \backslash frac\; (\; \backslash alpha\; x\; )$ for all $x$. This completes the proof.
An alternate proof is to observe that $(1+x^\backslash alpha)\backslash leq\; (1+x)^\backslash alpha$ under the given conditions. This can be proved, e.g., by the norm inequalities. Taking logarithms and using $\backslash ln(1+x)\backslash leq\; x$ completes the proof.
Derivative

Thederivative
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities ...

of the natural logarithm as a real-valued function on the positive reals is given by
:$\backslash frac\; \backslash ln\; x\; =\; \backslash frac.$
How to establish this derivative of the natural logarithm depends on how it is defined firsthand. If the natural logarithm is defined as the integral
:$\backslash ln\; x\; =\; \backslash int\_1^x\; \backslash frac\backslash ,dt,$
then the derivative immediately follows from the first part of the fundamental theorem of calculus
The fundamental theorem of calculus is a theorem
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and ...

.
On the other hand, if the natural logarithm is defined as the inverse of the (natural) exponential function, then the derivative (for ''x'' > 0) can be found by using the properties of the logarithm and a definition of the exponential function. From the definition of the number $e\; =\; \backslash lim\_(1+u)^,$ the exponential function can be defined as $e^x\; =\; \backslash lim\_(1+u)^\; =\; \backslash lim\_(1\; +\; hx)^$, where $u=hx,\; h=u/x.$ The derivative can then be found from first principles.
:$\backslash begin\; \backslash frac\; \backslash ln\; x\; \&=\; \backslash lim\_\; \backslash frac\; \backslash \backslash \; \&=\; \backslash lim\_\backslash left;\; href="/html/ALL/s/\backslash frac\_\backslash ln\backslash left(\backslash frac\backslash right)\backslash right.html"\; ;"title="\backslash frac\; \backslash ln\backslash left(\backslash frac\backslash right)\backslash right">\backslash frac\; \backslash ln\backslash left(\backslash frac\backslash right)\backslash right$
Also, we have:
:$\backslash frac\; \backslash ln\; ax\; =\; \backslash frac\; (\backslash ln\; a\; +\; \backslash ln\; x)\; =\; \backslash frac\; \backslash ln\; a\; +\backslash frac\; \backslash ln\; x\; =\; \backslash frac.$
so, unlike its inverse function $e^$, a constant in the function doesn't alter the differential.
Series

If $\backslash vert\; x\; -\; 1\; \backslash vert\; \backslash leq\; 1\; \backslash text\; x\; \backslash neq\; 0,$ then :$\backslash begin\; \backslash ln\; x\; \&=\; \backslash int\_1^x\; \backslash frac\; \backslash ,\; dt\; =\; \backslash int\_0^\; \backslash frac\; \backslash ,\; du\; \backslash \backslash \; \&=\; \backslash int\_0^\; (1\; -\; u\; +\; u^2\; -\; u^3\; +\; \backslash cdots)\; \backslash ,\; du\; \backslash \backslash \; \&=\; (x\; -\; 1)\; -\; \backslash frac\; +\; \backslash frac\; -\; \backslash frac\; +\; \backslash cdots\; \backslash \backslash \; \&=\; \backslash sum\_^\backslash infty\; \backslash frac.\; \backslash end$ This is theTaylor series
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities an ...

for ln ''x'' around 1. A change of variables yields the Mercator series
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It h ...

:
:$\backslash ln(1+x)=\backslash sum\_^\backslash infty\; \backslash frac\; x^k\; =\; x\; -\; \backslash frac\; +\; \backslash frac\; -\; \backslash cdots,$
valid for , ''x'', ≤ 1 and ''x'' ≠ −1.
Leonhard Euler
Leonhard Euler ( ; ; 15 April 170718 September 1783) was a Swiss mathematician
A mathematician is someone who uses an extensive knowledge of mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ) ...

, disregarding $x\backslash ne\; -1$, nevertheless applied this series to ''x'' = −1, in order to show that the harmonic series
Harmonic series may refer to either of two related concepts:
*Harmonic series (mathematics)
*Harmonic series (music)
{{Disambig ...

equals the (natural) logarithm of 1/(1 − 1), that is, the logarithm of infinity. Nowadays, more formally, one can prove that the harmonic series truncated at ''N'' is close to the logarithm of ''N'', when ''N'' is large, with the difference converging to the Euler–Mascheroni constant
Euler's constant (sometimes also called the Euler–Mascheroni constant) is a mathematical constant
A mathematical constant is a key number whose value is fixed by an unambiguous definition, often referred to by a symbol (e.g., an Letter (alph ...

.
At right is a picture of ln(1 + ''x'') and some of its Taylor polynomial
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...

s around 0. These approximations converge to the function only in the region −1 < ''x'' ≤ 1; outside of this region the higher-degree Taylor polynomials evolve to ''worse'' approximations for the function.
A useful special case for positive integers ''n'', taking $x=\backslash tfrac$, is:
:$\backslash ln\; \backslash left(\backslash frac\backslash right)\; =\; \backslash sum\_^\backslash infty\; \backslash frac\; =\; \backslash frac\; -\; \backslash frac\; +\; \backslash frac\; -\; \backslash frac\; +\; \backslash cdots$
If $\backslash operatorname(x)\; \backslash ge\; 1/2,$ then
:$\backslash begin\; \backslash ln\; (x)\; \&=\; -\; \backslash ln\; \backslash left(\backslash frac\backslash right)\; =\; -\; \backslash sum\_^\backslash infty\; \backslash frac\; =\; \backslash sum\_^\backslash infty\; \backslash frac\; \backslash \backslash \; \&=\; \backslash frac\; +\; \backslash frac\; +\; \backslash frac\; +\; \backslash frac\; +\; \backslash cdots\; \backslash end$
Now, taking $x=\backslash tfrac$ for positive integers ''n'', we get:
:$\backslash ln\; \backslash left(\backslash frac\backslash right)\; =\; \backslash sum\_^\backslash infty\; \backslash frac\; =\; \backslash frac\; +\; \backslash frac\; +\; \backslash frac\; +\; \backslash frac\; +\; \backslash cdots$
If $\backslash operatorname(x)\; \backslash ge\; 0\; \backslash text\; x\; \backslash neq\; 0,$ then
:$\backslash ln\; (x)\; =\; \backslash ln\; \backslash left(\backslash frac\backslash right)\; =\; \backslash ln\backslash left(\backslash frac\backslash right)\; =\; \backslash ln\; \backslash left(1\; +\; \backslash frac\backslash right)\; -\; \backslash ln\; \backslash left(1\; -\; \backslash frac\backslash right).$
Since
:$\backslash begin\; \backslash ln(1+y)\; -\; \backslash ln(1-y)\&=\; \backslash sum^\backslash infty\_\backslash frac\backslash left((-1)^y^i\; -\; (-1)^(-y)^i\backslash right)\; =\; \backslash sum^\backslash infty\_\backslash frac\backslash left((-1)^\; +1\backslash right)\; \backslash \backslash \; \&=\; y\backslash sum^\backslash infty\_\backslash frac\backslash left((-1)^\; +1\backslash right)\backslash overset\backslash ;\; 2y\backslash sum^\backslash infty\_\backslash frac,\; \backslash end$
we arrive at
:$\backslash begin\; \backslash ln\; (x)\; \&=\; \backslash frac\; \backslash sum\_^\backslash infty\; \backslash frac\; ^k\; \backslash \backslash \; \&=\; \backslash frac\; \backslash left(\; \backslash frac\; +\; \backslash frac\; \backslash frac\; +\; \backslash frac\; ^2\; +\; \backslash cdots\; \backslash right)\; .\; \backslash end$
Using the substitution $x=\backslash tfrac$ again for positive integers ''n'', we get:
:$\backslash begin\; \backslash ln\; \backslash left(\backslash frac\backslash right)\; \&=\; \backslash frac\; \backslash sum\_^\backslash infty\; \backslash frac\backslash \backslash \; \&=\; 2\; \backslash left(\backslash frac\; +\; \backslash frac\; +\; \backslash frac\; +\; \backslash cdots\; \backslash right).\; \backslash end$
This is, by far, the fastest converging of the series described here.
We can also represent the natural logarithm as an infinite product:
:$\backslash ln(x)=(x-1)\; \backslash prod\_^\backslash infty\; \backslash left\; (\; \backslash frac\; \backslash right\; )$
Two examples might be:
:$\backslash ln(2)=\backslash left\; (\; \backslash frac\; \backslash right\; )\backslash left\; (\; \backslash frac\; \backslash right\; )\backslash left\; (\; \backslash frac\; \backslash right\; )\backslash left\; (\; \backslash frac\; \backslash right\; )...$
:$\backslash pi=(2i+2)\backslash left\; (\; \backslash frac\; \backslash right\; )\backslash left\; (\; \backslash frac\; \backslash right\; )\backslash left\; (\; \backslash frac\; \backslash right\; )\backslash left\; (\; \backslash frac\; \backslash right\; )...$
From this identity, we can easily get that:
:$\backslash frac=\backslash frac-\backslash sum\_^\backslash infty\backslash frac$
For example:
:$\backslash frac=2-\backslash frac-\backslash frac-\backslash frac\; \backslash cdots$
The natural logarithm in integration

The natural logarithm allows simple of functions of the form ''g''(''x'') = ''f'' '(''x'')/''f''(''x''): anantiderivative
In calculus
Calculus, originally called infinitesimal calculus or "the calculus of infinitesimal
In mathematics, infinitesimals or infinitesimal numbers are quantities that are closer to zero than any standard real number, but are not zer ...

of ''g''(''x'') is given by ln(, ''f''(''x''), ). This is the case because of the chain rule
In calculus
Calculus, originally called infinitesimal calculus or "the calculus of infinitesimals", is the mathematics, mathematical study of continuous change, in the same way that geometry is the study of shape and algebra is the study of ...

and the following fact:
:$\backslash frac\backslash ln\; \backslash left,\; x\; \backslash \; =\; \backslash frac.$
In other words, if $x$ is a real number with $x\backslash not=0$, then
:$\backslash int\; \backslash frac\; \backslash ,dx\; =\; \backslash ln,\; x,\; +\; C$
and
:$\backslash int\; =\; \backslash ln,\; f(x),\; +\; C.$
Here is an example in the case of ''g''(''x'') = tan(''x''):
: $\backslash begin\; \&\; \backslash int\; \backslash tan\; x\; \backslash ,dx\; =\; \backslash int\; \backslash frac\; \backslash ,dx\; \backslash \backslash $& \int \tan x \,dx = \int \frac \,dx.
\end
Letting ''f''(''x'') = cos(''x''):
:$\backslash int\; \backslash tan\; x\; \backslash ,dx\; =\; -\backslash ln\; \backslash left,\; \backslash cos\; x\; \backslash \; +\; C$
:$\backslash int\; \backslash tan\; x\; \backslash ,dx\; =\; \backslash ln\; \backslash left,\; \backslash sec\; x\; \backslash \; +\; C$
where ''C'' is an arbitrary constant of integration.
The natural logarithm can be integrated using integration by parts
In calculus
Calculus, originally called infinitesimal calculus or "the calculus of infinitesimal
In mathematics, infinitesimals or infinitesimal numbers are quantities that are closer to zero than any standard real number, but are not zero. ...

:
:$\backslash int\; \backslash ln\; x\; \backslash ,dx\; =\; x\; \backslash ln\; x\; -\; x\; +\; C.$
Let:
:$u\; =\; \backslash ln\; x\; \backslash Rightarrow\; du\; =\; \backslash frac$
:$dv\; =\; dx\; \backslash Rightarrow\; v\; =\; x$
then:
: $\backslash begin\; \backslash int\; \backslash ln\; x\; \backslash ,dx\; \&\; =\; x\; \backslash ln\; x\; -\; \backslash int\; \backslash frac\; \backslash ,dx\; \backslash \backslash \; \&\; =\; x\; \backslash ln\; x\; -\; \backslash int\; 1\; \backslash ,dx\; \backslash \backslash \; \&\; =\; x\; \backslash ln\; x\; -\; x\; +\; C\; \backslash end$
Efficient computation

For ln(''x'') where ''x'' > 1, the closer the value of ''x'' 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: :$\backslash begin\; \backslash ln\; 123.456\; \&=\; \backslash ln(1.23456\; \backslash cdot\; 10^2)\backslash \backslash \; \&=\; \backslash ln\; 1.23456\; +\; \backslash ln(10^2)\backslash \backslash \; \&=\; \backslash ln\; 1.23456\; +\; 2\; \backslash ln\; 10\backslash \backslash \; \&\backslash approx\; \backslash ln\; 1.23456\; +\; 2\; \backslash cdot\; 2.3025851.\; \backslash end$ 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, which has the decimal expansion 2.30258509..., plays a role for example in the computation of natural logarithms of numbers represented inscientific notation
Scientific notation is a way of expressing numbers
A number is a mathematical object
A mathematical object is an abstract concept arising in mathematics.
In the usual language of mathematics, an ''object'' is anything that has been (or coul ...

, as a mantissa multiplied by a power of 10:
: $\backslash ln(a\backslash cdot\; 10^n)\; =\; \backslash ln\; a\; +\; n\; \backslash ln\; 10.$
This means that one can effectively calculate the logarithms of numbers with very large or very small magnitude
Magnitude may refer to:
Mathematics
*Euclidean vector, a quantity defined by both its magnitude and its direction
*Magnitude (mathematics), the relative size of an object
*Norm (mathematics), a term for the size or length of a vector
*Order of ...

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 useHalley's method
In numerical analysis, Halley's method is a root-finding algorithm used for functions of one real variable with a continuous second derivative. It is named after its inventor Edmond Halley.
The algorithm is second in the class of Householder's m ...

or Newton's method
In numerical analysis
Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathem ...

to invert the exponential function, because the series of the exponential function converges more quickly. For finding the value of to give using Halley's method, or equivalently to give using Newton's method, the iteration simplifies to
:$y\_\; =\; y\_n\; +\; 2\; \backslash cdot\; \backslash frac$
which has cubic convergence
In numerical analysis, the order of convergence and the rate of convergence of a limit of a sequence, convergent sequence are quantities that represent how quickly the sequence approaches its limit. A sequence (x_n) that converges to x^* is said to ...

to .
Another alternative for extremely high precision calculation is the formula
:$\backslash ln\; x\; \backslash approx\; \backslash frac\; -\; m\; \backslash ln\; 2,$
where denotes the arithmetic-geometric mean of 1 and , and
:$s\; =\; x\; 2^m\; >\; 2^,$
with chosen so that bits of precision is attained. (For most purposes, the value of 8 for m 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 can be pre-computed to the desired precision using any of several known quickly converging series.) Or, the following formula can be used:
:$\backslash ln\; x=\backslash frac,\backslash quad\; x\backslash in\; (1,\backslash infty)$
where
:$\backslash theta\_2(x)=\backslash sum\_x^,\; \backslash quad\backslash theta\_3(x)=\backslash sum\_x^$
are the Jacobi theta functions. page 225
Based on a proposal by William Kahan
William "Velvel" Morton Kahan (born June 5, 1933) is a Canadian
Canadians (french: Canadiens) are people identified with the country of Canada. This connection may be residential, legal, historical or cultural. For most Canadians, many (or al ...

and first implemented in the Hewlett-Packard
The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational information technology company headquartered in Palo Alto, California
Palo Alto (; Spanish language, Spanish for "tall stick" ...

HP-41C
The HP-41C series are programmable, expandable, continuous memoryThe term continuous memory was coined by Hewlett-Packard (HP) to describe a unique feature of certain HP calculators
Image:HP48G.jpg, 200px, HP 48G
HP calculators are various calc ...

calculator in 1979 (referred to under "LN1" in the display, only), some calculators, operating system
An operating system (OS) is system software
System software is software designed to provide a platform for other software. Examples of system software include operating systems (OS) like macOS, Linux, Android (operating system), Android and Mi ...

s (for example Berkeley UNIX 4.3BSD), computer algebra system
A computer algebra system (CAS) or symbolic algebra system (SAS) is any mathematical software
Mathematical software is software used to mathematical model, model, analyze or calculate numeric, symbolic or geometric data.
It is a type of applica ...

s and programming languages (for example C99
C99 (previously known as C9X) is an informal name for ISO/IEC 9899:1999, a past version of the C programming language
C (, as in the letter ''c'') is a general-purpose, procedural computer programming language
A programming language ...

) provide a special natural logarithm plus 1 function, alternatively named LNP1,Searchable PDF/ref> or log1p to give more accurate results for logarithms close to zero by passing arguments ''x'', also close to zero, to a function log1p(''x''), which returns the value ln(1+''x''), instead of passing a value ''y'' close to 1 to a function returning ln(''y''). The function log1p avoids in the floating point arithmetic a near cancelling of the absolute term 1 with the second term from the Taylor expansion of the ln. This keeps the argument, the result, and intermediate steps all close to zero where they can be most accurately represented as floating-point numbers. In addition to base the

IEEE 754-2008
The Institute of Electrical and Electronics Engineers (IEEE) is a professional association
A professional association (also called a professional body, professional organization, or professional society) usually seeks to further
Further or ...

standard defines similar logarithmic functions near 1 for binary
Binary may refer to:
Science and technology
Mathematics
* Binary number
In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: ty ...

and decimal logarithms: and .
Similar inverse functions named " expm1", "expm" or "exp1m" exist as well, all with the meaning of .For a similar approach to reduce round-off error
A roundoff error, also called rounding error, is the difference between the result produced by a given algorithm
In and , an algorithm () is a finite sequence of , computer-implementable instructions, typically to solve a class of problems ...

s of calculations for certain input values see trigonometric function
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

s like versine
The versine or versed sine is a trigonometric function
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry ...

, vercosine
The versine or versed sine is a trigonometric function found in some of the earliest (Vedic Aryabhatia I) trigonometric tables. The versine of an angle is 1 minus its cosine.
There are several related functions, most notably the coversine and ha ...

, coversine
The versine or versed sine is a trigonometric function found in some of the earliest (Vedic Aryabhatia I) trigonometric tables. The versine of an angle is 1 minus its cosine.
There are several related functions, most notably the coversine and ha ...

, covercosine
The versine or versed sine is a trigonometric function found in some of the earliest (Vedic Aryabhatia I) trigonometric tables. The versine of an angle is 1 minus its cosine.
There are several related functions, most notably the coversine and ha ...

, haversine
The versine or versed sine is a trigonometric function found in some of the earliest (Vedic Aryabhatia I) trigonometric tables. The versine of an angle is 1 minus its cosine.
There are several related functions, most notably the coversine and ...

, havercosine
The versine or versed sine is a trigonometric function found in some of the earliest (Vedic Aryabhatia I) trigonometric tables. The versine of an angle is 1 minus its cosine.
There are several related functions, most notably the coversine and ha ...

, hacoversine
The versine or versed sine is a trigonometric function found in some of the earliest (Vedic Aryabhatia I) trigonometric tables. The versine of an angle is 1 minus its cosine.
There are several related functions, most notably the coversine and ha ...

, hacovercosine
The versine or versed sine is a trigonometric function found in some of the earliest (Vedic Aryabhatia I) trigonometric tables. The versine of an angle is 1 minus its cosine.
There are several related functions, most notably the coversine and ha ...

, exsecant
The exsecant (exsec, exs) and excosecant (excosec, excsc, exc) are trigonometric functions defined in terms of the secant (trigonometry), secant and cosecant functions. They used to be important in fields such as surveying, railway engineering, ci ...

and excosecant
The exsecant (exsec, exs) and excosecant (excosec, excsc, exc) are trigonometric function
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, str ...

.
An identity in terms of the inverse hyperbolic tangent
Image:Hyperbolic functions-2.svg, 300px, A ray through the unit hyperbola \scriptstyle x^2\ -\ y^2\ =\ 1 in the point \scriptstyle (\cosh\,a,\,\sinh\,a), where \scriptstyle a is twice the area between the ray, the hyperbola, and the \scriptstyle x- ...

,
:$\backslash mathrm(x)\; =\; \backslash log(1+x)\; =\; 2\; ~\; \backslash mathrm\backslash left(\backslash frac\backslash right)\backslash ,,$
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 O(''M''(''n'') ln ''n''). Here ''n'' is the number of digits of precision at which the natural logarithm is to be evaluated and ''M''(''n'') is the computational complexity of multiplying two ''n''-digit numbers.Continued fractions

While no simplecontinued fraction
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no ge ...

s are available, several generalized continued fractionIn complex analysis
of the function
.
Hue represents the argument, brightness the magnitude.
Complex analysis, traditionally known as the theory of functions of a complex variable, is the branch of mathematical analysis that investigates ...

s are, including:
:$\backslash begin\; \backslash ln(1+x)\; \&\; =\backslash frac-\backslash frac+\backslash frac-\backslash frac+\backslash frac-\backslash cdots\; \backslash \backslash $& = \cfrac
\end
: $\backslash begin\; \backslash ln\backslash left(1+\backslash frac\backslash right)\; \&\; =\; \backslash cfrac\; \backslash \backslash $& = \cfrac
\end
These continued fractions—particularly the last—converge rapidly for values close to 1. However, the natural logarithms of much larger numbers can easily be computed, by repeatedly adding those of smaller numbers, with similarly rapid convergence.
For example, since 2 = 1.25natural logarithm of 2The decimal value of the natural logarithm
The natural logarithm of a number is its logarithm to the base of the mathematical constant
A mathematical constant is a key number
A number is a mathematical object used to counting, count, mea ...

can be computed as:
: $\backslash begin\; \backslash ln\; 2\; \&\; =\; 3\; \backslash ln\backslash left(1+\backslash frac\backslash right)\; +\; \backslash ln\backslash left(1+\backslash frac\backslash right)\; \backslash \backslash $& = \cfrac
+ \cfrac .
\end
Furthermore, since 10 = 1.250pt
PT, Pt, or pt may refer to:
Arts and entertainment
* , acronym for ''Playable Teaser'', a short video game released to promote the cancelled video game ''Silent Hills''
* , a British progressive rock group
In business Businesses
* (IATA ...

& = \cfrac
+ \cfrac .
\end
The reciprocal of the natural logarithm can be also written in this way:
:$\backslash frac\; =\backslash frac\; \backslash sqrt\backslash sqrt\backslash ldots$
For example:
:$\backslash frac\; =\backslash frac\; \backslash sqrt\backslash sqrt\backslash ldots$
Complex logarithms

The exponential function can be extended to a function which gives acomplex number
In mathematics, a complex number is an element of a number system that contains the real numbers and a specific element denoted , called the imaginary unit, and satisfying the equation . Moreover, every complex number can be expressed in the for ...

as for any arbitrary complex number ; simply use the infinite series with complex. This exponential function can be inverted to form a complex logarithm that exhibits most of the properties of the ordinary logarithm. There are two difficulties involved: no has ; and it turns out that . Since the multiplicative property still works for the complex exponential function, , for all complex and integers .
So the logarithm cannot be defined for the whole complex plane
In mathematics
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

, and even then it is multi-valued—any complex logarithm can be changed into an "equivalent" logarithm by adding any integer multiple of at will. The complex logarithm can only be single-valued on the complex plane#Cutting the plane, cut plane. For example, or or , etc.; and although can be defined as , or or , and so on.
See also

* Mental calculation#nat-exp, Approximating natural exponents (log base e) * Iterated logarithm * Napierian logarithm * List of logarithmic identities * Logarithm of a matrix * Logarithmic differentiation * Logarithmic integral function *Nicholas Mercator
Nicholas (Nikolaus) Mercator (c. 1620, Holstein – 1687, Versailles (city), Versailles), also known by his German language, German name Kauffmann, was a 17th-century mathematician.
He was born in Eutin, Schleswig-Holstein, Germany and educated at ...

– first to use the term natural logarithm
* Polylogarithm
* Von Mangoldt function
Notes

References

{{Calculus topics Logarithms Elementary special functions E (mathematical constant) Unary operations de:Logarithmus#Natürlicher Logarithmus