MATH 116, LECTURE 2: Domain and Range

MATH 116, LECTURE 2:
Domain and Range, Composition
1
Domain and Range
If we consider a function y = f (x), one of the primary things we may be
interested in is which values are admissible. That is to say, which values can
we put into the function (e.g. positive values, whole values, any value at
all)?
Another question we are interested in is which values a function can
return as an output. These concepts are called the domain and range of the
function.
Definition 1.1. The domain of a function f (x) is the set of admissible
x-values. It will be denoted by D(f ).
Definition 1.2. The range of a function f (x) is the set of y-values the
function may attain. It will be denoted by R(f ).
Depending on the application, we may have to be very careful about
which domain we choose. If we are modelling a chemical reaction, we are
only interested in positive chemical concentrations, so that we would only
have x ≥ 0. If we are interested in modelling something at daily intervals,
we may only be interested in the values t = 0, 1, 2, . . . and not decimal values
like t = 2.5 or t = 3.14.
In general, a function is defined everywhere except where inputting the
value would let to:
1. division by zero;
2. a negative value under a square room; or
3. a nonpositive value in a logarithm.
Example 1: State the domain and range of f (x) =
1
.
x−1
Solution: The only x-value we may not input into f (x) is x = 1, since
we many not divide by zero, so that we have
D(f ) = {x ∈ R | x 6= 1} .
1
We note that for x > 1 we attain all values y > 0 and for x < 1 we attain
all values y < 0. The range is therefore
R(f ) = {y ∈ R | y 6= 0} .
Another way to look at this is to rearrange the equation. We have
y=
1
x−1
=⇒
xy − y = 1
=⇒
x=
1+y
.
y
Only the value y = 0 cannot be corresponded to a value of x.
Example 2: State the domain and range of f (x) = |2x − 3| + 2.
Solution: The absolute value function may take in any value, so the
domain is
D(f ) = {x ∈ R} .
The range of the absolute value function is all of the nonnegative real numbers, so the range of |2x − 3| + 2 is that shift up two units. In other words,
we have
R(f ) = {y ∈ R | y ≥ 2} .
√
Example 3: State the domain and range of f (x) = x2 + 4x − 12.
Solution: The square root function can take in only nonnegative values,
so we need x2 + 4x − 12 = (x + 6)(x − 2) ≥ 0. We have that
(x + 6)
(x − 2)
f (x)
(−∞, −6)
−
−
+
(−6, 2)
+
−
−
(2, ∞)
+
+
+
It follows that
D(f ) = {x ∈ R | x ≤ −6 or x ≥ 2}
= x ∈ (−∞, −6] ∪ [2, ∞).
Since these values span the entire domain of the square root function, we
have
R(f ) = {y ∈ R | y ≥ 0}
= y ∈ [0, ∞).
2
2
Composition
There is often more than one relationship working on a system at once.
Consider a company whose daily profit depends on its sales according to the
relationship P (s) = 4s − 100. Now suppose we knew that the sales on a
given day of the week can be given by the function s(t), t = 1, 2, . . . , 7.
We are probably more interested in the relationship between profit and
the day of the week, than we are either of these given relationships. We
obtain the desired relationship P (t) by substituting s(t) into the formula for
P (s) to get P (t) = 4s(t) − 100.
This kind of operation is called composition of functions.
Definition 2.1. Given two functions f and g, the composition function
(f ◦ g)(x) is defined to be
(f ◦ g)(x) = f (g(x)).
The domain of (f ◦ g)(x) is somewhat more complicated than a standard
function. Not only does x have to be in the domain of g, we need to have
g(x) in the domain of f . The range can be similarly complicated.
√
√
Example 4: Consider the functions f (x) = x and g(x) = 2 − x.
Derive and find the domain and range of f ◦ g and g ◦ f .
Solution: We have
f ◦ g = f (g(x)) =
q
√
√
2 − x = 4 2 − x.
In order to be in the domain of g, we require x ≤ 2. Since every values in
the range of g is in the domain of f , we encounter no further restrictions, so
D(f ◦ g) = {x ∈ R | x ≤ 2} = (−∞, 2]. Since this spans the entire domain
of the fourth-root function, which produces only positive values, we have
R(f ◦ g) = {y ∈ R | y ≥ 0}.
For g ◦ f we have
q
√
g ◦ f = g(f (x)) = 2 − x.
We have D(f ) = {x ∈ R | x ≥ 0} so that we need x ≥ 0. We need to match
√
up the range of f with the domain of g. We can see that we need 2 − x ≥ 0
so that x ≤ 4. We have D(g ◦ f ) = {x ∈ R | 0 ≤ x ≤ 4} = [0, 4].
3
To find the range, we consider where the values in the domain may reach
when input into f (g(x)). We have
√
√
0 ≤ x ≤ 4 =⇒ 0 ≤ x ≤ 2 =⇒ −2 ≤ − x ≤ 0
q
√
√
√
=⇒ 0 ≤ 2 − x ≤ 2 =⇒ 0 ≤ 2 − x ≤ 2.
√ It follows that the range is R(g ◦ f ) = y ∈ R | 0 ≤ y ≤ 2 .
√
Example 5: Consider the functions f (x) = x and g(x) = x2 . Derive
and find the domain and range of f ◦ g and g ◦ f .
Solution: We have
f ◦ g = f (g(x)) =
√
x2 = |x|.
Since we can plug any x value into g, this produces a positive value, and any
positive values can be plugged into f , this has domain D(f ◦ g) = {x ∈ R}
and range R(f ◦ g) = {y ∈ R | y ≥ 0}.
Also, we have
√
g ◦ f = g(f (x)) = ( x)2 = x.
We notice, however, that the domain is restricted because we cannot plug a
negative value into f (x). This is true even though g ◦ f has no such restriction! The inputted values must be admissible in each step of the composition.
Consequently, we have D(f ) = {x ∈ R | x ≥ 0} and R(f ) = {y ∈ R | y ≥ 0}.
(The restricted range is a result of the restricted domain.)
4