Solving logarithmic equations
The unknown sits inside a logarithm. How do you get it out, and why can the algebra hand back an answer that does not work?
Where you are 11 in Logarithms
When you reach for it
A logarithmic equation is an equation with the unknown inside a logarithm, such as
You reach for the moves in this lesson whenever the unknown is in the argument of a logarithm, the number the logarithm is taken of. (When the unknown is in an exponent instead, as in 5^x = 30, the tools are matching the bases or taking a logarithm of both sides.)
Two facts you already have do the solving. A logarithm statement is a power statement in disguise, so \log_b M = c can be rewritten as b^c = M. And the laws of logarithms turn a sum or difference of logarithms into a single one. What is new is a third fact, and it is the reason this lesson exists: a logarithm only accepts positive arguments, and the laws quietly forget that. Rewriting an equation with the laws can make room for values the original equation never allowed. The algebra then finds them along with the real solutions, and each one has to be caught and dropped. Such a value is called an extraneous solution: it solves a rewritten equation but not the one you were given.
The procedure
Where the equation lives
\log_b M is defined only when M > 0, for a base b > 0 with b \ne 1. So before solving, read off the domain of the equation: the values of x that make every argument in it positive. For the equation above,
that is, x > 6.
No number outside this domain can be a solution, because at such a number the left side has no value at all. Writing the domain down first costs one line and makes the final check immediate.
One logarithm equal to a number: rewrite as a power
If the equation is a single logarithm equal to a number, \log_b M = c, the definition of the logarithm says this is the same statement as
The two statements are true for exactly the same x, so nothing is gained or lost by the switch.
A logarithm on each side: set the arguments equal
If the equation is \log_b M = \log_b N, with one logarithm of the same base on each side, then
The reason is the graph of y = \log_b x: it rises the whole way for b > 1 and falls the whole way for 0 < b < 1, so it never takes the same height twice. Two positive inputs with equal logarithms must therefore be the same input. This is the one-to-one property of logarithms. The step runs one way only: M = N does not bring back \log_b M = \log_b N when M and N are zero or negative, since then neither logarithm exists. So any answer from M = N still has to pass the domain.
Several logarithms: condense first
With more than one logarithm on a side, use the product, quotient and power laws to condense each side to a single logarithm, then use one of the two moves above. Here,
so the equation becomes \log_2\big(x(x - 6)\big) = 4. Rewrite it as a power:
and solve the quadratic, by moving 16 across and factoring:
So x = 8 or x = -2.
Why the check is needed, and what it is
Try x = -2 in the original equation. The first term is \log_2(-2), which does not exist, so x = -2 is not a solution. Yet it solved x(x - 6) = 16 honestly: (-2)(-8) = 16. It came in at the condensing step. The product law, \log_b M + \log_b N = \log_b(MN), holds when M and N are both positive. The right side, though, only needs MN > 0, and two negative numbers also have a positive product. So \log_2\big(x(x - 6)\big) is defined for x < 0 as well as for x > 6, while \log_2 x + \log_2(x - 6) is defined only for x > 6. The condensed equation lives on a bigger set, and on the extra piece it picked up the solution x = -2.
The graph shows it. The condensed logarithm has two branches, and the original left side is only the right-hand one. The line y = 4 crosses both, once at x = 8 and once at x = -2.
So the last step is a check of every candidate against the domain of the original equation. For x = 8 both arguments, 8 and 2, are positive, so it is kept; for x = -2 they are not, so it is dropped. Substituting the kept answer confirms it:
The solution is x = 8, and only x = 8.
Why is the domain check enough? Inside the domain, every step above can be run backwards: the product law holds there, a power statement turns back into its logarithm, and the quadratic’s steps are reversible. So a candidate inside the domain really does solve the original. Substituting it is still worth doing, because it catches an arithmetic slip. The same thing happens when squaring both sides of a radical equation: a step that can lose information, there the sign and here the positivity, can let in a value the original rules out.
Worked examples
One logarithm equal to a number
Solve (a) \log_3(2x + 1) = 4 \qquad (b) 4 + 2\ln(x - 5) = 10
Solution(a) There is one logarithm and it is alone, so rewrite it as a power of the base 3:
Check: 2(40) + 1 = 81 is positive and \log_3 81 = 4, since 3^4 = 81.
(b) First get the logarithm alone, using ordinary steps on both sides: subtract 4, then divide by 2.
The natural logarithm has base e, so the power form is
The exact answer is 5 + e^3; the decimal is only for a sense of size. The argument is x - 5 = e^3, which is positive, so the answer stands.
Neither part could have produced an extraneous solution. When a single logarithm equals a number, the rewrite makes its argument equal a power of a positive base, and such a power is always positive.
A logarithm on each side
Solve \log_5(x^2 - 4) = \log_5(3x).
SolutionThe domain needs x^2 - 4 > 0 and 3x > 0. The second says x > 0, and with it the first says x > 2. So only x > 2 can work.
Each side is one logarithm with base 5, so by the one-to-one property the arguments are equal:
The candidates are x = 4 and x = -1. At x = -1 both arguments are -3, so both sides of the original are logarithms of a negative number: drop it. At x = 4 both arguments are 12, so the original reads \log_5 12 = \log_5 12. The solution is x = 4.
Here no law was used, and an extraneous value still appeared. Setting arguments equal also forgets that they must be positive: x^2 - 4 = 3x is just as true at x = -1, where both are -3.
A difference of logarithms
Solve \log_3(x + 6) - \log_3(x - 2) = 2.
SolutionThe domain is x > 2, since x - 2 > 0 forces it and then x + 6 > 0 as well.
Condense with the quotient law, then rewrite as a power:
Multiply both sides by x - 2, which is allowed because it is not 0 anywhere in the domain:
x = 3 is in the domain. Check: \log_3 9 - \log_3 1 = 2 - 0 = 2.
Not every condensed equation produces something to drop. The check is what tells you, here as everywhere.
Every candidate dropped
Solve \ln x + \ln(x - 3) = \ln(x - 4).
SolutionAll three arguments must be positive: x > 0, x > 3 and x > 4. The domain is x > 4.
Condense the left side with the product law, then set the arguments equal:
The only candidate is x = 2, and it is not in the domain: \ln(x - 3) would be \ln(-1) and \ln(x - 4) would be \ln(-2). So the equation has no solution.
At x = 2 both sides of x^2 - 3x = x - 4 equal -2, which is why the algebra found it. “No solution” is a complete answer, not a sign that something went wrong.
The power law and the form of the equation
Solve (a) 2\log_7 x = \log_7(5x + 6) \qquad (b) \log_7\left(x^2\right) = \log_7(5x + 6)
Solution(a) The domain needs x > 0 and 5x + 6 > 0, so x > 0. Use the power law to make the left side a single logarithm, then set the arguments equal:
The candidates are x = 6 and x = -1. The original has \log_7 x, so x = -1 is dropped. The solution is x = 6. Check: 2\log_7 6 = \log_7 36, and 5(6) + 6 = 36.
(b) This equation looks the same after one step, but its domain is different. \log_7\left(x^2\right) needs only x^2 > 0, so any x \ne 0 will do, and 5x + 6 > 0 needs \displaystyle x > -\frac{6}{5}. Setting the arguments equal gives the same candidates, x = 6 and x = -1, and this time both are in the domain. At x = -1 the equation reads \log_7 1 = \log_7 1, both sides 0. The solutions are x = 6 and x = -1.
The power law \log_b\left(x^2\right) = 2\log_b x holds only for x > 0. Which candidates survive is decided by the equation as it was given, never by a rewritten form of it.
A quotient with radical answers
Solve \log(x + 2) - \log(x - 1) = \log x, where \log is the common logarithm, base 10.
SolutionThe domain needs x + 2 > 0, x - 1 > 0 and x > 0, so x > 1.
Condense the left side with the quotient law and set the arguments equal. Then multiply by x - 1, which is not 0 in the domain:
This does not factor over the integers, so use the quadratic formula:
Now \displaystyle 1 + \sqrt{3} \approx 2.73 is above 1, so it is kept, and \displaystyle 1 - \sqrt{3} \approx -0.73 is not, so it is dropped (at that value x - 1 and x are both negative).
Check the kept answer exactly. With \displaystyle x = 1 + \sqrt{3}, \displaystyle x - 1 = \sqrt{3} and \displaystyle x + 2 = 3 + \sqrt{3}, so
The solution is \displaystyle x = 1 + \sqrt{3}. With radical answers the decimals are the quickest way to see which side of the domain boundary each one falls on.
A quadratic in the logarithm
Solve (\log_3 x)^2 - \log_3 x - 2 = 0.
SolutionHere the logarithm itself is the unknown quantity, squared once and present once, so the equation is a quadratic in disguise. Write u = \log_3 x:
So u = 2 or u = -1. Each one is a logarithm equal to a number, so rewrite each as a power of 3:
Both are positive, as they must be, being powers of 3, so both are kept. Check \displaystyle x = \frac{1}{3}: \displaystyle \log_3 \frac{1}{3} = -1, and (-1)^2 - (-1) - 2 = 1 + 1 - 2 = 0.
A negative value of u is no problem. The logarithm itself may be any real number; only its argument has to be positive.
Boundaries
The base must be positive and not 1. Every move above uses a base b > 0 with b \ne 1. Base 1 has no logarithm, since every power of 1 is 1.
Every argument must be positive, in the equation as given. The domain comes from the original equation, before any law is applied. A rewritten equation can live on a bigger set (Examples 2, 4 and 5) and the extra part is where extraneous solutions come from.
The laws widen the domain; the reversed laws can shrink it. Condensing \log_b M + \log_b N into \log_b(MN) or 2\log_b x into \log_b\left(x^2\right) adds values, and the domain check removes them. Going the other way, expanding \log_b\left(x^2\right) into 2\log_b x throws away every negative x, and with it any solution there. Solving \log_7\left(x^2\right) = \log_7(5x + 6) through 2\log_7 x would lose x = -1. So condense, which only ever adds candidates that the check then removes, and do not expand an argument that may be negative.
Setting arguments equal needs one logarithm per side, with the same base. \log_2 x + \log_2 3 = \log_2 7 does not give x + 3 = 7; condense first, to \log_2(3x) = \log_2 7, and then 3x = 7. Bases that differ have to be made to match first, which is what change of base is for.
A single logarithm equal to a number never needs dropping. The power form makes its argument equal b^c, which is positive. Extraneous solutions need a law or a one-to-one step that compares two expressions without asking whether they are positive.
Some logarithmic equations have no algebraic solution. \ln x = 2 - x mixes a logarithm with a plain x. It has exactly one solution: the left side rises and the right side falls, so they meet at most once, and they do meet between x = 1 (where \ln 1 = 0 is below 2 - 1 = 1) and x = 2 (where \ln 2 \approx 0.69 is above 2 - 2 = 0). But no rewrite with logarithms, powers and ordinary algebra isolates it; it is found from a graph or by a numerical method.
Where this goes next
Solving logarithmic equations is the other half of solving exponential equations: there a logarithm is applied to free an exponent, here a power is applied to free an argument. Together they let you run exponential models backwards, asking when a quantity reaches a level rather than what level it has reached, the same question behind doubling time and half life. The habit this lesson builds, writing down where an equation lives before solving it and checking every answer against it, comes back with every equation whose steps are not all reversible: radical equations, equations with fractions, and later, in calculus, equations whose functions are only defined on part of the number line.
Exercises
One logarithm equal to a number
- \log_4(3x - 2) = 3
- \log(5x) = 2
- 3\ln(x + 1) = 6. Give the exact answer and a decimal to two places.
- \log_3(x^2 + 2) = 3
A logarithm on each side
- \log_6(2x + 5) = \log_6(x + 9)
- \log_3(x^2 + 2x) = \log_3(x + 6)
- 2\log_5 x = \log_5(x + 12)
- \ln(x - 1) = \ln(2x + 3)
Condense first
- \log_5 x + \log_5(x + 4) = 1
- \log x + \log(x - 21) = 2
- \log_2(x + 2) + \log_2(x - 5) = 3
- \displaystyle \log_4(x + 9) - \log_4 x = \frac{1}{2}
- \ln(x + 4) + \ln(x - 2) = \ln(4x)
- \log_3(x - 2) + \log_3(x + 4) = 3
Harder equations
- (\log_2 x)^2 = 3\log_2 x + 4
- \log_3(x + 1) - \log_3(x - 1) = \log_3 x
- \log_2(x + 1) = 1 + \log_2(x - 2). Write the 1 as a logarithm first.
- \ln x + \ln(x + 3) = \ln(x + 8)
Reasoning
- Solve \log_6 x + \log_6(x + 5) = 1 and \log_6(x^2 + 5x) = 1. Explain why the two equations have different solutions, even though the laws of logarithms seem to say they are the same.
- Lowen solved \log_3(x^2) = 4 by writing it as 2\log_3 x = 4, and found x = 9. Show that the equation has another solution, and say which step lost it.
- Explain why an equation \log_b(ax + c) = k, with a \ne 0, always has exactly one solution and never an extraneous one.
- Use the graph of y = \log_b x to explain why \log_b M = \log_b N forces M = N for positive M and N.
- A classmate checks x = -2 in \log_2\big(x(x - 6)\big) = 4, finds that it works, and concludes that x = -2 solves \log_2 x + \log_2(x - 6) = 4. Explain what is wrong.
Answers
- x = 22. Power form: 3x - 2 = 4^3 = 64, so 3x = 66.
- x = 20. Power form, base 10: 5x = 10^2 = 100.
- x = e^2 - 1 \approx 6.39. Divide by 3: \ln(x + 1) = 2, so x + 1 = e^2.
- x = 5 or x = -5, both kept. x^2 + 2 = 3^3 = 27, so x^2 = 25. At both values the argument is 27, which is positive.
- x = 4. 2x + 5 = x + 9. Both arguments are then 13.
- x = 2 or x = -3, both kept. x^2 + 2x = x + 6 gives x^2 + x - 6 = (x + 3)(x - 2) = 0. At x = 2 both arguments are 8; at x = -3 both are 3. A negative x is fine when every argument is still positive.
- x = 4. Power law: \log_5\left(x^2\right) = \log_5(x + 12), so x^2 - x - 12 = (x - 4)(x + 3) = 0. x = -3 is dropped because the original has \log_5 x.
- No solution. x - 1 = 2x + 3 gives x = -4, where x - 1 = -5 and 2x + 3 = -5.
- x = 1. x(x + 4) = 5^1, so x^2 + 4x - 5 = (x + 5)(x - 1) = 0. x = -5 is dropped. Check: \log_5 1 + \log_5 5 = 0 + 1.
- x = 25. x(x - 21) = 10^2 = 100, so x^2 - 21x - 100 = (x - 25)(x + 4) = 0. x = -4 is dropped.
- x = 6. (x + 2)(x - 5) = 2^3 = 8, so x^2 - 3x - 18 = (x - 6)(x + 3) = 0. At x = -3, x - 5 = -8, so it is dropped.
- x = 9. \displaystyle \frac{x + 9}{x} = 4^{\frac{1}{2}} = 2, so x + 9 = 2x. Check: \displaystyle \log_4 18 - \log_4 9 = \log_4 2 = \frac{1}{2}.
- x = 4. (x + 4)(x - 2) = 4x gives x^2 - 2x - 8 = (x - 4)(x + 2) = 0. At x = -2, x - 2 = -4, so it is dropped. Check: 8 \cdot 2 = 16 = 4 \cdot 4.
- x = 5. (x - 2)(x + 4) = 3^3 = 27, so x^2 + 2x - 35 = (x + 7)(x - 5) = 0. x = -7 is dropped.
- x = 16 or \displaystyle x = \frac{1}{2}, both kept. With u = \log_2 x, u^2 - 3u - 4 = (u - 4)(u + 1) = 0, so x = 2^4 or x = 2^{-1}.
- \displaystyle x = 1 + \sqrt{2}. \displaystyle \frac{x + 1}{x - 1} = x gives x^2 - 2x - 1 = 0, so \displaystyle x = 1 \pm \sqrt{2}. The domain is x > 1, and \displaystyle 1 - \sqrt{2} \approx -0.41 is dropped.
- x = 5. 1 = \log_2 2, so the right side is \log_2\big(2(x - 2)\big) and x + 1 = 2x - 4. Check: \log_2 6 = 1 + \log_2 3, because 6 = 2 \cdot 3.
- x = 2. x(x + 3) = x + 8 gives x^2 + 2x - 8 = (x + 4)(x - 2) = 0. x = -4 is dropped. Check: 2 \cdot 5 = 10 = 2 + 8.
- The first has only x = 1; the second has x = 1 and x = -6. Both lead to x^2 + 5x - 6 = (x + 6)(x - 1) = 0. At x = -6, x^2 + 5x = 6 is positive, so the second equation holds, but \log_6(-6) does not exist, so the first does not. The product law \log_6 x + \log_6(x + 5) = \log_6(x^2 + 5x) is true only when x > 0, so the two equations agree only there.
- x = -9 also works: (-9)^2 = 81 and \log_3 81 = 4. The rewrite \log_3(x^2) = 2\log_3 x holds only for x > 0, so it threw away every negative x. Solving through the power form, x^2 = 3^4 = 81, gives x = \pm 9.
- The power form is ax + c = b^k, a linear equation with a \ne 0, so it has exactly one solution, \displaystyle x = \frac{b^k - c}{a}. At that x the argument is b^k, a power of a positive base, which is positive, so the logarithm exists and the solution is never dropped.
- For b > 1 the graph rises the whole way, and for 0 < b < 1 it falls the whole way, so a horizontal line meets it at most once. If \log_b M = \log_b N = h, then M and N are both the input where the line at height h meets the graph, so they are the same number.
- The two equations are not the same equation. \log_2\big(x(x - 6)\big) needs only x(x - 6) > 0, which x = -2 satisfies, but \log_2 x + \log_2(x - 6) needs x > 0 and x - 6 > 0 separately, and at x = -2 the term \log_2(-2) does not exist. The check has to be made in the original equation.