Logarithms and Logarithmic functions.

Uses:
--solve exponential equations.
--some scales are logarithmic: pH, decibels (sound), Richter earthquake (fury), star magnitude, Moore's Law. To accommodate the large ranges. A line represents exponential growth.
--log scale graph paper.    Elements    Earthquakes
--historical: ease some calculations (when no calculator): multiplication of factors turned into addition of the logs of the factors, division turned into subtraction of the logs of the dividend and divisor.
123,456,789*987,654,321= log(123456789)+log(987654321)≈8.091515+8.984601=17.08612 ≈log(121,932,636,473,593,488)
Basis of the slide rule.
List of logs: log tables at the back of textbooks.

logb(x) = y, the exponent to raise b to to equal x:    by= x

logb n = p, the power p to raise the base b to to equal the number n:    bp= n
A logarithm (value) is an exponent. Convert a number to its exponent.
log10 1000 = 3, the exponent to raise 10 to to equal 1000: 103= 1000
log2 32 = 5, the exponent to raise 2 to to equal 32: 25= 32
log2 1/8 = -3, the exponent to raise 2 to to equal 1/8: 2-3= 1/8

"log" is the name of the function/operation. Could say f(x)=logb(x)
The parentheses are optional: logb x    NB. log x + 3 ≠ log(x+3)
You "take" a logarithm, like you "take" a square root. Taking a logarithm is an operation on a number, like taking its square root is, or raising it to a power.
Unlike other functions (e.g. linear, quadratic, exponential, rational), a logarithm function doesn't have an algebraic expression involving +-*/2√ defining what it does. It does/means a certain operation on its argument. It doesn't have a symbol like √ or +-*/p. cf. sqrt()
Logarithm is both an operation (log 9) and a function (f(x)=log x), like square root is (√9 and f(x)=√x).

b is the base, any/every positive real number: b>0. There are an infinite number of different logarithmic functions, one for every positive real number. But the two most common bases are 10 (common log: log without any base shown) and e (natural log: ln). Caveat: sometimes someplaces log means natural log (e.g. WolframAlpha, Python).
"logarithm" literally means something unhelpful like "ratio number"

Recall the powers of 10:
100 = 1
101 = 10
102 = 100
103 = 1000
104 = 10000
log10 x = y, the exponent to raise 10 to to equal x
log10 10000 = 4, the exponent to raise 10 to to equal 10000
log10 1000 = 3, the exponent to raise 10 to to equal 1000
log10 100 = 2, the exponent to raise 10 to to equal 100
log10 10 = 1, the exponent to raise 10 to to equal 10
log10 1 = 0, the exponent to raise 10 to to equal 1
For positive powers of 10, the log function tells how many 0's it has.
Or is approximately how many digits a positive number has.
log10 0.1 = -1, the exponent to raise 10 to to equal 0.1=1/10=10-1
log10 0.01 = -2, the exponent to raise 10 to to equal 0.01=1/100=10-2

Recall the powers of 2:
20 = 1
21 = 2
22 = 4
23 = 8
24 = 16
25 = 32      Powers of 2 worksheet
log2 x = y, the exponent to raise 2 to to equal x
log2 16 = 4, the exponent to raise 2 to to equal 16
log2 8 = 3, the exponent to raise 2 to to equal 8
log2 4 = 2, the exponent to raise 2 to to equal 4
log2 2 = 1, the exponent to raise 2 to to equal 2
log2 1 = 0, the exponent to raise 2 to to equal 1
log2 0.5 = -1, the exponent to raise 2 to to equal 0.5=1/2=2-1
log2 0.25 = -2, the exponent to raise 2 to to equal 0.25=1/4=2-2

Calculators have a log button (common log) and ln button (natural log). MathPapa knows log and ln. Use a calculator or software to evaluate a log. Some calculators have logb button. Windows calculator: logyx button. Desmos: Keypad | functions | Calculus | loga OR log Shift- to get into base area.
log 500 = 2.69897..., the (irrational) exponent to raise 10 to to equal 500. 102.69897≈500
log 50 = 1.69897..., the (irrational) exponent to raise 10 to to equal 50
log 5 = 0.69897..., the (irrational) exponent to raise 10 to to equal 5
log 0.5 = -0.301029..., the (irrational) exponent to raise 10 to to equal 0.5
Log 2 worksheet

Natural log: ln The base is e     = logelog2.71828
We are not familiar with the powers of e... Use a calculator or software to evaluate a ln.
ln e2 = 2, the exponent to raise e to to equal e2 duh     e2≈7.3890561     ln 7.3890561≈2
ln e3 = 3, the exponent to raise e to to equal e3     e3≈20.085537     ln 20.085537≈3
ln 10≈2.3025851, the exponent to raise e to to equal 10.     e2.3025851≈10
ln 100≈4.6051702, the exponent to raise e to to equal 100.     e4.6051702≈100
ln 2≈0.6931, the exponent to raise e to to equal 2.     e0.6931≈2
ln 1/2≈-0.6931, the exponent to raise e to to equal 1/2.     e-0.6931≈1/2
"An artificial log is Duraflame."

Logarithmic functions are very slow growing.
NB. graph is not to scale:

Continuous and smooth. No wiggle, no extrema, no turning points.
Domain is (0,∞): no logs of negative numbers or 0. Range is R.
X-intercept at (1,0). Vertical asymptote is Y axis (x=0), so no y-intercept.
(b,1) is on the curve of f(x)=logb x    as is (1/b,-1)
logb a, where a<1, is negative. e.g. log 0.1=-1
NB. graph is not to scale:

Worksheet log and ln

General logarithmic functions: ƒ(x)= a·logbcx + d     or expression
Ex. 2 log 3x - 4

log googol = 100     googol=10100
log log googol = log2 googol = 2
log log 1010 = 1
log log log googolplex = 2     googolplex=10googol

log 1/x = - log x

Change of base formula.
logb x = logc x / logc b    
Typically c is 10 or e: logb x = log x / log b = ln x / ln b
logold x = lognew x / lognew old
Useful if calculator can't do other logs (except common and natural).
Logs in different bases b and c differ by a constant factors logbc and logcb.
Ex. log5 100 = log 100 / log 5   = ln 100 / ln 5
Ex. log2 100 = log 100 / log 2   = ln 100 / ln 2
Convert log to ln by multiplying by ~2.3: ln x ≈ 2.3 log x
Convert ln to log by dividing by ~2.3 or multiplying by 1/2.3=.434: log x ≈ .343 ln x
logb a = loga a / loga b = 1 / loga b

"Laws"/facts/properties of logarithms: to manipulate log expressions, to "expand" or to "compactify" a log expression.

logb b = 1      logb 1/b = -1

Every log:
log 1 = 0

Power rule:
log xn = n log x
     Exs. ln x4 = 4 ln x    ln 4x = x ln 4    Special case: log(1/x)= log x-1= - log x

Product rule:
log(xy) = log x + log y    log of a product equals the sum of the logs of the factors.
     Exs. ln 4x = ln 4 + ln x    log 20 + log 5 = log 100

Quotient rule:
log(x/y) = log x - log y    log of a quotient equals the difference of the logs.
     Exs. ln 4/x = ln 4 - ln x    log 100 - log 20 = log 5

Non-laws:
log(x+y)≠
log(x-y)≠
log(x)*log(y)≠
log(x)/log(y)≠

logb bx = x      ln ex = x     logging an exponential leaves the exponent.
    Exs. log 103=3    log2 24 = 4    ln e5=5

blogb x = x      eln x = x     exponentiating a log leaves the log's argument.
    Exs. 10log 1000=1000    2log216=16    eln e5=e5


Exponent and logarithm are the inverse/reverse of each other, they "undo" what the other did. Logarithm is exponentiation "inside out".

10x inverse is the common logarithm function: log x
bx inverse is the logarithm base b function: logb x
ex inverse is the natural logarithm function: ln x

Like all inverse functions, they are reflections of each other over the y=x main diagonal.
ex has horizontal asymptote X axis (y=0). ln x has vertical asymptote Y axis (x=0).
Domain of ex is R. Range is (0,∞).
Domain of ln x is (0,∞). Range is R.

The exponential function, ex, is sometimes denoted exp(x).
ln ex = ln(exp(x)) = x
eln x = exp(ln(x)) = x

Solving exponential or logarithmic equations.
If have an exponential (i.e. x is in the exponent) equation, bx = a
take logs of both sides (i.e. same operation to both sides), will "undo" the exponent:
 →  logb bx = logb a
and then
EITHER    bx = ax = logb a
Ex. 10x=3.4567  →  log 10x= log 3.4567  →  x = log 3.4567  →  x≈0.5386616
OR use the power property:  →  x logb b = logb a  →  x = logb a    [ logb b=1]
Ex. 10x=3.4567  →  log 10x= log 3.4567  →  x log 10 = log 3.4567  →  x≈0.5386616

If have a logarithmic (i.e. x is in a log) equation, raise the base b to both sides (i.e. same operation to both sides), will "undo" the logarithm:
Exponent law/fact: blogba = a    Exs. 10log 1000 [ = 103 ] = 1000    10log 50 [ = 101.69897000 ] = 50    eln 100 [ = e4.605170186 ] = 100
logb x = a  →  blogb x = ba  →  x = ba
Ex. log x=0.5386616  →  10log x = 100.5386616  →  x = 3.456699
Beware the extraneous solution.

More


Derivative of ln: (ln x)' = 1/x
rate of change of ln x at x is 1/x
Integral of ln: ∫ln(x) = x ln(x)- x = x(ln x -1)

Derivative of logb: (log bx)' = 1 / (x ln b)
Derivative of general logarithm function: (a·logbcx + d)' = a / (x ln b)
Integral of logb: ∫log bx = x(ln x - 1) / ln b
Integral of general logarithm function: ∫a·logbcx + d = x(a ln cx - a + d ln b) / ln b

"Naturalness": slope of tangent line to ln(x) at (1,0) is 1.

bx=eln(b)x     2x=eln(2)x=e.6931x     3x=eln(3)x=e1.098x
eax=(ea)x

Doubling time of continuous growth:
FV=Pert     if FV=2P then     2P=Pert    2=ert     ln 2 = rt

ln -2 = ln 2 + πi