A logarithm is a way of expressing the exponent to which a given number (the base) must be raised to to get another number. Logarithms are often used to solve equations (see below). If we must raise the number $a$ to the power of $b$ to get the number $x$ then we write: \[\log_a x=b\] This is equivalent to $a^b=x$.
Logarithms can be used to find the exponent to which a number must be raised to get another number (see below for examples).
The most common bases are $10$ and $ e$ (see Exponential Function). Conventionally, $\log$ written without a specific base means $\log_{10}$, and $\ln$ means $\log_ e$. A logarithm to the base $ e$ ($\approx 2.71828\dots$) is called the natural logarithm.
For example, we must raise $10$ to the power of $2$ to get $100$ ($10^2=100$) so we can write this as: \[\log_{10} 100=2 \text{ or } \log 100=2\]
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 ^b) &= b, & a ^{\log_a(b)} &= b. \end{align}
\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}
Simplify $3\log (x) - 4\log (x+3) + \log (y)$.
First, use law 3 to bring the 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}
Simplify $2\log (\sqrt{27}) + 2\log (3x) - \dfrac{1}{3} \log (x)$.
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 since $243 = 3^{5} = 27^{5/3}$ we can 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: \[2\log (\sqrt{27}) + 2\log (3x) - \dfrac{1}{3} \log (x)=\dfrac{5}{3} \log(27x)\]
When asked to solve an equation where the unknown variable appears in the power, we can take the logarithms of both sides and use log law 3 $\left(\log(a^b) = b\log a\right)$ to bring the power down and make it the subject of the equation. We can then use the other log laws to rearrange and solve the equation.
Suppose we know that $64$ is a power of $2$ but we don't know what that power is. Denote this power by $x$. Use the laws of logarithms to find the value of $x$.
We have: \[2^x =64\] By taking the logarithm of both sides of this equation we get: \[\log(2^x)=\log(64)\] and using law 3 we can write this as: \[x\log(2)=\log(64)\] We can now rearrange and solve for $x$: \begin{align} x&=\dfrac{\log(64)}{\log(2)}\\ &=6 \end{align}
Solve $3^x=5^{x-2}$.
As the unknown appears in the power we must first take the logarithm of both sides, and then use the log laws to separate the $x$ out.
\[3^x=5^{x-2}\] Taking the logarithm of both sides gives: \[\log (3^x) = \log (5^{x-2})\] Using law 3 we have: \[x\log (3) = (x-2)\log( 5)\] Expand the brackets gives: \[x\log( 3) = x\log( 5) - 2\log( 5)\] We must now 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} Then using law 2 we have: \[x\log \left(\frac{5}{3}\right) = 2\log (5)\] By dividing through by $\log \left(\frac{5}{3}\right)$ to get $x$ we can find the value of $x$: \[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 otherwise.
Prof. Robin Johnson simplifies the expression $\log_{10}(5) + \log_{10}(\sqrt{5})-\log_{10}(25)$.
Prof. Robin Johnson solves the equation $5^x = 7 \times 3^{1-x}$.
Prof. Robin Johnson shows how $y^2=3x^3$ can be expressed as a straight line by taking logs.
This workbook produced by HELM is a good revision aid, containing key points for revision and many worked examples.
Test yourself: Numbas test on solving equations using logarithms