Logarithm

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 68.100.160.47 (talk) at 14:06, 11 May 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Logarithms to various bases: red is to base e, green is to base 10, and purple is to base 1.7. Note how logarithms of all bases pass through the point (1, 0). Each tick on the axis is one unit.

The logarithm is the mathematical operation that is the inverse of exponentiation, or raising a number (the base) to a power. The logarithm of a number x in base b is the number n such that bn = x. It is usually written as logb x = n. For example:

If n is a positive integer, bn means multiplying b by itself a number of times, using it as a factor in this multiplication n times; however, at least if b is positive, the definition can be extended to any real number n (see exponentiation for details). Similarly, the logarithm function can be defined for any positive real number. For each positive base, b, other than 1, there is one logarithm function and one exponential function; they are inverse functions. See the figure on the right.

Logarithms were originally invented to make lengthy numerical operations easier to perform and, before the advent of electronic computers, they were widely used for this purpose in fields such as astronomy, engineering and celestial navigation. They have important mathematical properties and are still used in many ways.

Bases

The most widely used bases for logarithms are 10, the mathematical constant e ≈ 2.71828... and 2. When "log" is written without a base (b missing from logb), the intent can usually be determined from context:

Other notations

The notation "ln(x)" invariably means loge(x), i.e., the natural logarithm of x, but the implied base for "log(x)" varies by discipline:

  • Mathematicians generally understand both "ln(x)" and "log(x)" to mean loge(x) and write "log10(x)" when the base-10 logarithm of x is intended. Sometimes the term "ld(x)" is used for the base-10 logarithm of x and "lg(x)" for the base-2 logarithm of x.
  • Engineers, biologists, and some others write only "ln(x)" or "loge(x)" when they mean the natural logarithm of x, and take "log(x)" to mean log10(x) or, sometimes in the context of computing, log2(x).
  • On most calculators, the LOG button is log10(x) and LN is loge(x).
  • In most commonly used computer programming languages, including C, C++, Java, Fortran, and BASIC, the "log" or "LOG" function returns the natural logarithm. The base-10 function, if it is available, is generally "log10."
  • Sometimes Log(x) (capital L) is used to mean log10(x), by those people who use log(x) with a lowercase l to mean loge(x).
  • The notation Log(x) is also used by mathematicians to denote the principal branch of the (natural) logarithm function.
  • A few people use the notation blog(x) instead of logb(x).

As recently as 1984, Paul Halmos in his autobiography heaped contempt on what he considered the childish "ln" notation, which he said no mathematician had ever used. (The notation was in fact invented in 1893 by Irving Stringham, professor of mathematics at Berkeley.) As of 2005, some mathematicians have adopted the "ln" notation, but most use "log".

In computer science, the base 2 logarithm is sometimes written as lg(x) to avoid confusion. This usage was suggested by Edward Reingold and popularized by Donald Knuth. However, in Russian literature, the notation lg(x) is generally used for the base 10 logarithm, so even this usage is not without its perils.[1]

Change of base

While there are several useful identities, the most important for calculator use lets one find logarithms with bases other than those built into the calculator (usually loge and log10). To find a logarithm with base b using any other base k:

Moreover, this result implies that all logarithm functions (whatever the base) are similar to each other.

Uses of logarithms

Logarithms are useful in solving equations in which exponents are unknown. They have simple derivatives, so they are often used in the solution of integrals. The logarithm is one of three closely related functions. In the equation bn = x, b can be determined with radicals, n with logarithms, and x with exponentials. See logarithmic identities for several rules governing the logarithm functions. For a discussion of some additional aspects of logarithms see additional logarithm topics.

Science and engineering

Various quantities in science are expressed as logarithms of other quantities; see logarithmic scale for an explanation and a more complete list.

  • The negative of the base-10 logarithm is used in chemistry, where it expresses the concentration of hydronium ions (pH). The concentration of hydronium ions in neutral water is 10−7 at 25 °C, hence a pH of 7.
  • The bel (symbol B) is a unit of measure which is the base-10 logarithm of ratios, such as power levels and voltage levels. It is mostly used in telecommunication, electronics, and acoustics. It is used, in part, because the ear responds logarithmically to acoustic power. The Bel is named after telecommunications pioneer Alexander Graham Bell. The decibel (dB), equal to 0.1 bel, is more commonly used. The neper is a similar unit which uses the natural logarithm of a ratio.
  • The Richter scale measures earthquake intensity on a base-10 logarithmic scale.
  • In spectrometry and optics, the absorbance unit used to measure optical density is equivalent to −1 B.
  • In astronomy, the apparent magnitude measures the brightness of stars logarithmically, since the eye also responds logarithmically to brightness.

Exponential functions

Sometimes (especially in the context of mathematical analysis) it is necessary to calculate arbitrary exponential functions using only the natural exponent :

The antilogarithm function is another name for the inverse of the logarithmic function. It is written antilogb(n) and means the same as bn.

Easier computations

Logarithms switch the focus from normal numbers to exponents. As long as the same base is used, this makes certain operations easier:

Operation with numbers Operation with exponents Logarithmic identity

These relations made such operations on two numbers much easier and the proper use of logarithms was an essential skill before multiplying calculators became available. To multiply two numbers, one simply found the logarithms of both numbers on a table of common logarithms, added them and then looked up the result in the table to find the product. To compute powers or roots of a number, the common logarithm of that number was looked up and multiplied or divided by the radix. Interpolation could be used for still higher precision. Slide rules used logarithms to perform the same operations more rapidly, but with much less precision than using tables. Other tools for performing multiplications before the invention of the calculator include Napier's bones and mechanical calculators: see history of computing hardware.

Calculus

The derivative of the logarithm function is

where ln is the natural logarithm, i.e., with base e. For b = e, the formula simplifies to

The integral of the logarithm is

See also: table of limits of logarithmic functions, list of integrals of logarithmic functions.

Numeric value

The numerical value for logarithm in base b can be calculated with the following identity.

as procedures exists for determining the numerical value for logarithm base e and logarithm base 2.

Alternatively the algorithm below can be used for calculating the logarithm of any positive base.

#!/usr/bin/python

from __future__ import division

def log(N,X):
   epsilon = 0.000000000001
   integer_value=0
   while X < 1:
      integer_value = integer_value - 1
      X = X * N
   while X >= N:
      integer_value = integer_value + 1
      X = X / N
   decfrac = 0.0
   partial = 0.5
   X=X*X
   while partial > epsilon:
      while X >= N:
         decfrac = decfrac + partial
         X = X / N
      partial = partial / 2
      X=X*X
   return (integer_value + decfrac)

if __name__ == '__main__':
   value = 45.7
   print "     X  =",value
   print "LOG6(X) =",log(6,value)
   print "  LN(X) =",log(2.718281828,value)

#  SAMPLE OUTPUT
#    $ python log.py
#         X  = 45.7
#    LOG6(X) = 2.13315367578
#      LN(X) = 3.82209829854 

Generalizations

Logarithms may also be defined for complex arguments. The logarithm (to base e) of a complex number z is the complex number ln(|z|) + i arg(z), where |z| is the modulus of z, arg(z) is the argument, and i is the imaginary unit; see natural logarithm for details.

The discrete logarithm is a related notion in the theory of finite groups. It involves solving the equation bn = x, where b and x are elements of the group, and n is an integer specifying a power in the group operation. For some finite groups, it is believed that the discrete logarithm is very hard to calculate, whereas discrete exponentials are quite easy. This asymmetry has applications in public key cryptography.

The logarithm of a matrix is the inverse of the matrix exponential.

A double logarithm is the inverse function of the double-exponential function. A super-logarithm or hyper-logarithm is the inverse function of the super-exponential function. The super-logarithm of x grows even more slowly than the double logarithm for large x.

For each positive b not equal to 1, the function logb (x) is an isomorphism from the group of positive real numbers under multiplication to the group of (all) real numbers under addition. They are the only such isomorphisms. The logarithm function can be extended to a Haar measure in the topological group of positive real numbers under multiplication.

History

Jaina mathematicians in ancient India first conceived of logarithms from around the 2nd century BC. By the 2nd century AD, they performed a number of operations using logarithmic functions to base 2, and by the 8th century, Virasena described logarithms to bases 2, 3 and 4. By the 13th century, logarithmic tables were produced by Muslim mathematicians.

In the 17th century, Joost Bürgi, a Swiss clockmaker in the employ of the Duke of Hesse-Kassel, first discovered logarithms as a computational tool; however he did not publish his discovery until 1620. The method of logarithms was first publicly propounded in 1614, in a book entitled Mirifici Logarithmorum Canonis Descriptio, by John Napier, Baron of Merchiston in Scotland, four years after the publication of his memorable discovery. This method contributed to the advance of science, and especially of astronomy, by making some difficult calculations possible. Prior to the advent of calculators and computers, it was used constantly in surveying, navigation, and other branches of practical mathematics. It supplanted the more involved prosthaphaeresis, which relied on trigonometric identities, as a quick method of computing products. Besides their usefulness in computation, logarithms also fill an important place in the higher theoretical mathematics.

At first, Napier called logarithms "artificial numbers" and antilogarithms "natural numbers". Later, Napier formed the word logarithm, a portmanteau, to mean a number that indicates a ratio: λoγoς (logos) meaning ratio, and αριθμoς (arithmos) meaning number. Napier chose that because the difference of two logarithms determines the ratio of the numbers for which they stand, so that an arithmetic series of logarithms corresponds to a geometric series of numbers. The term antilogarithm was introduced in the late 17th century and, while never used extensively in mathematics, persisted in collections of tables until they fell into disuse.

Napier did not use a base as we now understand it, but his logarithms were, up to a scaling factor, effectively to base . For interpolation purposes and ease of calculation, it is useful to make the ratio in the geometric series close to 1. Napier chose , and Bürgi chose . Napier's original logarithms did not have log 1 = 0 but rather log = 0. Thus if is a number and is its logarithm as calculated by Napier, . Since is approximately , is approximately . [1]

Tables of logarithms

Part of a 20th century table of common logarithms in the reference book Abramowitz and Stegun. Click to enlarge.

Prior to the advent of computers and calculators, using logarithms meant using tables of logarithms, which had to be created manually. Base-10 logarithms are useful in computations when electronic means are not available. See common logarithm for details, including the use of characteristics and mantissas of common (i.e., base-10) logarithms.

By the 13th century, the first logarithmic tables were produced by Muslim mathematicians. In 1617, Henry Briggs published the first installment of his own table of common logarithms, containing the logarithms of all integers below 1000 to eight decimal places. This he followed, in 1624, by his Arithmetica Logarithmica, containing the logarithms of all integers from 1 to 20,000 and from 90,000 to 100,000 to fourteen places of decimals, together with a learned introduction, in which the theory and use of logarithms are fully developed. The interval from 20,000 to 90,000 was filled up by Adriaan Vlacq, a Dutch computer; but in his table, which appeared in 1628, the logarithms were given to only ten places of decimals.

Vlacq's table was later to found to contain 603 errors, but "this cannot be regarded as a great number, when it is considered that the table was the result of an original calculation, and that more than 2,100,000 printed figures are liable to error." (Athenaeum, 15 June 1872. See also the Monthly Notices of the Royal Astronomical Society for May 1872.) An edition of Vlacq's work, containing many corrections, was issued at Leipzig in 1794 under the title Thesaurus Logarithmorum Completus by Jurij Vega.

Callet's seven-place table (Paris, 1795), instead of stopping at 100,000, gave the eight-place logarithms of the numbers between 100,000 and 108,000, in order to diminish the errors of interpolation, which were greatest in the early part of the table; and this addition was generally included in seven-place tables. The only important published extension of Vlacq's table was made by Mr. Sang 1871, whose table contained the seven-place logarithms of all numbers below 200,000.

Briggs and Vlacq also published original tables of the logarithms of the trigonometric functions.

Besides the tables mentioned above, a great collection, called Tables du Cadastre, was constructed under the direction of Gaspard de Prony, by an original computation, under the auspices of the French republican government of the 1700s. This work, which contained the logarithms of all numbers up to 100,000 to nineteen places, and of the numbers between 100,000 and 200,000 to twenty-four places, exists only in manuscript, "in seventeen enormous folios," at the Observatory of Paris. It was begun in 1792; and "the whole of the calculations, which to secure greater accuracy were performed in duplicate, and the two manuscripts subsequently collated with care, were completed in the short space of two years." (English Cyclopaedia, Biography, Vol. IV., article "Prony.") Cubic interpolation could be used to find the logarithm of any number to a similar accuracy.

To the modern student who has the benefit of a calculator, the work put into the tables just mentioned is a small indication of the importance of logarithms.

Trivia

Unicode glyph

log has its own Unicode glyph: ㏒ (U+33D2 or 13266 in decimal). This is more likely due to its presence in Asian legacy encodings than its importance as a mathematical function.

Graphical interpretation

The natural logarithm of a is the area under the curve y = 1/x between the x values 1 and a.

Irrationality

For integers b and x, the number logb(x) is irrational (i.e., not a quotient of two integers) if one of b and x has a prime factor which the other does not (and in particular if they are coprime and both greater than 1). In certain cases this fact can be proved very quickly: for example, if log23 were rational, we would have log23 = n/m for some positive integers n and m, thus implying 2n = 3m. But this last identity is impossible, since 2n is even and 3m is odd. Much stronger results are known. See Lindemann–Weierstrass theorem.

Relationships between binary, natural and common logarithms

In particular we have:

log2(e) ≈ 1.44269504
log2(10) ≈ 3.32192809
loge(10) ≈ 2.30258509
loge(2) ≈ 0.693147181
log10(2) ≈ 0.301029996
log10(e) ≈ 0.434294482

A curious coincidence is the approximation log2(x) ≈ log10(x) + ln(x), accurate to about 99.4% or 2 significant digits; this is because 1/ln(2)1/ln(10) ≈ 1 (in fact 1.0084...).

Another interesting coincidence is that log10(2) ≈ 0.3 (the actual value is about 0.301029996); this corresponds to the fact that, with an error of only 2.4%, 210 ≈ 103 (i.e. 1024 is about 1000; see also Binary prefix).

See also

References

Much of the history of logarithms is derived from The Elements of Logarithms with an Explanation of the Three and Four Place Tables of Logarithmic and Trigonometric Functions, by James Mills Peirce, University Professor of Mathematics in Harvard University, 1873.

External links

z