✖

Logarithmic equations

A logarithmic equation is an equation in which the unknown usually hides in the argument of a logarithm. The simplest one looks like this:

log2⁡x=3

A logarithm is the power to which we must raise the base to get the argument. So the equation is asking: what must we raise 2 to in order to get x? The third power. So

x=23=8.

The graph shows the same thing. We are looking for the point where the graph of the function y = log2 x meets the horizontal line y = 3:

The graph of the function y=\log_2 x meets the line y=3 at a single point, above x=8

The function log2 x is increasing, so it meets the line only once and the equation has exactly one solution. That is the whole secret of logarithmic equations: we try to turn everything into a form with a single logarithm on one side and a number, or also a single logarithm, on the other. It is a similar trick to the one we used for exponential equations, where we looked for the same bases.

Restrictions

Logarithms only exist for positive numbers. What is log2(−4)? What must we raise 2 to in order to get −4? There is no such power, because a power of 2 is always positive. It follows that the argument of every logarithm in the equation must be positive.

The steps we are going to take with logarithms, however, do not always keep the equation equivalent, and they can quietly lose this condition. Then we get a solution for which the original equation makes no sense at all. The typical mistake is to solve the equation mechanically, write down all the solutions and not check whether they can actually be substituted into a logarithm.

There are two ways to protect ourselves:

  • at the start, find the restrictions, that is, the domain of the equation, and at the end discard the solutions that do not belong to it,
  • or at the end, check each solution by substituting it into the original equation.

Checking is the safer option, because it also catches a plain slip in the arithmetic. With logarithmic equations it is usually short, so it is worth doing every time.

Removing the logarithms

If we manage to rewrite the equation in the form

loga⁡f(x)=loga⁡g(x),

where both sides have logarithms to the same base, we can simply “cross them out” and solve the equation

f(x)=g(x).

This is allowed because a logarithm is increasing when the base is greater than 1 and decreasing when it is less than 1, so it gives the same value only for the same argument. This step is called removing the logarithms. But be careful: you may only cross them out when each side consists of a single logarithm and nothing else. From the equation log x + log 3 = log 12 you do not get x + 3 = 12 by crossing out. First the left-hand side has to be combined into one logarithm, as we will see in the next section, and only then do we get x = 4.

Now let’s try it on an example:

log⁡(2x+3)=log⁡(x+7)

Recall that log with no base means the logarithm to base 10: here log means log₁₀. The base is the same on both sides, so we remove the logarithms and what is left is an ordinary linear equation:

2x+3=x+7/−xx+3=7/−3x=4

Check: on the left we get log(2 · 4 + 3) = log 11, on the right log(4 + 7) = log 11. They match, both arguments are positive, so the solution is x = 4.

Laws of logarithms

Often there are several logarithms on one side. Then we have to combine them into one using the laws of logarithms. Let’s look at the equation

log2⁡x+log2⁡(x−2)=3.

First the restrictions. We need x>0 and at the same time x − 2>0, so together x>2.

The sum of logarithms to the same base is the logarithm of the product, loga u + loga v = loga(u · v), provided that both u and v are positive. So we combine the left-hand side:

log2⁡(x(x−2))=3

Now we are back at the start: one logarithm on the left and a number on the right, so we can just use the definition:

x(x−2)=23

We expand the brackets and move the 8 to the left-hand side:

x2−2x−8=0

This is already a quadratic equation. We factorise the left-hand side as (x − 4)(x + 2) = 0, which gives two roots:

x1=4,x2=−2

A trap. The number −2 does not satisfy the condition x>2, and it cannot be substituted into the original equation, because log2(−2) does not exist. Where did it come from? From combining the logarithms. The expression x(x − 2) has the value 8 for x = −2, so it is positive, and the rewritten equation has no problem with it. The original one does. By combining the logarithms we extended the equation with numbers for which the original makes no sense.

Check for x = 4: log2 4 + log2 2 = 2 + 1 = 3. It matches, so the equation has exactly one solution, x = 4.

Substitution

Sometimes a squared logarithm appears in an equation:

log2⁡x−3log⁡x+2=0

The notation log2 x means (log x)2, that is, first the logarithm and only then the square, not log(x2). The only restriction is x>0.

At first glance it looks terrifying, but up close it is a quadratic equation in disguise. We introduce the substitution a = log x:

a2−3a+2=0

We factorise it as (a − 1)(a − 2) = 0, so a = 1 or a = 2. We are not done yet, because we are looking for x, not a. So we substitute back:

log⁡x=1⇒x=101=10

log⁡x=2⇒x=102=100

Both roots are positive, so they satisfy the condition. Check for x = 100: log 100 = 2, so 22 − 3 · 2 + 2 = 4 − 6 + 2 = 0. For x = 10 we get 1 − 3 + 2 = 0. The equation has two solutions, x = 10 and x = 100.