The domain of a function is the set of every input value that produces a real output, and you find it by checking seven things: division by zero, even roots of negatives, logarithm arguments, tangent and secant asymptotes, inverse-trig ranges, square-root denominators, and any stated restriction. A real-valued domain excludes any x where the rule breaks. Complex-valued domains need no restriction.

Read the Rule Backward to Spot Every Exclusion

Start with the function's notation, not its graph. The written expression tells you which operations appear, and each operation carries its own domain cost. Addition, subtraction, and multiplication of polynomials accept all reals. Division, radicals with even indices, logarithms, and the six inverse-trig rules each subtract specific inputs from the allowed set.

Work through the expression from the outside in. If an x sits inside a denominator, its denominator value matters first. If that denominator is also under a square root, both conditions apply. Reading the rule backward means asking what output each inner piece must produce for the outer piece to accept it β€” the outer function's domain becomes the target range for the inner one.

Manufactured restrictions ride on top of natural ones. A problem that says "f(x) = xΒ² for x β‰₯ 0" has a domain of [0, ∞) even though xΒ² accepts every real. The stated condition wins. Ignore it and you lose marks on exams and create false outputs in software.

Set up a short checklist before writing anything. Name each operation in the expression. Mark which ones restrict input. Solve each restriction as its own inequality or equation. Combine results with intersection β€” every restriction must hold simultaneously.

Division Restrictions: Solve the Denominator Equal to Zero

A denominator cannot equal zero. Set the denominator to zero, solve, and exclude those solutions. For f(x) = 1/(x βˆ’ 3), the denominator is x βˆ’ 3, zero only when x = 3, so the domain is all reals except 3, or (βˆ’βˆž, 3) βˆͺ (3, ∞).

Quadratics in denominators need factoring or the quadratic formula. For f(x) = (x + 1)/(xΒ² βˆ’ 5x + 6), factoring gives (x βˆ’ 2)(x βˆ’ 3), so x = 2 and x = 3 are excluded. If the quadratic won't factor cleanly, apply the formula x = [βˆ’b Β± √(bΒ² βˆ’ 4ac)] / 2a. When bΒ² βˆ’ 4ac is negative, no real zeros exist, and the denominator never hits zero for real inputs β€” the domain is all reals.

Higher-degree denominators require more work. A cubic like xΒ³ βˆ’ x factors as x(x βˆ’ 1)(x + 1), excluding x = 0, 1, and βˆ’1. For quartics without obvious factors, use the rational root theorem or a graphing utility to locate zeros before confirming algebraically. Skip the confirmation and you risk missing complex roots that don't affect the real domain anyway β€” a waste of time but a common trap.

Cancel-common-factor questions trip up most students. For f(x) = (xΒ² βˆ’ 4)/(x βˆ’ 2), factoring gives (x + 2)(x βˆ’ 2)/(x βˆ’ 2). Simplifying to x + 2 looks clean, but the original expression is undefined at x = 2. The domain excludes 2. The simplified form has a hole at (2, 4), not a point. Domain follows the written expression, not the simplified one.

Even Roots Require a Non-Negative Radicand

Square roots, fourth roots, and every even-indexed radical require a radicand of zero or greater. Set the inside β‰₯ 0 and solve. For f(x) = √(x βˆ’ 5), the inequality is x βˆ’ 5 β‰₯ 0, so x β‰₯ 5, written as [5, ∞).

Polynomial radicands sometimes accept all reals. For f(x) = √(xΒ² + 4), the expression xΒ² + 4 is at least 4 for every real x, so the domain is (βˆ’βˆž, ∞). Spot this shortcut by checking the minimum of the radicand: if it never dips below zero, no restriction applies.

Quadratic radicands need interval testing. For f(x) = √(xΒ² βˆ’ 9), factor to (x βˆ’ 3)(x + 3) β‰₯ 0. Test x = βˆ’4 (positive), x = 0 (negative), and x = 4 (positive). The domain is (βˆ’βˆž, βˆ’3] βˆͺ [3, ∞). Test points beat guessing: sign charts built from roots never lie.

Odd roots β€” cube roots, fifth roots, and so on β€” accept every real. The cube root of βˆ’8 equals βˆ’2, a real output, so f(x) = βˆ›(x) has domain (βˆ’βˆž, ∞). Mixing up even and odd indices produces wrong domains, so count the index before applying a restriction.

Logarithms and Exponentials: Arguments Above Zero, Bases Positive and Not One

A logarithm's argument must be strictly positive β€” greater than zero, never equal. For f(x) = log(x βˆ’ 7), the argument x βˆ’ 7 > 0 gives x > 7, or (7, ∞). Reaching x = 7 makes the log undefined, so the endpoint is excluded even though the notation looks like a simple inequality.

Composite arguments widen the work. For f(x) = ln(xΒ² βˆ’ 4), solve xΒ² βˆ’ 4 > 0. The roots are x = βˆ’2 and x = 2, and the positive intervals sit outside them: x < βˆ’2 or x > 2, written (βˆ’βˆž, βˆ’2) βˆͺ (2, ∞). Inside that gap, the log sees a negative or zero argument, and the function fails.

Exponential bases carry their own restrictions, though for f(x) = 2^x the base 2 is fixed and the domain is all reals. When the base is variable, as in f(x) = a^x, textbook convention demands a > 0 and a β‰  1. A negative base breaks real-valued output for most exponents. A base of 1 collapses to the constant 1, useless as an exponential model.

Log bases follow the same rule. If the problem states f(x) = log_b(x) with b as a variable, then b > 0 and b β‰  1. Base 1 makes log(1) = 0 trivial and base 0 makes log undefined entirely. Confirm the base in the problem statement before restricting the variable x.

Tangent, Secant, and Inverse Trig Each Need Their Own Exclusion Set

Tangent and secant have vertical asymptotes at odd multiples of Ο€/2, because cos(x) = 0 at those points. For f(x) = tan(x), the domain excludes x = Ο€/2 + kΟ€, where k is any integer. Written as a set: all reals except those points.

A shifted frequency changes the exclusion formula. For f(x) = tan(2x), solve 2x = Ο€/2 + kΟ€, giving x = Ο€/4 + kΟ€/2. Every vertical asymptote of the inner argument becomes an excluded input for the composite. Scaling and shifting multiply the excluded points, so build a fresh formula for each tangent or secant function.

Sine and cosine accept all reals. Cosecant and cotangent restrict where their reciprocal partners hit zero β€” csc(x) excludes x = kΟ€, and cot(x) excludes x = kΟ€ as well. For f(x) = csc(3x), solve 3x = kΟ€ to get x = kΟ€/3 excluded.

Inverse trig functions cap their own outputs to keep the inverse well-defined. arcsin(x) and arccos(x) require βˆ’1 ≀ x ≀ 1. arctan(x) accepts every real. When an inverse trig function appears as the outer layer, that range becomes the inner expression's required output. For f(x) = arcsin(x βˆ’ 2), solve βˆ’1 ≀ x βˆ’ 2 ≀ 1 to get the domain [1, 3].

Build a Domain Audit Table Before Writing the Final Answer

Once each restriction is solved, tabulate the results and intersect them. A domain audit table catches sign errors, swapped inequalities, and forgotten restrictions in one pass.

For f(x) = √(x βˆ’ 3)/(x βˆ’ 5), the restrictions are x βˆ’ 3 β‰₯ 0 and x β‰  5. Combined, the domain is [3, 5) βˆͺ (5, ∞). The [3, 5) piece is open at 5, and the (5, ∞) piece resumes at 6 but never includes 5.

For f(x) = log(x + 2)/√(4 βˆ’ x), three restrictions stack: x + 2 > 0, 4 βˆ’ x β‰₯ 0, and 4 βˆ’ x β‰  0 for the square root in the denominator. The first gives x > βˆ’2, the second gives x ≀ 4, and the third tightens the second to x < 4. Intersect: (βˆ’2, 4).

Restriction type Example Solve Result
Denominator β‰  0 1/(x βˆ’ 3) x βˆ’ 3 = 0 Exclude 3
Even root β‰₯ 0 √(x βˆ’ 5) x βˆ’ 5 β‰₯ 0 [5, ∞)
Log argument > 0 log(x βˆ’ 7) x βˆ’ 7 > 0 (7, ∞)
tan/ sec asymptote tan(x) x = Ο€/2 + kΟ€ Exclude those
Inverse sin/ cos arcsin(x) βˆ’1 ≀ x ≀ 1 [βˆ’1, 1]
Stated condition xΒ², x β‰₯ 0 (given) [0, ∞)
Square root in denominator 1/√(4 βˆ’ x) 4 βˆ’ x > 0 (βˆ’βˆž, 4)

The last row is the failure a lot of students miss: a square root in the denominator requires the radicand to be strictly positive, not zero. At 4 βˆ’ x = 0, the denominator becomes zero, so the endpoint is excluded. The inequality flips from β‰₯ to >.

Read the table vertically for stacked restrictions and horizontally for the final interval. The audit catches a symbolic analyst's most common error β€” forgetting that two conditions on the same expression often tighten into a single inequality.

Worked Examples That Exercise Every Rule at Once

A composite like f(x) = √(x + 4)/(xΒ² βˆ’ 1) + ln(x βˆ’ 3) looks intimidating; splitting it into layers makes it manageable. Numerator root: x + 4 β‰₯ 0 gives x β‰₯ βˆ’4. Denominator: xΒ² βˆ’ 1 = 0 gives x = Β±1, both excluded. Logarithm: x βˆ’ 3 > 0 gives x > 3. Intersect: [βˆ’4, ∞) minus {βˆ’1, 1} intersected with (3, ∞) yields (3, ∞).

For f(x) = (x + 2)/(xΒ³ βˆ’ 4x), factor the cubic denominator as x(x βˆ’ 2)(x + 2). The canceled (x + 2) creates a hole at x = βˆ’2, not a filled point. Domain is all reals except βˆ’2, 0, and 2. Written as (βˆ’βˆž, βˆ’2) βˆͺ (βˆ’2, 0) βˆͺ (0, 2) βˆͺ (2, ∞).

For f(x) = arcsin((x βˆ’ 1)/2), set βˆ’1 ≀ (x βˆ’ 1)/2 ≀ 1. Multiply by 2: βˆ’2 ≀ x βˆ’ 1 ≀ 2. Add 1: βˆ’1 ≀ x ≀ 3. Domain [βˆ’1, 3]. The inverse trig restriction sits on the composite argument, so solve through the full expression, not just the inner piece.

For f(x) = 1/√(xΒ² βˆ’ 9), the radicand must be strictly positive. xΒ² βˆ’ 9 > 0 gives x < βˆ’3 or x > 3. The domain is (βˆ’βˆž, βˆ’3) βˆͺ (3, ∞). Endpoints excluded because the square root in the denominator cannot produce zero.

Match the Written Expression, Not the Simplified One

Domain is a property of the expression as written. Simplifying a rational function can hide excluded points. For f(x) = (xΒ² βˆ’ 1)/(x βˆ’ 1), the simplified form is x + 1, but the original is undefined at x = 1. Domain: all reals except 1. Graphically, the point (1, 2) is missing β€” a hole.

The same trap appears with trig identities. For f(x) = (sin(x))/x, no simplification removes the excluded x = 0 even though the limit at 0 is 1. Domain: all reals except 0. The removable discontinuity doesn't refresh the domain.

Composite expressions built from several rules require every condition to be solved independently, then intersected. A rational under a square root under a log carries three layers, and forgetting any one creates a wrong answer. Work from the inside out, or the outside in β€” either way, list each restriction before combining.

When the expression is graphed, discontinuities appear as holes, vertical asymptotes, or gaps. Reading them from a picture and confirming them algebraically is the safest path. A hole in the graph at x = 3 often traces back to a canceled factor in the denominator.

Software and Text-Based Tools Use Their Own Domain Conventions

Text-based math systems follow slightly different domain rules. Wolfram Alpha reports the real-valued domain by default and displays excluded points when you ask for one. Desmos plots real-valued points only, leaving gaps where the function fails. Each tool's convention matters when checking work.

Python's sympy library computes domains through sympy.calculus.util.function_range and related utilities, but its default domain='RR' treats all inputs as real. Sympy's singularities function locates poles in rational functions and is a reliable cross-check after manual solving. Confirm version-specific behavior in its documentation before trusting a result.

Graphing calculators like the TI-84 Plus CE handle square roots and logarithms by returning errors for out-of-domain inputs. The calculator's ERR: NONREAL ANS message hides the underlying domain issue. Read the error as an exclusion, then solve algebraically.

The convention across all real-valued work: the domain is the set of inputs where the expression produces a finite real output. Complex analysis lifts this restriction β€” the log becomes multi-valued and negative roots give complex results β€” but that's a different problem.

Common Mistakes and How to Catch Each One

Forgetting to exclude the zero of a denominator is the single most common error. Reviewers catch it by checking every denominator against the expression's original written form. Set each denominator to zero and record every solution before touching anything else.

Confusing the inequality direction on logs and even roots ranks second. Logs use strict inequality, roots allow equality except when the root is in a denominator. Write out both sides and test one interior point to verify the interval direction.

Treating arcsin and arccos as all-reals functions creates wrong domains at the top layer. Confirm the inverse trig range before solving. If the expression contains arcsin(y), solve βˆ’1 ≀ y ≀ 1 first, then combine with any inner restrictions.

Missing a stated restriction like "for x > 0" costs points. Scan the problem statement for qualifiers before solving. Interval notation should reflect any stated restriction exactly.

Canceling a factor and forgetting the canceled point loses marks. Keep the original written expression alongside the simplified form when writing the final answer. The domain answers to the original.

FAQ

What is the domain of a constant function like f(x) = 5?

The domain is every real number β€” (βˆ’βˆž, ∞). A constant function has no x in its rule, so no restrictions apply. This often surprises students who assume all domains narrow somewhere.

Does a domain of (βˆ’βˆž, ∞) mean the function never fails?

No. A domain of (βˆ’βˆž, ∞) means the expression is undefined nowhere in the reals. The function can still have jumps, corners, or asymptotes not covered by the domain notation β€” domain only tracks inputs where output is defined.

Does the domain change if I graph the function in Desmos or GeoGebra?

Desmos and GeoGebra plot real-valued points and leave gaps where the expression fails. That gap matches the algebraic domain, but visual reading can miss single-point holes at pixel resolution. Solve algebraically and use the graph to confirm, not discover.

How does the domain change in complex analysis?

In the complex setting, negative roots and logarithms of negatives become defined through branches. A function that fails on (βˆ’βˆž, 0) in the reals might accept those inputs as complex numbers. The domain there is the complex plane minus branch cuts and poles.

What happens if a restriction contradicts another?

Conflicting restrictions give an empty domain. For f(x) = √(x βˆ’ 5) + √(3 βˆ’ x), the first gives x β‰₯ 5 and the second gives x ≀ 3. No x satisfies both, so the domain is the empty set. The function has no real output anywhere.

Do stated domain restrictions override the expression's natural domain?

Yes, always. A condition like "for x β‰₯ 0" removes every negative input even though the expression might accept them. State restrictions are part of the function's definition and take priority over algebraic domain.

How do I verify my domain answer before an exam?

Build an audit table listing every restriction, the solved inequality, and the combined interval. Test one interior point from each resulting interval to confirm the expression returns a real number. If a test point fails, an excluded value slipped through.

Is the domain of f(x) = tan(x)/x the same as tan(x)?

No. tan(x) excludes odd multiples of Ο€/2. The additional denominator x excludes 0 as well. The combined domain is all reals except 0 and Ο€/2 + kΟ€ for every integer k, which is strictly smaller than either piece alone.