D.1 Exponents
Exponents are of the form a^x where:
- a (called the base) and
- x (called the exponent) is any real number.
Recall that a^0 = 1. Exponents have the following useful properties
- a^x· a^y = a^{x+y}
- (a^x)^y = a^{x·y}
Note: that the first property requires that both terms have the same base a.
We cannot simplify a^x ·b^y if a \ne b.
- One common base is the number e which is approximately equal to 2.7183.
- The function e^x is so common in mathematics and has its own symbol e^x = \exp(x).
- Because e > 0 we have e^x > 0 for all real numbers x
- \lim_{x \to \infty} x = e^{−x} = 0.
D.2 Natural Logarithms
We will need to manipulate long products of probabilities. Since there often comprise small fractions, their calculation on computers can be problematic due to the underflow of floats. We will therefore prefer to convert these products into sums of logarithms.
Definition D.1 (The Logarithm) A log is the inverse of a power. We can use (Equation D.1).
y = a^x \implies log_a(y) = x \tag{D.1}
Definition D.2 (The Natural log) The natural logarithm function has base e and is written without the subscript
log_e(y) = log(y) \tag{D.2}
Theorem D.1 (Logs take positive values) logs only exist for values greater than 0
\forall x(e^x > 0) \implies \exists \log(y) \iff {y > 0}
We can use the properties of exponents from the previous section to obtain some important properties of logarithms:
Definition D.3 (Log of a product) we can use Equation D.3 to convert a log of a product to a sum of logs.
\log(x·y) = \log(x) + \log(y) \tag{D.3}
Definition D.4 (Log of a quotient) we can use Equation D.4 to convert a log of a quotient to a difference of logs.
\log(\frac{x}{y}) = log(x) − log(y) \tag{D.4}
Definition D.5 (Log of a power) we can use Equation D.5 to convert a log of a variable raised to a power into the product.
\log(x^b) = b \cdot log(x) \tag{D.5}
Definition D.6 (Log of one) we can use (Equation D.6) to replace a log of 1 with zero since $x(x^0 = 1) $
\log(1)=0 \tag{D.6}
D.2.1 Log of exponent
we can use (Equation D.7) to cancel a log of an exponent since the log is the inverse function of the exponent.
exp(log(y)) = log(exp(y)) = y \tag{D.7}
Example D.1 (Logarithm) \begin{aligned} log \frac{5^2}{10}= 2 log(5) − log(10) ≈ 0.916. \end{aligned}
Definition D.7 (Change of base for a log) we can use (Equation D.8) to change the base of a logarithm.
\log_b(a)=\frac{\log_c(a)}{\log_c(n)} \tag{D.8}
Definition D.8 (Derivative of a Log) we can use (Equation D.9) to differentiate a log.
\frac{d}{dx} \log_(x)=\frac{1}{x} \tag{D.9}
- Because the natural logarithm is a monotonically increasing one-to-one function, finding the x which maximizes any (positive-valued function) f(x) is equivalent to maximizing log(f(x)).
- This is useful because we often take derivatives to maximize functions.
- If f(x) has product terms, then log(f(x)) will have summation terms, which are usually simpler when taking derivatives.