Pengguna:Dedhert.Jr/Uji halaman 01/16: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Dedhert.Jr (bicara | kontrib)
Tidak ada ringkasan suntingan
Dedhert.Jr (bicara | kontrib)
Tag: VisualEditor pranala ke halaman disambiguasi
Baris 39:
== Identitas logaritma ==
{{Main|Daftar identitas logaritma}}
Ada beberapa rumus penting, terkadang disebut ''identitas logaritma'', mengaitkan logaritma dengan yang lainnya.<ref>AllSemua statementspernyataan indi thisbagian sectionini candapat beditemukan found inpada {{Harvard citations|last1=Shirali|first1=Shailesh|year=2002|loc=sectionbagian 4|nb=yes}}. Sebagai contoh, {{Harvard citations|last1=Downing|first1=Douglas|year=2003|loc=phlm. 275}}, oratau {{Harvard citations|last1=Kate|last2=Bhapkar|year=2009|loc=phlm. 1-1|nb=yes}}, for example.</ref>
 
=== Hasil kali, hasil bagi, pangkat, dan akar ===
Baris 69:
 
: <math> \log_b x = \frac{\log_k x}{\log_k b}.\, </math>
{{Collapse top|title=TurunanBukti dari faktor konversiperubahan antara logaritma dengan bilangan pokok sembarang|width=80%}}
Pada identitas
 
Baris 83:
 
showing the conversion factor from given <math>\log_k</math>-values to their corresponding <math>\log_b </math>-values to be <math>(\log_k b)^{-1}.</math>
{{Collapse bottom}}Typical [[scientific calculators]] calculate the logarithms to bases 10 and {{mvar|[[e (mathematical constant)|e]]}}.<ref>{{Citation|last1=Bernstein|first1=Stephen|last2=Bernstein|first2=Ruth|title=Schaum's outline of theory and problems of elements of statistics. I, Descriptive statistics and probability|publisher=[[McGraw-Hill]]|location=New York|series=Schaum's outline series|isbn=978-0-07-005023-5|year=1999|url=https://archive.org/details/schaumsoutlineof00bern}}, phlm.&nbsp;21</ref> Logarithms with respect to any base&nbsp;{{mvar|b}} can be determined using either of these two logarithms by the previous formula:
 
: <math> \log_b x = \frac{\log_{10} x}{\log_{10} b} = \frac{\log_{e} x}{\log_{e} b}.</math>
Baris 93:
which can be seen from taking the defining equation <math> x = b^{\,\log_b x} = b^y</math> to the power of <math>\tfrac{1}{y}.</math>
 
== ReferensiParticular bases ==
[[Berkas:Log4.svg|jmpl|Plots of logarithm for bases 0.5, 2, and {{mvar|e}}]]
Among all choices for the base, three are particularly common. These are {{math|1=''b'' = 10}}, {{math|1=''b'' = [[e (mathematical constant)|''e'']]}} (the [[Irrational number|irrational]] mathematical constant ≈ 2.71828), and {{math|1=''b'' = 2}} (the [[binary logarithm]]). In [[mathematical analysis]], the logarithm base {{mvar|e}} is widespread because of analytical properties explained below. On the other hand, {{nowrap|base-10}} logarithms are easy to use for manual calculations in the [[decimal]] number system:<ref>{{Citation|last1=Downing|first1=Douglas|title=Algebra the Easy Way|series=Barron's Educational Series|location=Hauppauge, NY|publisher=Barron's|isbn=978-0-7641-1972-9|date=2003|url=https://archive.org/details/algebraeasyway00down_0}}, chapter 17, p.&nbsp;275</ref>
 
: <math>\log_{10}(10 x) = \log_{10} 10 + \log_{10} x = 1 + \log_{10} x.\ </math>
 
Thus, {{math|log<sub>10</sub>&thinsp;(''x'')}} is related to the number of [[Decimal digit|decimal digits]] of a positive integer {{mvar|x}}: the number of digits is the smallest [[integer]] strictly bigger than {{math|log<sub>10</sub>&thinsp;(''x'')}}.<ref>{{Citation|last1=Wegener|first1=Ingo|title=Complexity theory: exploring the limits of efficient algorithms|publisher=[[Springer-Verlag]]|location=Berlin, New York|isbn=978-3-540-21045-0|date=2005}}, p.&nbsp;20</ref> For example, {{math|log<sub>10</sub>(1430)}} is approximately 3.15. The next integer is 4, which is the number of digits of 1430. Both the natural logarithm and the logarithm to base two are used in [[information theory]], corresponding to the use of [[Nat (unit)|nats]] or [[Bit|bits]] as the fundamental units of information, respectively.<ref>{{citation|title=Information Theory|first=Jan C. A.|last=Van der Lubbe|publisher=Cambridge University Press|date=1997|isbn=978-0-521-46760-5|page=3|url={{google books |plainurl=y |id=tBuI_6MQTcwC|page=3}}}}</ref> Binary logarithms are also used in [[computer science]], where the [[Binary numeral system|binary system]] is ubiquitous; in [[music theory]], where a pitch ratio of two (the [[octave]]) is ubiquitous and the number of [[Cent (music)|cents]] between any two pitches is the binary logarithm, times 1200, of their ratio (that is, 100 cents per [[equal-temperament]] [[semitone]]); and in [[photography]] to measure [[Exposure value|exposure values]], [[Luminance|light levels]], [[Exposure time|exposure times]], [[Aperture|apertures]], and [[Film speed|film speeds]] in "stops".<ref>{{citation|title=The Manual of Photography|first1=Elizabeth|last1=Allen|first2=Sophie|last2=Triantaphillidou|publisher=Taylor & Francis|date=2011|isbn=978-0-240-52037-7|page=228|url={{google books |plainurl=y |id=IfWivY3mIgAC|page=228}}}}</ref>
 
The following table lists common notations for logarithms to these bases and the fields where they are used. Many disciplines write {{math|log&thinsp;''x''}} instead of {{math|log<sub>''b''</sub>&thinsp;''x''}}, when the intended base can be determined from the context. The notation {{math|<sup>''b''</sup>log&thinsp;''x''}} also occurs.<ref>{{Citation|url=http://www.mathe-online.at/mathint/lexikon/l.html|author1=Franz Embacher|author2=Petra Oberhuemer|title=Mathematisches Lexikon|publisher=mathe online: für Schule, Fachhochschule, Universität unde Selbststudium|access-date=22 March 2011|language=de}}</ref> The "ISO notation" column lists designations suggested by the [[International Organization for Standardization]] ([[ISO 80000-2]]).<ref>Quantities and units – Part 2: Mathematics (ISO 80000-2:2019); EN ISO 80000-2</ref> Because the notation {{math|log {{mvar|x}}}} has been used for all three bases (or when the base is indeterminate or immaterial), the intended base must often be inferred based on context or discipline. In computer science, {{Math|log}} usually refers to {{math|log<sub>2</sub>}}, and in mathematics {{Math|log}} usually refers to {{math|log<sub>''e''</sub>}}.<ref>{{citation|first1=Michael T.|last1=Goodrich|author1-link=Michael T. Goodrich|first2=Roberto|last2=Tamassia|author2-link=Roberto Tamassia|title=Algorithm Design: Foundations, Analysis, and Internet Examples|publisher=John Wiley & Sons|date=2002|page=23|quote=One of the interesting and sometimes even surprising aspects of the analysis of data structures and algorithms is the ubiquitous presence of logarithms&nbsp;... As is the custom in the computing literature, we omit writing the base {{mvar|b}} of the logarithm when {{math|1=''b'' = 2}}.}}</ref> In other contexts, {{Math|log}} often means {{math|log<sub>10</sub>}}.<ref>{{citation|title=Introduction to Applied Mathematics for Environmental Science|edition=illustrated|first1=David F.|last1=Parkhurst|publisher=Springer Science & Business Media|date=2007|isbn=978-0-387-34228-3|page=288|url={{google books |plainurl=y |id=h6yq_lOr8Z4C|page=288 }}}}</ref>
{| class="wikitable" style="text-align:center; margin:1em auto 1em auto;"
! scope="col" |Base {{mvar|b}}
! scope="col" |Name for log<sub>''b''</sub>&#x2009;''x''
! scope="col" |ISO notation
! scope="col" |Other notations
! scope="col" |Used in
|-
! scope="row" |2
|[[binary logarithm]]
|{{math|lb ''x''}}<ref name="gullberg">{{Citation|title=Mathematics: from the birth of numbers.|author=Gullberg, Jan|location=New York|publisher=W. W. Norton & Co|date=1997|isbn=978-0-393-04002-9|url-access=registration|url=https://archive.org/details/mathematicsfromb1997gull}}</ref>
|{{math|ld ''x''}}, {{math|log ''x''}}, {{math|lg ''x''}},<ref>See footnote 1 in {{citation|last1=Perl|first1=Yehoshua|last2=Reingold|first2=Edward M.|title=Understanding the complexity of interpolation search|journal=Information Processing Letters|date=December 1977|volume=6|issue=6|pages=219–22|doi=10.1016/0020-0190(77)90072-2}}</ref> {{math|log<sub>2</sub>&thinsp;''x''}}
|[[computer science]], [[information theory]], [[bioinformatics]], [[music theory]], [[photography]]
|-
! scope="row" |{{mvar|e}}
|[[natural logarithm]]
|{{math|ln ''x''}}{{refn|Some mathematicians disapprove of this notation. In his 1985 autobiography, [[Paul Halmos]] criticized what he considered the "childish ln notation," which he said no mathematician had ever used.<ref>
{{Citation
|title = I Want to Be a Mathematician: An Automathography
|author = Paul Halmos
|publisher = Springer-Verlag
|location=Berlin, New York
|date = 1985
|isbn=978-0-387-96078-4
}}</ref>
The notation was invented by [[Irving Stringham]], a mathematician.<ref>
{{Citation
|title = Uniplanar algebra: being part I of a propædeutic to the higher mathematical analysis
|author = Irving Stringham
|publisher = The Berkeley Press
|date = 1893
|page = xiii
|url = {{google books |plainurl=y |id=hPEKAQAAIAAJ|page=13}}
}}</ref><ref>
{{Citation|title = Introduction to Financial Technology|author = Roy S. Freedman|publisher = Academic Press|location=Amsterdam|date = 2006|isbn=978-0-12-370478-8|page = 59|url = {{google books |plainurl=y |id=APJ7QeR_XPkC|page=5}}}}</ref>|name=adaa|group=nb}}
|{{math|log {{mvar|x}}}}(in mathematics<ref>See Theorem 3.29 in {{citation|last1=Rudin|first1=Walter|title=Principles of mathematical analysis|date=1984|publisher=McGraw-Hill International|location=Auckland|isbn=978-0-07-085613-4|edition=3rd ed., International student|url=https://archive.org/details/principlesofmath00rudi}}</ref> and many [[Programming language|programming languages]]{{refn|For example [[C (programming language)|C]], [[Java (programming language)|Java]], [[Haskell (programming language)|Haskell]], and [[BASIC programming language|BASIC]].|group=nb}}), {{math|log<sub>''e''</sub>&thinsp;''x''}}
|mathematics, physics, chemistry,
[[statistics]], [[economics]], information theory, and engineering
|-
! scope="row" |10
|[[common logarithm]]
|{{math|lg ''x''}}
|{{math|log ''x''}}, {{math|log<sub>10</sub>&thinsp;''x''}}
(in engineering, biology, astronomy)
|various [[engineering]] fields (see [[decibel]] and see below),
logarithm [[Mathematical table|tables]], handheld [[Scientific calculator|calculators]], [[spectroscopy]]
|-
! scope="row" |{{mvar|b}}
|logarithm to base {{mvar|b}}
|{{math|log<sub>''b''</sub>&thinsp;''x''}}
|
|mathematics
|}
 
== History ==
{{Main|History of logarithms}}
The '''history of logarithms''' in seventeenth-century Europe is the discovery of a new [[Function (mathematics)|function]] that extended the realm of analysis beyond the scope of algebraic methods. The method of logarithms was publicly propounded by [[John Napier]] in 1614, in a book titled ''Mirifici Logarithmorum Canonis Descriptio'' (''Description of the Wonderful Rule of Logarithms'').<ref>{{citation|first=John|last=Napier|author-link=John Napier|title=Mirifici Logarithmorum Canonis Descriptio|trans-title=The Description of the Wonderful Rule of Logarithms|language=la|location=Edinburgh, Scotland|publisher=Andrew Hart|year=1614|url=http://gdz.sub.uni-goettingen.de/dms/load/img/?PPN=PPN527914568&DMDID=DMDLOG_0001&LOGID=LOG_0001&PHYSID=PHYS_0001}}</ref><ref>{{Citation|first=Ernest William|last=Hobson|title=John Napier and the invention of logarithms, 1614|year=1914|publisher=The University Press|location=Cambridge|url=https://archive.org/details/johnnapierinvent00hobsiala}}</ref> Prior to Napier's invention, there had been other techniques of similar scopes, such as the [[prosthaphaeresis]] or the use of tables of progressions, extensively developed by [[Jost Bürgi]] around 1600.<ref name="folkerts">{{citation|last1=Folkerts|first1=Menso|last2=Launert|first2=Dieter|last3=Thom|first3=Andreas|arxiv=1510.03180|doi=10.1016/j.hm.2016.03.001|issue=2|journal=[[Historia Mathematica]]|mr=3489006|pages=133–147|title=Jost Bürgi's method for calculating sines|volume=43|year=2016|s2cid=119326088}}</ref><ref>{{mactutor|id=Burgi|title=Jost Bürgi (1552 – 1632)}}</ref> Napier coined the term for logarithm in Middle Latin, “logarithmus,” derived from the Greek, literally meaning, “ratio-number,” from ''logos'' “proportion, ratio, word” + ''arithmos'' “number”.
 
The [[common logarithm]] of a number is the index of that power of ten which equals the number.<ref>William Gardner (1742) ''Tables of Logarithms''</ref> Speaking of a number as requiring so many figures is a rough allusion to common logarithm, and was referred to by [[Archimedes]] as the “order of a number”.<ref>{{citation|last=Pierce|first=R. C. Jr.|date=January 1977|doi=10.2307/3026878|issue=1|journal=[[The Two-Year College Mathematics Journal]]|jstor=3026878|pages=22–26|title=A brief history of logarithms|volume=8}}</ref> The first real logarithms were heuristic methods to turn multiplication into addition, thus facilitating rapid computation. Some of these methods used tables derived from trigonometric identities.<ref>Enrique Gonzales-Velasco (2011) ''Journey through Mathematics – Creative Episodes in its History'', §2.4 Hyperbolic logarithms, p. 117, Springer {{isbn|978-0-387-92153-2}}</ref> Such methods are called [[prosthaphaeresis]].
 
Invention of the [[Function (mathematics)|function]] now known as the [[natural logarithm]] began as an attempt to perform a [[Quadrature (mathematics)|quadrature]] of a rectangular [[hyperbola]] by [[Grégoire de Saint-Vincent]], a Belgian Jesuit residing in Prague. Archimedes had written ''[[The Quadrature of the Parabola]]'' in the third century BC, but a quadrature for the hyperbola eluded all efforts until Saint-Vincent published his results in 1647. The relation that the logarithm provides between a [[geometric progression]] in its [[Argument of a function|argument]] and an [[arithmetic progression]] of values, prompted [[A. A. de Sarasa]] to make the connection of Saint-Vincent's quadrature and the tradition of logarithms in [[prosthaphaeresis]], leading to the term “hyperbolic logarithm”, a synonym for natural logarithm. Soon the new function was appreciated by [[Christiaan Huygens]], and [[James Gregory (mathematician)|James Gregory]]. The notation Log y was adopted by [[Gottfried Wilhelm Leibniz|Leibniz]] in 1675,<ref>[[Florian Cajori]] (1913) "History of the exponential and logarithm concepts", [[American Mathematical Monthly]] 20: 5, 35, 75, 107, 148, 173, 205.</ref> and the next year he connected it to the [[Integral calculus|integral]] <math display="inline">\int \frac{dy}{y} .</math>
 
Before Euler developed his modern conception of complex natural logarithms, [[Roger Cotes#Mathematics|Roger Cotes]] had a nearly equivalent result when he showed in 1714 that<ref>{{citation|last1=Stillwell|first1=J.|title=Mathematics and Its History|date=2010|publisher=Springer|edition=3rd}}</ref>
 
: <math>\log(\cos \theta + i\sin \theta) = i\theta</math>.
 
== Logarithm tables, slide rules, and historical applications{{anchor|Antilogarithm}} ==
[[Berkas:Logarithms_Britannica_1797.png|ka|jmpl|360x360px|The 1797 ''[[Encyclopædia Britannica]]'' explanation of logarithms]]
By simplifying difficult calculations before calculators and computers became available, logarithms contributed to the advance of science, especially [[astronomy]]. They were critical to advances in [[surveying]], [[celestial navigation]], and other domains. [[Pierre-Simon Laplace]] called logarithms
 
:: "...[a]n admirable artifice which, by reducing to a few days the labour of many months, doubles the life of the astronomer, and spares him the errors and disgust inseparable from long calculations."<ref>{{Citation|last1=Bryant|first1=Walter W.|title=A History of Astronomy|url=https://archive.org/stream/ahistoryastrono01bryagoog#page/n72/mode/2up|publisher=Methuen & Co|location=London|year=1907}}, p.&nbsp;44</ref>
 
As the function {{math|''f''(''x'') {{=}} {{mvar|b}}<sup>''x''</sup>}} is the inverse function of {{math|log<sub>''b''</sub>&thinsp;''x''}}, it has been called an '''antilogarithm'''.<ref>{{Citation|editor1-last=Abramowitz|editor1-first=Milton|editor1-link=Milton Abramowitz|editor2-last=Stegun|editor2-first=Irene A.|editor2-link=Irene Stegun|title=Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables|publisher=[[Dover Publications]]|location=New York|isbn=978-0-486-61272-0|edition=10th|year=1972|title-link=Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}}, section 4.7., p.&nbsp;89</ref> Nowadays, this function is more commonly called an [[exponential function]].
 
=== Log tables ===
A key tool that enabled the practical use of logarithms was the ''[[Log table|table of logarithms]]''.<ref>{{Citation|last1=Campbell-Kelly|first1=Martin|title=The history of mathematical tables: from Sumer to spreadsheets|title-link=The History of Mathematical Tables|publisher=[[Oxford University Press]]|series=Oxford scholarship online|isbn=978-0-19-850841-0|year=2003}}, section 2</ref> The first such table was compiled by [[Henry Briggs (mathematician)|Henry Briggs]] in 1617, immediately after Napier's invention but with the innovation of using 10 as the base. Briggs' first table contained the [[Common logarithm|common logarithms]] of all integers in the range from 1 to 1000, with a precision of 14&nbsp;digits. Subsequently, tables with increasing scope were written. These tables listed the values of {{math|log<sub>10</sub>&thinsp;''x''}} for any number&nbsp;{{mvar|x}} in a certain range, at a certain precision. Base-10 logarithms were universally used for computation, hence the name common logarithm, since numbers that differ by factors of 10 have logarithms that differ by integers. The common logarithm of {{mvar|x}} can be separated into an [[integer part]] and a [[fractional part]], known as the characteristic and [[Mantissa (logarithm)|mantissa]]. Tables of logarithms need only include the mantissa, as the characteristic can be easily determined by counting digits from the decimal point.<ref>{{Citation|last1=Spiegel|first1=Murray R.|last2=Moyer|first2=R.E.|title=Schaum's outline of college algebra|publisher=[[McGraw-Hill]]|location=New York|series=Schaum's outline series|isbn=978-0-07-145227-4|year=2006}}, p.&nbsp;264</ref> The characteristic of {{math|10 · {{mvar|x}}}} is one plus the characteristic of {{mvar|x}}, and their mantissas are the same. Thus using a three-digit log table, the logarithm of 3542 is approximated by
 
: <math>\log_{10}3542 = \log_{10}(1000 \cdot 3.542) = 3 + \log_{10}3.542 \approx 3 + \log_{10}3.54 \, </math>
 
Greater accuracy can be obtained by [[interpolation]]:
 
: <math>\log_{10}3542 \approx 3 + \log_{10}3.54 + 0.2 (\log_{10}3.55-\log_{10}3.54)\, </math>
 
The value of {{math|10<sup>''x''</sup>}} can be determined by reverse look up in the same table, since the logarithm is a [[monotonic function]].
 
=== Computations ===
The product and quotient of two positive numbers {{Mvar|c}} and ''{{Mvar|d}}'' were routinely calculated as the sum and difference of their logarithms. The product&nbsp;{{Math|''cd''}} or quotient&nbsp;{{Math|''c''/''d''}} came from looking up the antilogarithm of the sum or difference, via the same table:
 
: <math> cd = 10^{\, \log_{10} c} \, 10^{\,\log_{10} d} = 10^{\,\log_{10} c \, + \, \log_{10} d}</math>
 
and
 
: <math>\frac c d = c d^{-1} = 10^{\, \log_{10}c \, - \, \log_{10}d}.</math>
 
For manual calculations that demand any appreciable precision, performing the lookups of the two logarithms, calculating their sum or difference, and looking up the antilogarithm is much faster than performing the multiplication by earlier methods such as [[prosthaphaeresis]], which relies on [[trigonometric identities]].
 
Calculations of powers and [[Nth root|roots]] are reduced to multiplications or divisions and lookups by
 
: <math>c^d = \left(10^{\, \log_{10} c}\right)^d = 10^{\, d \log_{10} c}</math>
 
and
 
: <math>\sqrt[d]{c} = c^\frac{1}{d} = 10^{\frac{1}{d} \log_{10} c}.</math>
 
Trigonometric calculations were facilitated by tables that contained the common logarithms of [[Trigonometric function|trigonometric functions]].
 
=== Slide rules ===
Another critical application was the [[slide rule]], a pair of logarithmically divided scales used for calculation. The non-sliding logarithmic scale, [[Gunter's rule]], was invented shortly after Napier's invention. [[William Oughtred]] enhanced it to create the slide rule—a pair of logarithmic scales movable with respect to each other. Numbers are placed on sliding scales at distances proportional to the differences between their logarithms. Sliding the upper scale appropriately amounts to mechanically adding logarithms, as illustrated here:
[[Berkas:Slide_rule_example2_with_labels.svg|al=A slide rule: two rectangles with logarithmically ticked axes, arrangement to add the distance from 1 to 2 to the distance from 1 to 3, indicating the product 6.|pus|jmpl|550x550px|Schematic depiction of a slide rule. Starting from 2 on the lower scale, add the distance to 3 on the upper scale to reach the product&nbsp;6. The slide rule works because it is marked such that the distance from 1 to {{mvar|x}} is proportional to the logarithm of {{mvar|x}}.]]
For example, adding the distance from 1 to 2 on the lower scale to the distance from 1 to 3 on the upper scale yields a product of 6, which is read off at the lower part. The slide rule was an essential calculating tool for engineers and scientists until the 1970s, because it allows, at the expense of precision, much faster computation than techniques based on tables.<ref name="ReferenceA">{{Citation|last1=Maor|first1=Eli|title=E: The Story of a Number|publisher=[[Princeton University Press]]|isbn=978-0-691-14134-3|year=2009|at=sections 1, 13}}</ref>
 
== Analytic properties ==
A deeper study of logarithms requires the concept of a ''[[Function (mathematics)|function]]''. A function is a rule that, given one number, produces another number.<ref>{{citation|last1=Devlin|first1=Keith|author1-link=Keith Devlin|title=Sets, functions, and logic: an introduction to abstract mathematics|publisher=Chapman & Hall/CRC|location=Boca Raton, Fla|edition=3rd|series=Chapman & Hall/CRC mathematics|isbn=978-1-58488-449-1|year=2004|url={{google books |plainurl=y |id=uQHF7bcm4k4C}}}}, or see the references in [[Function (mathematics)|function]]</ref> An example is the function producing the {{mvar|x}}-th power of {{mvar|b}} from any real number&nbsp;{{mvar|x}}, where the base&nbsp;{{mvar|b}} is a fixed number. This function is written as {{math|1=''f''(''x'') = {{mvar|b}}<sup>&thinsp;''x''</sup>}}. When {{mvar|b}} is positive and unequal to 1, we show below that {{Mvar|f}} is invertible when considered as a function from the reals to the positive reals.
 
=== Existence ===
Let {{mvar|b}} be a positive real number not equal to 1 and let {{math|1=''f''(''x'') = {{mvar|b}}<sup>&thinsp;''x''</sup>}}.
 
It is a standard result in real analysis that any continuous strictly monotonic function is bijective between its domain and range. This fact follows from the [[intermediate value theorem]].<ref name="LangIII.3">{{Citation|last1=Lang|first1=Serge|title=Undergraduate analysis|year=1997|series=[[Undergraduate Texts in Mathematics]]|edition=2nd|location=Berlin, New York|publisher=[[Springer-Verlag]]|doi=10.1007/978-1-4757-2698-5|isbn=978-0-387-94841-6|mr=1476913|author1-link=Serge Lang}}, section III.3</ref> Now, {{mvar|f}} is [[Monotonic function|strictly increasing]] (for {{math|''b'' > 1}}), or strictly decreasing (for {{math|0 < {{mvar|b}} < 1}}),<ref name="LangIV.2">{{Harvard citations|last1=Lang|year=1997|nb=yes|loc=section IV.2}}</ref> is continuous, has domain <math>\R</math>, and has range <math>\R_{> 0}</math>. Therefore, {{Mvar|f}} is a bijection from <math>\R</math> to <math>\R_{>0}</math>. In other words, for each positive real number {{Mvar|y}}, there is exactly one real number {{Mvar|x}} such that <math>b^x = y</math>.
 
We let <math>\log_b\colon\R_{>0}\to\R</math> denote the inverse of {{Mvar|f}}. That is, {{math|log<sub>''b''</sub>&thinsp;''y''}} is the unique real number {{mvar|x}} such that <math>b^x = y</math>. This function is called the base-{{Mvar|b}} ''logarithm function'' or ''logarithmic function'' (or just ''logarithm'').
 
=== Characterization by the product formula ===
The function {{math|log<sub>''b''</sub>&thinsp;''x''}} can also be essentially characterized by the product formula
 
: <math>\log_b(xy) = \log_b x + \log_b y.</math>
 
More precisely, the logarithm to any base {{math|''b'' > 1}} is the only [[increasing function]] ''f'' from the positive reals to the reals satisfying {{math|1=''f''(''b'') = 1}} and<ref>{{citation|title=Foundations of Modern Analysis|volume=1|last=Dieudonné|first=Jean|page=84|year=1969|publisher=Academic Press}} item (4.3.1)</ref>
 
: <math>f(xy)=f(x)+f(y).</math>
 
=== Graph of the logarithm function ===
[[Berkas:Logarithm_inversefunctiontoexp.svg|al=The graphs of two functions.|ka|jmpl|The graph of the logarithm function {{math|log<sub>''b''</sub>&thinsp;(''x'')}} (blue) is obtained by [[Reflection (mathematics)|reflecting]] the graph of the function {{math|''b''<sup>''x''</sup>}} (red) at the diagonal line ({{math|1=''x'' = {{mvar|y}}}}).]]
As discussed above, the function {{math|log<sub>''b''</sub>}} is the inverse to the exponential function <math>x\mapsto b^x</math>. Therefore, Their [[Graph of a function|graphs]] correspond to each other upon exchanging the {{mvar|x}}- and the {{mvar|y}}-coordinates (or upon reflection at the diagonal line {{Math|1=''x'' = ''y''}}), as shown at the right: a point {{math|1=(''t'', ''u'' = {{mvar|b}}<sup>''t''</sup>)}} on the graph of {{Mvar|f}} yields a point {{math|1=(''u'', ''t'' = log<sub>''b''</sub>&thinsp;''u'')}} on the graph of the logarithm and vice versa. As a consequence, {{math|log<sub>''b''</sub>&thinsp;(''x'')}} [[Divergent sequence|diverges to infinity]] (gets bigger than any given number) if {{mvar|x}} grows to infinity, provided that {{mvar|b}} is greater than one. In that case, {{math|log<sub>''b''</sub>(''x'')}} is an [[increasing function]]. For {{math|''b'' < 1}}, {{math|log<sub>''b''</sub>&thinsp;(''x'')}} tends to minus infinity instead. When {{mvar|x}} approaches zero, {{math|log<sub>''b''</sub>&thinsp;''x''}} goes to minus infinity for {{math|''b'' > 1}} (plus infinity for {{math|''b'' < 1}}, respectively).
 
=== Derivative and antiderivative ===
[[Berkas:Logarithm_derivative.svg|al=A graph of the logarithm function and a line touching it in one point.|ka|jmpl|220x220px|The graph of the [[natural logarithm]] (green) and its tangent at {{math|''x'' {{=}} 1.5}} (black)]]
Analytic properties of functions pass to their inverses.<ref name="LangIII.3" /> Thus, as {{math|1=''f''(''x'') = {{mvar|b}}<sup>''x''</sup>}} is a continuous and [[differentiable function]], so is {{math|log<sub>''b''</sub>&thinsp;''y''}}. Roughly, a continuous function is differentiable if its graph has no sharp "corners". Moreover, as the [[derivative]] of {{math|''f''(''x'')}} evaluates to {{math|ln(''b'') ''b''<sup>''x''</sup>}} by the properties of the [[exponential function]], the [[chain rule]] implies that the derivative of {{math|log<sub>''b''</sub>&thinsp;''x''}} is given by<ref name="LangIV.2" /><ref>{{citation|work=Wolfram Alpha|title=Calculation of ''d/dx(Log(b,x))''|publisher=[[Wolfram Research]]|access-date=15 March 2011|url=http://www.wolframalpha.com/input/?i=d/dx(Log(b,x))}}</ref>
 
: <math>\frac{d}{dx} \log_b x = \frac{1}{x\ln b}. </math>
 
That is, the [[slope]] of the [[tangent]] touching the graph of the {{math|base-''b''}} logarithm at the point {{math|(''x'', log<sub>''b''</sub>&thinsp;(''x''))}} equals {{math|1/(''x'' ln(''b''))}}.
 
The derivative of {{Math|ln(''x'')}} is {{Math|1/''x''}}; this implies that {{Math|ln(''x'')}} is the unique [[antiderivative]] of {{math|1/''x''}} that has the value 0 for {{math|1=''x'' = 1}}. It is this very simple formula that motivated to qualify as "natural" the natural logarithm; this is also one of the main reasons of the importance of the [[E (mathematical constant)|constant&nbsp;{{Mvar|e}}]].
 
The derivative with a generalized functional argument {{math|''f''(''x'')}} is
 
: <math>\frac{d}{dx} \ln f(x) = \frac{f'(x)}{f(x)}.</math>
 
The quotient at the right hand side is called the [[logarithmic derivative]] of ''{{Mvar|f}}''. Computing {{math|''f<nowiki>'</nowiki>''(''x'')}} by means of the derivative of {{math|ln(''f''(''x''))}} is known as [[logarithmic differentiation]].<ref>{{Citation|last1=Kline|first1=Morris|author1-link=Morris Kline|title=Calculus: an intuitive and physical approach|publisher=[[Dover Publications]]|location=New York|series=Dover books on mathematics|isbn=978-0-486-40453-0|year=1998}}, p.&nbsp;386</ref> The antiderivative of the [[natural logarithm]] {{math|ln(''x'')}} is:<ref>{{citation|work=Wolfram Alpha|title=Calculation of ''Integrate(ln(x))''|publisher=Wolfram Research|access-date=15 March 2011|url=http://www.wolframalpha.com/input/?i=Integrate(ln(x))}}</ref>
 
: <math>\int \ln(x) \,dx = x \ln(x) - x + C.</math>
 
[[List of integrals of logarithmic functions|Related formulas]], such as antiderivatives of logarithms to other bases can be derived from this equation using the change of bases.<ref>{{Harvard citations|editor1-last=Abramowitz|editor2-last=Stegun|year=1972|nb=yes|loc=p. 69}}</ref>
 
=== Integral representation of the natural logarithm ===
[[Berkas:Natural_logarithm_integral.svg|al=A hyperbola with part of the area underneath shaded in grey.|ka|jmpl|The [[natural logarithm]] of ''{{Mvar|t}}'' is the shaded area underneath the graph of the function {{math|1=''f''(''x'') = 1/''x''}} (reciprocal of {{mvar|x}}).]]
The [[natural logarithm]] of {{Mvar|t}} can be defined as the [[definite integral]]:
 
: <math>\ln t = \int_1^t \frac{1}{x} \, dx.</math>
 
This definition has the advantage that it does not rely on the exponential function or any trigonometric functions; the definition is in terms of an integral of a simple reciprocal. As an integral, {{math|ln(''t'')}} equals the area between the {{mvar|x}}-axis and the graph of the function {{math|1/''x''}}, ranging from {{math|1=''x'' = 1}} to {{math|1=''x'' = ''t''}}. This is a consequence of the [[fundamental theorem of calculus]] and the fact that the derivative of {{math|ln(''x'')}} is {{math|1/''x''}}. Product and power logarithm formulas can be derived from this definition.<ref>{{Citation|last1=Courant|first1=Richard|title=Differential and integral calculus. Vol. I|publisher=[[John Wiley & Sons]]|location=New York|series=Wiley Classics Library|isbn=978-0-471-60842-4|mr=1009558|year=1988}}, section III.6</ref> For example, the product formula {{math|1=ln(''tu'') = ln(''t'') + ln(''u'')}} is deduced as:
 
: <math> \ln(tu) = \int_1^{tu} \frac{1}{x} \, dx \ \stackrel {(1)} = \int_1^{t} \frac{1}{x} \, dx + \int_t^{tu} \frac{1}{x} \, dx \ \stackrel {(2)} = \ln(t) + \int_1^u \frac{1}{w} \, dw = \ln(t) + \ln(u).</math>
 
The equality&nbsp;(1) splits the integral into two parts, while the equality&nbsp;(2) is a change of variable ({{math|1=''w'' = {{mvar|x}}/''t''}}). In the illustration below, the splitting corresponds to dividing the area into the yellow and blue parts. Rescaling the left hand blue area vertically by the factor&nbsp;{{Mvar|t}} and shrinking it by the same factor horizontally does not change its size. Moving it appropriately, the area fits the graph of the function {{math|1=''f''(''x'') = 1/''x''}} again. Therefore, the left hand blue area, which is the integral of {{math|''f''(''x'')}} from {{Mvar|t}} to {{Mvar|tu}} is the same as the integral from 1 to {{Mvar|u}}. This justifies the equality&nbsp;(2) with a more geometric proof.
[[Berkas:Natural_logarithm_product_formula_proven_geometrically.svg|al=The hyperbola depicted twice. The area underneath is split into different parts.|pus|jmpl|500x500px|A visual proof of the product formula of the natural logarithm]]
The power formula {{math|1=ln(''t''<sup>''r''</sup>) = ''r'' ln(''t'')}} may be derived in a similar way:
 
: <math>
\ln(t^r) = \int_1^{t^r} \frac{1}{x}dx = \int_1^t \frac{1}{w^r} \left(rw^{r - 1} \, dw\right) = r \int_1^t \frac{1}{w} \, dw = r \ln(t).
</math>
 
The second equality uses a change of variables ([[integration by substitution]]), {{math|1=''w'' = {{mvar|x}}<sup>1/''r''</sup>}}.
 
The sum over the reciprocals of natural numbers,
 
: <math>1 + \frac 1 2 + \frac 1 3 + \cdots + \frac 1 n = \sum_{k=1}^n \frac{1}{k},</math>
 
is called the [[Harmonic series (mathematics)|harmonic series]]. It is closely tied to the [[natural logarithm]]: as {{Mvar|n}} tends to [[infinity]], the difference,
 
: <math>\sum_{k=1}^n \frac{1}{k} - \ln(n),</math>
 
[[Limit of a sequence|converges]] (i.e. gets arbitrarily close) to a number known as the [[Euler–Mascheroni constant]] {{math|1=''γ'' = 0.5772...}}. This relation aids in analyzing the performance of algorithms such as [[quicksort]].<ref>{{Citation|last1=Havil|first1=Julian|title=Gamma: Exploring Euler's Constant|publisher=[[Princeton University Press]]|isbn=978-0-691-09983-5|year=2003}}, sections 11.5 and 13.8</ref>
 
=== Transcendence of the logarithm ===
[[Real number|Real numbers]] that are not [[Algebraic number|algebraic]] are called [[Transcendental number|transcendental]];<ref>{{citation|title=Selected papers on number theory and algebraic geometry|volume=172|first1=Katsumi|last1=Nomizu|author-link=Katsumi Nomizu|location=Providence, RI|publisher=AMS Bookstore|year=1996|isbn=978-0-8218-0445-2|page=21|url={{google books |plainurl=y |id=uDDxdu0lrWAC|page=21}}}}</ref> for example, [[Pi|{{pi}}]] and ''[[E (mathematical constant)|e]]'' are such numbers, but <math>\sqrt{2-\sqrt 3}</math> is not. [[Almost all]] real numbers are transcendental. The logarithm is an example of a [[transcendental function]]. The [[Gelfond–Schneider theorem]] asserts that logarithms usually take transcendental, i.e. "difficult" values.<ref>{{Citation|last1=Baker|first1=Alan|author1-link=Alan Baker (mathematician)|title=Transcendental number theory|publisher=[[Cambridge University Press]]|isbn=978-0-521-20461-3|year=1975}}, p.&nbsp;10</ref>
 
== Calculation ==
[[Berkas:Logarithm_keys.jpg|jmpl|The logarithm keys (LOG for base&nbsp;10 and LN for base&nbsp;{{mvar|e}}) on a [[TI-83 series|TI-83 Plus]] graphing calculator]]
Logarithms are easy to compute in some cases, such as {{math|1=log<sub>10</sub>&thinsp;(1000) = 3}}. In general, logarithms can be calculated using [[power series]] or the [[arithmetic–geometric mean]], or be retrieved from a precalculated [[logarithm table]] that provides a fixed precision.<ref>{{Citation|last1=Muller|first1=Jean-Michel|title=Elementary functions|publisher=Birkhäuser Boston|location=Boston, MA|edition=2nd|isbn=978-0-8176-4372-0|year=2006}}, sections 4.2.2 (p. 72) and 5.5.2 (p. 95)</ref><ref>{{Citation|last1=Hart|last2=Cheney|last3=Lawson|year=1968|publisher=John Wiley|location=New York|title=Computer Approximations|series=SIAM Series in Applied Mathematics|display-authors=etal}}, section 6.3, pp.&nbsp;105–11</ref> [[Newton's method]], an iterative method to solve equations approximately, can also be used to calculate the logarithm, because its inverse function, the exponential function, can be computed efficiently.<ref>{{Citation|last1=Zhang|first1=M.|last2=Delgado-Frias|first2=J.G.|last3=Vassiliadis|first3=S.|title=Table driven Newton scheme for high precision logarithm generation|doi=10.1049/ip-cdt:19941268|journal=IEE Proceedings - Computers and Digital Techniques|issn=1350-2387|volume=141|year=1994|issue=5|pages=281–92}}, section 1 for an overview</ref> Using look-up tables, [[CORDIC]]-like methods can be used to compute logarithms by using only the operations of addition and [[Arithmetic shift|bit shifts]].<ref>{{Citation|url=https://semanticscholar.org/paper/b3741168ba25f23b694cf8f9c80fb4f2aabce513|first=J.E.|last=Meggitt|title=Pseudo Division and Pseudo Multiplication Processes|journal=IBM Journal of Research and Development|date=April 1962|doi=10.1147/rd.62.0210|volume=6|issue=2|pages=210–26|s2cid=19387286}}</ref><ref>{{Citation|last=Kahan|first=W.|author-link=William Kahan|title=Pseudo-Division Algorithms for Floating-Point Logarithms and Exponentials|date=20 May 2001}}</ref> Moreover, the [[Binary logarithm#Algorithm|binary logarithm algorithm]] calculates {{math|lb(''x'')}} [[Recursion|recursively]], based on repeated squarings of {{mvar|x}}, taking advantage of the relation
 
: <math>\log_2\left(x^2\right) = 2 \log_2 |x|.</math>
 
=== Power series ===
 
; Taylor series
 
[[Berkas:Taylor_approximation_of_natural_logarithm.gif|al=An animation showing increasingly good approximations of the logarithm graph.|ka|jmpl|The Taylor series of {{math|ln(''z'')}} centered at {{math|''z'' {{=}} 1}}. The animation shows the first&nbsp;10 approximations along with the 99th and 100th. The approximations do not converge beyond a distance of 1 from the center.]]
For any real number {{mvar|z}} that satisfies {{math|0 < ''z'' ≤ 2}}, the following formula holds:{{refn|The same series holds for the principal value of the complex logarithm for complex numbers {{mvar|z}} satisfying {{math|{{!}}''z'' − 1{{!}} < 1}}.|group=nb}}<ref name="AbramowitzStegunp.68">{{Harvard citations|editor1-last=Abramowitz|editor2-last=Stegun|year=1972|nb=yes|loc=p. 68}}</ref>
 
: <math>
\begin{align}\ln (z) &= \frac{(z-1)^1}{1} - \frac{(z-1)^2}{2} + \frac{(z-1)^3}{3} - \frac{(z-1)^4}{4} + \cdots \\
&= \sum_{k=1}^\infty (-1)^{k+1}\frac{(z-1)^k}{k}
\end{align}
</math>
 
This is a shorthand for saying that {{math|ln(''z'')}} can be approximated to a more and more accurate value by the following expressions:
 
: <math>
\begin{array}{lllll}
(z-1) & & \\
(z-1) & - & \frac{(z-1)^2}{2} & \\
(z-1) & - & \frac{(z-1)^2}{2} & + & \frac{(z-1)^3}{3} \\
\vdots &
\end{array}
</math>
 
For example, with {{math|''z'' {{=}} 1.5}} the third approximation yields 0.4167, which is about 0.011 greater than {{math|ln(1.5) {{=}} 0.405465}}. This [[Series (mathematics)|series]] approximates {{math|ln(''z'')}} with arbitrary precision, provided the number of summands is large enough. In elementary calculus, {{math|ln(''z'')}} is therefore the [[Limit (mathematics)|limit]] of this series. It is the [[Taylor series]] of the [[natural logarithm]] at {{math|1=''z'' = 1}}. The Taylor series of {{math|ln(''z'')}} provides a particularly useful approximation to {{math|ln(1 + ''z'')}} when {{mvar|z}} is small, {{math|{{!}}''z''{{!}} < 1}}, since then
 
: <math>
\ln (1+z) = z - \frac{z^2}{2} +\frac{z^3}{3}\cdots \approx z.
</math>
 
For example, with {{math|1=''z'' = 0.1}} the first-order approximation gives {{math|ln(1.1) ≈ 0.1}}, which is less than 5% off the correct value 0.0953.
 
; More efficient series
 
Another series is based on the [[area hyperbolic tangent]] function:
 
: <math>
\ln (z) = 2\cdot\operatorname{artanh}\,\frac{z-1}{z+1} = 2 \left ( \frac{z-1}{z+1} + \frac{1}{3}{\left(\frac{z-1}{z+1}\right)}^3 + \frac{1}{5}{\left(\frac{z-1}{z+1}\right)}^5 + \cdots \right ),
</math>
 
for any real number {{math|''z'' > 0}}.{{refn|The same series holds for the principal value of the complex logarithm for complex numbers {{mvar|z}} with positive real part.|group=nb}}<ref name="AbramowitzStegunp.68" /> Using [[sigma notation]], this is also written as
 
: <math>\ln (z) = 2\sum_{k=0}^\infty\frac{1}{2k+1}\left(\frac{z-1}{z+1}\right)^{2k+1}.</math>
 
This series can be derived from the above Taylor series. It converges more quickly than the Taylor series, especially if {{mvar|z}} is close to 1. For example, for {{math|1=''z'' = 1.5}}, the first three terms of the second series approximate {{math|ln(1.5)}} with an error of about {{val|3|e=-6}}. The quick convergence for {{mvar|z}} close to 1 can be taken advantage of in the following way: given a low-accuracy approximation {{math|''y'' ≈ ln(''z'')}} and putting
 
: <math>A = \frac z{\exp(y)},</math>
 
the logarithm of {{mvar|z}} is:
 
: <math>\ln (z)=y+\ln (A).</math>
 
The better the initial approximation {{mvar|y}} is, the closer {{mvar|A}} is to 1, so its logarithm can be calculated efficiently. {{mvar|A}} can be calculated using the [[Exponential function|exponential series]], which converges quickly provided {{mvar|y}} is not too large. Calculating the logarithm of larger {{mvar|z}} can be reduced to smaller values of {{mvar|z}} by writing {{math|''z'' {{=}} ''a'' · 10<sup>''b''</sup>}}, so that {{math|ln(''z'') {{=}} ln(''a'') + {{mvar|b}} · ln(10)}}.
 
A closely related method can be used to compute the logarithm of integers. Putting <math>\textstyle z=\frac{n+1}{n}</math> in the above series, it follows that:
 
: <math>\ln (n+1) = \ln(n) + 2\sum_{k=0}^\infty\frac{1}{2k+1}\left(\frac{1}{2 n+1}\right)^{2k+1}.</math>
 
If the logarithm of a large integer&nbsp;{{mvar|n}} is known, then this series yields a fast converging series for {{math|log(''n''+1)}}, with a [[rate of convergence]] of <math display="inline">\left(\frac{1}{2 n+1}\right)^{2}</math>.
 
=== Arithmetic–geometric mean approximation ===
The [[arithmetic–geometric mean]] yields high precision approximations of the [[natural logarithm]]. Sasaki and Kanada showed in 1982 that it was particularly fast for precisions between 400 and 1000 decimal places, while Taylor series methods were typically faster when less precision was needed. In their work {{math|ln(''x'')}} is approximated to a precision of {{math|2<sup>−''p''</sup>}} (or {{Mvar|p}}&nbsp;precise bits) by the following formula (due to [[Carl Friedrich Gauss]]):<ref>{{Citation|first1=T.|last1=Sasaki|first2=Y.|last2=Kanada|title=Practically fast multiple-precision evaluation of log(x)|journal=Journal of Information Processing|volume=5|issue=4|pages=247–50|year=1982|url=http://ci.nii.ac.jp/naid/110002673332|access-date=30 March 2011}}</ref><ref>{{Citation|first1=Timm|title=Stacs 99|last1=Ahrendt|publisher=Springer|location=Berlin, New York|series=Lecture notes in computer science|doi=10.1007/3-540-49116-3_28|volume=1564|year=1999|pages=302–12|isbn=978-3-540-65691-3|chapter=Fast Computations of the Exponential Function}}</ref>
 
: <math>\ln (x) \approx \frac{\pi}{2\, \mathrm{M}\!\left(1, 2^{2 - m}/x \right)} - m \ln(2).</math>
 
Here {{math|M(''x'', ''y'')}} denotes the [[arithmetic–geometric mean]] of {{mvar|x}} and {{mvar|y}}. It is obtained by repeatedly calculating the average {{Math|(''x'' + ''y'')/2}} ([[arithmetic mean]]) and <math display="inline">\sqrt{xy}</math> ([[geometric mean]]) of {{mvar|x}} and {{mvar|y}} then let those two numbers become the next {{mvar|x}} and {{mvar|y}}. The two numbers quickly converge to a common limit which is the value of {{math|M(''x'', ''y'')}}. {{mvar|m}} is chosen such that
 
: <math>x \,2^m > 2^{p/2}.\, </math>
 
to ensure the required precision. A larger {{mvar|m}} makes the {{math|M(''x'', ''y'')}} calculation take more steps (the initial {{mvar|x}} and {{mvar|y}} are farther apart so it takes more steps to converge) but gives more precision. The constants {{math|{{pi}}}} and {{math|ln(2)}} can be calculated with quickly converging series.
 
=== Feynman's algorithm ===
While at [[Los Alamos National Laboratory]] working on the [[Manhattan Project]], [[Richard Feynman]] developed a bit-processing algorithm, to compute the logarithm, that is similar to long division and was later used in the [[Connection Machine]]. The algorithm uses the fact that every real number {{Math|1 < ''x'' < 2}} is representable as a product of distinct factors of the form {{Math|1 + 2<sup>−''k''</sup>}}. The algorithm sequentially builds that product&nbsp;{{Mvar|P}}, starting with {{math|''P'' {{=}} 1}} and {{math|''k'' {{=}} 1}}: if {{math|''P'' · (1 + 2<sup>−''k''</sup>) < ''x''}}, then it changes {{Mvar|P}} to {{math|''P'' · (1 + 2<sup>−''k''</sup>)}}. It then increases <math>k</math> by one regardless. The algorithm stops when {{Mvar|k}} is large enough to give the desired accuracy. Because {{Math|log(''x'')}} is the sum of the terms of the form {{Math|log(1 + 2<sup>−''k''</sup>)}} corresponding to those {{Mvar|k}} for which the factor {{Math|1 + 2<sup>−''k''</sup>}} was included in the product&nbsp;{{Mvar|P}}, {{Math|log(''x'')}} may be computed by simple addition, using a table of {{Math|log(1 + 2<sup>−''k''</sup>)}} for all {{Mvar|k}}. Any base may be used for the logarithm table.<ref>{{citation|first=Danny|last=Hillis|author-link=Danny Hillis|title=Richard Feynman and The Connection Machine|journal=Physics Today|volume=42|issue=2|page=78|date=15 January 1989|doi=10.1063/1.881196|bibcode=1989PhT....42b..78H}}</ref>
 
== Applications ==
[[Berkas:NautilusCutawayLogarithmicSpiral.jpg|al=A photograph of a nautilus' shell.|jmpl|A [[nautilus]] displaying a logarithmic spiral]]
Logarithms have many applications inside and outside mathematics. Some of these occurrences are related to the notion of [[scale invariance]]. For example, each chamber of the shell of a [[nautilus]] is an approximate copy of the next one, scaled by a constant factor. This gives rise to a [[logarithmic spiral]].<ref>{{Harvard citations|last1=Maor|year=2009|nb=yes|loc=p. 135}}</ref> [[Benford's law]] on the distribution of leading digits can also be explained by scale invariance.<ref>{{Citation|last1=Frey|first1=Bruce|title=Statistics hacks|publisher=[[O'Reilly Media|O'Reilly]]|location=Sebastopol, CA|series=Hacks Series|url={{google books |plainurl=y |id=HOPyiNb9UqwC|page=275}}|isbn=978-0-596-10164-0|year=2006}}, chapter 6, section 64</ref> Logarithms are also linked to [[self-similarity]]. For example, logarithms appear in the analysis of algorithms that solve a problem by dividing it into two similar smaller problems and patching their solutions.<ref>{{Citation|last1=Ricciardi|first1=Luigi M.|title=Lectures in applied mathematics and informatics|url={{google books |plainurl=y |id=Cw4NAQAAIAAJ}}|publisher=Manchester University Press|location=Manchester|isbn=978-0-7190-2671-3|year=1990}}, p.&nbsp;21, section 1.3.2</ref> The dimensions of self-similar geometric shapes, that is, shapes whose parts resemble the overall picture are also based on logarithms. [[Logarithmic scale|Logarithmic scales]] are useful for quantifying the relative change of a value as opposed to its absolute difference. Moreover, because the logarithmic function {{math|log(''x'')}} grows very slowly for large {{mvar|x}}, logarithmic scales are used to compress large-scale scientific data. Logarithms also occur in numerous scientific formulas, such as the [[Tsiolkovsky rocket equation]], the [[Fenske equation]], or the [[Nernst equation]].
 
=== Logarithmic scale ===
{{Main|Logarithmic scale}}
[[Berkas:Germany_Hyperinflation.svg|al=A graph of the value of one mark over time. The line showing its value is increasing very quickly, even with logarithmic scale.|ka|jmpl|A logarithmic chart depicting the value of one [[German gold mark|Goldmark]] in [[German Papiermark|Papiermarks]] during the [[Inflation in the Weimar Republic|German hyperinflation in the 1920s]]]]
Scientific quantities are often expressed as logarithms of other quantities, using a ''logarithmic scale''. For example, the [[decibel]] is a [[unit of measurement]] associated with [[logarithmic-scale]] [[Level quantity|quantities]]. It is based on the common logarithm of [[Ratio|ratios]]—10&nbsp;times the common logarithm of a [[Power (physics)|power]] ratio or 20&nbsp;times the common logarithm of a [[voltage]] ratio. It is used to quantify the loss of voltage levels in transmitting electrical signals,<ref>{{Citation|last1=Bakshi|first1=U.A.|title=Telecommunication Engineering|publisher=Technical Publications|location=Pune|isbn=978-81-8431-725-1|year=2009|url={{google books |plainurl=y |id=EV4AF0XJO9wC|page=A5}}}}, section 5.2</ref> to describe power levels of sounds in [[acoustics]],<ref>{{Citation|last1=Maling|first1=George C.|editor1-last=Rossing|editor1-first=Thomas D.|title=Springer handbook of acoustics|publisher=[[Springer-Verlag]]|location=Berlin, New York|isbn=978-0-387-30446-5|year=2007|chapter=Noise}}, section 23.0.2</ref> and the [[absorbance]] of light in the fields of [[Spectrometer|spectrometry]] and [[optics]]. The [[signal-to-noise ratio]] describing the amount of unwanted [[Noise (electronic)|noise]] in relation to a (meaningful) [[Signal (information theory)|signal]] is also measured in decibels.<ref>{{Citation|last1=Tashev|first1=Ivan Jelev|title=Sound Capture and Processing: Practical Approaches|publisher=[[John Wiley & Sons]]|location=New York|isbn=978-0-470-31983-3|year=2009|url={{google books |plainurl=y |id=plll9smnbOIC|page=48}}|page=98}}</ref> In a similar vein, the [[peak signal-to-noise ratio]] is commonly used to assess the quality of sound and [[image compression]] methods using the logarithm.<ref>{{Citation|last1=Chui|first1=C.K.|title=Wavelets: a mathematical tool for signal processing|publisher=[[Society for Industrial and Applied Mathematics]]|location=Philadelphia|series=SIAM monographs on mathematical modeling and computation|isbn=978-0-89871-384-8|year=1997|url={{google books |plainurl=y |id=N06Gu433PawC|page=180}}}}</ref>
 
The strength of an earthquake is measured by taking the common logarithm of the energy emitted at the quake. This is used in the [[moment magnitude scale]] or the [[Richter magnitude scale]]. For example, a 5.0 earthquake releases 32&nbsp;times {{math|(10<sup>1.5</sup>)}} and a 6.0 releases 1000&nbsp;times {{math|(10<sup>3</sup>)}} the energy of a 4.0.<ref>{{Citation|last1=Crauder|first1=Bruce|last2=Evans|first2=Benny|last3=Noell|first3=Alan|title=Functions and Change: A Modeling Approach to College Algebra|publisher=Cengage Learning|location=Boston|edition=4th|isbn=978-0-547-15669-9|year=2008}}, section 4.4.</ref> [[Apparent magnitude]] measures the brightness of stars logarithmically.<ref>{{Citation|last1=Bradt|first1=Hale|title=Astronomy methods: a physical approach to astronomical observations|publisher=[[Cambridge University Press]]|series=Cambridge Planetary Science|isbn=978-0-521-53551-9|year=2004}}, section 8.3, p.&nbsp;231</ref> In [[chemistry]] the negative of the decimal logarithm, the decimal '''{{vanchor|cologarithm}}''', is indicated by the letter p.<ref name="Jens">{{cite journal|author=Nørby, Jens|year=2000|title=The origin and the meaning of the little p in pH|journal=Trends in Biochemical Sciences|volume=25|issue=1|pages=36–37|doi=10.1016/S0968-0004(99)01517-0|pmid=10637613}}</ref> For instance, [[pH]] is the decimal cologarithm of the [[Activity (chemistry)|activity]] of [[hydronium]] ions (the form [[hydrogen]] [[Ion|ions]] {{chem|H|+|}} take in water).<ref>{{Citation|author=IUPAC|title=Compendium of Chemical Terminology ("Gold Book")|edition=2nd|editor=A. D. McNaught, A. Wilkinson|publisher=Blackwell Scientific Publications|location=Oxford|year=1997|url=http://goldbook.iupac.org/P04524.html|isbn=978-0-9678550-9-7|doi=10.1351/goldbook|author-link=IUPAC|doi-access=free}}</ref> The activity of hydronium ions in neutral water is 10<sup>−7</sup>&nbsp;[[Molar concentration|mol·L<sup>−1</sup>]], hence a pH of 7. Vinegar typically has a pH of about 3. The difference of 4 corresponds to a ratio of 10<sup>4</sup> of the activity, that is, vinegar's hydronium ion activity is about {{math|10<sup>−3</sup> mol·L<sup>−1</sup>}}.
 
[[Semi-log plot|Semilog]] (log–linear) graphs use the logarithmic scale concept for visualization: one axis, typically the vertical one, is scaled logarithmically. For example, the chart at the right compresses the steep increase from 1&nbsp;million to 1&nbsp;trillion to the same space (on the vertical axis) as the increase from 1 to 1&nbsp;million. In such graphs, [[Exponential function|exponential functions]] of the form {{math|1=''f''(''x'') = ''a'' · ''b''{{i sup|''x''}}}} appear as straight lines with [[slope]] equal to the logarithm of {{mvar|b}}. [[Log-log plot|Log-log]] graphs scale both axes logarithmically, which causes functions of the form {{math|1=''f''(''x'') = ''a'' · ''x''{{i sup|''k''}}}} to be depicted as straight lines with slope equal to the exponent&nbsp;{{mvar|k}}. This is applied in visualizing and analyzing [[Power law|power laws]].<ref>{{Citation|last1=Bird|first1=J.O.|title=Newnes engineering mathematics pocket book|publisher=Newnes|location=Oxford|edition=3rd|isbn=978-0-7506-4992-6|year=2001}}, section 34</ref>
 
=== Psychology ===
Logarithms occur in several laws describing [[human perception]]:<ref>{{Citation|last1=Goldstein|first1=E. Bruce|title=Encyclopedia of Perception|url={{google books |plainurl=y |id=Y4TOEN4f5ZMC}}|publisher=Sage|location=Thousand Oaks, CA|series=Encyclopedia of Perception|isbn=978-1-4129-4081-8|year=2009}}, pp.&nbsp;355–56</ref><ref>{{Citation|last1=Matthews|first1=Gerald|title=Human Performance: Cognition, Stress, and Individual Differences|url={{google books |plainurl=y |id=0XrpulSM1HUC}}|publisher=Psychology Press|location=Hove|isbn=978-0-415-04406-6|year=2000}}, p.&nbsp;48</ref> [[Hick's law]] proposes a logarithmic relation between the time individuals take to choose an alternative and the number of choices they have.<ref>{{Citation|last1=Welford|first1=A.T.|title=Fundamentals of skill|publisher=Methuen|location=London|isbn=978-0-416-03000-6|oclc=219156|year=1968}}, p.&nbsp;61</ref> [[Fitts's law]] predicts that the time required to rapidly move to a target area is a logarithmic function of the distance to and the size of the target.<ref>{{Citation|author=Paul M. Fitts|date=June 1954|title=The information capacity of the human motor system in controlling the amplitude of movement|journal=Journal of Experimental Psychology|volume=47|issue=6|pages=381–91|pmid=13174710|doi=10.1037/h0055392|s2cid=501599|url=https://semanticscholar.org/paper/3087289229146fc344560478aac366e4977749c0}}, reprinted in {{Citation|journal=Journal of Experimental Psychology: General|volume=121|issue=3|pages=262–69|year=1992|pmid=1402698|url=http://sing.stanford.edu/cs303-sp10/papers/1954-Fitts.pdf|access-date=30 March 2011|title=The information capacity of the human motor system in controlling the amplitude of movement|author=Paul M. Fitts|doi=10.1037/0096-3445.121.3.262}}</ref> In [[psychophysics]], the [[Weber–Fechner law]] proposes a logarithmic relationship between [[Stimulus (psychology)|stimulus]] and [[Sensation (psychology)|sensation]] such as the actual vs. the perceived weight of an item a person is carrying.<ref>{{Citation|last1=Banerjee|first1=J.C.|title=Encyclopaedic dictionary of psychological terms|publisher=M.D. Publications|location=New Delhi|isbn=978-81-85880-28-0|oclc=33860167|year=1994|url={{google books |plainurl=y |id=Pwl5U2q5hfcC|page=306}}|page=304}}</ref> (This "law", however, is less realistic than more recent models, such as [[Stevens's power law]].<ref>{{Citation|last1=Nadel|first1=Lynn|author1-link=Lynn Nadel|title=Encyclopedia of cognitive science|publisher=[[John Wiley & Sons]]|location=New York|isbn=978-0-470-01619-0|year=2005}}, lemmas ''Psychophysics'' and ''Perception: Overview''</ref>)
 
Psychological studies found that individuals with little mathematics education tend to estimate quantities logarithmically, that is, they position a number on an unmarked line according to its logarithm, so that 10 is positioned as close to 100 as 100 is to 1000. Increasing education shifts this to a linear estimate (positioning 1000 10 times as far away) in some circumstances, while logarithms are used when the numbers to be plotted are difficult to plot linearly.<ref>{{Citation|doi=10.1111/1467-9280.02438|journal=Psychological Science|archive-date=17 May 2011|archive-url=https://web.archive.org/web/20110517002232/http://www.psy.cmu.edu/~siegler/sieglerbooth-cd04.pdf|access-date=7 January 2011|s2cid=9583202|citeseerx=10.1.1.727.3696|pmid=12741747|url=http://www.psy.cmu.edu/~siegler/sieglerbooth-cd04.pdf|year=2003|last1=Siegler|pages=237–43|issue=3|volume=14|title=The Development of Numerical Estimation. Evidence for Multiple Representations of Numerical Quantity|first2=John E.|last2=Opfer|first1=Robert S.|url-status=dead}}</ref><ref>{{Citation|last1=Dehaene|issue=5880|bibcode=2008Sci...320.1217D|journal=Science|year=2008|pmid=18511690|pmc=2610411|doi=10.1126/science.1156540|pages=1217–20|volume=320|first1=Stanislas|title=Log or Linear? Distinct Intuitions of the Number Scale in Western and Amazonian Indigene Cultures|first4=Pierre|last4=Pica|first3=Elizabeth|last3=Spelke|first2=Véronique|last2=Izard|citeseerx=10.1.1.362.2390}}</ref>
 
=== Probability theory and statistics ===
[[Berkas:PDF-log_normal_distributions.svg|al=Three asymmetric PDF curves|ka|jmpl|Three [[Probability density function|probability density functions]] (PDF) of random variables with log-normal distributions. The location parameter&nbsp;{{math|μ}}, which is zero for all three of the PDFs shown, is the mean of the logarithm of the random variable, not the mean of the variable itself.]]
[[Berkas:Benfords_law_illustrated_by_world's_countries_population.png|al=A bar chart and a superimposed second chart. The two differ slightly, but both decrease in a similar fashion.|ka|jmpl|Distribution of first digits (in %, red bars) in the [[List of countries by population|population of the 237 countries]] of the world. Black dots indicate the distribution predicted by Benford's law.]]
Logarithms arise in [[probability theory]]: the [[law of large numbers]] dictates that, for a [[fair coin]], as the number of coin-tosses increases to infinity, the observed proportion of heads [[Binomial distribution|approaches one-half]]. The fluctuations of this proportion about one-half are described by the [[law of the iterated logarithm]].<ref>{{Citation|last1=Breiman|first1=Leo|title=Probability|publisher=[[Society for Industrial and Applied Mathematics]]|location=Philadelphia|series=Classics in applied mathematics|isbn=978-0-89871-296-4|year=1992}}, section 12.9</ref>
 
Logarithms also occur in [[Log-normal distribution|log-normal distributions]]. When the logarithm of a [[random variable]] has a [[normal distribution]], the variable is said to have a log-normal distribution.<ref>{{Citation|last1=Aitchison|first1=J.|last2=Brown|first2=J.A.C.|title=The lognormal distribution|publisher=[[Cambridge University Press]]|isbn=978-0-521-04011-2|oclc=301100935|year=1969}}</ref> Log-normal distributions are encountered in many fields, wherever a variable is formed as the product of many independent positive random variables, for example in the study of turbulence.<ref>{{Citation|title=An introduction to turbulent flow|author=Jean Mathieu and Julian Scott|publisher=Cambridge University Press|year=2000|isbn=978-0-521-77538-0|page=50|url={{google books |plainurl=y |id=nVA53NEAx64C|page=50}}}}</ref>
 
Logarithms are used for [[maximum-likelihood estimation]] of parametric [[Statistical model|statistical models]]. For such a model, the [[likelihood function]] depends on at least one [[Parametric model|parameter]] that must be estimated. A maximum of the likelihood function occurs at the same parameter-value as a maximum of the logarithm of the likelihood (the "''log&nbsp;likelihood''"), because the logarithm is an increasing function. The log-likelihood is easier to maximize, especially for the multiplied likelihoods for [[Independence (probability)|independent]] random variables.<ref>{{Citation|last1=Rose|first1=Colin|last2=Smith|first2=Murray D.|title=Mathematical statistics with Mathematica|publisher=[[Springer-Verlag]]|location=Berlin, New York|series=Springer texts in statistics|isbn=978-0-387-95234-5|year=2002}}, section 11.3</ref>
 
[[Benford's law]] describes the occurrence of digits in many [[Data set|data sets]], such as heights of buildings. According to Benford's law, the probability that the first decimal-digit of an item in the data sample is {{Mvar|d}} (from 1 to 9) equals {{math|log<sub>10</sub>&thinsp;(''d'' + 1) − log<sub>10</sub>&thinsp;(''d'')}}, ''regardless'' of the unit of measurement.<ref>{{Citation|last1=Tabachnikov|first1=Serge|author-link1=Sergei Tabachnikov|title=Geometry and Billiards|publisher=[[American Mathematical Society]]|location=Providence, RI|isbn=978-0-8218-3919-5|year=2005|pages=36–40}}, section 2.1</ref> Thus, about 30% of the data can be expected to have 1 as first digit, 18% start with 2, etc. Auditors examine deviations from Benford's law to detect fraudulent accounting.<ref>{{citation|title=The Effective Use of Benford's Law in Detecting Fraud in Accounting Data|first1=Cindy|last1=Durtschi|first2=William|last2=Hillison|first3=Carl|last3=Pacini|url=http://faculty.usfsp.edu/gkearns/Articles_Fraud/Benford%20Analysis%20Article.pdf|volume=V|pages=17–34|year=2004|journal=Journal of Forensic Accounting|archive-url=https://web.archive.org/web/20170829062510/http://faculty.usfsp.edu/gkearns/Articles_Fraud/Benford%20Analysis%20Article.pdf|archive-date=29 August 2017|access-date=28 May 2018}}</ref>
 
=== Computational complexity ===
[[Analysis of algorithms]] is a branch of [[computer science]] that studies the [[Time complexity|performance]] of [[Algorithm|algorithms]] (computer programs solving a certain problem).<ref name="Wegener">{{Citation|last1=Wegener|first1=Ingo|title=Complexity theory: exploring the limits of efficient algorithms|publisher=[[Springer-Verlag]]|location=Berlin, New York|isbn=978-3-540-21045-0|year=2005}}, pp. 1–2</ref> Logarithms are valuable for describing algorithms that [[Divide and conquer algorithm|divide a problem]] into smaller ones, and join the solutions of the subproblems.<ref>{{Citation|last1=Harel|first1=David|last2=Feldman|first2=Yishai A.|title=Algorithmics: the spirit of computing|location=New York|publisher=[[Addison-Wesley]]|isbn=978-0-321-11784-7|year=2004}}, p.&nbsp;143</ref>
 
For example, to find a number in a sorted list, the [[binary search algorithm]] checks the middle entry and proceeds with the half before or after the middle entry if the number is still not found. This algorithm requires, on average, {{math|log<sub>2</sub>&thinsp;(''N'')}} comparisons, where {{mvar|N}} is the list's length.<ref>{{citation|last=Knuth|first=Donald|author-link=Donald Knuth|title=The Art of Computer Programming|publisher=Addison-Wesley|location=Reading, MA|year=1998|isbn=978-0-201-89685-5|title-link=The Art of Computer Programming}}, section 6.2.1, pp. 409–26</ref> Similarly, the [[merge sort]] algorithm sorts an unsorted list by dividing the list into halves and sorting these first before merging the results. Merge sort algorithms typically require a time [[Big O notation|approximately proportional to]] {{math|''N'' · log(''N'')}}.<ref>{{Harvard citations|last=Knuth|first=Donald|year=1998|loc=section 5.2.4, pp. 158–68|nb=yes}}</ref> The base of the logarithm is not specified here, because the result only changes by a constant factor when another base is used. A constant factor is usually disregarded in the analysis of algorithms under the standard [[uniform cost model]].<ref name="Wegener20">{{Citation|last1=Wegener|first1=Ingo|title=Complexity theory: exploring the limits of efficient algorithms|publisher=[[Springer-Verlag]]|location=Berlin, New York|isbn=978-3-540-21045-0|year=2005|page=20}}</ref>
 
A function&nbsp;{{math|''f''(''x'')}} is said to [[Logarithmic growth|grow logarithmically]] if {{math|''f''(''x'')}} is (exactly or approximately) proportional to the logarithm of {{mvar|x}}. (Biological descriptions of organism growth, however, use this term for an exponential function.<ref>{{Citation|last1=Mohr|first1=Hans|last2=Schopfer|first2=Peter|title=Plant physiology|publisher=Springer-Verlag|location=Berlin, New York|isbn=978-3-540-58016-4|year=1995|url-access=registration|url=https://archive.org/details/plantphysiology0000mohr}}, chapter 19, p.&nbsp;298</ref>) For example, any [[natural number]]&nbsp;{{mvar|N}} can be represented in [[Binary numeral system|binary form]] in no more than {{math|log<sub>2</sub>&thinsp;''N'' + 1}}&nbsp;[[Bit|bits]]. In other words, the amount of [[Memory (computing)|memory]] needed to store {{mvar|N}} grows logarithmically with {{mvar|N}}.
 
=== Entropy and chaos ===
[[Berkas:Chaotic_Bunimovich_stadium.png|al=An oval shape with the trajectories of two particles.|ka|jmpl|[[Dynamical billiards|Billiards]] on an oval [[billiard table]]. Two particles, starting at the center with an angle differing by one degree, take paths that diverge chaotically because of [[Reflection (physics)|reflections]] at the boundary.]]
[[Entropy]] is broadly a measure of the disorder of some system. In [[statistical thermodynamics]], the entropy&nbsp;''S'' of some physical system is defined as
 
: <math> S = - k \sum_i p_i \ln(p_i).\, </math>
 
The sum is over all possible states&nbsp;{{Mvar|i}} of the system in question, such as the positions of gas particles in a container. Moreover, {{math|''p''<sub>''i''</sub>}} is the probability that the state&nbsp;{{Mvar|i}} is attained and {{mvar|k}} is the [[Boltzmann constant]]. Similarly, [[Entropy (information theory)|entropy in information theory]] measures the quantity of information. If a message recipient may expect any one of {{mvar|N}} possible messages with equal likelihood, then the amount of information conveyed by any one such message is quantified as {{math|log<sub>2</sub>&thinsp;''N''}} bits.<ref>{{Citation|last1=Eco|first1=Umberto|author1-link=Umberto Eco|title=The open work|publisher=[[Harvard University Press]]|isbn=978-0-674-63976-8|year=1989}}, section III.I</ref>
 
[[Lyapunov exponent|Lyapunov exponents]] use logarithms to gauge the degree of chaoticity of a [[dynamical system]]. For example, for a particle moving on an oval billiard table, even small changes of the initial conditions result in very different paths of the particle. Such systems are [[Chaos theory|chaotic]] in a [[Deterministic system|deterministic]] way, because small measurement errors of the initial state predictably lead to largely different final states.<ref>{{Citation|last1=Sprott|first1=Julien Clinton|title=Elegant Chaos: Algebraically Simple Chaotic Flows|journal=Elegant Chaos: Algebraically Simple Chaotic Flows. Edited by Sprott Julien Clinton. Published by World Scientific Publishing Co. Pte. Ltd|url={{google books |plainurl=y |id=buILBDre9S4C}}|publisher=[[World Scientific]]|location=New Jersey|isbn=978-981-283-881-0|year=2010|bibcode=2010ecas.book.....S|doi=10.1142/7183}}, section 1.9</ref> At least one Lyapunov exponent of a deterministically chaotic system is positive.
 
=== Fractals ===
[[Berkas:Sierpinski_dimension.svg|al=Parts of a triangle are removed in an iterated way.|ka|jmpl|400x400px|The Sierpinski triangle (at the right) is constructed by repeatedly replacing [[Equilateral triangle|equilateral triangles]] by three smaller ones.]]
Logarithms occur in definitions of the [[Fractal dimension|dimension]] of [[Fractal|fractals]].<ref>{{Citation|last1=Helmberg|first1=Gilbert|title=Getting acquainted with fractals|publisher=Walter de Gruyter|series=De Gruyter Textbook|location=Berlin, New York|isbn=978-3-11-019092-2|year=2007}}</ref> Fractals are geometric objects that are self-similar in the sense that small parts reproduce, at least roughly, the entire global structure. The [[Sierpinski triangle]] (pictured) can be covered by three copies of itself, each having sides half the original length. This makes the [[Hausdorff dimension]] of this structure {{math|ln(3)/ln(2) ≈ 1.58}}. Another logarithm-based notion of dimension is obtained by [[Box-counting dimension|counting the number of boxes]] needed to cover the fractal in question.
 
=== Music ===
{{multiple image
| direction = vertical
| width = 350
| footer = Four different octaves shown on a linear scale, then shown on a logarithmic scale (as the ear hears them).
| image1 = 4Octaves.and.Frequencies.svg
| alt1 = Four different octaves shown on a linear scale.
| image2 = 4Octaves.and.Frequencies.Ears.svg
| alt2 = Four different octaves shown on a logarithmic scale.
}}
Logarithms are related to musical tones and [[Interval (music)|intervals]]. In [[equal temperament]], the frequency ratio depends only on the interval between two tones, not on the specific frequency, or [[Pitch (music)|pitch]], of the individual tones. For example, the [[A (musical note)|note&nbsp;''A'']] has a frequency of 440&nbsp;[[Hertz|Hz]] and [[B♭ (musical note)|''B-flat'']] has a frequency of 466&nbsp;Hz. The interval between ''A'' and ''B-flat'' is a [[semitone]], as is the one between ''B-flat'' and [[B (musical note)|''B'']] (frequency 493&nbsp;Hz). Accordingly, the frequency ratios agree:
 
: <math>\frac{466}{440} \approx \frac{493}{466} \approx 1.059 \approx \sqrt[12]2.</math>
 
Therefore, logarithms can be used to describe the intervals: an interval is measured in semitones by taking the {{Nowrap|base-{{math|2<sup>1/12</sup>}}}} logarithm of the [[frequency]] ratio, while the {{Nowrap|base-{{math|2<sup>1/1200</sup>}}}} logarithm of the frequency ratio expresses the interval in [[Cent (music)|cents]], hundredths of a semitone. The latter is used for finer encoding, as it is needed for non-equal temperaments.<ref>{{Citation|last1=Wright|first1=David|title=Mathematics and music|location=Providence, RI|publisher=AMS Bookstore|isbn=978-0-8218-4873-9|year=2009}}, chapter 5</ref>
{| class="wikitable" style="text-align:center; margin:1em auto 1em auto;"
|'''Interval'''(the two tones are played at the same time)
|[[72 tone equal temperament|1/12 tone]] {{audio|1_step_in_72-et_on_C.mid|play}}
|[[Semitone]] {{audio|Minor_second_on_C.mid|play|help=no}}
|[[Just major third]] {{audio|Just_major_third_on_C.mid|play|help=no}}
|[[Major third]] {{audio|Major_third_on_C.mid|play|help=no}}
|[[Tritone]] {{audio|Tritone_on_C.mid|play|help=no}}
|[[Octave]] {{audio|Perfect_octave_on_C.mid|play|help=no}}
|-
|'''Frequency ratio''' ''r''
|<math>2^{\frac 1 {72}} \approx 1.0097</math>
|<math>2^{\frac 1 {12}} \approx 1.0595</math>
|<math>\tfrac 5 4 = 1.25</math>
|<math>\begin{align} 2^{\frac 4 {12}} & = \sqrt[3] 2 \\ & \approx 1.2599 \end{align} </math>
|<math>\begin{align} 2^{\frac 6 {12}} & = \sqrt 2 \\ & \approx 1.4142 \end{align} </math>
|<math> 2^{\frac {12} {12}} = 2 </math>
|-
|'''Corresponding number of semitones'''<math>\log_{\sqrt[12] 2}(r) = 12 \log_2 (r)</math>
|<math>\tfrac 1 6</math>
|<math>1</math>
|<math>\approx 3.8631</math>
|<math>4</math>
|<math>6</math>
|<math>12</math>
|-
|'''Corresponding number of cents'''<math>\log_{\sqrt[1200] 2}(r) = 1200 \log_2 (r)</math>
|<math>16 \tfrac 2 3</math>
|<math>100</math>
|<math>\approx 386.31</math>
|<math>400</math>
|<math>600</math>
|<math>1200</math>
|}
 
=== Number theory ===
[[Natural logarithm|Natural logarithms]] are closely linked to [[Prime-counting function|counting prime numbers]] (2, 3, 5, 7, 11, ...), an important topic in [[number theory]]. For any [[integer]]&nbsp;{{mvar|x}}, the quantity of [[Prime number|prime numbers]] less than or equal to {{mvar|x}} is denoted {{math|[[prime-counting function|{{pi}}(''x'')]]}}. The [[prime number theorem]] asserts that {{math|{{pi}}(''x'')}} is approximately given by
 
: <math>\frac{x}{\ln(x)},</math>
 
in the sense that the ratio of {{math|{{pi}}(''x'')}} and that fraction approaches 1 when {{mvar|x}} tends to infinity.<ref>{{Citation|last1=Bateman|first1=P.T.|last2=Diamond|first2=Harold G.|title=Analytic number theory: an introductory course|publisher=[[World Scientific]]|location=New Jersey|isbn=978-981-256-080-3|oclc=492669517|year=2004}}, theorem 4.1</ref> As a consequence, the probability that a randomly chosen number between 1 and {{mvar|x}} is prime is inversely [[Proportionality (mathematics)|proportional]] to the number of decimal digits of {{mvar|x}}. A far better estimate of {{math|{{pi}}(''x'')}} is given by the [[Logarithmic integral function|offset logarithmic integral]] function {{math|Li(''x'')}}, defined by
 
: <math> \mathrm{Li}(x) = \int_2^x \frac1{\ln(t)} \,dt. </math>
 
The [[Riemann hypothesis]], one of the oldest open mathematical [[Conjecture|conjectures]], can be stated in terms of comparing {{math|{{pi}}(''x'')}} and {{math|Li(''x'')}}.<ref>{{Harvard citations|last1=Bateman|first1=P. T.|last2=Diamond|year=2004|nb=yes|loc=Theorem 8.15}}</ref> The [[Erdős–Kac theorem]] describing the number of distinct [[Prime factor|prime factors]] also involves the [[natural logarithm]].
 
The logarithm of ''n'' [[factorial]], {{math|1=''n''! = 1 · 2 · ... · ''n''}}, is given by
 
: <math> \ln (n!) = \ln (1) + \ln (2) + \cdots + \ln (n).</math>
 
This can be used to obtain [[Stirling's formula]], an approximation of {{math|''n''!}} for large {{mvar|n}}.<ref>{{Citation|last1=Slomson|first1=Alan B.|title=An introduction to combinatorics|publisher=[[CRC Press]]|location=London|isbn=978-0-412-35370-3|year=1991}}, chapter 4</ref>
 
== Generalizations ==
 
=== Complex logarithm ===
{{Main|Complex logarithm}}
[[Berkas:Complex_number_illustration_multiple_arguments.svg|al=An illustration of the polar form: a point is described by an arrow or equivalently by its length and angle to the x-axis.|ka|jmpl|Polar form of {{math|''z {{=}} x + iy''}}. Both {{mvar|φ}} and {{mvar|φ'}} are arguments of {{mvar|z}}.]]
All the [[Complex number|complex numbers]] {{mvar|a}} that solve the equation
 
: <math>e^a=z</math>
 
are called ''complex logarithms'' of {{mvar|z}}, when {{mvar|z}} is (considered as) a complex number. A complex number is commonly represented as {{math|''z {{=}} x + iy''}}, where {{mvar|x}} and {{mvar|y}} are real numbers and {{mvar|i}} is an [[imaginary unit]], the square of which is −1. Such a number can be visualized by a point in the [[complex plane]], as shown at the right. The [[polar form]] encodes a non-zero complex number&nbsp;{{mvar|z}} by its [[absolute value]], that is, the (positive, real) distance&nbsp;{{Mvar|r}} to the [[Origin (mathematics)|origin]], and an angle between the real ({{mvar|x}}) axis''&nbsp;''{{Math|Re}} and the line passing through both the origin and {{mvar|z}}. This angle is called the [[Argument (complex analysis)|argument]] of {{mvar|z}}.
 
The absolute value {{mvar|r}} of {{mvar|z}} is given by
 
: <math>\textstyle r=\sqrt{x^2+y^2}.</math>
 
Using the geometrical interpretation of [[sine]] and [[cosine]] and their periodicity in {{Math|2{{pi}}}}, any complex number&nbsp;{{mvar|z}} may be denoted as
 
: <math>z = x + iy = r (\cos \varphi + i \sin \varphi )= r (\cos (\varphi + 2k\pi) + i \sin (\varphi + 2k\pi)),</math>
 
for any integer number&nbsp;{{mvar|k}}. Evidently the argument of {{mvar|z}} is not uniquely specified: both {{mvar|φ}} and {{Math|1=''φ''' = ''φ'' + 2''k''{{pi}}}} are valid arguments of {{mvar|z}} for all integers&nbsp;{{mvar|k}}, because adding {{Math|2''k''{{pi}}}}&nbsp;[[Radian|radians]] or ''k''⋅360°{{refn|See [[radian]] for the conversion between 2[[pi|{{pi}}]] and 360 [[degree (angle)|degree]].|group=nb}} to {{mvar|φ}} corresponds to "winding" around the origin counter-clock-wise by {{mvar|k}}&nbsp;[[Turn (geometry)|turns]]. The resulting complex number is always {{mvar|z}}, as illustrated at the right for {{math|''k'' {{=}} 1}}. One may select exactly one of the possible arguments of {{mvar|z}} as the so-called ''principal argument'', denoted {{math|Arg(''z'')}}, with a capital&nbsp;{{math|A}}, by requiring {{mvar|φ}} to belong to one, conveniently selected turn, e.g. {{Math|−{{pi}} < ''φ'' ≤ {{pi}}}}<ref>{{Citation|last1=Ganguly|location=Kolkata|first1=S.|title=Elements of Complex Analysis|publisher=Academic Publishers|isbn=978-81-87504-86-3|year=2005}}, Definition 1.6.3</ref> or {{Math|0 ≤ ''φ'' < 2{{pi}}}}.<ref>{{Citation|last1=Nevanlinna|first1=Rolf Herman|author1-link=Rolf Nevanlinna|last2=Paatero|first2=Veikko|title=Introduction to complex analysis|journal=London: Hilger|location=Providence, RI|publisher=AMS Bookstore|isbn=978-0-8218-4399-4|year=2007|bibcode=1974aitc.book.....W}}, section 5.9</ref> These regions, where the argument of {{mvar|z}} is uniquely determined are called [[Principal branch|''branches'']] of the argument function.
[[Berkas:Complex_log_domain.svg|al=A density plot. In the middle there is a black point, at the negative axis the hue jumps sharply and evolves smoothly otherwise.|ka|jmpl|The principal branch (-{{pi}}, {{pi}}) of the complex logarithm, {{math|Log(''z'')}}. The black point at {{math|''z'' {{=}} 1}} corresponds to absolute value zero and brighter colors refer to bigger absolute values. The [[hue]] of the color encodes the argument of {{math|Log(''z'')}}.]]
[[Euler's formula]] connects the [[trigonometric functions]] [[sine]] and [[cosine]] to the [[complex exponential]]:
 
: <math>e^{i\varphi} = \cos \varphi + i\sin \varphi .</math>
 
Using this formula, and again the periodicity, the following identities hold:<ref>{{Citation|last1=Moore|first1=Theral Orvis|last2=Hadlock|first2=Edwin H.|title=Complex analysis|publisher=[[World Scientific]]|location=Singapore|isbn=978-981-02-0246-0|year=1991}}, section 1.2</ref>
 
: <math> \begin{array}{lll}z& = & r \left (\cos \varphi + i \sin \varphi\right) \\
& = & r \left (\cos(\varphi + 2k\pi) + i \sin(\varphi + 2k\pi)\right) \\
& = & r e^{i (\varphi + 2k\pi)} \\
& = & e^{\ln(r)} e^{i (\varphi + 2k\pi)} \\
& = & e^{\ln(r) + i(\varphi + 2k\pi)} = e^{a_k},
\end{array}
</math>
 
where {{math|ln(''r'')}} is the unique real natural logarithm, {{math|''a''<sub>''k''</sub>}} denote the complex logarithms of {{mvar|z}}, and {{mvar|k}} is an arbitrary integer. Therefore, the complex logarithms of {{mvar|z}}, which are all those complex values {{math|''a''<sub>''k''</sub>}} for which the {{math|''a''<sub>''k''</sub>-th}}&nbsp;power of {{mvar|e}} equals {{mvar|z}}, are the infinitely many values
 
: <math>a_k = \ln (r) + i ( \varphi + 2 k \pi ),\quad</math> for arbitrary integers&nbsp;{{mvar|k}}.
 
Taking {{mvar|k}} such that {{Math|''φ'' + 2''k''{{pi}}}} is within the defined interval for the principal arguments, then {{math|''a''<sub>''k''</sub>}} is called the ''principal value'' of the logarithm, denoted {{math|Log(''z'')}}, again with a capital&nbsp;{{math|L}}. The principal argument of any positive real number&nbsp;{{mvar|x}} is 0; hence {{math|Log(''x'')}} is a real number and equals the real (natural) logarithm. However, the above formulas for logarithms of products and powers [[Exponentiation#Failure of power and logarithm identities|do ''not'' generalize]] to the principal value of the complex logarithm.<ref>{{Citation|last1=Wilde|first1=Ivan Francis|title=Lecture notes on complex analysis|publisher=Imperial College Press|location=London|isbn=978-1-86094-642-4|year=2006|url=https://books.google.com/books?id=vrWES2W6vG0C&q=complex+logarithm&pg=PA97}}, theorem 6.1.</ref>
 
The illustration at the right depicts {{math|Log(''z'')}}, confining the arguments of {{mvar|z}} to the interval {{open-closed|−π, π}}. This way the corresponding branch of the complex logarithm has discontinuities all along the negative real {{mvar|x}}&nbsp;axis, which can be seen in the jump in the hue there. This discontinuity arises from jumping to the other boundary in the same branch, when crossing a boundary, i.e. not changing to the corresponding {{mvar|k}}-value of the continuously neighboring branch. Such a locus is called a [[branch cut]]. Dropping the range restrictions on the argument makes the relations "argument of {{mvar|z}}", and consequently the "logarithm of {{mvar|z}}", [[Multi-valued function|multi-valued functions]].
 
=== Inverses of other exponential functions ===
Exponentiation occurs in many areas of mathematics and its inverse function is often referred to as the logarithm. For example, the [[logarithm of a matrix]] is the (multi-valued) inverse function of the [[matrix exponential]].<ref>{{Citation|last1=Higham|first1=Nicholas|author1-link=Nicholas Higham|title=Functions of Matrices. Theory and Computation|location=Philadelphia, PA|publisher=[[Society for Industrial and Applied Mathematics|SIAM]]|isbn=978-0-89871-646-7|year=2008}}, chapter 11.</ref> Another example is the [[P-adic logarithm function|''p''-adic logarithm]], the inverse function of the [[P-adic exponential function|''p''-adic exponential]]. Both are defined via Taylor series analogous to the real case.<ref>{{Neukirch ANT|mode=cs2}}, section II.5.</ref> In the context of [[differential geometry]], the [[Exponential map (Riemannian geometry)|exponential map]] maps the [[tangent space]] at a point of a [[Differentiable manifold|manifold]] to a [[Neighborhood (mathematics)|neighborhood]] of that point. Its inverse is also called the logarithmic (or log) map.<ref>{{Citation|last1=Hancock|first1=Edwin R.|last2=Martin|first2=Ralph R.|last3=Sabin|first3=Malcolm A.|title=Mathematics of Surfaces XIII: 13th IMA International Conference York, UK, September 7–9, 2009 Proceedings|url=https://books.google.com/books?id=0cqCy9x7V_QC&pg=PA379|publisher=Springer|year=2009|page=379|isbn=978-3-642-03595-1}}</ref>
 
In the context of [[finite groups]] exponentiation is given by repeatedly multiplying one group element&nbsp;{{mvar|b}} with itself. The [[discrete logarithm]] is the integer&nbsp;''{{mvar|n}}'' solving the equation
 
: <math>b^n = x,</math>
 
where {{mvar|x}} is an element of the group. Carrying out the exponentiation can be done efficiently, but the discrete logarithm is believed to be very hard to calculate in some groups. This asymmetry has important applications in [[public key cryptography]], such as for example in the [[Diffie–Hellman key exchange]], a routine that allows secure exchanges of [[Cryptography|cryptographic]] keys over unsecured information channels.<ref>{{Citation|last1=Stinson|first1=Douglas Robert|title=Cryptography: Theory and Practice|publisher=[[CRC Press]]|location=London|edition=3rd|isbn=978-1-58488-508-5|year=2006}}</ref> [[Zech's logarithm]] is related to the discrete logarithm in the multiplicative group of non-zero elements of a [[finite field]].<ref>{{Citation|last1=Lidl|first1=Rudolf|last2=Niederreiter|first2=Harald|author2-link=Harald Niederreiter|title=Finite fields|publisher=Cambridge University Press|isbn=978-0-521-39231-0|year=1997|url-access=registration|url=https://archive.org/details/finitefields0000lidl_a8r3}}</ref>
 
{{anchor|double logarithm}}Further logarithm-like inverse functions include the ''double logarithm''&nbsp;{{math|ln(ln(''x''))}}, the ''[[Super-logarithm|super- or hyper-4-logarithm]]'' (a slight variation of which is called [[iterated logarithm]] in computer science), the [[Lambert W function]], and the [[logit]]. They are the inverse functions of the [[double exponential function]], [[tetration]], of {{math|''f''(''w'') {{=}} ''we<sup>w</sup>''}},<ref>{{Citation|last1=Corless|year=1996|archive-date=14 December 2010|archive-url=https://web.archive.org/web/20101214110615/http://www.apmaths.uwo.ca/~djeffrey/Offprints/W-adv-cm.pdf|access-date=13 February 2011|s2cid=29028411|doi=10.1007/BF02124750|pages=329–59|volume=5|issn=1019-7168|journal=Advances in Computational Mathematics|url=http://www.apmaths.uwo.ca/~djeffrey/Offprints/W-adv-cm.pdf|first1=R.|title=On the Lambert ''W'' function|author5-link=Donald Knuth|first5=Donald|last5=Knuth|first4=D.|last4=Jeffrey|first3=D.|last3=Hare|first2=G.|last2=Gonnet|url-status=dead}}</ref> and of the [[logistic function]], respectively.<ref>{{Citation|last1=Cherkassky|first1=Vladimir|last2=Cherkassky|first2=Vladimir S.|last3=Mulier|first3=Filip|title=Learning from data: concepts, theory, and methods|publisher=[[John Wiley & Sons]]|location=New York|series=Wiley series on adaptive and learning systems for signal processing, communications, and control|isbn=978-0-471-68182-3|year=2007}}, p.&nbsp;357</ref>
 
=== Related concepts ===
From the perspective of [[group theory]], the identity {{math|log(''cd'') {{=}} log(''c'') + log(''d'')}} expresses a [[group isomorphism]] between positive [[Real number|reals]] under multiplication and reals under addition. Logarithmic functions are the only continuous isomorphisms between these groups.<ref>{{Citation|last1=Bourbaki|first1=Nicolas|author1-link=Nicolas Bourbaki|title=General topology. Chapters 5–10|publisher=[[Springer-Verlag]]|location=Berlin, New York|series=Elements of Mathematics|isbn=978-3-540-64563-4|mr=1726872|year=1998}}, section V.4.1</ref> By means of that isomorphism, the [[Haar measure]] ([[Lebesgue measure]])&nbsp;{{math|''dx''}} on the reals corresponds to the Haar measure&nbsp;{{math|''dx''/''x''}} on the positive reals.<ref>{{Citation|last1=Ambartzumian|first1=R.V.|author-link=Rouben V. Ambartzumian|title=Factorization calculus and geometric probability|publisher=[[Cambridge University Press]]|isbn=978-0-521-34535-4|year=1990|url-access=registration|url=https://archive.org/details/factorizationcal0000amba}}, section 1.4</ref> The non-negative reals not only have a multiplication, but also have addition, and form a [[semiring]], called the [[probability semiring]]; this is in fact a [[semifield]]. The logarithm then takes multiplication to addition (log multiplication), and takes addition to log addition ([[LogSumExp]]), giving an [[isomorphism]] of semirings between the probability semiring and the [[log semiring]].
 
[[Logarithmic form|Logarithmic one-forms&nbsp;]]{{math|''df''/''f''}} appear in [[complex analysis]] and [[algebraic geometry]] as [[Differential form|differential forms]] with logarithmic [[Pole (complex analysis)|poles]].<ref>{{Citation|last1=Esnault|first1=Hélène|last2=Viehweg|first2=Eckart|title=Lectures on vanishing theorems|location=Basel, Boston|publisher=Birkhäuser Verlag|series=DMV Seminar|isbn=978-3-7643-2822-1|mr=1193913|year=1992|volume=20|doi=10.1007/978-3-0348-8600-0|citeseerx=10.1.1.178.3227}}, section 2</ref>
 
The [[polylogarithm]] is the function defined by
 
: <math>
\operatorname{Li}_s(z) = \sum_{k=1}^\infty {z^k \over k^s}.
</math>
 
It is related to the [[natural logarithm]] by {{math|1=Li<sub>1</sub>&thinsp;(''z'') = −ln(1 − ''z'')}}. Moreover, {{math|Li<sub>''s''</sub>&thinsp;(1)}} equals the [[Riemann zeta function]] {{math|ζ(''s'')}}.<ref>{{dlmf|id=25.12|first=T.M.|last=Apostol}}</ref>
 
== See also ==
{{Portal|Mathematics|Arithmetic|Chemistry|Geography|Engineering}}
 
* [[Decimal exponent]] (dex)
* [[Exponential function]]
* [[Index of logarithm articles]]
* [[Logarithmic notation]]
 
== Notes ==
{{reflist|30em|group=nb}}
 
== References ==
{{Reflist}}
 
== External links ==
* {{Commons category-inline}}
* {{Wiktionary-inline}}
*{{sister-inline|project=v|links=[[v:Speak Math Now!/Week 9: Six rules of Exponents/Logarithms|A lesson on logarithms can be found on Wikiversity]]|short=yes}}
* {{MathWorld|Logarithm|Logarithm|mode=cs2}}
 
* [https://web.archive.org/web/20121218200616/http://www.khanacademy.org/math/algebra/logarithms-tutorial Khan Academy: Logarithms, free online micro lectures]
* {{springer|title=Logarithmic function|id=p/l060600}}
* {{Citation|author=Colin Byfleet|url=http://mediasite.oddl.fsu.edu/mediasite/Viewer/?peid=003298f9a02f468c8351c50488d6c479|title=Educational video on logarithms|access-date=12 October 2010}}
* {{Citation|author=Edward Wright|url=http://www.johnnapier.com/table_of_logarithms_001.htm|title=Translation of Napier's work on logarithms|access-date=12 October 2010|url-status=unfit|archive-url=https://web.archive.org/web/20021203005508/http://www.johnnapier.com/table_of_logarithms_001.htm|archive-date=3 December 2002}}
* {{Cite EB1911|wstitle=Logarithm|volume=16|pages=868–77|first=James Whitbread Lee|last=Glaisher|mode=cs2}}