How to Find the Domain of a Log Function: A Complete Step-by-Step Guide
Learning how to find the domain of a log function is one of the most essential skills in algebra and precalculus, because logarithmic functions only accept positive inputs. In short, the domain of any logarithmic function is the set of all x-values that make the argument (the expression inside the logarithm) strictly greater than zero. In this guide, you will learn the core rule, a simple step-by-step method, worked examples ranging from basic to advanced, common mistakes to avoid, and answers to frequently asked questions.
What Is a Logarithmic Function?
A logarithmic function is the inverse of an exponential function. It is usually written as:
f(x) = log_b(x), where b is the base (b > 0 and b ≠ 1)
The most common versions you will meet are:
- log(x) — base 10, called the common logarithm
- ln(x) — base e, called the natural logarithm
- log₂(x) — base 2, often used in computer science
No matter which base appears, the rule for the domain never changes.
Why the Domain of a Log Function Matters
The logarithm asks a simple question: "To what power must I raise the base to get this number?" A positive base raised to any real exponent can never produce zero or a negative result. That means:
- log(0) is undefined
- log(−5) is undefined
- log(3) is perfectly fine
If you ignore the domain, you will produce answers that are mathematically impossible, and your graphs will show vertical asymptotes in the wrong places.
The Golden Rule: The Argument Must Be Positive
To find the domain of a log function, follow this single principle:
Set the argument > 0 and solve the inequality.
The argument is whatever sits inside the logarithm. For f(x) = log_b(g(x)), the domain is every x such that g(x) > 0.
Note that the inequality is strictly greater than — the argument can never equal zero It's one of those things that adds up..
Step-by-Step Method
Follow these four steps every time:
- Identify the argument of the logarithm.
- Write the inequality: argument > 0.
- Solve the inequality for x (linear, quadratic, rational, or radical).
- Express the answer using interval notation or set-builder notation.
If the function contains more than one logarithm, find the domain of each one and take the intersection of all conditions.
Worked Examples
Example 1: A Simple Shifted Logarithm
f(x) = log(x − 3)
- Argument: x − 3
- Inequality: x − 3 > 0
- Solution: x > 3
Domain: (3, ∞)
The graph has a vertical asymptote at x = 3 Not complicated — just consistent..
Example 2: A Linear Argument with a Coefficient
f(x) = ln(2x + 6)
- 2x + 6 > 0
- 2x > −6
- x > −3
Domain: (−3, ∞)
Example 3: A Quadratic Argument
f(x) = log(x² − 4)
- x² − 4 > 0
- (x − 2)(x + 2) > 0
The critical values are x = −2 and x = 2. Testing intervals shows the expression is positive when x < −2 or x > 2.
Domain: (−∞, −2) ∪ (2, ∞)
Notice that the domain is not all real numbers except −2 and 2 — the argument must be positive, not merely nonzero Took long enough..
Example 4: A Rational Argument
f(x) = log((x − 1)/(x + 3))
- (x − 1)/(x + 3) > 0
Critical values: x = 1 (numerator zero) and x = −3 (denominator zero, always excluded).
Testing the intervals:
- x < −3 → positive ✔
- −3 < x < 1 → negative ✘
- x > 1 → positive ✔
**Domain: (−∞, −
- ∪ (1, ∞)**
The value x = −3 is excluded because it makes the denominator zero, and the interval between the critical values is excluded because the argument is negative there.
Example 5: A Logarithm with a Radical Argument
f(x) = log(√(4 − x))
The expression under the square root must be positive (and the square root itself must be positive to serve as a valid argument):
- 4 − x > 0
- x < 4
Domain: (−∞, 4)
Example 6: Two Logarithms in One Function
f(x) = log(x + 2) + log(x − 5)
Each logarithm imposes its own condition:
- x + 2 > 0 → x > −2
- x − 5 > 0 → x > 5
Take the intersection of both conditions. Since x > 5 automatically satisfies x > −2, the stricter condition wins.
Domain: (5, ∞)
Common Mistakes to Avoid
Even students who understand the rule can slip up on the details. Watch for these:
- Setting the argument ≥ 0 instead of > 0. The argument can never equal zero, so the endpoint is always excluded — use a parenthesis, never a bracket.
- Solving the whole function instead of the argument. You do not set log(x) > 0; you set the inside > 0.
- Forgetting to exclude denominator zeros. In a rational argument, values that make the denominator zero are automatically out, even if the fraction happens to be positive nearby.
- Treating "not zero" as "positive." For a quadratic argument like x² − 4, the answer is not "all reals except ±2" — it is only where the expression is strictly positive.
- Ignoring extra logarithms. When several logs appear, every one must be satisfied at once.
Quick Reference
| Argument type | Condition to solve | Typical domain shape |
|---|---|---|
| Linear: ax + b | ax + b > 0 | Single ray, e.g. (c, ∞) |
| Quadratic: ax² + bx + c | ax² + bx + c > 0 | Two rays or all reals |
| Rational: p(x)/q(x) | p(x)/q(x) > 0 | Union of intervals |
| Radical: √(g(x)) | g(x) > 0 | Ray or interval |
Honestly, this part trips people up more than it should Easy to understand, harder to ignore. Which is the point..
Conclusion
Finding the domain of a logarithmic function comes down to one unbreakable rule: the argument must be strictly positive. Everything else — linear inequalities, sign charts for quadratics, interval testing for rational expressions — is just the machinery you use to enforce that single condition.
Once you internalize this, the process becomes almost mechanical. Identify what sits inside the logarithm, set it greater than zero, solve, and express the result in interval notation. Now, when multiple logarithms appear, satisfy every condition simultaneously by intersecting the results. And when radicals or fractions are involved, layer their own restrictions on top of the positivity requirement.
The logarithm is the inverse of exponential growth, and that inverse relationship is exactly why its domain is so restricted: an exponential function only ever outputs positive values, so its inverse can only ever accept positive inputs. Understanding that connection turns the domain rule from something you memorize into something you genuinely understand — and that understanding is what lets you graph, solve, and reason about logarithmic functions with confidence.
Putting Theory into Practice
The abstract rule “the argument of a logarithm must be positive” becomes powerful when you see it applied to concrete situations. Below are three real‑world scenarios, each illustrating how domain restrictions shape the feasible region of a problem.
1. The pH Scale
The acidity of a solution is measured by
[
\text{pH}= -\log_{10}!\bigl[H^{+}\bigr],
]
where ([H^{+}]) denotes the hydrogen‑ion concentration in moles per liter. Because a logarithm is only defined for positive arguments, ([H^{+}]) must be greater than zero—physically, a solution cannot have a negative concentration of ions. This means the pH scale is unbounded above (as ([H^{+}]) approaches zero, pH → ∞) but has a lower bound of 0 (when ([H^{+}]=1) M). Understanding this domain restriction explains why pH values below 0 are possible only for extremely strong acids, a nuance that directly follows from the positivity requirement Turns out it matters..
2. Sound Intensity (Decibels)
Sound level in decibels is given by
[
L = 10\log_{10}!\Bigl(\frac{I}{I_{0}}\Bigr),
]
where (I) is the measured intensity and (I_{0}) a reference intensity (usually (10^{-12},\text{W/m}^2)). The fraction (\frac{I}{I_{0}}) must be positive, which is automatically satisfied for any real intensity (I>0). On the flip side, if a sensor reports a non‑positive intensity (e.g., due to a malfunction), the logarithmic formula breaks down. Engineers therefore design systems that guarantee (I>0) before applying the decibel conversion Simple, but easy to overlook. But it adds up..
3. Earthquake Magnitude
The Richter magnitude (M) is defined as
[
M = \log_{10}!\Bigl(\frac{A}{A_{0}}\Bigr),
]
with (A) the amplitude of seismic waves and (A_{0}) a reference amplitude. Again, the argument (\frac{A}{A_{0}}) must be positive, reflecting the physical reality that wave amplitudes cannot be zero or negative. This domain condition underpins why the magnitude scale is logarithmic rather than linear: each whole‑number increase corresponds to a tenfold increase in amplitude.
Worked Examples
Example A – A Logarithm Combined with a Radical
Find the domain of
[
f(x)=\log!\Bigl(\frac{x^{2}-9}{x-4}\Bigr)+\sqrt{x+1}.
]
Step 1 – Isolate each restriction.
- The logarithm requires (\displaystyle\frac{x^{2}-9}{x-4}>0).
- The radical requires (x+1\ge 0) (the radicand must be non‑negative).
Step 2 – Solve the rational inequality.
Factor the numerator: (x^{2}-9=(x-3)(x+3)).
Critical points are (x=-3,;x=3,;x=4) (the denominator zero).
Create a sign chart:
| Interval | Sign of ((x-3)(x+3)) | Sign of ((x-4)) | Quotient sign | |----------|------------------------ entspricht | | | | ((-\infty,-3)) | – | – | + | | ((-3,3)) | + | – | – | | ((3,4)) | + | – | – | | ((4,\infty)) | + | + | + |
The quotient is positive on ((-\infty,-3)) and ((4,\infty)).
Step 3 – Apply the radical condition.
(x+1\ge0) gives