Logarithmic Equation Solver – Solve for x with Domain Checking
A logarithmic equation is any equation where the unknown appears inside a logarithm, such as 3 · log₂(x − 1) + 2 = 11. Solving one means undoing the logarithm — usually by isolating or combining the log terms and then exponentiating both sides. Logarithmic equations show up throughout science and engineering: pH and decibel scales, Richter-scale earthquake magnitude, half-life and doubling-time inversion problems, and information-theory entropy calculations all reduce to this same algebraic shape. This tool solves five common forms and shows the full derivation for each, with rigorous checking for extraneous roots.
The Five Supported Forms
The basic form a · log_b(cx + d) + e = f is solved by isolating the log term and exponentiating with base b. The equal-logs form log_b(f(x)) = log_b(g(x)) uses the fact that log_b is one-to-one — matching bases means the arguments themselves must be equal, reducing the problem to a linear equation. The sum-of-logs form log_b(x) + log_b(x − a) = c combines via the product rule log_b(u) + log_b(v) = log_b(uv), and the difference-of-logs form log_b(x) − log_b(x − a) = c combines via the quotient rule log_b(u) − log_b(v) = log_b(u/v) — both then exponentiate into a polynomial. Finally, the quadratic-in-log form p·(log_b x)² + q·log_b x + r = 0 is solved with the substitution u = log_b x, turning it into an ordinary quadratic in u.
Why Domain Checking Matters
Every logarithm has a strict requirement: its argument must be greater than zero. When you combine two logs into one (via the product or quotient rule) or exponentiate both sides of an equation, the resulting polynomial can have roots that satisfy the simplified equation but make an argument of the original logarithm zero or negative. These are called extraneous roots. For example, solving log₂(x) + log₂(x − 2) = 3 produces the quadratic roots x = 4 and x = −2, but only x = 4 keeps both x and x − 2 positive — x = −2 is extraneous and must be discarded.
Exact Answers and Verification
Alongside the decimal result at your chosen precision, the tool shows the exact closed-form expression (for example x = 2³ + 1) and automatically detects when the answer simplifies to a clean integer or small fraction. Every accepted solution is then substituted back into the original equation and compared side by side, so you can confirm the answer directly rather than trusting the algebra blindly.
Solvability Classification
Not every equation has a clean unique answer. The solver classifies each result as a unique solution, multiple solutions (both roots of a quadratic pass the domain check), no valid solution (every algebraic root is extraneous, or the discriminant is negative), an identity (true for every x in the domain), or a contradiction (never true). Reporting these cases explicitly avoids returning a misleading or undefined answer.
Choosing a Base and Log Notation
Any positive base b ≠ 1is supported — use Euler's number for natural log, 10 for common log, or any other base for custom scales. The step-by-step derivation can display the logarithm using ln, log₁₀, or log_b notation regardless of which base you entered, via the change-of-base formula log_b(v) = ln(v)/ln(b).