Sub topic 9
Finding the Domain from an Equation
Assume you can solve linear inequalities, work with fractions and exponents, and understand square roots. In this chapter, you will find the domain, the set of allowed input values, directly from an equation.
The two main restrictions
For a function defined by an equation, begin by assuming every real number is allowed. Then remove values that make the equation undefined in the real numbers.
Two restrictions occur often:
- A denominator cannot equal zero.
- An even root, such as a square root or fourth root, cannot contain a negative number.
Odd roots, such as cube roots, do allow negative radicands.
| Expression | Restriction |
|---|---|
| \(\frac{1}{x-5}\) | \(x-5\ne0\), so \(x\ne5\) |
| \(\sqrt{x+2}\) | \(x+2\ge0\), so \(x\ge-2\) |
| \(\sqrt[3]{x-7}\) | No real-number restriction |
A domain restriction belongs to the original equation. Do not cancel a factor and then forget a value that made the original denominator zero.
Denominators cannot be zero
Consider
\[ f(x)=\frac{x+1}{x-4}. \]
Set the denominator equal to zero:
\[ x-4=0 \]
so \(x=4\) is excluded. The domain is every real number except 4.
In interval notation:
\[ (-\infty,4)\cup(4,\infty) \]
In set-builder notation:
\[ \{x\in\mathbb R\mid x\ne4\}. \]
The parentheses at 4 show that 4 is not included. Infinity always uses parentheses because it is not a real endpoint.
Even roots require nonnegative radicands
Consider
\[ g(x)=\sqrt{3x-6}. \]
The expression inside the square root is called the radicand. For real outputs, require
\[ 3x-6\ge0. \]
Solving gives
\[ x\ge2. \]
Therefore,
\[ \text{Domain of }g=[2,\infty) \]
or, in set-builder notation,
\[ \{x\in\mathbb R\mid x\ge2\}. \]
The bracket at 2 shows that 2 is allowed. Indeed, \(g(2)=0\).
Combine restrictions
Some equations have both a denominator and an even root:
\[ h(x)=\frac{\sqrt{x-2}}{x-5}. \]
The square root requires
\[ x-2\ge0,\qquad x\ge2. \]
The denominator requires
\[ x-5\ne0,\qquad x\ne5. \]
Together, the domain is
\[ [2,5)\cup(5,\infty). \]
The interval starts at 2 because 2 is allowed. It is split at 5 because 5 is forbidden.
A reliable procedure
- Find every denominator and require it to be nonzero.
- Find every even-root radicand and require it to be at least zero.
- Solve all restrictions.
- Combine them using intersection.
- Write the result in interval notation or set-builder notation.
- Check endpoints and excluded values in the original equation.
You can also test the restrictions computationally:
import math
def g(x):
if x < 2 or x == 5:
raise ValueError("x is outside the domain of g")
return math.sqrt(x - 2) / (x - 5)
print(g(6)) # 2.0
print(g(3)) # -0.5The code rejects values outside \([2,5)\cup(5,\infty)\).
Exercise
Find the domain of p(x) = sqrt(2x + 4) / (x - 3). Give your answer in interval notation and set-builder notation.
Show answer
The root requires 2x + 4 >= 0, so x >= -2. The denominator requires x != 3. The domain is [-2, 3) union (3, infinity), or {x in R | x >= -2 and x != 3}.