Logarithm Article Index for
Logarithm
Articles about
Logarithm
 

Information About

Logarithm




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 ''b''''n'' = ''x''. It is usually written as log''b'' ''x'' = ''n''. For example:
: \log_3 (81) = 4\ \mathrm{since}\ 3^4 = 81.

If ''n'' is a Positive Integer , ''b''''n'' means multiplying ''b'' by itself ''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 Function s. See the figure on the right.

Logarithms were originally invented to make lengthy numerical operations easier to perform and, before the advent of Electronic Computer s, 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 log''b''), 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 "lg(''x'')" is used for the base-10 logarithm of x and "ld(''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 Language s, 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 log''e''(''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 ''b''log(''x'') instead of log''b''(''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. "Common Logarithm" at MathWorld


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 log''e'' and log10). To find a logarithm with base ''b'' using any other base ''k'':
: \log_b(x) = rac{\log_k(x)}{\log_k(b)}

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 Derivative s, so they are often used in the solution of Integral s. The logarithm is one of three closely related functions. In the equation ''b''''n'' = ''x'', ''b'' can be determined with Radical s, ''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 Ratio s, 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 f(x)^x using only the Natural Exponent e^x:

:\begin{matrix}f(x)^x & = & \left(e^{\log f(x)} ight)^x \ \ & = & e^{x\log f(x) }\, \end{matrix}

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


Easier computations

Logarithms switch the focus from normal numbers to exponents. As long as the same base is used, this makes certain operations easier:
These relations made such operations on two numbers much easier and the proper use of logarithms was an essential skill before multiplying .


Calculus

The Derivative of the logarithm function is
: rac{d}{dx} \log_b(x) = rac{1}{x \ln(b)} = rac{\log_b(e)}{x}
where ln is the natural logarithm, i.e., with base ''e''. For ''b'' = ''e'', the formula simplifies to
: rac{d}{dx} \ln(x) = rac{1}{x}.

The Integral of the logarithm is
: \int \log_b(x) \,dx = x \log_b(x) - rac{x}{\ln(b)} + C = x \log_b \left( rac{x}{e} ight) + C.

''See also:'' , List Of Integrals Of Logarithmic Functions .


NUMERIC VALUE

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

: \log_b(x) = rac{\log_e(x)}{\log_e(b)} \qquad \mbox{ or } \qquad \log_b(x) = rac{\log_2(x)}{\log_2(b)}

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
#By Ali Raheem
#For wikipedia

while 1:
try:
a=raw_input('Log Base: ')
if (a==e): #checking if they want a natural log.
a=2.71828183
a=int(a)
c=int(raw_input('of: '))
b=1
d=100. #The decimal is needed to make sure the division does not leave remainders.
e=0
g=11 #Number of times it will run thorugh the algorythm, otherwise it would never end.
f=0
while (f while (int(b) e=e+d #make the exponent bigger
  • ---e #and test it

  • ---d) #Seeing as the result is too big go back one increment

  • e=e-d #and reduce the exponent

d=d/10 #and reduce the incriments by 10.
f=f+1
print 'Exponent: '+str(e) #print the result.
except:
print '
\aERROR!
'
#sample output:
#log base: 2
#of: 3
#Exponent: 1.5849625



How it works

This tries to checks multiples of ten until it's too big then tries multiples 1 then 0.1 and so on.


GENERALIZATIONS