Logarithms (or Logs)

Logarithms, or logs for short, are essentially powers and are useful when a power is unknown.

When you come across logs, you will usually see the word ‘log’ followed by a small subscript then a number in brackets:

\log_a(b)=c.

The subscript is known as the baseย and the number in brackets (although sometimes the brackets are left out) is the exponent.

It can help to understand logs by making a habit of, when reading log expressions, saying ‘the power of’ instead of the word ‘log’. It follows that the above reads as ‘the power of a to get a result of b is c’. For example, in \log_2(8) the base is 2 and since it can be read as the power of 2 to give 8, the value of \log_2(8) is 3. \log_a(x) is considered to be the inverse of a^x – see Logarithmic Graphs.

Explore Example 1 to see more of this or Example 2 when a calculator is required to evaluate the logs.

Note that logging negative numbers with a positive base is not possible. This is because, there is no amount of times you can multiply a positive number by itself to get any negative number. Your calculator will verify this with a MATH ERROR.

Note that \log_a(a)=1 since a^1=a. Note also that log to the base is the natural logarithm and has the special notation ln. For example, \log_e(8)=\ln(8). Interestingly,  logs used to be calculated on a slide rule – click here to find out more. You might also want to check out log graphs.

Log Rules

Arguably the most important identity when using logs is the following:

\log_a(b)=c\hspace{10pt}\Longleftrightarrow\hspace{10pt}a^c=b

This is because log equations (see below) can be solved once in this format.

The following rules follow from the Laws of Indices and should be used to convert log expressions into a single log.

\begin{array}{lll}\log_a(x)+\log_a(y)&=&\log_a(xy)\hspace{20pt}(1)\\\log_a(x)-\log_a(y)&=&\log_a(x/y)\hspace{20pt}(2)\\\log_a(x^n)&=&n\log_a(x)\hspace{20pt}(3)\end{array}

You can also change the base of the log using the following formula:

\log_a(x)=\frac{\log_b(x)}{\log_b(a)}

See Example 8 to see an example of using a change of base.

The above log identities and rules can be used to solve log equations. Of course, if an equation is in the form a^c=b, logs can be applied to solve the equation. Additionally, if the equation involves an expression that is not yet in the format \log_a{b}, use the log rules to get it in this format. See Examples 5 to 8.

Note that when solving log equations, you should alway check that the solutions you obtain actually work in the original equation you were given. For example, if you get a negative x-value and the original equation has \log_2{x} in it for example, it should be disregarded. It is not possible to evaluate logs with a positive base at a negative number.

Examples

Evaluate

\begin{array}{l}\log_3(9)\\\log_4(64)\\\log_2(1/8)\\\log_{123}(1)\end{array}

Solution:

\begin{array}{l}\log_3(9)=2\\\log_4(64)=3\\\log_2(1/8)=-3 \text{ since }2^{-3}=\frac{1}{2^3}=\frac{1}{8}\\\log_{123}(1)=0\end{array}

In the final example, anything to the power of 0 is 1.

Evaluate the following:

\begin{array}{l}\log_{9}(5)\\\log_{8}(9)\\\log_{12}(150)\\\log_{2}(0.7)\\\log_{3}(-4)\end{array}

Solution:

\begin{array}{l}\log_{9}(5)=0.732 \text{ to 3 decimal places}\\\log_{8}(9)=1.06 \text{ to 2 decimal places}\\\log_{12}(150)=2.016 \text{ to 3 decimal places}\\\log_{2}(0.7)=-0.515 \text{ to 3 decimal places}\\\log_{3}(-4)= \text{ not possible} \end{array}

Write the following as a single logarithm:

3\log_5(2)+2\log_5(4)-\log_5(6)

Solution:

Firstly, using log rule (3), the expression can be written as

\log_5(2^3)+\log_5(4^2)-\log_5(6)

Then, using log rule (1), this expression can be written as

\log_5(2^3\times 4^2)-\log_5(6)

Finally, using log rule (2), we can write it as

\log_5\left(\frac{2^3\times 4^2}{6}\right).

This simplifies to \log_5\left(\frac{64}{3}\right).

Expand the following in terms of logs of x, y and z:

\log_a\left(\frac{x^2\sqrt{y}}{z^5}\right)

Solution:

Firstly, using log rules (1) and (2), we can expand the expression as follows:

\log_a\left(x^2\right)+\log_a\left(\sqrt{y}\right)-\log_a\left(z^5\right)

Next, using log rule (3) this becomes:

2\log_a(x)+\frac{1}{2}\log_a(y)-5\log_a\left(z\right)

Find the exact solution of i) 4e^{2x-7}=20 and ii) \ln(3y-5)=6.

Solution:

i) Firstly, divide both sides by 4 to obtain e^{2x-7}=5. Next take the natural log of both sides (or use one of the log rules to read this equation) and get 2x=\log_e(5)=\ln(5) .

Finally, x=\frac{\ln(5)+7}{2}.

ii) Exponentiating both sides (or exchanging equivalent statements) we have 3y-5=e^6. It follows that y=\frac{e^6+5}{3}.

Solve the equation 5^{x}+9\times 5^{-x}=6.

Solution:

Although it may not appear so just yet, this equation is a quadratic โ€“ it is quadratic in 5 to the x:

\begin{array}{l}5^{x}+9\times 5^{-x}=6\Longrightarrow 5^x+\frac{9}{5^x}=6\Longrightarrow \left(5^x\right)^2+9=6\times 5^x\end{array}

Now setting the right hand side to zero and factorising we get

\left(5^x\right)^2-6(5^x)+9=0\Longrightarrow \left(5^x-3\right)^2=0

It follows that we have a repeated root when 5^x=3, i.e. when x=\log_5(3)=0.683 to 3 d.p.

Solve 2^xe^{3x}=e^5.

Solution:

This kind of question appears difficult to students because the combination of e and x makes it look messy. Solving this equation means finding x and currently x appears in the powers. To deal with this we can log both sides of the equation but it is important to remember that both sides must be logged in their entirety:

\ln\left(2^xe^{3x}\right)=\ln\left(e^5\right)

We do this because the log rules allow us to change x from being a power inside the log to being a multiplier outside the log. We must first use the log rule that allows us to split the product inside the log to a summation outside the log. Also note that e and ln are inverses of each other and so the equation becomes:

\ln\left(2^x\right)+\ln\left(e^{3x}\right)=5

It follows that

x\ln\left(2\right)+3x=5

To get x on its own, the left hand side can be factorised to give

x\left(\ln(2)+3\right)=5

giving the solution

x=\frac{5}{\ln(2)+3}

Solve the equation   \log_2(x)=\log_x(5).

Solution:

Notice that the bases are different and so we must make them the same first using the change of base formula. Choose to change the right hand side so that 2 is the base for all terms:

\log_x(5)=\frac{\log_2(5)}{\log_2(x)}

and substituting into the equation gives

\log_2(x)=\frac{\log_2(5)}{\log_2(x)}

Multiplying both sides by \log_2(x) gives

\left(\log_2(x)\right)^2=\log_2(5)=2.322

Note that there is no log rule for multiplying logs, only for multiplying within the log and also note that \log_2(5) can be calculated using the calculator. By square rooting we get:

\log_2(x)=1.524

In other words,

x=2^{1.524}

and sox=2.875 to 3 decimal places.

Videos

https://youtu.be/wFezs07idhQ

Correcting mistakes made in a typical student solution to a logs question.

https://youtu.be/iZSTfMxEZHY

Finding exact solutions to a logs equation and an exponential equation using log rules.