Sub topic 7
Domain: the Allowed Inputs
Assume you can solve basic equations and inequalities, work with square roots, and use interval notation. The domain of a function is the set of all input values for which the function produces a real, defined output.
If \(y=f(x)\), the variable \(x\) is the input. The domain tells you which \(x\)-values are allowed. Values outside the domain are excluded because the expression may require division by zero or the square root of a negative number.
Reading a domain
A domain can be written in set notation or interval notation.
| Notation | Meaning |
|---|---|
| \(x \ne 3\) | Every real number except 3 |
| \([2,\infty)\) | All numbers from 2 onward, including 2 |
| \((-\infty,5)\) | All numbers less than 5, not including 5 |
| \([2,5)\cup(5,\infty)\) | From 2 through 5, except 5 |
A square bracket means the endpoint is included. A parenthesis means it is excluded. Infinity always uses a parenthesis because infinity is not a number.
Finding restrictions from an equation
For a function given by an equation, begin with the assumption that every real number is allowed. Then remove values that make the expression undefined.
Denominators cannot equal zero
A fraction is undefined when its denominator is zero. For example,
\[ f(x)=\frac{4}{x-3} \]
requires
\[ x-3\ne0, \]
so \(x\ne3\). The domain is
\[ (-\infty,3)\cup(3,\infty). \]
Do not cancel a factor before identifying this restriction. For instance,
\[ \frac{(x-3)(x+2)}{x-3} \]
simplifies to \(x+2\), but the original expression still excludes \(x=3\).
Even roots require nonnegative radicands
The expression inside a square root is called the radicand. For a real-valued function, an even root requires the radicand to be at least zero.
Consider
\[ g(x)=\sqrt{2x-6}. \]
Require
\[ 2x-6\ge0. \]
Solving gives \(x\ge3\), so the domain is
\[ [3,\infty). \]
If a root appears in a denominator, apply both restrictions. For
\[ h(x)=\frac{\sqrt{x-2}}{x-5}, \]
the square root requires \(x\ge2\), while the denominator requires \(x\ne5\). Combining them gives
\[ [2,5)\cup(5,\infty). \]
The following program checks these restrictions before evaluating the function:
import math
def h(x):
if x < 2 or x == 5:
raise ValueError("x is outside the domain of h")
return math.sqrt(x - 2) / (x - 5)
print(h(6)) # 2.0
print(h(3)) # -0.5A reliable process
Use this process for most algebraic functions:
- Look for variables in denominators and require each denominator to be nonzero.
- Look for even roots and require each radicand to be at least zero.
- Solve the resulting equations or inequalities.
- Combine all conditions. The domain must satisfy every condition at the same time.
- Write the result in interval notation or set notation.
Context can restrict the domain
An equation may allow more inputs than the situation does. For example, if \(P(t)=120-15t\) represents the amount of water in a tank after \(t\) minutes, negative time is not meaningful. The context requires \(t\ge0\). If the tank is empty after 8 minutes, the useful domain is \(0\le t\le8\), even though the equation can be calculated for other values.
Exercise
Find the domain of \(p(x)=\frac{\sqrt{x+1}}{x-2}\) in interval notation.
Show answer
The square root requires \(x\ge-1\), and the denominator requires \(x\ne2\). The domain is \([-1,2)\cup(2,\infty)\).