# Domain and Range in Precalculus

These are my notes on domain and range in precalculus.

Ankr Store on Amazon, keep your electronics charged by the best! f you buy something, I get a small commission and that makes it easier to keep on writing. Thank you in advance if you buy something.

Finding The Domain Of A Function
In determining domains and ranges, we need to consider what is physically
possible in real world examples. We also need to consider what is
mathematically permitted. For example, we cannot include any input value
that leads us to take an even root of a negative number if the domain and
range consist of real numbers. Or in a function expressed as a formula,
we cannot include any input value in the domain that would lead us to divide
by 0.

We can visualize the domain as a holding area that contains raw materials
for a function machine and the range as another holding area for the
machine's products.

We can write the domain and range in interval notation, which uses
values within brackets to describe a set of numbers. In interval notation, we
use a square bracket when the set includes the endpoint and a
parenthesis to indicate the endpoint is either not included or the interval
is unbounded. For example, if a person has $100 to spend, they would need to express the interval that is more than - and less than or equal to 100 and write (0,100]. Let us turn our attention to finding the domain of a function whose equation is provided. Oftentimes, finding the domain of such functions involves remembering three different forms. First, if the function has no denominator or an odd root, consider whether the domain could be all real numbers. Second, if there is a denominator in the function's equation, exclude values in the domain that force the denominator to be zero. Third, if there is an even root, consider excluding values that would make the radicand negative. The smallest term from the interval is written first. The largest term in the interval is written second, following a comma. Parentheses are used to signify that an endpoint is not included, called exclusive. Brackets are used to indicate that an endpoint is included, called inclusive. Example 1 Find the domain of the following function: {(2,10), (3,10), (4,20), (5,30),(6,40)} Solution: First, identify the input values. The input value is the first coordinate in an ordered pair. There are no restrictions, as the ordered pairs are simply listed. The domain is the set of the first coordinates of the ordered pairs. {2,3,4,5,6} Example 2 Find the domain of the function $$f(x)=x^2-1$$ Solution: The input value, shown by the variable x in the equation, is squared and then the result is lowered by 1. Any real number may be squared and then be lowered by 1, so there are no restrictions on the domain of this function. The domain is the set of real numbers. In interval form, the domain of f is: (-inf,inf) Example 3 Find the domain of the function: $$f(x)=\frac{x+1}{2-x}$$ Solution: When there is a denominator, we want to include only values that do not force the denominator to be zero. So, we will set the denominator equal to 0 and solve for x. $$2-x=0$$ $$-x=-2$$ $$x=2$$ Now, we will exclude 2 from the domain. The answers are all real numbers where x<2 or x>2. We can use a symbol known as the union to combine the two sets. In interval notation, we write the solution: $$(-\infty,2) \cup (2,\infty)$$ Example 4 Find the domain of the function $$f(x)=\sqrt{7-x}$$. Solution: When there is an even root in the formula, we exclude any real numbers that result in a negative number in the radicand. Set the radicand greater than or equal to zero and solve for x $$7-x \geq 0$$ $$-x \geq -7$$ $$x \leq 7$$ Now, we will exclude any number greater than 7 from the domain. The answers are all real numbers less than or equal to 7. $$(-\infty,7)$$ Can there be functions in which the domain and range do not intersect at all? Yes, for example, the function $$f(x)=-\frac{1}{\sqrt{x}}$$ has the set of all positive real numbers as its domain but the set of all negative real numbers as its range. As a more extreme example, a function's inputs and outputs can be completely different categories, in such cases the domain and range have no elements in common. Using Notations to Specify Domain and Range In the previous examples, we used inequalities and lists to describe the domain of functions. We can also use inequalities, or other statements that might define sets of values or data, to describe the behavior of the variable in set-builder notation. For example, $${x|10 \leq x < 30}$$ describes the behavior of x in set-builder notation. The braces "{}" are read as "the set of", and the vertical bar "|" is read as "such that" so we would read it as "the set of x-values such that 10 is less than or equal to x, and x is less than 30." Here are some examples of different notation: $$5<h\leq10$$ : $${h|5<h\leq10}$$ : $$5,10]$$ $$5\leq h<10$$ : $${h|5\leq h<10}$$ : $$[5,10)$$ $$5<h<10$$ : $${h|5<h<10}$$ : $$(5,10)$$ $$h<10$$ : $${h|h<10}$$ : $$(-\infty,10)$$ all numbers : $${R}$$ : $$(-\infty,\infty)$$ To combine two intervals using inequality notation or set-builder notation, we use the word "or". As we saw in earlier examples, we use the union symbol, $$\cup$$, to combine two unconnected intervals. For example, the union of sets {2,3,5} and {4,6} is the set {2,3,4,5,6}. It is the set of all elements that belong to one or the other(or both) of the original two sets. For sets with a finite number of elements like these, the elements do not have to be listed in ascending order of numerical value. If the original two sets have some elements in common, those elements should be listed only once in the union set. For sets of real numbers on intervals, another example of a union is: $${x| |x| \geq 3} = (-\infty,-3) \cup [3,\infty)$$ Set-Builder Notation This is a method of specifying a set of elements that satisfy a certain condition. It takes the form $${x| ... x}$$ which reads as, "the set of all x such that the statement about x is true." $${x|4<x\leq12}$$ Interval Notation This is a way of describing sets that include all real numbers between a lower limit that may or may not be included and an upper limit that may or may not be included. The endpoint values are listed between brackets or parentheses. A square bracket indicates inclusion in the set, and a parenthesis indicates exclusion from the set. $$(4,12]$$ Given a line graph, describe the set of values using interval notation. 1. Identify the intervals to be included in the set by determining where the heavy line overlays the real line. 2. At the left end of each interval, use [ with each end value to be included in the set (solid dot) or a ( for each excluded end value (open dot). 3. At the right end of each interval, use ] with each end value to be included in the set (filled dot) or ) for each excluded end value (open dot). 4. Use the union symbol $$\cup$$ to combine all intervals into one set. Example 5 Describe the intervals of values shown using inequality notation, set-builder notation, and interval notation. Solution: To describe the values, x, included in the intervals shown, we would say "x is a real number greater than or equal to 1 and less than or equal to 3, or a real number greater than 5." Inequality: $$1 \leq x \leq 3 \text{ or} x > 5$$ Set-Builder: $${x| 1 \leq x \leq 3 \text{ or} x > 5}$$ interval: $$[1,3] \cup (5,\infty)$$ Remember that, when writing or reading interval notation, using a square bracket means the boundary is included in the set. Using a parenthesis means the boundary is not included in the set. Finding Domain and Range From Graphs Another way to identify the domain and range of functions is by using graphs. Because the domain refers to the set of possible input values, the domain of a graph consists of all input values shown on the x-axis. The range is the set of all possible values, which are shown on the y-axis. Keep in mind that if the graph continues beyond the portion of the graph we can see, the domain and range may be greater than the visible values. We can observe that the graph extends horizontally from -5 to the right without bound, so the domain is $$[-5,\infty)$$. The vertical extent of the graph is all range values 5 and below, so the range is $$(-\infty, 5]. Note that the domain and range are always written from smaller to larger values, or from left to right for domain, and from the bottom of the graph to the top of the graph for range. Example 6 Find the domain and range of the function f whose graph is shown. Solution: We can observe that the horizontal extent of the graph is -3 to 1, so the domain of f is (-3,1]. The vertical extent of the graph is 0 to -4, so the range is [-4,0]. Example 7 Find the domain and range of the function f whose graph is shown. Solution: The input quantity along the horizontal axis is years, which we represent with the variable T for time. The output quantity is thousands of barrels a per day, which we represent with the variable b for barrels. The graph may continue to the left and right beyond what is viewed, but based on the portion of the graph that is visible, we can determine the domain as \(1973 \leq t \leq 2008$$ and the range as approximately $$180 \leq b \leq 2010$$. In interval notation, the domain is [1973,2008] and the range is about [180,2010]. for the domain and the range, we approximate the smallest and largest values since they do not fall exactly on the grid lines. Can a function's domain and range be the same? Yes. For example, the domain and range of the cube root function are both the set of all real numbers. Finding Domains and Ranges of the Toolkit Functions We will now return to our set of toolkit functions to determine the domain and range of each. Constant Function $$f(x)=c$$ D=$$(-\infty,\infty)$$ : R=$$[c,c]$$ For the constant function f(x)=c, the domain consists of all real numbers. There are no restrictions on the input. The only output value is the constant c, so the range is the set {c} that contains this single element. In interval notation, this is written as [c,c], the interval that both begins and ends with c. Identity Function $$f(x)=x$$ D=$$(-\infty,\infty)$$ : R=$$(-\infty,\infty)$$ For the identity function f(x)=x, there is no restriction on x. Both the domain and and range are the set of all real numbers. Absolute Function $$f(x)=|x|$$ D=$$(-\infty,\infty)$$ : R=$$[0,\infty)$$ For the absolute value function, $$f(x)=|x|$$, there is no restriction on x. However, because absolute value is defined as a distance from 0, the output can only be greater than or equal to 0. Quadratic Function $$f(x)=x^2$$ D=$$(-\infty,\infty)$$ : R=$$[0,\infty)$$ For the quadratic function $$f(x)=x^2$$, the domain is all real numbers since the horizontal extent of the graph is the whole real number line. Because the graph does not include any negative value for the range, the range is only nonnegative real numbers. Cubic Function $$f(x)=x^3$$ D=$$(-\infty,\infty)$$ : R=$$(-\infty,\infty)$$ For the cubic function $$f(x)=x^3$$, the domain is all real numbers because the horizontal extent of the graph is the whole real number line. The same applies to the vertical extent of the graph, so the domain and range includes all real numbers. Reciprocal Function $$f(x)=\frac{1}{x}$$ D=$$(-\infty,0) \cup (0,\infty)$$ : R=$$(-\infty,0) \cup (0,\infty)$$ We cannot divide by 0, so we must exclude 0 from the domain. further, 1 divided by any value can never be 0, so the range also will not include 0. Reciprocal Squared Function $$f(x)=\frac{1}{x^2}$$ D=$$(-\infty,0) \cup (0,\infty)$$ : R=$$(0,\infty)$$ We cannot divide by 0, so we must exclude 0 from the domain. There is also no x that can give an output of 0, so 0 is excluded from the range as well. Note that the output of this function is always positive due to the square in the denominator, so the range includes only positive numbers. Square Root Function $$f(x)=\sqrt{x}$$ D=$$[0,\infty)$$ : R=$$[0,\infty)$$ We cannot take the square root of a negative real number, so the domain must be 0 or greater. The range also excludes negative numbers because the square root of a positive number x is defined to be positive, even though the square of the negative number $$-\sqrt{x}$$ also gives us x. Cube Root Function $$f(x)=\sqrt[3]{x}$$ D=$$(-\infty,\infty)$$ : R=$$(-\infty,\infty)$$ The domain and range include all real numbers. Note that there is no problem taking a cube root, or any odd-integer root, of a negative number, and the resulting output is negative(it is an odd function). Given the formula for a function, determine the domain and range 1. Exclude from the domain any input values that result in division by 0. 2. Exclude from the domain any input values that have nonreal or undefined number outputs. 3. Use the valid input values to determine the range of the output values. 4. Look at the function graph and table values to confirm the actual function behavior. Example 8 Find the domain and range of $$f(x)=2x^3-x$$ Solution: There are no restrictions on the domain, as any real number may be cubed and then subtracted from the result. The domain is $$(-\infty,\infty)$$ and the range is also $$(-\infty,\infty)$$. Example 9 Find the domain and range of $$f(x)=\frac{2}{x+1}$$. Solution: We cannot evaluate the function at -1 because division by zero is undefined. The domain is $$(-\infty,-1)\cup(-1,\infty)$$. Because the function is never 0, we exclude 0 from the range. The range is $$(-\infty,0)\cup(0,\infty)$$. Example 10 Find the domain and range of $$f(x)=2\sqrt{x+4}$$. We cannot take the square root of a negative number, so the value inside the radical must be nonnegative. $$x+4 \geq 0 \text{ when } x \geq -4$$ The domain of $$f(x) \text{ is } [-4,\infty)$$. We then find the range. We know that f(-4)=0, and the function value increases as x increases without any upper limit. We conclude that the range of f is $$[0,\infty)$$. Graphing Piecewise-Defined Functions Sometimes, we come across a function that requires more than one formula in order to obtain the given output. For example, in the toolkit functions, we introduced the absolute value function $$f(x)=|x|$$. With a domain of all real numbers and a range of values greater than or equal to 0, absolute value can be defined as the magnitude, or modulus, of a real number value regardless of sign. It is the distance from 0 on the number line. All of these definitions require the output to be greater than or equal to 0. If we input 0, or a positive value, the output is the same as the input. $$f(x)=x \text{ if } x \geq 0$$ If we input a negative value, the output is the opposite of the input. $$f(x)=-x \text{ if } x < 0$$ Because this requires two different processes or pieces, the absolute value function is an example of a piecewise function. A piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain. We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain boundaries. For example, we often encounter situations in business for which the cost per piece of a certain item is discounted once the number ordered exceeds a certain value. Tax brackets are another real-world example of piecewise functions. For example, consider a simple tax system in which incomes up to$10,000 are taxed
at 10%, and any additional income is taxed at 20%. The tax on a total income S
would be $$0.1S \text{ if } S \leq 10,000 \text{ and } 1000+0.2(S-10000) \text{ if } S > 1000$$.

Piecewise Function
A piecewise function is a function in which more than one formula is used to
define the output. Each formula has its own domain, and the domain of the
function is the union of all these smaller domains.

Given a piecewise function, write the formula and identify the domain for
each interval.
1. Identify the intervals for which different rules apply.
2. Determine formulas that describe how to calculate an output from an input
in each interval.
3. Use braces and if-statements to write the function.

Example 11
Writing a Piecewise Function
A museum charges $5 per person for a guided tour with a group of 1-9 people or a fixed$50 fee for a group of 10 or more people. Write a function relating
the number of people, n, to the cost, c.

Solution:
Two different formulas will be needed. For n-values under 10, c=5n. For
values of n that are 10 or greater, c=50.
$c(n)= \begin{cases} 5n \text{ if } 0 < n < 10 & \quad \\ 50 \text{ if } n \geq 10 & \quad \end{cases}$

Example 12
A cell phone company uses the function below to determine the cost, c, in
dollars for g gigabytes of data transfer.
$c(g)= \begin{cases} 25 \text{ if } 0 < g < 2 & \quad \\ 25 + 10(g-2) \text{ if } g \geq 2 & \quad \end{cases}$
Find the cost of using 1.5 gigabytes of data and the cost of using 4 gigabytes
of data.

Solution:
To find the cost of using 1.5 gigabytes of data, c(1.5), we first look to see
which part of the domain our input falls in. Because 1.5 is less than 2, we use
the first formula.
$$c(1.5)=25$$
To find the cost of using 4 gigabytes of data, c(4), we see that our input of
4 is greater than 2, so we use the second formula.
$$c(4)=25+10(4-2)=45$$

Given a piecewise function, sketch a graph
1. Indicate on the x-axis the boundaries defined by the intervals on each
piece of the domain.
2. For each piece of the domain, graph on that interval using the
corresponding equation pertaining to that piece. Do not graph two functions
over one interval because it would violate the criteria of a function.

Example 13
Sketch a graph of the function:
$f(x)=\begin{cases} x^2 \text{ if } x \leq 1 & \quad \\ 3 \text{ if } 1 < x \leq 2 & \quad \\ x \text{ if } x > 2 & \quad \end{cases}$

Solution:
Each of the component functions is from our library of toolkit functions, so we
know their shapes. We can imagine graphing each function and then
limiting the graph to the indicated domain. At the endpoints of the domain,
we draw open circles to indicate where the endpoint is not included because of a
less-than or greater-than inequality. We draw a closed circle where the endpoint
is included because of a less-than-or-equal-to or  greater-than-or-equal-to
inequality.

Can more than one formula from a piecewise function be applied to a value in the
domain?
No. Each value corresponds to one equation in a piecewise formula.