Sub topic 13
Solving Logarithmic Equations and Checking the Domain
This chapter assumes you know the definition of a logarithm and its three laws (product, quotient, power). It also assumes the change of base formula and solving linear and quadratic equations. Here you combine those tools into a repeatable method for equations. The part that costs marks is the domain check, so most of the chapter is about that.
Why the domain matters
A logarithm log_b(A) is defined only when two conditions hold:
| Part | Requirement | Reason |
|---|---|---|
| Argument `A` | `A > 0` | No real power of a positive base gives zero or a negative number |
| Base `b` | `b > 0` and `b ≠ 1` | A base of 1 gives only 1, so it cannot be inverted |
The log laws can enlarge the set of allowed values. For example, log(x-3) + log(x-1) needs both x > 3 and x > 1. After combining, log((x-3)(x-1)) only needs the product to be positive, which also allows x < 1. Solving the combined form can therefore produce roots that were never valid in the original equation. These are called extraneous roots.
A four-step method
- Write the domain conditions for every logarithm in the original equation.
- Reduce the equation to one of the standard forms below.
- Solve the resulting algebraic equation.
- Keep only the roots that satisfy every condition from step 1.
Standard form 1: convert to exponential form
If log_b(f(x)) = c, then f(x) = b^c. Use the definition directly.
Solve log_2(x) + log_2(x - 2) = 3.
- Domain:
x > 0andx - 2 > 0, sox > 2. - Combine:
log_2(x(x - 2)) = 3, sox(x - 2) = 2^3 = 8. - Solve:
x^2 - 2x - 8 = 0, so(x - 4)(x + 2) = 0, givingx = 4orx = -2. - Check:
-2is not greater than 2, so it is rejected. The answer isx = 4.
The check by substitution confirms it: log_2(4) + log_2(2) = 2 + 1 = 3.
import math
# Test each candidate in the ORIGINAL equation, not the combined one.
for x in (4, -2):
try:
value = math.log2(x) + math.log2(x - 2)
print(x, "gives", value)
except ValueError:
print(x, "is outside the domain")The output is 4 gives 3.0 followed by -2 is outside the domain. Python raises ValueError exactly where the real logarithm is undefined.
Standard form 2: equal logs mean equal arguments
If two logarithms with the same base are equal, their arguments are equal. This works because log_b is one-to-one. Solve log_5(x + 4) = log_5(3x - 2).
- Domain:
x > -4andx > 2/3, sox > 2/3. - Equate:
x + 4 = 3x - 2, sox = 3. - Check:
3 > 2/3, so it is valid.
Move all logs to one side first when they are on both sides. For log(x+1) - log(x-1) = log 3, the quotient law gives (x+1)/(x-1) = 3, so x = 2. The domain is x > 1, and 2 passes.
Standard form 3: unknown base
When the base contains the variable, add x > 0 and x ≠ 1 to the domain. Solve log_x(2x + 8) = 2.
- Domain:
x > 0,x ≠ 1, and2x + 8 > 0. - Convert:
x^2 = 2x + 8, sox^2 - 2x - 8 = 0, givingx = 4orx = -2. - Check:
-2is not a valid base. The answer isx = 4, and indeedlog_4(16) = 2.
Standard form 4: substitution
When the equation contains log x and (log x)^2, or log_a x together with log_x a, let t be the logarithm.
Solve (log_2 x)^2 - 3 log_2 x + 2 = 0. Put t = log_2 x. Then t^2 - 3t + 2 = 0, so t = 1 or t = 2. Therefore x = 2 or x = 4. Both are positive, so both are valid.
Now solve log_x 2 + log_2 x = 5/2. By the reciprocal identity, log_x 2 = 1/log_2 x. Put t = log_2 x, which gives 1/t + t = 5/2.
- Note
t ≠ 0, becauset = 0would meanx = 1, which is not a valid base. - Multiply by
2t:2t^2 - 5t + 2 = 0, so(2t - 1)(t - 2) = 0. - Then
t = 1/2ort = 2, sox = √2orx = 4. - Both satisfy
x > 0andx ≠ 1.
Taking logs of both sides
When the variable appears in both the base and the exponent, take a logarithm of both sides. Solve x^(log_10 x) = 10000.
- Domain:
x > 0. - Take
log_10:(log_10 x)(log_10 x) = 4, so(log_10 x)^2 = 4. - Therefore
log_10 x = 2or-2, givingx = 100orx = 1/100. Both are positive and valid.
Where roots are lost or gained
Domain errors go in two directions. The first is gaining false roots, as in the -2 example above. The second is losing real roots through the power law.
The identity log(x^2) = 2 log x holds only for x > 0. For all x ≠ 0, the correct version is log(x^2) = 2 log|x|. Compare these two equations:
log_10(x^2) = 2: the domain isx ≠ 0, sox^2 = 100gives bothx = 10andx = -10.2 log_10 x = 2: the domain isx > 0, so onlyx = 10.
Common errors
- Forgetting the domain entirely and reporting both roots of the quadratic.
- Writing
log(A + B) = log A + log B. No such law exists. - Dropping the condition
base ≠ 1when the base is a variable. - Mixing bases:
log_2 A = log_3 Adoes not imply anything aboutAuntil you note that it forcesA = 1, since the logs agree only at 0. - Cancelling
logfrom both sides oflog f = c · log gwithout first rewritingc · log gaslog(g^c).
CAT-style summary table
| Equation shape | Move | Domain trap |
|---|---|---|
| `log_b f = c` | `f = b^c` | `f > 0` |
| `log f = log g` | `f = g` | `f > 0` and `g > 0` |
| `log A + log B = c` | combine, then exponentiate | `A > 0` and `B > 0` separately |
| `log_x (...)` | exponentiate with base `x` | `x > 0`, `x ≠ 1` |
| `(log x)^2` with `log x` | substitute `t = log x` | roots for `x` must be positive |
| `x^(log x) = k` | take logs of both sides | `x > 0` |
Exercise
Solve log3(x + 1) + log3(x - 1) = 1, and state which candidate roots you reject.
Show answer
Domain: x + 1 > 0 and x - 1 > 0, so x > 1. Combine: log_3((x + 1)(x - 1)) = 1, so x^2 - 1 = 3, so x^2 = 4 and x = 2 or x = -2. Since -2 is not greater than 1, reject it. The solution is x = 2.
Exercise
Solve log2(log3 x) = 1. What is the domain?
Show answer
The inner logarithm needs x > 0, and the outer one needs log3 x > 0, so x > 1. Exponentiating the outer log gives log3 x = 2^1 = 2, so x = 3^2 = 9. Since 9 > 1, it is valid. The solution is x = 9.
Exercise
Solve 2 log10 x = log10(4x - 3). Are both algebraic roots valid?
Show answer
Domain: x > 0 and 4x - 3 > 0, so x > 3/4. The power law is safe because x > 0. Then log10(x^2) = log10(4x - 3), so x^2 = 4x - 3, so x^2 - 4x + 3 = 0, so x = 1 or x = 3. Both exceed 3/4, so both are valid. Check: x = 1 gives 0 = log10(1) = 0, and x = 3 gives 2 log10 3 = log_10 9.