Pengguna:Klasüo/bak pasir: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Klasüo (bicara | kontrib)
Tag: Suntingan perangkat seluler Suntingan peramban seluler Suntingan seluler lanjutan
Klasüo (bicara | kontrib)
Pembersihan.
Tag: Penggantian Suntingan perangkat seluler Suntingan peramban seluler Suntingan seluler lanjutan
 
(28 revisi perantara oleh 2 pengguna tidak ditampilkan)
Baris 6:
<div style="text-align:center">{{archive list
| start=1
| max=33100
}}</div>
|}
----
{{short description|Invers dari fungsi eksponensial, para pemetaan darab ke jumlah}}
{{Use dmy dates|date=Juni 2020}}
{{Lead too long|date=Oktober 2021}}
{{Infobox mathematical function
|name=Logaritma
|image=Logarithms.svg
|imagesize=240px
|domain=<math> (0,\infty) </math>
|kodomain=<math> (-\infty,\infty) </math>
|plusinf=<math> \infty </math>
|root=<math> 1 </math>
|max=Tidak ada
|min=Tidak ada
|inverse=<math> x = b^y </math>
|derivative=<math> \frac{1}{x \ln b} </math>
|antiderivative=<math> x \log_b x - \frac{x}{\ln b} + C </math>
}}
[[Berkas:Logarithm plots.png|right|thumb|upright=1.35|Plot fungsi logaritma, dengan tiga basis yang umum digunakan. Titik-titik khusus {{math|log<sub>''b''</sub> ''b'' {{=}} 1}} ditandai dengan garis bertitik-titik, dan semua irisan kurva pada {{math|1=log<sub>''b''</sub>&thinsp;1 = 0}}.]]
{{Operasi aritmetika}}
Dalam [[matematika]], '''logaritma''' adalah [[fungsi invers]] dengan [[eksponen]]. Itu berarti logaritma dari suatu bilangan yang diberikan {{mvar|x}} adalah [[eksponen]] dimana bilangan tetap lainnya, ''[[basis (eksponen)|basis]]'' {{mvar|b}} dimasukkan untuk menghasilkan bilangan tersebut, yaitu {{mvar|x}}. Dalam kasus yang sederhana, logaritma menghitung jumlah kemunculan faktor yang sama dalam perkalian berulang; misalnya karena {{math|1000 {{=}} 10 × 10 × 10 {{=}} 10<sup>3</sup>}}, "basis logaritma 10" dari 1000 adalah 3, atau {{math|log<sub>10</sub>&thinsp;(1000) {{=}} 3}}. Logaritma {{mvar|x}} ke ''basis'' {{mvar|b}} dinotasikan sebagai {{math|log<sub>''b''</sub>&thinsp;(''x'')}}, atau tanpa tanda kurung {{math|log<sub>''b''</sub> ''x''}}, bahkan tanpa basis eksplisit {{math|log ''x''}}, ketika tidak ada kebingungan yang mungkin terjadi, atau ketika basis tidak penting seperti dalam [[notasi O besar]].
 
The logarithm base {{math|10}} (that is {{math|1=''b'' = 10}}) is called the decimal or [[common logarithm]] and is commonly used in science and engineering. The [[natural logarithm]] has the [[e (mathematical constant)|number&nbsp;{{mvar|e}}]] (that is {{math|''b'' ≈ 2.718}}) as its base; its use is widespread in mathematics and [[physics]], because of its simpler [[integral]] and [[derivative]]. The [[binary logarithm]] uses base {{math|2}} (that is {{math|1=''b'' = 2}}) and is frequently used in [[computer science]].
 
Logarithms were introduced by [[John Napier]] in 1614 as a means of simplifying calculations.<ref>{{citation|url=http://archive.org/details/johnnapierinvent00hobsiala|title=John Napier and the invention of logarithms, 1614; a lecture|last=Hobson|first=Ernest William|date=1914|publisher=Cambridge : University Press|others=University of California Libraries}}</ref> They were rapidly adopted by navigators, scientists, engineers, surveyors and others to perform high-accuracy computations more easily. Using [[Mathematical table|logarithm tables]], tedious multi-digit multiplication steps can be replaced by table look-ups and simpler addition. This is possible because of the fact—important in its own right—that the logarithm of a [[product (mathematics)|product]] is the [[summation|sum]] of the logarithms of the factors:
:<math> \log_b(xy) = \log_b x + \log_b y,</math>
provided that {{mvar|b}}, {{mvar|x}} and {{mvar|y}} are all positive and {{math|''b'' ≠ 1}}. The [[slide rule]], also based on logarithms, allows quick calculations without tables, but at lower precision. The present-day notion of logarithms comes from [[Leonhard Euler]], who connected them to the [[exponential function]] in the 18th century, and who also introduced the letter {{mvar|e}} as the base of natural logarithms.<ref>{{citation|title=Theory of complex functions|last=Remmert, Reinhold.|date=1991|publisher=Springer-Verlag|isbn=0387971955|location=New York|oclc=21118309}}</ref>
 
[[Logarithmic scale]]s reduce wide-ranging quantities to smaller scopes. For example, the [[decibel]] (dB) is a [[Units of measurement|unit]] used to express [[Level (logarithmic quantity)|ratio as logarithms]], mostly for signal power and amplitude (of which [[sound pressure]] is a common example). In chemistry, [[pH]] is a logarithmic measure for the [[acid]]ity of an [[aqueous solution]]. Logarithms are commonplace in scientific [[formula]]e, and in measurements of the [[Computational complexity theory|complexity of algorithms]] and of geometric objects called [[fractal]]s. They help to describe [[frequency]] ratios of [[Interval (music)|musical intervals]], appear in formulas counting [[prime number]]s or [[Stirling's approximation|approximating]] [[factorial]]s, inform some models in [[psychophysics]], and can aid in [[forensic accounting]].
 
In the same way as the logarithm reverses [[exponentiation]], the [[complex logarithm]] is the [[inverse function]] of the exponential function, whether applied to [[real number]]s or [[complex number]]s. The modular [[discrete logarithm]] is another variant; it has uses in [[public-key cryptography]].
 
==Motivasi==
[[Berkas:Binary logarithm plot with grid.png|right|thumb|upright=1.35|alt=Grafik yang menunjukkan kurva logaritmik, melintasi sumbu ''x'' diantara ''x''= 1 dan mendekati minus tak-hingga sepanjang sumbu-''y''.|[[fungsi graf|grafik]] dari basis logaritma 2 memotong [[sumbu x|sumbu-''x'']] antara {{math|''x'' {{=}} 1}} dan melewati titik {{nowrap|(2, 1)}}, {{nowrap|(4, 2)}}, dan {{nowrap|(8, 3)}} yang menggambarkan {{math|log<sub>2</sub>(8) {{=}} 3}} dan {{math|2<sup>3</sup> {{=}} 8}}. Grafik secara arbiter mendekati sumbu-{{mvar|y}}, tetapi [[asimptotik|tak-memenuhinya]].]]
[[Penjumlahan]], [[perkalian]], dan [[eksponen]] adalah tiga dari operasi aritmetika yang paling mendasar. Kebalikan dari penjumlahan adalah pengurangan, dan kebalikan dari perkalian adalah [[pembagian (matematika)|pembagian]]. Sehingga, logaritma adalah operasi kebalikan dari [[eksponen]]. Eksponen adalah ketika suatu bilangan {{mvar|b}}, ''basis'' dipangkatkan ke pangkat tertentu {{mvar|y}}, ''eksponen'' untuk memberikan nilai {{mvar|x}}; dilambangkan
: <math>b^y=x.</math>
Misalnya, dipangkatkan {{math|2}} ke pangkat {{math|3}} menghasilkan {{math|8}}, adalah: <math>2^3 = 8</math>
 
Logaritma basis {{mvar|b}} adalah operasi kebalikan, yang memberikan keluaran {{mvar|y}} dari masukan {{mvar|x}}. Artinya, <math>y = \log_b x</math> sama dengan <math>x=b^y</math> jika {{mvar|b}} adalah [[bilangan real]] positif. (Jika {{mvar|b}} dalam bukan bilangan real positif, eksponensial dan logaritma didefinisikan, tetapi mungkin memerlukan beberapa nilai, yang membuat definisi menjadi lebih rumit.)
 
Salah satu motivasi historis utama memperkenalkan rumus logaritma adalah
:<math>\log_b(xy)=\log_b x + \log_b y,</math>
yang memungkinkan (sebelum ditemukannya komputer) untuk mengurangi perhitungan perkalian dan pembagian menjadi penambahan, pengurangan dan pencarian [[tabel logaritma]].
 
== Definisi ==
Logaritma dapat dipahami secara matematis sebagai anggota fungsi (yang keseluruhannya dilambangkan dengan <math> b </math>) dari <math>\R^+ \to \R</math>. Fungsi logaritma masing-masing hanya berbeda (tetapi tidak sama dengan nol) kelipatan satu sama lain.
 
Ini diperkenalkan dengan cara yang berbeda pada bilangan real positif. Tergantung pada latar belakang dan niat, Anda akan memilih satu atau pendekatan didaktik lainnya. Definisi yang berbeda dari logaritma real antara satu sama lain [[konversi ekuivalen|ekuivalen]] dan dibuat dengan fokus khusus pada logaritma alami, yang terjadi secara ''alami'' dari sudut pandang para matematikawan, seperti yang dilihat dalam akses melalui [[integral tak tentu]] dari <math>\tfrac{1}{t}</math>.
 
=== Sebagai fungsi invers dari fungsi eksponensial ===
Logaritma ke basis <math>b</math> adalah fungsi invers dari [[fungsi eksponensial]] pada basis positif <math>b</math>, yaitu:
: <math>x \mapsto b^x.</math>
 
Oleh karena itu, fungsi <math>b^x</math> dan <math> \log_b x</math> adalah [[fungsi invers]] satu sama lain. Logaritma membalikkan eksponensial dan sebaliknya:
: <math>b^{\log_b x} = x \quad \text{dan} \quad \log_b(b^x) = x.</math>
 
Hasil logaritma alami dari basis <math>b=\mathrm{e}</math>, dimana
: <math>\mathrm{e} = 2{,}718281828459\ldots</math>
yang adalah [[bilangan Euler]].
 
=== Sebagai solusi untuk persamaan fungsional ===
<!-- Disembunyikan: Georg-Johann: memungkinkan d/dx L(1) = 1 -->
 
Fungsi logaritma adalah solusi kontinu non-trivial <math>L</math> dari [[persamaan fungsional]]
: <math>L(x \cdot y) = L(x) + L(y).</math>
Solusi dapat memenuhi <math>L(1)=0</math> dan bahkan dapat diturunkan. Logaritma alami kemudian diperoleh secara bersama dengan kondisi tambahan
: <math>L'(1) = 1.</math>
 
Kondisi tambahan adalah salah satu alasan untuk sebutan logaritma yang diperoleh secara ''alami''. Jikalau mendapatkan logaritma ke basis lain <math>b</math> melalui kondisi tambahan, maka yang harus dilakukan adalah
: <math>L'(1) = \frac 1{\ln b}</math>
dan selalu membutuhkan logaritma alami lagi.
 
Solusi trivial dari persamaan fungsional atas adalah [[fungsi null]] <math>L(x)=0</math>, yang tidak dianggap sebagai fungsi logaritmik, dan satu-satunya solusi dari persamaan fungsional yang juga didefinisikan <math>L(0)</math>.
 
Karena persamaan fungsional atas, maka dari itu logaritma menyampaikan khususnya [[homomorfisme|pemetaan pelestarian struktur]] dari bilangan real positif dengan struktur perkalian. Apabila seseorang juga menemukan secara eksplisit ini sebagai suatu kondisi dan dengan demikian sampai pada turunan.
 
=== Als Isomorphismus ===
Die reellwertigen Logarithmen sind genau die stetigen [[Isomorphismus|Isomorphismen]]
: <math>L\colon(\R^+\!,\,\cdot\,) \longrightarrow (\R,+)</math>.
Diese Definition legt die Funktion <math>L</math> bis auf eine multiplikative Konstante eindeutig fest.
 
Der algebraische Zugang betont ebenso wie der Zugang über die Funktionalgleichung
die historische Bedeutung des Logarithmus als Rechenhilfe: Er ermöglicht es, eine Multiplikation in eine Addition „umzuwandeln“.
 
=== Als Stammfunktion von ''f'' mit ''f''(''x'')=1/''x'' ===
[[Datei:Natural logarithm integral.svg|mini|Der natürliche Logarithmus als Fläche unter dem Graphen von 1/''x'']]
 
Die Funktion
: <math>L\colon t \mapsto \int_1^t \frac 1x\,\mathrm dx</math>
mit <math>t>0</math> ist gerade der natürliche Logarithmus: Es ist <math>L=\ln</math>. Zum Logarithmus mit der Basis&nbsp;<math>b</math> gelangt man durch Division der Funktion&nbsp;<math>L</math> durch die Konstante <math>L(b)= \ln b</math>. Als uneigentliches Integral von <math>f</math>, oder beliebiger willkürlicher (positiver) unterer Integrationsgrenze, betrachtet, würde man nur noch eine zusätzliche, additive Konstante erhalten, aber immer nur den Logarithmus zur Basis <math>\mathrm{e}</math> bekommen.
 
=== Als Potenzreihe ===
Der natürliche Logarithmus kann als [[Potenzreihe]] gemäß
: <math>\ln(1+x) = \sum_{k=1}^\infty (-1)^{k+1} \frac{x^k}k = x-\frac{x^2}2 + \frac{x^3}3 -\frac{x^4}4 + \dotsb</math>
eingeführt werden. Diese Reihe konvergiert für <math>|x|<1</math> und für <math>x=1</math>.
 
Für eine numerische Berechnung des Werts <math>\ln(1+x)</math> für <math>x>1</math> ist die Beziehung <math>\ln(1+x)=-\ln\Bigl(1+\Bigl(-\frac x{1+x}\Bigr)\Bigr)</math> nützlich.
 
=== Anmerkung ===
Diese Definitionen können auch herangezogen werden, um Logarithmen auf anderen mathematischen Strukturen zu erhalten, wie z.&nbsp;B. auf den komplexen Zahlen. Das setzt voraus, dass in der betreffenden Struktur die zur Definition verwendeten Konzepte existieren.
 
Um etwa den [[Diskreter Logarithmus|diskreten Logarithmus]] auf einer [[Gruppe (Mathematik)|Gruppe]] zu definieren, können Konzepte wie Differentiation/Integration nicht herangezogen werden, weil sie dort gar nicht existieren. (Die Definition geschieht dort als Umkehrung der Potenzierung mit ganzen Exponenten, die wiederum aus mehrfachem Anwenden der ''einen'' Verknüpfung der Gruppe definiert ist.)
 
==Logarithmic identities==
{{Main|List of logarithmic identities}}
 
Several important formulas, sometimes called ''logarithmic identities'' or ''logarithmic laws'', relate logarithms to one another.<ref>All statements in this section can be found in {{Harvard citations|last1=Shirali|first1=Shailesh|year=2002|loc=section 4|nb=yes}}, {{Harvard citations|last1=Downing| first1=Douglas |year=2003|loc=p. 275}}, or {{Harvard citations|last1=Kate|last2=Bhapkar|year=2009|loc=p. 1-1|nb=yes}}, for example.</ref>
 
===Product, quotient, power, and root===
The logarithm of a product is the sum of the logarithms of the numbers being multiplied; the logarithm of the ratio of two numbers is the difference of the logarithms. The logarithm of the {{Mvar|p}}-th power of a number is ''{{Mvar|p}}&nbsp;''times the logarithm of the number itself; the logarithm of a {{Mvar|p}}-th root is the logarithm of the number divided by {{Mvar|p}}. The following table lists these identities with examples. Each of the identities can be derived after substitution of the logarithm definitions <math>x = b^{\, \log_b x}</math> or <math>y = b^{\, \log_b y}</math> in the left hand sides.
 
{| class="wikitable" style="margin: 0 auto;"
|-
! !! Formula !! Example
|-
| Product|| <math display="inline">\log_b(x y) = \log_b x + \log_b y</math>
| <math display="inline">\log_3 243 = \log_3 (9 \cdot 27) = \log_3 9 + \log_3 27 = 2 + 3 = 5</math>
|-
| Quotient || <math display="inline">\log_b \!\frac{x}{y} = \log_b x - \log_b y</math>
| <math display="inline">\log_2 16 = \log_2 \!\frac{64}{4} = \log_2 64 - \log_2 4 = 6 - 2 = 4</math>
|-
| Power || <math display="inline">\log_b\left(x^p\right) = p \log_b x</math>
| <math display="inline">\log_2 64 = \log_2 \left(2^6\right) = 6 \log_2 2 = 6</math>
|-
| Root || <math display="inline">\log_b \sqrt[p]{x} = \frac{\log_b x}{p}</math>
| <math display="inline">\log_{10} \sqrt{1000} = \frac{1}{2}\log_{10} 1000 = \frac{3}{2} = 1.5</math>
|}
 
===Change of base===<!-- This section is linked from [[Mathematica]] -->
The logarithm {{math|log<sub>''b''</sub>&thinsp;''x''}} can be computed from the logarithms of {{mvar|x}} and {{mvar|b}} with respect to an arbitrary base&nbsp;{{Mvar|k}} using the following formula:
 
:<math> \log_b x = \frac{\log_k x}{\log_k b}.\, </math>
 
{{Collapse top|title=Derivation of the conversion factor between logarithms of arbitrary base|width=80%}}
Starting from the defining identity
 
: <math> x = b^{\log_b x} </math>
 
we can apply {{math|log<sub>''k''</sub>}} to both sides of this equation, to get
 
: <math> \log_k x = \log_k \left(b^{\log_b x}\right) = \log_b x \cdot \log_k b</math>.
 
Solving for <math>\log_b x</math> yields:
 
: <math> \log_b x = \frac{\log_k x}{\log_k b}</math>,
 
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 }}, p.&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>
 
Given a number {{mvar|x}} and its logarithm {{math|1=''y'' = log<sub>''b''</sub>&thinsp;''x''}} to an unknown base&nbsp;{{mvar|b}}, the base is given by:
 
:<math> b = x^\frac{1}{y},</math>
 
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>
 
==Particular bases==
[[File:Log4.svg|thumb|upright=1.2|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]]s of a positive integer {{mvar|x}}: the number of digits is the smallest [[integer]] strictly bigger than {{math|1=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)|nat]]s or [[bit]]s 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 [[cent (music)|cent]] is the binary logarithm (scaled by 1200) of the ratio between two adjacent equally-tempered pitches in European [[classical music]]; and in [[photography]] to measure [[exposure value]]s.<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>&thinsp;''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}}}}<br />(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]]s{{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,<br />[[statistics]], [[economics]], information theory, and engineering
|-
! scope="row"|10
| [[common logarithm]]
| {{math|lg ''x''}}
| {{math|log ''x''}}, {{math|log<sub>10</sub>&thinsp;''x''}}<br />(in engineering, biology, astronomy)
| various [[engineering]] fields (see [[decibel]] and see below), <br />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}}==
[[Image:Logarithms Britannica 1797.png|thumb|360px|right|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|1=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]]s 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]]s.
 
===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:
 
[[Image:Slide rule example2 with labels.svg|center|thumb|550px|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}}.|alt=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.]]
 
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: {{math|1=''f''(''x'') = {{mvar|b}}<sup>&thinsp;''x''</sup>}}.
 
===Logarithmic function===
To justify the definition of logarithms, it is necessary to show that the equation
:<math>b^x = y</math>
 
has a solution {{mvar|x}} and that this solution is unique, provided that {{mvar|y}} is positive and that {{mvar|b}} is positive and unequal to 1. A proof of that fact requires the [[intermediate value theorem]] from elementary [[calculus]].<ref name=LangIII.3>{{Citation|last1=Lang|first1=Serge|author1-link=Serge Lang|title=Undergraduate analysis|publisher=[[Springer-Verlag]]|location=Berlin, New York|edition=2nd|series=[[Undergraduate Texts in Mathematics]]|isbn=978-0-387-94841-6|mr=1476913|year=1997|doi=10.1007/978-1-4757-2698-5}}, section III.3</ref> This theorem states that a [[continuous function]] that produces two values ''{{mvar|m}}'' and ''{{mvar|n}}'' also produces any value that lies between ''{{mvar|m}}'' and ''{{mvar|n}}''. A function is ''continuous'' if it does not "jump", that is, if its graph can be drawn without lifting the pen.
 
This property can be shown to hold for the function {{math|1=''f''(''x'') = {{mvar|b}}<sup>&thinsp;''x''</sup>}}. Because ''{{mvar|f}}'' takes arbitrarily large and arbitrarily small positive values, any number {{math|''y'' > 0}} lies between {{math|''f''(''x''<sub>0</sub>)}} and {{math|''f''(''x''<sub>1</sub>)}} for suitable {{math|''x''<sub>0</sub>}} and {{math|''x''<sub>1</sub>}}. Hence, the intermediate value theorem ensures that the equation {{math|1=''f''(''x'') = {{mvar|y}}}} has a solution. Moreover, there is only one solution to this equation, because the function&nbsp;{{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>
 
The unique solution {{mvar|x}} is the logarithm of {{mvar|y}} to base&nbsp;{{mvar|b}}, {{math|log<sub>''b''</sub>&thinsp;''y''}}. The function that assigns to {{mvar|y}} its logarithm is called ''logarithm function'' or ''logarithmic function'' (or just ''logarithm'').
 
The function {{math|log<sub>''b''</sub>&thinsp;''x''}} is 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>
 
===Inverse function===
[[File:Logarithm inversefunctiontoexp.svg|right|thumb|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}}}}).|alt=The graphs of two functions.]]
The formula for the logarithm of a power says in particular that for any number&nbsp;{{mvar|x}},
:<math>\log_b \left (b^x \right) = x \log_b b = x.</math>
In prose, taking the {{Mvar|x}}-th power of {{mvar|b}} and then the {{Nowrap|base-{{mvar|b}}}} logarithm gives back {{mvar|x}}. Conversely, given a positive number&nbsp;{{mvar|y}}, the formula
:<math>b^{\log_b y} = y</math>
says that first taking the logarithm and then exponentiating gives back {{mvar|y}}. Thus, the two possible ways of combining (or [[function composition|composing]]) logarithms and exponentiation give back the original number. Therefore, the logarithm to base&nbsp;{{mvar|b}} is the ''[[inverse function]]'' of {{math|''f''(''x'') {{=}} {{mvar|b}}<sup>''x''</sup>}}.<ref>{{Citation | last1=Stewart | first1=James | title=Single Variable Calculus: Early Transcendentals | publisher=Thomson Brooks/Cole |location=Belmont|isbn=978-0-495-01169-9 | year=2007}}, section 1.6</ref>
 
Inverse functions are closely related to the original functions. 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===
[[File:Logarithm derivative.svg|right|thumb|220px|The graph of the [[natural logarithm]] (green) and its tangent at {{math|''x'' {{=}} 1.5}} (black)|alt=A graph of the logarithm function and a line touching it in one point.]]
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===
[[File:Natural logarithm integral.svg|right|thumb|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}}).|alt=A hyperbola with part of the area underneath shaded in grey.]]
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.
 
[[File:Natural logarithm product formula proven geometrically.svg|thumb|center|500px|A visual proof of the product formula of the natural logarithm|alt=The hyperbola depicted twice. The area underneath is split into different parts.]]
 
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]]s 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==
[[File:Logarithm keys.jpg|thumb|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
 
[[File:Taylor approximation of natural logarithm.gif|right|thumb|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.|alt=An animation showing increasingly good approximations of the logarithm graph.]]
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 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}}: 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==
[[File:NautilusCutawayLogarithmicSpiral.jpg|thumb|A [[nautilus]] displaying a logarithmic spiral|alt=A photograph of a nautilus' shell.]]
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]]s 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}}
[[File:Germany Hyperinflation.svg|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]]|right|thumb|alt=A graph of the value of one mark over time. The line showing its value is increasing very quickly, even with logarithmic scale.]]
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]]s—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 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]]s {{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]]s 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]]s.<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|last1=Siegler|first1=Robert S.|last2=Opfer|first2=John E.|title=The Development of Numerical Estimation. Evidence for Multiple Representations of Numerical Quantity|volume=14|issue=3|pages=237–43|year=2003|journal=Psychological Science|url=http://www.psy.cmu.edu/~siegler/sieglerbooth-cd04.pdf|pmid=12741747|citeseerx=10.1.1.727.3696|s2cid=9583202|access-date=7 January 2011|archive-url=https://web.archive.org/web/20110517002232/http://www.psy.cmu.edu/~siegler/sieglerbooth-cd04.pdf|archive-date=17 May 2011|url-status=dead}}
</ref><ref>{{Citation|last1=Dehaene| first1=Stanislas|last2=Izard|first2=Véronique |last3=Spelke| first3=Elizabeth|last4=Pica| first4=Pierre| title=Log or Linear? Distinct Intuitions of the Number Scale in Western and Amazonian Indigene Cultures|volume=320|issue=5880|pages=1217–20|doi=10.1126/science.1156540|pmc=2610411|pmid=18511690| year=2008|journal=Science|bibcode=2008Sci...320.1217D| citeseerx=10.1.1.362.2390}}</ref>
 
===Probability theory and statistics===
[[File:PDF-log normal distributions.svg|thumb|right|alt=Three asymmetric PDF curves|Three [[probability density function]]s (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.]]
[[File:Benfords law illustrated by world's countries population.png|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.|thumb|right|alt=A bar chart and a superimposed second chart. The two differ slightly, but both decrease in a similar fashion.]]
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]]s. 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]]s. 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]]s, 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]]s (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]]s. In other words, the amount of [[memory (computing)|memory]] needed to store {{mvar|N}} grows logarithmically with {{mvar|N}}.
 
===Entropy and chaos===
[[File:Chaotic Bunimovich stadium.png|right|thumb|[[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.|alt=An oval shape with the trajectories of two particles.]]
 
[[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]]s 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===
[[File:Sierpinski dimension.svg|The Sierpinski triangle (at the right) is constructed by repeatedly replacing [[equilateral triangle]]s by three smaller ones.|right|thumb|400px|alt=Parts of a triangle are removed in an iterated way.]]
 
Logarithms occur in definitions of the [[fractal dimension|dimension]] of [[fractal]]s.<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-similarity|self-similar]]: 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|1=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'''<br />(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|help=no|Minor_second_on_C.mid|play}}
||[[Just major third]] {{audio|help=no|Just_major_third_on_C.mid|play}}
||[[Major third]] {{audio|help=no|Major_third_on_C.mid|play}}
||[[Tritone]] {{audio|help=no|Tritone_on_C.mid|play}}
||[[Octave]] {{audio|help=no|Perfect_octave_on_C.mid|play}}
|-
|| '''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'''<br /><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'''<br /><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]]s 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]]s 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]]s, 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]]s 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}}
[[File:Complex number illustration multiple arguments.svg|thumb|right|Polar form of {{math|''z {{=}} x + iy''}}. Both {{mvar|φ}} and {{mvar|φ'}} are arguments of {{mvar|z}}.|alt=An illustration of the polar form: a point is described by an arrow or equivalently by its length and angle to the x-axis.]]
 
All the [[complex number]]s {{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.
 
[[File:Complex log.jpg|right|thumb|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, more [[saturation (color theory)|saturated]] colors refer to bigger absolute values. The [[hue]] of the color encodes the argument of {{math|Log(''z'')}}.|alt=A density plot. In the middle there is a black point, at the negative axis the hue jumps sharply and evolves smoothly otherwise.]]
 
[[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]]s.
 
===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 | first1=R. | last2=Gonnet | first2=G. | last3=Hare | first3=D. | last4=Jeffrey | first4=D. | last5=Knuth | first5=Donald | author5-link=Donald Knuth | title=On the Lambert ''W'' function | url=http://www.apmaths.uwo.ca/~djeffrey/Offprints/W-adv-cm.pdf | year=1996 | journal=Advances in Computational Mathematics | issn=1019-7168 | volume=5 | pages=329–59 | doi=10.1007/BF02124750 | s2cid=29028411 | access-date=13 February 2011 | archive-url=https://web.archive.org/web/20101214110615/http://www.apmaths.uwo.ca/~djeffrey/Offprints/W-adv-cm.pdf | archive-date=14 December 2010 | 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]]s 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}}
* [[Cologarithm]]
* [[Decimal exponent]] (dex)
* [[Exponential function]]
* [[Index of logarithm articles]]
* [[Logarithmic notation]]
 
==Notes==
{{reflist|group=nb|30em}}
 
==References==
{{Reflist}}
 
==External links==
* {{Commons category-inline}}
* {{Wiktionary-inline}}
* {{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}}
 
{{Hyperoperations}}
{{Featured article}}
{{Authority control}}
 
[[Category:Logarithms| ]]
[[Category:Elementary special functions]]
[[Category:Scottish inventions]]
[[Category:Additive functions]]