On this page
Paste log₂x + log₂(x − 2) = 3 into a chatbot and you may get two answers: x = 4 and x = −2. Only x = 4 is a solution. The other makes a logarithm's argument negative, and the AI kept it because it never went back to the original equation.
This is a classic way to get a log equation wrong, for chatbots and students alike, and a domain-first check catches it quickly.
Why does AI keep a root that makes the log negative?
The domain of the logarithm function with base b is (0, ∞), so the log of zero or a negative number has no real value (OpenStax Precalculus 2e, Logarithmic functions). If that rule feels arbitrary, our explainer on why the logarithm of a negative number is undefined walks through it.
Now look at the step every solution uses: log₂x + log₂(x − 2) becomes log₂[x(x − 2)]. The left side needs x > 0 and x − 2 > 0 separately. The right side only needs the product x(x − 2) to be positive, which is also true when both factors are negative, as at x = −2. Combining the logs quietly widens the domain.
An extraneous solution is "a solution that is correct algebraically but does not satisfy the conditions of the original equation" (OpenStax Precalculus 2e, Exponential and logarithmic equations).
A chatbot generates likely next steps, and "factorise the quadratic, list both roots" is a familiar pattern in worked solutions, so it can stop there. Asking "are you sure?" is not a reliable fix. In a paper presented at ICLR 2024, Jie Huang and colleagues found that large language models struggle to correct their own reasoning without external feedback, and sometimes do worse after trying (Huang et al., arXiv 2310.01798). They tested reasoning benchmarks, not log equations, but the lesson carries over: the check has to come from you.
How do you check the domain of a log equation first?
Write down every log in the original equation, before any rule is applied.
For each one, write argument > 0. If the base contains x, also write base > 0 and base ≠ 1.
Solve those inequalities together to get one allowed interval.
Let the AI, or you, solve the equation any way it likes.
Test each root against the interval from step 3 and throw out any that fall outside.
Substitute the survivors into the original equation, not the simplified one.
Worked example: which of the AI's two answers must go?
Equation: log₂x + log₂(x − 2) = 3.
Domain first: x > 0 and x − 2 > 0, so x > 2.
Combine: log₂[x(x − 2)] = 3, so x(x − 2) = 2³ = 8.
Rearrange: x² − 2x − 8 = 0, which factorises as (x − 4)(x + 2) = 0.
Candidates: x = 4 or x = −2.
x = 4 is greater than 2. Check: log₂4 + log₂2 = 2 + 1 = 3. It stays.
x = −2 is not greater than 2, and log₂(−2) is undefined. It goes.
Final answer: x = 4 only.
Zero is the other trap. Try log(x² − 1) = log(x − 1). The domain needs x² − 1 > 0 and x − 1 > 0, so x > 1. Setting the arguments equal is the right move, but any root still has to make both arguments positive, because the argument of a logarithm must be positive (OpenStax). Setting x² − 1 = x − 1 gives x² − x = 0, so x = 0 or x = 1. At x = 1 both arguments are zero; at x = 0 both are −1. Neither is allowed, so the equation has no solution. An AI that skips the domain can hand you two answers here, when the right answer is none.
Rewriting 2 log x as log x² widens the domain the same way, and so does squaring both sides of an equation.
What should you type to make the AI show its domain check?
Ask for the check up front. Paste this:
"Before solving, list the domain condition for every logarithm in the original equation and combine them into one interval. After solving, test each root against that interval and substitute it into the original equation, showing the value of each log's argument. Reject any root where an argument is zero or negative."
Then run your own domain check anyway; it is the outside feedback the model cannot give itself. For the inequality cases, our guide to logarithmic equations and inequalities, domain first uses the same method.
If you want to see where the domain condition enters each step, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If logs themselves feel shaky, the Fermi Concept Library gives every concept in mathematics its own lesson.
Next time an AI hands you two roots, write the domain first and let the interval decide.



