CHAPTER 7
SPECIAL FUNCTIONS
7.1 Compound function
A compound function is a function for which more than one equation is needed to define the function.
An example, if we let the function 𝑓 be defined by
𝑥−1 𝑖𝑓 −2<𝑥 <0
𝑓(𝑥) = { 5 𝑖𝑓 𝑥=0 ,
𝑥2 + 2 𝑖𝑓 0<𝑥≤4
then 𝑓 is an example of a compound function.
The domain of a compound function is the union of the sets on which each equation is defined.
For 𝑓 above, the domain of 𝑓 (or Dom 𝑓) is (−2, 0) ∪ {0} ∪ (0,4] = (−2, 4].
To evaluate the function value 𝑓(𝑥) we evaluate the equation corresponding to the subset of the domain
containing 𝑥.
For example, to evaluate:
• 𝑓(3) we substitute 3 into 𝑥 2 + 2 as 0 < 3 ≤ 4, that is, 3 ∈ (0, 4].
Hence 𝑓(3) = (3)2 + 2 = 11.
• 𝑓(−1) substitute −1 into 𝑥 − 1 as −2 < −1 < 0 or −1 ∈ (−2, 0).
Hence 𝑓(−1) = −1 − 1 = −2.
• 𝑓(0) = 5 since 0 = 0.
• 𝑓(5) is undefined since 5 is not in the domain of 𝑓, that is 5 ∉ 𝐷𝑜𝑚 𝑓.
The graph of 𝑓 is given below. Note the graph of 𝑓 consists of the straight line 𝑦 = 𝑥 − 1 on the interval
−2 < 𝑥 < 0, the constant function 𝑦 = 5 at 0 and the parabola 𝑦 = 𝑥 2 + 2 on the interval 0 < 𝑥 ≤ 4.
Page 1 of 8
Example 1
Let the function 𝑔 be
3−𝑥 𝑖𝑓 𝑥<2
𝑔(𝑥) = {
½𝑥 + 1 𝑖𝑓 𝑥>2
(a) Find:
i. 𝑔(−2)
ii. 𝑔(1.9)
iii. 𝑔(2)
iv. 𝑔(0)
(b) Draw the graph of 𝑔.
Example 2
If
− 1 if −2 x 0
f ( x) = x 2 − 1 if 0 x2
− x + 5 if x2
Evaluate:
(a) f(1) (b) f(3)
(c) f(2) (d) f(0)
Page 2 of 8
(e) f(1+h), 0 < h < 1 (f). f(1+h), h < 0
(g) Df (h) Rf
To determine the function value f(x) we evaluate the equation corresponding to the subset of the domain
containing x.
Example 3
(i) Evaluate
x if 0 x 3
f ( x) = 6 − x if 3 x5
1 5 x 7
if
(a) f(3) (b) f(5)
(c) f(1) (d) f(-5)
Page 3 of 8
(ii) Sketch the graph of the function and find the domain and range of
EXERCISE 1:
2𝑥 + 3 𝑖𝑓 𝑥 ≤ −1
1. If 𝑓(𝑥) = { 𝑥 2 𝑖𝑓 − 1 < 𝑥 < 2
−2𝑥 𝑖𝑓 𝑥>2
a) Find the domain of 𝑓.
b) Evaluate 𝑓: (a) 𝑓(−2) ; (b) 𝑓(−1) ; (c) 𝑓(0) and (d) 𝑓(2)
c) Draw the graph of the above function
2. If
3𝑥 − 1 𝑖𝑓 𝑥 ≥ 1
1
𝑓(𝑥) = { 𝑥 + 1 𝑖𝑓 − 2 ≤ 𝑥 < 1
1
−3𝑥 + 1 𝑖𝑓 𝑥 < −2
1
a) Evaluate 𝑓: (a) 𝑓(−1) ; (b) 𝑓(− ) ; (c) 𝑓(0) ; (d) 𝑓(1) and (e) 𝑓(2)
2
b) Draw the graph of the above function and determine the domain.
Page 4 of 8
7.2 Absolute value function
The absolute value of any real number 𝑥, denoted |𝑥| and its define by
𝑥 𝑖𝑓 𝑥≥0
|𝑥| = {
−𝑥 𝑖𝑓 𝑥<0
The absolute value of any real number is always positive. An example of absolute is distance, length, etc.
Example,
(a) |2| = 2 (since 2 ≥ 0)
(b) |−4| = −(−4) = 4 (since −4 < 0)
(c) |0| = 0 (since 𝑥 ≥ 0)
(d) |−½| = −(−½) = ½ (since −½ < 0)
𝑥 𝑖𝑓 𝑥≥0
The absolute value function 𝑓(𝑥) = |𝑥| = {
−𝑥 𝑖𝑓 𝑥<0
has domain ℝ (all the reals).
We calculate some function values:
(a) 𝑓(16) = |16| = 16 (since 16 ≥ 0)
(b) 𝑓(−5.4) = |−5.4| = −(−5.4) = 5.4 (since −5.4 < 0)
(c) 𝑓(0) = |0| = 0 (since 𝑥 ≥ 0)
The graph of 𝑓(𝑥) = |𝑥| is given below
EXERCISE 2:
1. Let ℎ(𝑥) = |𝑥 − 1| be the function
a) Use the definition to write the absolute value in terms of a compound function.
b) Evaluate ℎ: (a) ℎ(−1) ; (b) ℎ(0) ; (c) ℎ(2)
c) Draw the graph of the absolute value function
d) Find the domain of ℎ.
x + 1 −1 , x 1
2. Sketch the graph of f ( x) = .
−2 , x =1
Page 5 of 8
7.3 Combination of functions
A variety of situations arise in which we have to combine two or more functions in one of several ways to
get new functions.
Definition
Given two functions 𝑓 and 𝑔, with domains Dom𝑓 and Dom𝑔, we define the sum, difference, product
and quotient of 𝑓 and 𝑔 as
Sum: (𝑓 + 𝑔)(𝑥) = 𝑓(𝑥) + 𝑔(𝑥)
Difference: (𝑓 − 𝑔)(𝑥) = 𝑓(𝑥) − 𝑔(𝑥)
Product: (𝑓 ∙ 𝑔)(𝑥) = 𝑓(𝑥) ∙ 𝑔(𝑥)
𝑓 𝑓(𝑥)
Quotient: (𝑔) (𝑥) = 𝑔(𝑥), provided 𝑔(𝑥) ≠ 0.
The domains of 𝑓 + 𝑔, 𝑓 − 𝑔 and 𝑓 ∙ 𝑔 are the common parts of the domains of 𝑓 and 𝑔, that is, the
intersection of Dom𝑓 and Dom𝑔.
𝑓 𝑓
In the case of the quotient 𝑔, the domain of 𝑔 is the common part of Dom𝑓 and Dom𝑔 except for the
values of 𝑥 which makes 𝑔(𝑥) = 0.
Example 4
Let 𝑓(𝑥) = 𝑥 2 and 𝑔(𝑥) = 𝑥 + 1.
i) What are the domains of 𝑓 and 𝑔?
𝑓
ii) Find 𝑓 + 𝑔, 𝑓 − 𝑔, 𝑓 ∙ 𝑔 and and their domains.
𝑔
Combination 𝑓(𝑥) + 𝑔(𝑥) 𝑓(𝑥) − 𝑔(𝑥) 𝑓(𝑥) ∙ 𝑔(𝑥) 𝑓(𝑥)
, 𝑔(𝑥) ≠ 0
𝑔(𝑥)
Function
Example 5
1 𝑓
Let f ( x ) = x 2 − 1 and g ( x ) = . Find 𝑓 + 𝑔, 𝑓 − 𝑔, 𝑓 ∙ 𝑔 and 𝑔 and their domains.
x
Combination 𝑓(𝑥) + 𝑔(𝑥) 𝑓(𝑥) − 𝑔(𝑥) 𝑓(𝑥) ∙ 𝑔(𝑥) 𝑓(𝑥)
, 𝑔(𝑥) ≠ 0
𝑔(𝑥)
Domain
Page 6 of 8
Example 6
1 𝑓
Let 𝑓(𝑥) = 𝑥−1 and 𝑔(𝑥) = √𝑥. Find 𝑓 + 𝑔, 𝑓 − 𝑔, 𝑓 ∙ 𝑔 and 𝑔 and their domains.
Combination 𝑓(𝑥) + 𝑔(𝑥) 𝑓(𝑥) − 𝑔(𝑥) 𝑓(𝑥) ∙ 𝑔(𝑥) 𝑓(𝑥)
, 𝑔(𝑥) ≠ 0
𝑔(𝑥)
Function
Example 7
Let 𝑓(𝑥) = 𝑥 2 + 4 and 𝑔(𝑥) = √𝑥.
Evaluate:
𝑓
(a) (𝑓 + 𝑔)(4) (b) (𝑓 ∙ 𝑔)(4) (c) (𝑔) (4)
7.4 Composition of functions
Definition
The composition of a function 𝑔 with a function 𝑓 is defined to be a function ℎ whose value is defined by
evaluating the function 𝑔 at the point 𝑓(𝑥), that is ℎ(𝑥) = 𝑔(𝑓(𝑥)). The composition function is defined
by ℎ = 𝑔 ° 𝑓 read “𝑔 composite 𝑓”.
Example 8
Let 𝑓(𝑥) = 𝑥 2 − 1 and 𝑔(𝑥) = √𝑥 + 2.
Compute:
(a) 𝑔 ° 𝑓 (b) 𝑓 ° 𝑔
(c) 𝑓 ° 𝑓 (d) 𝑔 ° 𝑔
Page 7 of 8
Example 9
1
Let 𝑓(𝑥) = 𝑥−2 and 𝑔(𝑥) = √𝑥.
Compute:
(a) (𝑓 ° 𝑔)(9) (b) (𝑓 ° 𝑔)(4)
(c) (𝑔 ° 𝑓)(6) (d) (𝑔 ° 𝑓)(1)
Example 10
Find f (x) and g (x) such that each composite function f ° g is as described.
(i) (f ° g)(x) = (x2+ 1)3 (ii) (f ° g)(x) = 1
(iii) (f ° g)(x) = 2x + 3
x2
f(x) = f(x) = f(x) =
g(x) = g(x) = g(x) =
Page 8 of 8