Chapter: Functions

Chapter: Functions
Section: An Introduction to Functions and Function Notation
A '''function''' is a rule that associates an element of one set (the set of inputs) to exactly one element of another
set (the set of outputs). For our purposes, functions will almost always be rules defined on the set of real
numbers. Often the rule will be expressed as an equation, but they can also be expressed as a graph, a table of
values or even a description. The independent variable (often denoted by the letter x) represents the input of the
function and the dependent variable represents the output. The set of all independent variable (or input) values
is called the '''domain''' of a function, while the set of all dependent variable (or output) values is called the
'''range''' of a function.
Deciding if a graph represents a function can be accomplished using what is commonly called the Vertical Line
Test. If a graph represents a function, for any given independent variable, say x, value there will be at most one
dependent variable value. Thus, a vertical line drawn at any x position on the graph of a function will intersect
the graph at most once.
Function
Not a Function
EXAMPLE 1. An accurate thermometer is located in a room. At noon every day, the temperature of the room
is recorded. In this situation, the independent variable is the date while the dependent variable is the
temperature. For any given day at noon, the thermometer will read exactly one temperature. Thus, this
situation can be represented by a function. The domain of the function is the set of dates recorded while the
range is the set of temperatures recorded. Note that in this example, we will likely not be able to write an
equation relating the two variables since the temperature depends on many factors (including weather), not just
the date.
EXAMPLE 2. An example of a function expressed as an equation is y = 2x. This function assigns to every real
number, x, the real number, y, with twice its value. In this example, x is the independent variable (or input) and
y is the dependent variable (or output). In this example, both the domain and the range are the set of real
numbers (denoted R ), since any real number can be doubled.
When a function is expressed as an equation, the function itself is given a name (often f for function). The
notation y = f(x) indicates that a function named f has an input named x and an output named y. This notation is
called '''function notation'''. The symbol f(x) is read “the value of f at x” or simply “f of x”. The function in
Example 2 above can be written in function notation as f(x)=2x.
A function ƒ takes an input, x, and returns an output ƒ(x). One metaphor describes the function as a "machine" or "black box" that
converts the input into the output.
Using function notation is a convenient way to evaluate the function for various input values. For the function
f(x) = 2x, when x = 3, the function value is 2 times 3, which is 6. Using function notation, this is expressed as
f(3)=6. Using the black box metaphor described above, you can imagine a “3” going into the box and the
function f(x) = 2x returning a “6” (since f doubles the input). Likewise, f(w) = 2w, f(a + b) = 2(a + b) and f(x2) =
2x2. Regardless of the input (a number or an expression), the output for this particular function is double the
input.
EXAMPLE 3. The function f(x) = x2 has a domain of the set of all real numbers (denoted R ), and its range is
the set of all non-negative real numbers (denoted R ). (Note that no matter what the input, once squared the
result will be non-negative.) For this function, f(2) = (2)2=4 and f(-2) = (-2)2 = 4. This demonstrates that
functions may have the same output for two or more different inputs. For this function, f(a + b)=(a + b)2 = a2 +
2ab + b2, thus we see that f ( a b) f ( a) f (b) .
x 4 has a domain of the set of real numbers greater than or equal to -4
EXAMPLE 4. The function g( x )
(which can be written as [ 4, ) using interval notation), and its range is the set of all non-negative real
numbers (which can be written as [0, ) using interval notation or simply as R ). (Note that in interval
notation, square brackets mean that the endpoint is included, and parenthesis mean that the endpoint is not
5 4
9 3 but g( 5)
5 4
1 , which is a nonincluded.) For this function, notice that g(5)
real result. Evaluating a function at a value outside of the domain will be undefined.
EXAMPLE 5. The function h( x )
1
x 2
has a domain of the set of all real numbers except 2 and its range is
the set of all real numbers except 0. For this function, h(2.01)
1
2.01 2
1
.01
100 and
1
1
1000 . Thus, the function is not defined for x = 2, but we can evaluate the
2.001 2 .001
function at values arbitrarily close to x = 2. We call the vertical line x = 2 a vertical '''asymptote'''. An
asymptote is a line that a graph approaches but never intersects.
h(2.001)
Put paragraphs “To summarize, two reasons why…” until “In a problem in pure mathematics…” from Section
1.3 here. (page 10)
EXAMPLE 6. The function f is defined at the given x-values as seen in the table below.
x
-4
-2
-1
0
3
4
5
8
f(x)
-10
-9
6
8
2
-1
-9
-11
For this function f(-2) = f(5) = -9. This is another example that functions may have the same output for two or
more different inputs.
EXAMPLE 7. Put Example 1.4 from Section 1.3 here.
EXAMPLE 8. Given a graph of a function, you can use function notation to evaluate the height of the function
at various values. For example, using the graph of the function f below, we see that the height of the graph
when x = 0 is 1, so f(0) = 1. Also, the height of the graph at x = 1 is 2, so f(1) = 2. We also have that f(2)=2,
f(3) = 1, f(5) = 0, f(-2) = 0, f(-4) = -1. For values like f(4), you will need to approximate the height of the
function since we do not know the exact value and have no equation for f.
2
f(x)
-5
5
-2
EXERCISES:
For #1-7, (a) Is the given relationship a function? (b) If part (a) is “yes”, state the domain and range.
1. x2 + y = 4 (Ans: (a) yes (b) domain: R , range: (
, 4] )
2. x2 + y2 = 4 (Ans: (a) no )
3.
(Ans: (a)yes (b) domain: R , range: R )
4.
(Ans: (a) no)
5.
(Ans: (a) yes (b) domain: all real numbers except 1, range: R )
6.
x
f(x)
-3
1
-2
-4
-1
1
0
7
1
1
2
-3
3
2
(Ans: (a) yes (b) domain: {-3,-2,-1,0,1,2,3}, range: {-4,-3,1,2,7})
7. independent variable: students taking calculus at WCSU this semester, dependent variable: date of their
birthday (Ans: (a) yes (b) domain: list of all WCSU calculus class rosters, range: list of students birthdays)
For #8-12, evaluate the function at each given value, if possible. Simplify.
8. f(x) = 3x – 1
a. f(1) (Ans: 2)
b. f(-2) (Ans: -7)
c. f(a + b) (Ans: 3a + 3b - 1)
b. g(2) (Ans: -6)
c. g(m + n) (Ans: -2m2-4mn -2n2 +m+n)
b. s(-9) (Ans: undefined)
c. s(x2) (Ans: 3- |x|)
9. g(x) = -2x2 + x
a. g(-1) (Ans: -3)
10.
a. s(9) (Ans: 0)
11.
a. q(-2) (Ans: -11/4)
b. q(3) (Ans: 1)
c. q(3x) (Ans:
)
12. The function f is graphed below.
6
4
2
f
-10
-5
5
10
-2
-4
a. f(-2) (Ans: 2)
b. f(4) (Ans: -1)
c. f(7) (Ans: 2)
d. f(8) (Ans: 4)
e. f(0) (Ans: 1)
f. f(10) (Ans: 5)
g. f(-8) (Ans: -1)
h. f(-3) (Ans: 1)
13. What is the domain and range of the function f graphed in #12? (Ans: Domain: 8 x 10 ; Range:
1 x 5)
14. For each of the following functions find (i) f(x + h) and (ii)
f (x h ) f (x )
. Simplify your answers.
h
a. f(x) = 3x – 5 (Ans: (i) 3x + 3h – 5, (ii) 3)
b. f(x) = x2 (Ans: (i) x2 + 2xh + h2, (ii) 2x + h)
c. f ( x )
1
(Ans: (i)
x
1
x h
, (ii)
1
x( x h )
)
15. Write an equation for the area A of a square as a function of its perimeter, p. (Ans: A(p) = p2/16)
16. In your own words, explain the meaning of domain and range. (Ans: Answers will vary.)
Section: Special Functions
Subsection: Piecewise-defined Functions
A function does not always have to be given by a single formula.
EXAMPLE 1. Suppose that y = v(t) is …Copy paragraph with its corresponding figure in Section 1.3 .
The above is an example of a piecewise-defined function. In general a piecewise-defined function is a function
defined by two or more equations each over a specified domain.
EXAMPLE 2. The absolute value function, f(x) = |x| can be defined piecewise as,
.
For all values of x less than zero, the first function y = -x is used, which negates the sign of the input value,
making negative numbers positive. For all values of x greater than or equal to zero, the second function y = x s
used. (Note that since both y = -x and y = x are zero at x=0, it would be equivalent to define the absolute value
function to use the function y = -x for x = 0.)
EXAMPLE 3. Sketch the graph of
-
. To sketch this function, we graph the line
y = -3-x which has a y-intercept at (0, 3) and a slope of -1. However, we don’t graph the entire line, we only
sketch the portion with x-values less than or equal to -2. (Some students find it easiest to graph the entire line
and then erase the portion not wanted.) Next we sketch the line y = 2x + 1 which has a y-intercept at (0, 1) and
a slope of 2. But we only keep the portion of the graph with x-values between -2 and 2. At x = -2 we will plot
an open circle at the endpoint to indicate that the graph does not include this point. Finally we sketch the
parabola defined by the graph y = x2 – 4x + 2 for all x-values greater than 2. Again and open circle at the
endpoint will indicate we do not wish to include it.
EXAMPLE 4. Put piecewise-defined function example from Functions Handout here.
EXAMPLE 5. Functions whose graphs resemble steps are called '''step functions'''. One such example is
called the '''greatest integer function''' or '''floor function'''. The greatest integer function is denoted
and is defined to be the greatest integer less than or equal to x. In other words, the value of the function at
x is the integer part of x.
EXERCISES
For #1-4, graph the piecewise-defined function.
1.
(Ans:
)
2.
(Ans:
)
3.
(Ans:
)
4.
(Ans:
)
5. There is another step function called the '''least integer function'''. Describe how you think this function
would be defined and graph it.
(Ans:
)
6. Write a piecewise-defined function for the following function.
Note that endpoints that are included are explicitly plotted on this
graph.
(Ans:
Subsection: Even and Odd Functions
A function is called an '''even function''' if its graph is symmetric with respect to the y-axis. This means that if
you reflect an even function across the y-axis, the result will be identical to the original function. The property
that such function will satisfy it that
for all x in the domain of f.
A function is called an '''odd function''' if its graph is symmetric with respect to the origin. This means that if
you rotate an odd function 180 degrees about the origin, the result will be identical to the original function. The
property that such function will satisfy it that
for all x in the domain of f.
EXAMPLE 1. The function g(x) = 2x2 is an even function since g(-x) = 2(-x)2=2x2 = g(x). Also, notice that the
graph of g is symmetric across the y-axis.
EXAMPLE 2. The function h(x) = x3 - x is an odd function since h(-x) = (-x)3 - (-x) = -x3 + x = -(x3 - x)=-h(x).
Also, notice that the graph of h is symmetric about the origin.
EXAMPLE 3. The function f(x) = x2 – x is neither even or odd since f(-x) = (-x)2 – (-x) = x2 + x, which is neither
f(x) or –f(x). It is also not symmetric about the y-axis or the origin.
EXERCISES
In #1-5, decide whether each function is even, odd or neither.
1. f(x) = x2 + 3x4 (Ans: even)
2. f(x) = 6x + 3x3-x2 (Ans: neither)
3. f(x) = sqrt(x) (Ans: neither)
4. f(x) = x5 + 3x3 (Ans: odd)
5.
(Ans: odd)
6. f(x) = |x| (Ans: even)
7.
(Ans: neither)
8. f(x) = x2 + 1 (Ans: even)
9. f(x) = x3 – 1 (Ans: neither)
10. Describe in your own words how you can predict whether a polynomial is an even or an odd function.
(Ans: If the degree of every term in the polynomial is odd the polynomial is odd. If the degree of every term is
even or zero, the polynomial is even. )
Subsection: One-to-one functions
Recall that with functions every element of the domain of the function corresponds to exactly one element of
the range. Graphically a function passes the Vertical Line Test.
A '''one-to-one function''' is a function in which every element of the range of the function corresponds to
exactly one element of the domain. Deciding if a graph represents a one-to-one function can be accomplished
using what is commonly called the Horizontal Line Test. If a graph represents a one-to-one function, for any
given dependent variable, say y, value there will be at most one independent variable value. Thus, a horizontal
line drawn at any y position on the graph of a one-to-one function will intersect the graph at most once. Note:
A one-to-one function is a function. So, to be a one-to-one function, the graph must pass both the Vertical Line
Test and the Horizontal Line Test.
We revisit the examples from above.
EXAMPLE 1. An accurate thermometer is located in a room. At noon every day, the temperature of the room
is recorded. In this situation, the independent variable is the date while the dependent variable is the
temperature. We have already seen that this situation can be represented by a function. However, since the
temperature of the room may be the same on more than one day, it is not a one-to-one function.
EXAMPLE 2. Let y = f(x) = 2x, which is a function, in terms of x. Notice that for any value of y, there is
exactly one x value that when multiplied by 2 will give that y-value. Thus f is a one-to-one function.
Graphically this can be confirmed by the fact that f is a line passing through the origin with slope 2. This graph
passes both the Vertical and Horizontal Line Tests.
EXAMPLE 3. Let y = f(x) = x2, which is a function in terms of x. If we let y = 4, for example, there are two xvalues that when squared will equal 4, namely 2 and -2. Thus f is NOT a one-to-one function. Graphically this
can be confirmed by the fact that f is a parabola opening up and thus does not pass the Horizontal Line Test.
See figure below.
f x = x2
gx =4
10
8
6
4
2
-10
-5
5
10
-2
-4
2
f(x) = x does not pass the Horizontal Line Test
-6
x 4 which is a function in terms of x. Notice that for any value of y, there is
EXAMPLE 4. Let y = g( x )
exactly one x value such that the square root of x + 4 is equal to that y-value. Thus g is a one-to-one function.
Graphically this can be confirmed by the fact that g is the top half of a parabola opening the right and thus
passes the Horizontal Line Test.
EXAMPLE 5. Let y = h( x )
1
, which is a function of x. Notice that for any value of y, there is exactly
x 2
one x value such that the reciprocal of x – 2 is equal to that y-value. Thus h is a one-to-one function.
Graphically this can be confirmed by the fact that h is a hyperbola with asymptotes parallel to the axes and thus
passes the Horizontal Line Test.
EXAMPLE 6. The function f is defined at the given x-values as seen in the table below.
x
f(x)
-4
-10
-2
-9
-1
6
0
8
3
2
4
-1
5
-9
For this function f(-2) = f(5) = -9 and thus f is not a one-to-one function.
EXERCISES
For #1-12, decide whether the given relationship is a one-to-one function.
1. x2 + y = 4 (Ans: no )
2. x2 + y2 = 4 (Ans: no )
3.
(Ans: no)
4.
(Ans: no)
5.
8
-11
(Ans: no)
6.
x
f(x)
-3
1
-2
-4
-1
1
0
7
1
1
2
-3
3
2
(Ans: no)
7. independent variable: students taking calculus at WCSU this semester, dependent variable: date of their
birthday (Ans: since it is likely that two students will have the same birthday, this is likely not a one-to-one
function)
8.
(Ans: yes)
9. f(x) = |x| (Ans: no)
10.
(Ans: no)
11.
(Ans: yes)
12.
(Ans: yes)
13. Can an even function be one-to-one? (Assume the function has more than one value in the domain.)
Explain. (Ans: no, since if f(-x) = f(x) for even a single x-value it will not pass the Horizontal Line Test)
14. Can an odd function be one-to-one? Explain. (Ans: yes, the function f(x) = x is an example.)
Subsection: Inverse Functions
Suppose you earn $15 an hour at your job. We can write an equation for the amount of money earned, m, in
terms of the number of hours worked, h as m = 15h. (Let’s suppose we don’t have to worry about income tax.)
Note that this equation is a function where h is the independent variable and m is the dependent variable. Now
suppose that you are saving money to purchase a $525 item. How can we use the equation to find out how
many hours you will need to work in order to save enough for your purchase. Hopefully it is clear to you that
we need to solve the equation 525 = 15h. We can use algebra to solve this equation for h and get that h = 35.
Thus it will take you 525/15 = 35 hours of work to earn enough money to purchase the item. Can you now find
a formula that will tell you how many hours you have to work to earn m dollars? Hopefully you can see that
this is just a generalization of the previous scenario and we get the formula h = m/15. This equation is also a
function but now the independent variable is m and the dependent variable is h.
m
. Both functions represent your job scenario. However, the
15
independent and dependent variables switch roles in the two functions. These two functions are called '''inverse
functions'''. The first equation is a function in terms of the hours worked and thus can be written in function
notation as f(h) = 15h, while the second function is its inverse function in terms of the amount of money earned
m
and can be written as f 1 (m)
. The notation f 1 means the inverse function of f. Do not confuse the -1 in
15
1
.
f 1 for an exponent. It is not an exponent and thus f 1
f
Let us compare the functions m = 15h and h
Fact: In general, the inverse of y = f(x), if it exists, is x
domain of f
1
f 1 ( y ) . The domain of f is the range of f
1
while the
is the range of f.
EXAMPLE 1. The function F
f (C )
9
5
C 32 converts degrees Celsius, C into degrees Fahrenheit, F. We
will find the inverse function which converts F into C. Solving for C in the equation F = f(C) (by subtracting 32
and then multiplying by the reciprocal of 9/5), gives that C 95 (F 32) . Thus the inverse function is
f 1 (F )
5
9
(F 32) . Note that for f the independent variable is C and for f
1
the independent variable is F.
EXAMPLE 2. Find the inverse of the function y = f(x) = 2x – 3. Solving for x (by adding 3 and then dividing
y 3
y 3
by 2) we get x
and thus f 1 ( y )
.
2
2
EXAMPLE 3. Find the inverse of the function y
and then taking the cube root) we get x
3
g(x) 5x 3 1 . Solving for x (by adding 1, dividing by 5
y 1
and thus g 1 ( y )
5
EXAMPLE 4. Find the inverse of the function y
3
y 1
.
5
f (x) 3x 2 . Solving for x (by dividing by 3 and taking both
y
. This is NOT a
3
function since there is more than one output for all nonzero input values in the domain. Thus, the inverse of f
does not exist.
the positive and negative square root) we get two equations for x. In particular we get x
1
Fact: A function f has an inverse f
if and only if f is a one-to-one function. If f has an inverse it is called
'''invertible'''. Note that the function f in Example 4 is not a one-to-one function and therefore does not have an
inverse.
EXAMPLE 5. Find the inverse of the function
. Note that the domain is
while the
range is
. Solving for m (by subtracting 1 and squaring) we get that
. However, the domain
should be
, and so we must restrict the domain (like you would restrict the domain when writing a
piecewise-defined function) and write our inverse function as
if
. See figure below.
8
8
m
m
6
-1 2
6
f x = x-1 2
4
4
2
2
-5
5
r
-10
-5
10
5
-2
-2
-4
-4
r
if
Note that if we did not restrict the domain, the inverse of r = f(m) would be defined as a parabola, which is not a
one-to-one function. So, to keep the inverse function invertible we must restrict the domain.
Fact: The inverse of an inverse function is the original function, i.e.
.
Fact: A function y = f(x) and its inverse,
, when graphed on their appropriate axes (the variables
will switch axes) will be reflections of each other across the line y = x. See the graphs of the functions y = g(x)
and x = g-1(y) from example 3 below, for example.
1
40
fx =
y
x+1 3
6
5
x
30
4
20
10
2
-5
5
-10
x
10
-60
-40
-20
20
-20
-2
-30
-40
y
g(x) 5x 3 1
-4
x=
g 1(y)
3
y 1
5
y
40
60
EXAMPLE 6. Let y = h(x) = x3 – x (graphed below). Estimate h-1(2). Even though we cannot algebraically
solve for x in terms of y, we can use the graph of h to estimate inverse values. By definition of the inverse, x =
h-1(2) corresponds to solving the equation 2=h(x) for x. In other words, we are looking for the x-value whose
1
function value is 2 on the graph below. This point is approximately x = 1.5, i.e. h (2) 1.5 . (In fact
h(1.5)=1.875, but using the graph to estimate inverse values will not always be precise.)
EXERCISES
For #1-7, find the inverse of each of the following functions, if it exists.
1.
(Ans:
2.
3.
(Ans: no inverse exists)
(Ans:
4.
)
(Ans:
5.
)
(Ans: no inverse exists)
6.
(Ans:
7. a
(Ans:
8. Find the inverse of y
(Ans: x
)
)
)
. Then graph f and its inverse. What do you notice about their graphs?
, the graphs of f and its inverse are the same (with only the axes labeled differently))
9. Find the inverse of y
. Then graph g and its inverse. What do you notice about their graphs?
(Ans: x
, the graphs of g and its inverse are the same (with only the axes labeled differently))
10. A car is traveling 55 miles per hour along a straight road.
a. Write a function giving its distance traveled, d in terms of the hours elapsed, h. (Ans: d = f(h) = 55h)
b. Evaluate the function you defined in part (a) at 4. Be sure to include the proper units in your answer. (Ans:
f(4) = 220 miles)
c. Find the inverse of the function you defined in part (a), if it exists. (Ans:
)
d. Evaluate your inverse function, found in part (c) at 220. Be sure to include the proper units in your answer.
(Ans:
hours)
11. The volume of a sphere is given by the function
.
a. State the domain and range of the given function. (Ans: Domain:
b. Find f-1, if it exists. (Ans:
c. Evaluate
, Range: V
)
)
, if it exists. Then state its meaning. (Ans:
units; this is
the length of the radius of a sphere whose volume is 100 cubic units.)
12. The area of a circle is given by the function
.
a. State the domain and range of the given function. (Ans: Domain:
, Range: A
)
b. Find f-1, if it exists. (Ans: The graph of f is the right half of parabola, since a circle can’t have a negative
radius, and so the inverse is
c. Evaluate
)
, if it exists. Then state its meaning. (Ans:
the length of the radius of a circle whose area is 100 square units.)
units; this is
Section: Arithmetic with Functions
Just as you can combine algebraic expressions by adding, subtracting, multiplying and dividing, you can
combine functions.
Fact: Let f and g be two functions with overlapping domains. Then the following “new” functions are defined:
'''The Sum Function''': (f + g)(x) = f(x) + g(x) for all x common to both domains.
'''The Difference Function''': (f - g)(x) = f(x) - g(x) for all x common to both domains.
'''The Product Function''': (fg)(x) = f(x)g(x) for all x common to both domains.
'''The Quotient Function''':
f
(x)
g
f (x)
, g( x ) 0 for all x common to both domains.
g( x )
EXAMPLE 1. Let f(x) = x2 – 2x - 15 and g(x) = 2x2 – 10x. Notice that both functions have a domain of all real
numbers. Then (f + g)(x) = (x2 – 2x - 15) +(2x2 – 10x) = 3x2 – 12x - 15, (f - g)(x) = (x2 – 2x - 15) - (2x2 – 10x) =
-x2 + 8x - 15, (fg)(x) = (x2 – 2x - 15)(2x2 – 10x) =2x4 – 14x3 - 10x2 + 150x and
f
(x)
g
x 2 2x 15
2 x 2 10x
( x 3)( x 5)
2 x(x 5)
x 3
.
2x
EXAMPLE 2. Let m(x) = 2x + 1 and n(x) = x2 + 2x – 1. Both functions have a domain of all real numbers. The
sum function is (m + n)(x) = (2x + 1) + (x2 + 2x – 1) = x2 + 4x. This is a new function and can be evaluated at
any value in its domain. For example, (m + n)(2) = 22 +4(2) =12. Notice that (m – n)(x) = (2x + 1) – (x2 + 2x –
1) = -x2 +2 while (n – m)(x) = (x2 + 2x – 1) – (2x + 1) = x2 – 2. Thus the order in which you subtract the
functions matters.
EXAMPLE 3. Let f(x) and g(x) be defined by the table of values below. Both functions have a domain of {-2, 1, 0, 1, 2, 3, 4}. We will complete the table.
x
f(x)
g(x)
(f + g)(x)
(f – g) (x)
(fg)(x)
f
g
-2
-4
0
-1
-1
1
0
2
3
1
4
-5
2
6
3
3
-2
-2
4
-3
-4
5
0
2
(x)
For the fourth row, the first entry is, (f + g)(-2) = f(-2) + g(-2) = -4 + 0 = -4. The second entry is (f + g)(-1) = f(1) + g(-1) = -1 + 1 = 0. We continue to complete the chart in a similar manner to get:
x
f(x)
g(x)
(f + g)(x)
(f – g) (x)
(fg)(x)
f
g
(x)
-2
-4
0
-4
-4
0
undefined
-1
-1
1
0
-2
-1
-1
0
2
3
5
-1
6
2/3
1
4
-5
-1
9
-20
-4/5
2
6
3
9
3
18
2
3
-2
-2
-4
0
4
1
4
-3
-4
-7
1
12
3/4
5
0
2
2
-2
0
0
6
EXAMPLE 4. Let f(x) and g(x) be defined by the graphs below. Both functions have a domain of 5 x 5 .
4
4
2
2
f(x)
g(x)
-5
5
10 -10
-5
5
-2
-2
-4
-4
10
We will graph (f + g)(x). To complete this task, we evaluate the sum function at some values.
x
f(x) g(x) (f +g)(x) = f(x) + g(x)
-5
-4
-2
-4 + -2 = -6
0
1
1
1+1=2
1
1
2
1+2=3
2
1
3
1+3=4
3
1
3
1+3=4
4
-1
3
-1 + 3 = 2
5
-3
3
-3 + 3 = 0
Plotting these function values and connecting the points gives us the graph of the sum function:
4
2
(f+g)(x)
-10
-5
5
10
-2
-4
-6
EXAMPLE 5. Let h(x) = 5x – 3. We will find (h + h)(x). Since (h + h)(x) = h(x) + h(x) = 2h(x), we see that (h
+ h)(x) =2 (5x – 3) =10x - 6. Thus (2h)(x) = 2h(x). Likewise, (ch)(x) = ch(x) for any constant, c.
EXERCISES
For #1-8, let f(x) = x2, g(x)= 2x + 1, and h(x) = -x2 +5x.
1. Find (a) (f + g)(x) (Ans: x2 + 2x + 1)
(b) (f + g)(3) (Ans: 16)
2. Find (a) (f - g)(x) (Ans: x2 - 2x - 1)
(b) (f - g)(3) (Ans: 2)
3. Find (a) (fg)(x) (Ans: 2x3 + x2)
(b) (fg)(3) (Ans: 63)
4. Find (a)
f
x2
)
( x ) (Ans:
g
2x 1
(b)
f
(3) (Ans: 9/7)
g
5. Find (a) (2g)(x) (Ans: 4x + 2)
(b) (2g)(3) (Ans: 14)
6. Find (a) (h - f)(x) (Ans: -2x2 + 5x)
(b) (h - f)(3) (Ans: -3)
7. Find (a) (g + h)(x) (Ans: -x2 + 7x + 1)
(b) (g + h)(3) (Ans: 13)
8. Find (a)
f
( x ) (Ans:
h
x2
x
2
5x
)
(b)
f
(3) (Ans: 3/2)
h
9. Use the functions defined in EXAMPLE 3 to complete a row in the table for
g
f
(x) .
(Ans:
x
f(x)
g(x)
g
f
(x)
-2
-4
0
0
-1
-1
1
-1
0
2
3
3/2
1
4
-5
-5/4
2
6
3
1/2
)
10. Use the graphs of f and g from EXAMPLE 4 to graph (f –g)(x).
2
-10
-5
5
10
(f-g)(x)
-2
-4
(Ans:
-6
)
3
-2
-2
1
4
-3
-4
4/3
5
0
2
undefined
Section: Composition of Functions
In the previous section, we combined functions in an algebraic manner. In this section we take advantage of
function notation to combine functions in a new way called a '''composition of functions'''. To compose two
functions, one function becomes the input of another function.
EXAMPLE 1. Let f(x) = 2x2 + 3 and g(x) = x – 5. The composition of f with g is f(g(x)) = f(x – 5) = 2(x – 5)2
+ 3. Notice that the function g(x) replaces the variable x in the function f. We can now simplify to get that
f(g(x)) = 2x2 – 20x + 53.
Fact: The composition of the function f with g is sometimes denoted f g ( x ) and should not be confused
with the product function fg ( x ) .
Fact: The composition of the function f with g has a domain of all x in the domain of g such that g(x) is in the
domain of f.
EXAMPLE 2. Let f ( x )
x and g( x )
x 2 . We can compose f with g as f g(x)
f x 2
x 2.
The domain of the composition is x 2 since square roots are only defined for non-negative inputs.
EXAMPLE 3. We can compose functions in any order. For example, taking the functions defined in the
previous example, we can compose g with f as g f (x )
that f g ( x )
g
x 2 , which has a domain of x 0 . Note
x
g f (x) .
EXAMPLE 4. Let f(x) and g(x) be defined by the table of values below. We will compose the functions f and
g.
x
f(x)
g(x)
f g (x)
-2
-4
0
-1
-1
1
0
2
3
1
4
-5
2
6
3
3
-2
-2
4
-3
-4
5
0
2
g f (x)
For the fourth row, first entry we have that f g ( 2)
that f g ( 1)
f g( 1)
f g( 2)
f (0) 2 . For the second entry, we have
f (1) 4 . For the third entry, we have that f g (0)
For the fourth entry, f g (1)
f g(1)
f (3)
2.
f ( 5) undefined. We continue in this manner to complete the
row. For the fifth row, first entry we have that g f ( 2)
entry, we have that g f ( 1)
f g(0)
g f ( 1)
g f ( 2)
g( 4) undefined. For the second
g( 1) 1 . We continue in this manner to complete the row.
x
f(x)
g(x)
f g (x)
-2
-4
0
2
-1
-1
1
4
0
2
3
-2
1
4
-5
undefined
2
6
3
-2
3
-2
-2
-4
4
-3
-4
undefined
5
0
2
6
g f (x)
undefined
1
6
-4
undefined
0
undefined
3
EXAMPLE 5. Let f(x) and g(x) be defined by the graphs below.
6
4
4
2
g(x)
f(x)
2
-10
-5
5
-5
5
-2
10
-2
-4
-4
-6
We will graph f(g(x)). To complete this task, we evaluate the composition at some values.
x
f(x) g(x) f(g(x))
-5
4
3
f(g(-5))= f(3) =0
-4
3.5
1
f(g(-4))=f(1)=1
-3
3
1
f(g(-3))=f(1) = 1
-2
2.5
2
f(g(-2))=f(2) = 0.5
-1
2
3
f(g(-1))=f(3) = 0
0
1.5
3
f(g(0))=f(3) = 0
1
1
1
f(g(1)) = f(1) = 1
2
0.5
-1
f(g(2))=f(-1) = 2
3
0
-3
f(g(3))=f(-3) = 3
4
-0.5 -5
f(g(4))=f(-5) = 4
5
-1
-4
f(g(5))=f(-4) = 3.5
Plotting these function values and connecting the points gives us the graph of the composition:
4
2
f(g(x))
-10
-5
5
-2
Likewise we can compose g with f as follows:
x
-5
-4
-3
-2
-1
0
1
2
3
f(x)
4
3.5
3
2.5
2
1.5
1
0.5
0
g(x)
3
1
1
2
3
3
1
-1
-3
g(f(x))
g(f(-5))= g(4) =-5
g(f(-4))=g(3.5)=-4
g(f(-3))=g(3) = -3
g(f(-2))=g(2.5) = -2
g(f(-1))=g(2) = -1
g(f(0))=g(1.5) = 0
g(f(1))=g(1)=1
g(f(2))=g(0.5) = 2
g(f(3))=g(0) = 3
10
10
4
5
-0.5
-1
-5
-4
g(f(4))=g(-0.5)=2.5
g(f(5))=g(-1)=3
4
2
-10
-5
5
10
g(f(x))
-2
-4
-6
EXAMPLE 6. Recall that the inverse of y
1
1
g ( g(x )) . We have that g( g ( y ))
g
3
1
g(x) 5x 3 1 is g ( y )
y 1
5
5
3
y 1
5
3
y 1
. We will find g( g 1 ( y )) and
5
3
1
y . We also get that
(5x 3 1) 1
x . To summarize, g( g 1 ( y )) y and g 1 ( g(x)) x . Notice that the
5
result in both cases is the original input. This is not a coincidence. The composition of inverse functions will
always result in the original input.
g 1 ( g( x ))
g 1 (5x 3 1)
3
EXERCISES
1. Let f(x) = x+ 2 and g(x) = 4 – x2. Find the following.
a.
f g ( x ) (Ans: -x2 + 6)
b.
g f ( x ) (Ans: -x2 – 4x)
c.
f g (0) (Ans: 6)
d.
f g (1) (Ans: 5)
e.
f g (3) (Ans: -3)
f.
g f (0) (Ans: 0)
g.
g f (2) (Ans: -12)
h.
g f ( 1) (Ans: 3)
9 x2 .
2. Let f (x) x 2 5 and g( x )
a. Find f ( g( x )) . (Ans: 4 – x2)
b. Find the domain of f ( g( x )) . (Ans: Since the domain of g(x) is [-3,3], the domain of f ( g( x )) is also [-3,3].)
3. Let f ( x )
1
x 3
and g( x ) 2 x .
a. Find f ( g( x )) . (Ans:
1
)
2 x 3
b. Find g( f ( x )) . (Ans: 2
1
x 3
)
4. Let f(x) = x2, g(x)= 2x + 1, and h(x) = -x2 +5x.
a. Find f ( g( x )) . (Ans: 4x2
4x 1 )
b. Find g( f ( x )) . (Ans: 2x 2
1)
c. Find f (h(x)) . (Ans: x4 10x3 25x2 )
d. Find h( f (x)) . (Ans: x 4 5x2 )
e. Find h( g(x)) . (Ans: 4x2 6x 4 )
f. Find g(h(x)) . (Ans: 2x2 10x 1 )
5. Complete the table below.
x
f(x)
g(x)
f g (x)
-2
-4
0
-1
-1
1
0
2
3
1
4
-5
2
6
3
3
-2
-2
4
-3
-4
5
0
2
x
f(x)
g(x)
f g (x)
-2
-4
0
2
-1
-1
1
4
0
2
3
-2
1
4
-5
undefined
2
6
3
-2
3
-2
-2
-4
4
-3
-4
undefined
5
0
2
6
g f (x)
undefined
1
3
-4
undefined
0
undefined
3
g f (x)
(Ans:
)
6. Use the
graphs of f(x) and g(x) below to answer the following.
6
6
4
4
2
2
g(x)
f(x)
5
10
-5
-2
15
5
10
-2
a. Find f ( g(0)) . (Ans: 4)
b. Find -4f ( g(1)) . (Ans: 2)
-4
c. Find f ( g(2)) . (Ans: 0)
d. Find f ( g(3)) . (Ans: 2)
e. Find f ( g(4)) . (Ans: 4)
f. Graph f ( g( x )) using the points found in your previous answers. What do you notice? (Ans: The graph of
f ( g( x )) is the same as the graph of f(x).)
g. Find g( f (0)) . (Ans: 0)
h. Find g( f (1)) . (Ans: 2)
i. Find g( f (2)) . (Ans: 4)
j. Find g( f (3)) . (Ans: 2)
k. Find g( f (4)) . (Ans: 0)
l. Graph g( f ( x )) using the points found in your previous answers. What do you notice? (Ans: The graph of
g( f ( x )) is the graph of f(x) reflected across the line y = 2.)
7. Given
f (C )
9
5
C 32
1
and f (F )
5
9
(F 32) , find f ( f 1 (F )) and f 1 ( f (C )) . (Ans:
f ( f 1 (F )) F
and f 1 ( f (C )) C .)
8. Given f(x) = 2x – 3 and f 1 ( y )
f 1 ( f (x)) x .)
y 3
, find f ( f 1 ( y )) and f 1 ( f ( x )) . (Ans: f ( f 1 ( y )) y and
2
9. Why does it make sense that the composition of inverse functions will always give the original
input? (Ans: Answers may vary. Inverse functions “undo” each other and thus composing them
will always give the original input.)
Section: Decomposition of Functions
In this section we investigate how to identify a function as the result of a composition of two
functions, i.e. we will '''decompose''' functions. This skill will be helpful when you later learn about
the chain rule.
To decompose a function, you must find two functions so that when you compose them you get the
original function. There is often more than one way to decompose a function. Some decompositions
of functions will be more meaningful than others.
EXAMPLE 1. Let h( x )
1
. We will find two functions, f and g such that h(x)
( x 5)2
f ( g(x)) . Notice
that since g(x) is “inside” our composition, we can choose g(x) to be x – 5. Then it must be that
1
1
. We can confirm that our decomposition works since f ( g( x )) f ( x 5)
f (x)
h( x ) .
2
( x 5)2
x
EXAMPLE 2. Using the same function as in EXAMPLE 1, we can decompose h by letting
1
. We can confirm that our decomposition works since
g(x ) (x 5)2 and f ( x )
x
1
f ( g( x )) f (( x 5)2 )
h( x) .
( x 5)2
EXAMPLE 3. Using the same function as in EXAMPLE 1 yet again, we can decompose h by letting
1
and f (x ) x . We can confirm that our decomposition works since
g( x )
( x 5)2
f ( g( x ))
f
1
( x 5)2
1
( x 5)2
h( x ) . While this decomposition does work, it is known as a trivial
decomposition since one of the functions is f(x) = x. Another trivial decomposition would be to let
1
. We will usually want to avoid such decompositions since they aren’t
g( x ) x and f ( x )
( x 5)2
very useful. (You will usually be asked to find a non-trivial decomposition.)
EXAMPLE 4. We will (non-trivially) decompose the function h( x )
such that h(x)
5 x into two functions f and g
f ( g(x)) . In this case, we see the “inside” function is clearly 5 – x and so we let g(x) =
5 – x and then f ( x )
x . Again, a simple composition to check: f ( g( x ))
f (5 x )
5 x
desired.
EXERCISES
Decompose the following functions (non-trivially) so that h(x)
f ( g(x)) .
1. h(x) (2x 1)2 (Ans: Answers may vary. One possibility: f ( x ) x 2 and g(x ) 2x 1 .)
h( x ) as
2. h( x )
1
5 (Ans: Answers may vary. One possibility: f (x) x 5 and g( x )
3x
3
5x 1
3. h( x )
4. h( x )
5. h( x )
3
3
(Ans: Answers may vary. One possibility: f ( x ) x 3 and g( x )
2 x 2 10x (Ans: Answers may vary. One possibility: f ( x )
1
(Ans: Answers may vary. One possibility: f ( x )
8x
3
1
.)
3x
3
.)
5x 1
2 x and g(x ) x 2
1
and g(x ) 8x .)
x
5x .)