### Logarithms

#### Definition

The logarithm with respect to a particular base is the inverse of exponentiation of that base. The ''base-$a$ logarithm of $x$ is denoted $\log_a x$

If $x = a^n$, for $n$ any number, $a \gt 0$, and $x \gt 0$, then equivalently $\log_ax = n$.

The most common bases are $10$ and $e$. Conventionally, $\log$ written without a specific base means $\log_{10}$, and $\ln$ means $\log_ e$. A logarithm to the base $e$ is called the natural logarithm, because of its mathematical properties.

##### Useful Results

Some useful results to remember are \begin{align} \log(10) &= 1, & \ln ( e) &= 1,\\ \log_a (a) &= 1, & \log_a (1) &= 0,\\ \log_a (a ^x) &= x, & a ^{\log_a(x)} &= x. \end{align}

#### Laws of logarithms

\begin{align} \log_a(xy) &= \log_a(x) + \log_a(y) & \textbf{(1)} \\ \log_a\left(\dfrac{x}{y}\right) &= \log_a(x) - \log_a(y) & \textbf{(2)} \\ \log_a(x^b) &= b\log_a(x) & \textbf{(3)} \\ \log_b(a) &= \dfrac{1}{\log_a(b)} & \textbf{(4)} \\ \log_a(x) &= \dfrac{\log_b(x)}{\log_b(a)} & \textbf{(5)} \end{align}

##### Worked Examples
###### Example 1

Simplify $3\log (x) - 4\log (x+3) + \log (y)$.

###### Solution

First, use law 3 to bring the constant coefficients inside the logarithms. $3\log (x) - 4\log (x+3) + \log (y) = \log (x^3) - \log ((x+3)^4) + \log (y)$ Then combine the three terms using laws 1 and 2. \begin{align} \log (x^3) - \log ((x+3)^4) + \log (y) &=\log (x^3y) - \log( (x+3)^4)\\ &=\log \left(\dfrac{x^3y}{(x+3)^4}\right) \end{align}

###### Example 2

Simplify $2\log (\sqrt{27}) + 2\log (3x) - \dfrac{1}{3} \log (x)$.

###### Solution

Use law 3 to obtain: \begin{align} 2\log (\sqrt{27}) + 2\log (3x) - \dfrac{1}{3} \log (x)&=\log (\sqrt{27}^2) + \log ((3x)^2)- \log ((x)^\frac{1}{3})\\ &= \log (27) + \log (9x^2) - \log (x^\frac{1}{3}) \end{align} Then combine the terms using laws 1 and 2. \begin{align} \log (27) + \log (9x^2) - \log (x^\frac{1}{3}) &= \log(243x^2) - \log(x^\frac{1}{3}) \\ &= \log \left(\dfrac{243x^2}{x^\frac{1}{3} }\right) \\ &= \log \left(243x^{\frac{5}{3} }\right) \end{align} Finally, notice that $243 = 3^{5} = 27^{5/3}$ and use law 3 to bring out a factor of $\frac{5}{3}$. $\log \left(243x^{\frac{5}{3} }\right) = \frac{5}{3} \log(27x)$

So we have obtained: $2\log (\sqrt{27}) + 2\log (3x) - \dfrac{1}{3} \log (x)=\dfrac{5}{3} \log(27x)$

#### Solving Equations

##### Definition

When asked to solve an equation where the unknown variable appears in the power, the log law $\log(a^b) = b\log a$ can be used to bring the power down and make it the subject of the equation.

You must take the logarithm of both sides the equation, not just the term with the variable in the power. Then, the other log laws and rearranging can be used to solve the equation.

##### Worked Example
###### Example

Solve $3^x=5^{x-2}$.

###### Solution

As the unknown appears in the power, take the logarithm of both sides and then use log laws and rearranging to separate the $x$ out.

$3^x=5^{x-2}$ Take the logarithm of both sides. $\log (3^x) = \log (5^{x-2})$ Use law 3. $x\log (3) = (x-2)\log( 5)$ Expand the brackets. $x\log( 3) = x\log( 5) - 2\log( 5)$ Collect the $x$ terms on one side. \begin{align} x\log( 3) - x\log (5) &= - 2\log( 5)\\ x\log (5) - x\log (3) &= 2\log (5)\\ x(\log (5) - \log (3)) &= 2\log (5) \end{align} Use law 2. $x\log \left(\frac{5}{3}\right) = 2\log (5)$ Divide through by $\log \left(\frac{5}{3}\right)$ to get $x$ on its own. $x = \frac{2\log (5)}{\log\left(\frac{5}{3}\right)}$

Note: It is usually better to leave a logarithmic solution in exact algebraic form unless you are asked for a numeric answer.

#### Video Examples

###### Example 1

Prof. Robin Johnson simplifies the expression $\log_{10}(5) + \log_{10}(\sqrt{5})-\log_{10}(25)$.

###### Example 2

Prof. Robin Johnson solves the equation $5^x = 7 \times 3^{1-x}$.

###### Example 3

Prof. Robin Johnson shows how $y^2=3x^3$ can be expressed as a straight line by taking logs.

#### Workbook

This workbook produced by HELM is a good revision aid, containing key points for revision and many worked examples.

#### Test Yourself 