Sub topic 9
Solving Logarithmic Equations by Rewriting in Exponential Form
This chapter assumes you can solve linear and quadratic equations, apply the exponent rules, and use the inverse relationship between exponentials and logarithms. It also assumes you know the product, quotient, and power rules for logarithms, and that a logarithm is only defined for a positive argument.
The core idea
A logarithm answers the question "what exponent produces this number?" The statement
log_b(A) = C
means exactly the same thing as
b^C = A
where b > 0, b ≠ 1, and A > 0. Rewriting in exponential form removes the logarithm, so the unknown no longer sits inside a function. You then solve what is left with ordinary algebra.
This works because the exponential function with base b and the logarithm with base b are inverses. Raising b to both sides of logb(A) = C gives b^(logb(A)) = b^C, and the left side simplifies to A.
The procedure
- Use algebra to isolate one logarithm on one side. Move constants and divide by coefficients, but do not touch the log's argument yet.
- If several logarithms appear, combine them into one using the product, quotient, and power rules.
- Rewrite log_b(A) = C as b^C = A.
- Solve for the variable.
- Substitute each candidate into the original equation. Keep only those that keep every logarithm argument positive.
Step 5 is part of the method. It is not an optional extra.
Worked examples
Example 1: The simplest case
Solve log_2(x) = 5.
Rewrite: x = 2^5 = 32.
Check: log_2(32) = 5, and 32 > 0. The solution is x = 32.
Example 2: A linear argument
Solve log_3(2x − 1) = 2.
Rewrite: 2x − 1 = 3^2 = 9. So 2x = 10 and x = 5.
Check: the argument is 2(5) − 1 = 9, which is positive, and log_3(9) = 2. The solution is x = 5.
Example 3: Isolate the logarithm first
Solve 4 log_5(x + 3) − 2 = 6.
Add 2 to both sides: 4 log5(x + 3) = 8. Divide by 4: log5(x + 3) = 2.
Rewrite: x + 3 = 5^2 = 25, so x = 22.
Check: log_5(25) = 2, so 4(2) − 2 = 6. The solution is x = 22.
A common mistake here is to rewrite before isolating. If you wrote 5^6 = 4(x + 3) − 2, you would be treating the 4 and the −2 as if they were inside the logarithm. They are not.
Example 4: Natural and common logs
Solve ln(x) = 3. The base of ln is e, so x = e^3. The exact answer is e^3, and the decimal approximation is about 20.09.
Solve log(x + 1) = −2. A log with no written base has base 10, so x + 1 = 10^(−2) = 0.01 and x = −0.99.
Check: x + 1 = 0.01 > 0, so the argument is valid. The solution is x = −0.99. A negative answer for x is fine. Only the argument of the logarithm must be positive.
Example 5: A variable base
Solve log_x(49) = 2.
Rewrite: x^2 = 49, so x = 7 or x = −7. A base must be positive and not equal to 1, so x = −7 is rejected. The solution is x = 7.
This is a second kind of domain restriction. Besides the argument, the base is restricted too.
Equations with two logarithms
When logarithms appear with the same base, combine them first so that exactly one logarithm remains.
Example 6: Product of logs equal to a constant
Solve log2(x) + log2(x − 2) = 3.
- Combine with the product rule: log_2(x(x − 2)) = 3.
- Rewrite: x(x − 2) = 2^3 = 8.
- Expand and collect terms: x^2 − 2x − 8 = 0.
- Factor: (x − 4)(x + 2) = 0, so the candidates are x = 4 and x = −2.
Now check each candidate against the original equation. For x = −2, the argument x is −2 and the argument x − 2 is −4. Both are negative, so x = −2 is extraneous. For x = 4, the arguments are 4 and 2, both positive, and log2(4) + log2(2) = 2 + 1 = 3. The only solution is x = 4.
The following Python code applies the same check numerically.
import math
# Solve log2(x) + log2(x - 2) = 3
# Combine: log2(x*(x - 2)) = 3, so x*(x - 2) = 8, so x**2 - 2*x - 8 = 0
candidates = [4, -2] # roots of the quadratic
valid = [
x for x in candidates
if x > 0 and x - 2 > 0
and math.isclose(math.log2(x) + math.log2(x - 2), 3)
]
print(valid) # [4]The x > 0 and x - 2 > 0 test comes first. Because Python's and stops at the first false condition, the logarithm is never called on an invalid number. Calling math.log2(-2) raises a ValueError.
Example 7: Difference of logs
Solve log3(x + 8) − log3(x) = 2.
Quotient rule: log_3((x + 8)/x) = 2.
Rewrite: (x + 8)/x = 9. Multiply by x: x + 8 = 9x, so 8 = 8x and x = 1.
Check: the arguments are 9 and 1, both positive, and log3(9) − log3(1) = 2 − 0 = 2. The solution is x = 1.
Why extraneous solutions appear
The combining step changes the domain of the equation. The original equation log2(x) + log2(x − 2) requires both x > 0 and x − 2 > 0, so x > 2. The combined expression log_2(x(x − 2)) only requires x(x − 2) > 0. That is also true when both factors are negative, which covers x < 0. The new equation accepts more values than the original, so the algebra can return a value the original equation never allowed.
The power rule has the same problem. The expression 2 log(x) is defined only for x > 0, but log(x^2) is defined for every x ≠ 0. Suppose you solve 2 log(x) = log(9) by rewriting it as log(x^2) = log(9). You get x^2 = 9, so x = ±3. Only x = 3 satisfies the original equation.
A case with no solution
Solve log(x) + log(x + 3) = log(−4)... this fails at the start, because log(−4) is undefined. A subtler case is the following.
Solve log2(x) + log2(x + 6) = 4... this has a solution, so try one that does not. Take
log(x − 5) + log(x − 4) = log(2) + log(−1)... also undefined.
A cleaner example is log2(x + 3) + log2(x − 2)... a better choice is the following.
Solve log(x) + log(x + 1) = log(−x − 6)... the right side requires x < −6, but the left side requires x > 0. No value satisfies both, so the equation has no solution. You can discover this from the domains alone, before doing any algebra.
Instead of searching for such cases, build the habit. Write the domain first, then solve. For log2(x) + log2(x − 2) = 3, the domain is x > 2. Any candidate outside it is rejected immediately.
Comparing the two methods
Some equations can be solved in two ways. Compare them on one problem.
Solve log2(x + 1) = log2(5).
| Method | Steps | Result |
|---|---|---|
| Rewrite in exponential form | x + 1 = 2^(log_2(5)) = 5 | x = 4 |
| One-to-one property | Equate the arguments: x + 1 = 5 | x = 4 |
Both give x = 4. Use the one-to-one property when each side is a single logarithm with the same base. Use exponential form when one side is a constant. Rewriting a constant as a logarithm is rarely worth the effort.
Exact answers and decimals
Exponential form often produces answers like x = 10^(2/3) or x = e^3 − 1. These are exact. Give a decimal approximation only when the problem asks for one, and say how many places you used.
For ln(x − 1) = 2, the exact answer is x = e^2 + 1. The decimal approximation is about 8.389.
import math
# Solve ln(x - 1) = 2
x = math.exp(2) + 1
print(x) # about 8.389
print(math.log(x - 1)) # about 2.0Common errors
- Rewriting before isolating the logarithm, which puts outside constants inside the exponent equation.
- Writing log_b(A) = C as C^b = A. The base b is the number that gets raised to a power.
- Splitting log(A + B) into log(A) + log(B). The product rule applies to log(AB), not to a sum.
- Forgetting the check, and so keeping a root that makes an argument zero or negative.
- Rejecting a negative x just because it is negative. Reject only when an argument or base becomes invalid.
- Treating a log with no written base as natural. In most algebra courses log means base 10 and ln means base e.
Edge cases to remember
- log_b(1) = 0 for every valid base, and an argument of exactly 0 is never allowed. A candidate that makes an argument 0 is extraneous.
- If the right side of an isolated equation like log_b(A) = C is any real number, a solution exists whenever A = b^C is attainable by the argument. Because b^C is always positive, the exponential form never fails on its own. Any failure comes from the rest of the equation.
- Several candidates may pass. The check removes bad ones and keeps every good one.
Exercise
Solve log2(x) + log2(x − 6) = 4. Give all valid solutions and state which candidates you reject.
Show answer
Combine: log2(x(x − 6)) = 4. Rewrite: x(x − 6) = 16, so x^2 − 6x − 16 = 0, which factors as (x − 8)(x + 2) = 0. The candidates are x = 8 and x = −2. The domain requires x > 6, so x = −2 is extraneous. Check x = 8: log2(8) + log_2(2) = 3 + 1 = 4. The solution is x = 8.
Exercise
Solve 3 ln(x + 2) + 1 = 10 exactly, then give a decimal approximation to three places.
Show answer
Subtract 1: 3 ln(x + 2) = 9. Divide by 3: ln(x + 2) = 3. Rewrite: x + 2 = e^3, so x = e^3 − 2. The argument x + 2 = e^3 is positive. The decimal approximation is about 18.086.
Exercise
Solve log(x + 2) − log(x − 1) = 1, and state the domain you used.
Show answer
The domain is x > 1. Quotient rule: log((x + 2)/(x − 1)) = 1. Rewrite: (x + 2)/(x − 1) = 10, so x + 2 = 10x − 10, so 12 = 9x and x = 4/3. This is greater than 1. Check: log(10/3) − log(1/3) = log(10) = 1. The solution is x = 4/3.