6.3 Domain and Range
Let \(f:X\longrightarrow Y\) be a function from \(X\) to \(Y\).
- 1.
- We call the set \(X\) the domain of the function and write \(D_f=X\).
- 2.
- We call the set \(Y\) the target or the Co-domain. The range of \(f\) is a subset of the Co-domain
and contains only the images under \(f\). When the domain of a function is not explicitly
stated then we take the longest set possible.
Solution.
We note that \(x=5\), we should be dividing by zero which is not defined since infinity \((\infty )\) is not a real
number.
To come up with the domain we must remove that which causes problem.
\(D_f=(-\infty ,5)\cup (5,\infty )\) or \(D_f=\{x\in \mathbb {R}:x\neq 5\}\) or \(D_f=\mathbb {R}-\{5\}\).
Determine the domain of each of the following functions:
- 1.
- \(f(x)=\frac {x^2-1}{2}\)
- 2.
- \(g(x)=\sqrt {x}\)
- 3.
- \(h(x)=\frac {3x}{x^2-4}\)
Solution.
- 1.
- Here every real number will produce another real number. Therefore there is no real
number which causes problems.
Hence \(D_f=\mathbb {R}\) the set of all real numbers. - 2.
- So we note that if we replace \(x\) by a negative number then we get an imaginary number
which is not a real number. Therefore to find the domain we must remove the set of any
negative real numbers.
\(D_g=[0,\infty )\)
\(D_g=\{x\in \mathbb {R}:x\geq 0\}\)
- 3.
- Here \(x^{2}-4=0\) at \(x=2\) and \(x=-2\), so both must be removed from \(\mathbb {R}\).
\(D_h=(-\infty ,-2)\cup (-2,2)\cup (2,\infty )\)
\(D_h=\mathbb {R}-\{-2,2\}\)
- 1.
- If \(f(x)=\sqrt {ax+b}\), the expression under the root must not be negative: \[D_f:\ ax+b\geq 0 \quad \implies \quad x\geq \frac {-b}{a} \quad \text {provided } a>0 .\] If \(a<0\) the inequality reverses on dividing, giving \(x\leq \frac {-b}{a}\). Dividing an inequality by a negative number flips it, and forgetting to do so is one of the commonest errors in this course.
- 2.
- If \(g(x)=\frac {ax}{bx+c}\), the denominator must not vanish. Solving \(bx+c=0\) gives \(x=\frac {-c}{b}\), and that single point is excluded:
\[D_g=\mathbb {R}-\left \{\frac {-c}{b}\right \}.\]
Note carefully that \(x=\frac {-c}{b}\) is the value the domain leaves out, not the domain itself.
- 3.
- If \(h(x)=ax+b\)
\(D_h=x\in \mathbb {R}\)
All real numbers.
Range
Let \(X=\{-4,-3,-2,-1,0,1,2,3,4\}\)
Let \(Y=\{0,1,2,3,4,\ldots , 20\}\)
Let \(f:X\longrightarrow Y\) be defined by \(f(x)=x^2+1\). Find the range of \(f\).
Solution.
\(f(-4)=(-4)^2+1=16+1=17=f(4)\)
\(f(-3)=(-3)^2+1=9+1=10=f(3)\)
\(f(-2)=(-2)^2+1=4+1=5=f(2)\)
\(f(-1)=(-1)^2+1=1+1=2=f(1)\)
\(f(0)=0^2+1=0+1=1\)
Images are 1, 2, 5, 10, 17 \(\implies R_f=\{1,2,5,10,17\}\)
Determine the domain and range of each of the following functions
- 1.
- \(f(x)=3x+2\)
- 2.
- \(g(x)=2+\sqrt {2x-3}\)
- 3.
- \(h(x)=\frac {2}{x^2+1}\)
- 4.
- \(p(x)=|x-2|-3\)
Solution. For the domain ask what would break; for the range ask what values the formula can actually produce.
(i). \(f(x)=3x+2\). Nothing breaks, so \(D_f=\mathbb {R}\). Any real \(y\) is reached, by \(x=\frac {y-2}{3}\), so \(R_f=\mathbb {R}\).
(ii). \(g(x)=2+\sqrt {2x-3}\). The root needs \(2x-3\geq 0\), so \(D_g=\left [\frac {3}{2},\infty \right )\). A square root is never negative and takes every value from \(0\) upwards, so \(g\) takes every value from \(2\) upwards: \(R_g=[2,\infty )\).
(iii). \(h(x)=\frac {2}{x^{2}+1}\). Since \(x^{2}+1\geq 1>0\) for every real \(x\), nothing is excluded and \(D_h=\mathbb {R}\). As \(x^{2}+1\) ranges over \([1,\infty )\), its reciprocal ranges over \((0,1]\), so \(h\) ranges over \((0,2]\). The value \(2\) is attained at \(x=0\); the value \(0\) is approached but never reached, which is why the bracket there is round: \(R_h=(0,2]\).
(iv). \(p(x)=\left |x-2\right |-3\). Nothing breaks, so \(D_p=\mathbb {R}\). The modulus is at least \(0\) and takes every non-negative value, so \(p\) takes every value from \(-3\) upwards, the minimum occurring at \(x=2\): \(R_p=[-3,\infty )\).
Note 6.15. Ranges are harder than domains and the reason is worth naming. A domain question asks what to exclude, and there are only two usual culprits — division by zero and even roots of negatives. A range question asks what the function can reach, which needs you to think about the whole formula. The reliable method is to build the function up from the inside: in (ii), \(2x-3\) reaches everything, \(\sqrt {\ }\) of it reaches \([0,\infty )\), and adding \(2\) shifts that to \([2,\infty )\).
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.