9.2 Domain and Range
SL 2.2
- what the maximal (largest possible) domain of a function is
- how to find it when there is a fraction or a square root
- how restricting the domain gives a new function
- how to find the range of a function, using its graph
Maximal domain of a function
The domain of a function is the set of \(x\)-values we are allowed to put in. For \(f(x) = x^2\) we can square any real number, so the domain can be all of \(\mathbb{R}\).
But some rules do not work for every real number:
- we cannot divide by zero;
- a negative number has no real square root;
- \(\ln x\) and \(\log x\) need \(x > 0\).
Maximal domain Not in the formula booklet
The maximal domain (largest possible domain) of \(f\) is the set of all real \(x\) for which \(f(x)\) is defined.
- Denominator: must not be \(0\).
- Under a square root: must be \(\geq 0\).
- Inside \(\ln\) or \(\log\): must be \(> 0\).
Situation 1. Let \(g(x) = \sqrt{x + 3}\). We need \(x + 3 \geq 0\), so the maximal domain is \(x \geq -3\).
Situation 2. The function \(f(x) = x^2\), \(x \in \mathbb{R}\), works for all \(x\). But we may choose a smaller domain. For example,
\[ h(x) = x^2, \qquad x \geq 2 . \]
This is a new function \(h\). It has the same rule as \(f\), but a different domain, so its graph is only the part of the parabola with \(x \geq 2\). A function is not complete until its domain is stated.
Example 1 Find the largest possible domain of each function.
(a) \(f(x) = \dfrac{3}{x + 4}\)
(b) \(g(x) = \sqrt{5 - x}\)
(c) \(h(x) = \dfrac{1}{\sqrt{2x - 6}}\)
(a) The denominator cannot be zero: \(x + 4 \neq 0\). Domain: \(x \in \mathbb{R},\; x \neq -4\).
(b) \(5 - x \geq 0 \Rightarrow x \leq 5\). Domain: \(x \leq 5\).
(c) We need \(2x - 6 \geq 0\) (square root) and \(\sqrt{2x - 6} \neq 0\) (denominator). So \(2x - 6 > 0\), giving \(x > 3\).
Example 2 Let \(f(x) = (x + 2)^3\), \(x \in \mathbb{R}\). Restrict the domain so that the function is always positive. Write down the new function \(g\) and its domain.
A cube is positive exactly when the number cubed is positive: \((x + 2)^3 > 0 \Leftrightarrow x + 2 > 0 \Leftrightarrow x > -2\).
\[ g(x) = (x + 2)^3, \qquad x > -2 . \]
Range of a function
The range of \(f\) is the set of all values \(y = f(x)\) that we get when \(x\) runs through the domain. On a graph, the range is the part of the \(y\)-axis that the curve covers.
For example, let \(f(x) = x^3 + 1\) with domain \(-2 \leq x \leq 1\) (Figure 2). The curve goes from \((-2, -7)\) up to \((1, 2)\) and is always increasing, so the range is \(-7 \leq f(x) \leq 2\).
Finding the range
- Sketch the graph over the given domain (use a GDC on Paper 2).
- Find the end points, and any turning points (for a quadratic, complete the square).
- Look for asymptotes: values the function approaches but never reaches.
- Read off the lowest and highest \(y\)-values. Take care with \(<\) and \(\leq\).
Example 3 Find the range of \(f : x \mapsto x^2 - 6x + 5\), \(\; x \leq 4\).
Complete the square: \(f(x) = (x - 3)^2 - 4\). The vertex \((3, -4)\) is inside the domain (\(3 \leq 4\)).
At the right end, \(f(4) = -3\). As \(x \to -\infty\), \(f(x) \to \infty\). So the lowest value is \(-4\) and there is no highest value.
\[ \text{Range: } f(x) \geq -4 . \]
Example 4 Find the range of each function.
(a) \(g(x) = 7 - 2x\), \(\;-1 < x \leq 3\)
(b) \(h(x) = \dfrac{1}{x - 2} + 3\), \(\;x \neq 2\)
(c) \(k(x) = \sqrt{x - 1} + 2\), \(\;x \geq 1\)
(a) \(g\) is decreasing. \(g(3) = 1\) and \(g(-1) = 9\), but \(x = -1\) is not in the domain. Range: \(1 \leq g(x) < 9\).
(b) \(\dfrac{1}{x - 2}\) can be any real number except \(0\). So \(h(x)\) can be any number except \(3\). Range: \(h(x) \in \mathbb{R},\; h(x) \neq 3\) (the line \(y = 3\) is a horizontal asymptote).
(c) \(\sqrt{x - 1} \geq 0\), and it takes every non-negative value. Range: \(k(x) \geq 2\).
Graphs page: type the function with its domain after a “|”, for example f1(x)=x^2-6x+5 | x<=4. Use Menu → Analyze Graph → Minimum (or Maximum) to find turning points, and Menu → Trace → Graph Trace to check the end points. Then write the range with the correct inequality signs.
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| Domain of \(\sqrt{5 - x}\) is \(x \geq 5\) | \(x \leq 5\) | Solve \(5 - x \geq 0\) carefully. |
| Domain of \(\dfrac{1}{\sqrt{2x - 6}}\) is \(x \geq 3\) | \(x > 3\) | At \(x = 3\) the denominator is \(0\). |
| Range of \(x^2 - 6x + 5\), \(x \leq 4\) is \(f(x) \geq -3\) | \(f(x) \geq -4\) | The vertex is inside the domain; check turning points, not only end points. |
| Range in (a) of Example 4 is \(1 \leq g(x) \leq 9\) | \(1 \leq g(x) < 9\) | \(x = -1\) is not in the domain, so \(9\) is not reached. |
| Writing the range in terms of \(x\) | Write it in terms of \(y\) or \(f(x)\) | The range is a set of outputs. |
Exercises
1 Find the largest possible domain of \(f(x) = \dfrac{2x}{x - 7}\).
\(x - 7 \neq 0\), so the domain is \(x \in \mathbb{R},\; x \neq 7\).
2 Find the largest possible domain of \(g(x) = \sqrt{3x + 12}\).
\(3x + 12 \geq 0 \Rightarrow x \geq -4\).
3 Find the largest possible domain of \(h(x) = \dfrac{5}{x^2 - 9}\).
\(x^2 - 9 \neq 0 \Rightarrow x \neq \pm 3\). Domain: \(x \in \mathbb{R},\; x \neq 3,\; x \neq -3\).
4 Find the largest possible domain of \(k(x) = \ln(8 - 2x)\).
\(8 - 2x > 0 \Rightarrow x < 4\).
5 Let \(f(x) = (3 - x)^3\), \(x \in \mathbb{R}\). Restrict the domain so that \(f(x) \leq 0\), and write down the new function.
\((3 - x)^3 \leq 0 \Leftrightarrow 3 - x \leq 0 \Leftrightarrow x \geq 3\). New function: \(g(x) = (3 - x)^3\), \(x \geq 3\).
6 Find the range of \(f(x) = 4x - 1\), \(\; -2 \leq x < 3\).
\(f\) is increasing. \(f(-2) = -9\) (included), \(f(3) = 11\) (not included). Range: \(-9 \leq f(x) < 11\).
7 Find the range of \(g(x) = x^2 + 4x + 1\), \(\; x \in \mathbb{R}\).
\(g(x) = (x + 2)^2 - 3\). The minimum is \(-3\). Range: \(g(x) \geq -3\).
8 Find the range of \(h(x) = 2x^2 - 8x + 3\), \(\; 0 \leq x \leq 5\).
\(h(x) = 2(x - 2)^2 - 5\). Vertex \((2, -5)\) is in the domain. \(h(0) = 3\), \(h(5) = 13\). Range: \(-5 \leq h(x) \leq 13\).
9 Find the range of \(f(x) = 5 - \dfrac{2}{x}\), \(\; x \geq 1\).
For \(x \geq 1\), \(\;0 < \dfrac{2}{x} \leq 2\). So \(3 \leq 5 - \dfrac{2}{x} < 5\). Range: \(3 \leq f(x) < 5\) (the value \(5\) is approached but never reached).
10 Let \(g(x) = \sqrt{9 - x^2}\).
(a) Find the largest possible domain of \(g\).
(b) Find the range of \(g\) for this domain.
(a) \(9 - x^2 \geq 0 \Rightarrow x^2 \leq 9 \Rightarrow -3 \leq x \leq 3\).
(b) \(9 - x^2\) takes all values from \(0\) (at \(x = \pm 3\)) to \(9\) (at \(x = 0\)). So \(0 \leq g(x) \leq 3\). (The graph is the upper half of the circle \(x^2 + y^2 = 9\).)