# Exponents and logarithms¶

## Logarithms¶

### Introduction¶

A logarithm is defined so that $log_b(w)=z$ such that $w=z^b$. A logarithm has two parameters – a base. It value of the logarithm is you what you need to raise the base to to get the value of which the logarithm is taken.

### Some notation and the definition of Euler's number¶

In mathematics $ln(x)$ and $log(x)$ are both taken to mean $log_e(x)$, where $e$ is an irrational mathematical constant called Euler's number and can be defined in different ways.

e = \lim_{n\to\infty}(1+\frac{1}{n})^n
e = \sum_{n=0}^{\infty}\frac{1}{n!}

The infinite decimal of $e$ begins $2.718281828459045\dots$.

### Properties of logarithms¶

Much like the properties of powers there are also useful properties of exponents.

log_b(xy) = log_b(x) + log_b(y)
log_b(\frac{x}{y}) = log_b(x) - log_b(y)
log_b(x)^y = y log_b(x)

### Converting products to sums with logarithms¶

It is often easier to compute the value of a summation than it is to find the value of a product. Using the property of logarithms $log(xy)=log(x)+log(y)$ it is possible to rewrite a product as a sum. (This example is taken from Chapter 1 of Stephen J. Miller's The Probability Lifesaver (ISBN: 9780691149554))

\prod_{k=0}^n \frac{356-k}{356}

Taking the logarithm.

log(\prod_{k=0}^n \frac{356-k}{356}) = \sum_{k=0}^n log(\frac{356-k}{356})