Examples – Now let’s use the steps shown above to work through some examples.
o
Example 1: If f(x) = –4x + 9 and g(x) = 2x – 7, find (f g)(x).
o
Rewrite the composition in a different form.
(f g)(x)
=
f(g(x))
= -
4(2x 7) 9
-
+
Replace each occurrence of x in f(x) with g(x) = 2x – 7.
Simplify the answer by distributing and combining like
= -
8x 28 7
+
+
terms.
= -
8x 37
+
o
Thus, (f g)(x)
= –8x + 37.
o
Example 2: If f(x) = –4x + 9 and g(x) = 2x – 7, find (g f )(x).
o
Rewrite the composition in a different form.
(g f)(x) g(f(x))
=
=
2( 4x 9) 7
-
+
-
Replace each occurrence of x in g(x) with f(x) = –4x + 9.
Simplify the answer by distributing and combining like
= -
8x 18 7
+
-
terms.
= -
8x 11
+
o
Thus, (g f )(x)
= –8x + 11.
Notice that in Examples 1 and 2 the functions f(x) = –4x + 9 and g(x) = 2x – 7 were the same, but
o
o
(f g)(x)
and (g f )(x)
produced different answers. These two examples should help us understand
o
o
why we need to be very specific when we are asked to find either (f g)(x)
or (g f )(x).
The way we
write down the problem can make a big difference in our answer.
2
o
Example 3: If h(x) = 3x – 5 and g(x) = 2x
– 7x, find (g h)(x).
o
(g h)(x) g(h(x))
=
Rewrite the composition in a different form.
2
Replace each occurrence of x in g(x) with h(x) = 3x – 5.
=
2(3x 5)
-
-
7(3x 5)
-
2
Simplify the answer by first dealing with the exponent and
=
2(9x
-
30x 25) 7(3x 5)
+
-
-
squaring (3x – 5), then distributing, and finally combining
2
=
18x
-
60x 50 21x 35
+
-
+
like terms.
2
=
18x
-
81x 85
+
2
o
Thus, (g h)(x)
= 18x
– 81x + 85.