Search

Composition of Functions:
Composing Functions with Functions
(page 4 of 6)

Sections: Composing functions that are sets of point, Composing functions at points, Composing functions with other functions, Word problems using composition, Inverse functions and composition

• Given f(x) = 2x + 3 and g(x) = –x2 + 5, find ( f o f )(x).
• ( f o f )(x) = f ( f (x))
= f (2x + 3)
= 2(           ) + 3    ... setting up to insert the input
= 2(2x + 3) + 3
= 4x + 6 + 3
= 4x + 9

• Given f(x) = 2x + 3 and g(x) = –x2 + 5, find (g o g)(x).
• (g o g)(x) = g(g(x))
= –(             )2 + 5     ... setting up to insert the input
= –(–x2 + 5)2 + 5
= –(x4 – 10x2 + 25) + 5
= –x4 + 10x2 – 25 + 5
= x4 + 10x2 – 20

Sometimes you have to be careful with the domain and range of the composite function.

• Given f (x) = sqrt(x) and g(x) = x – 2, find the domains of ( f o g)(x) and (g o f )(x).
• Since  f (x) involves a square root, the inputs have to be non-negative. This means that the domain (the set of x-values) for f (x) is "all x > 0". Then, in (g o f )(x), where I'm plugging x first into f (x) = sqrt(x), the domain is at least restricted to "all x > 0". Let's see what the two compositions look like:

( f o g)(x) =  f (g(x))
f (x – 2)
= sqrt(         )
= sqrt(x – 2)

The domain for the square root is all inputs that make "x – 2" non-negative. That is, all x such that x – 2 > 0. Solving this for x, I get that the domain of ( f o g)(x) is "all x > 2".

Now to do the other composition:

(g o f )(x) = g( f (x))
= g( sqrt(x) )
= (              ) – 2
= ( sqrt(x) ) – 2
= sqrt(x) – 2

The domain for this is all inputs that make the square root defined. Since there is only "x" inside the square root, then:

the domain of (g o f )(x) is "all x > 0".

If your initial functions are just plain old polynomials, then their domains are "all x", and so will be the domain of the composition. It's pretty much only if your dealing with denominators (where you can't divide by zero) or square roots (where you can't have a negative) that the domain ever becomes an issue.

Usually composition is used to combine two functions. But sometimes you are asked to go backwards. That is, they will give you a function, and they'll ask you to come up with the two original functions that they composed. For example: Copyright © Elizabeth Stapel 2002-2011 All Rights Reserved

• Given h(x) = (x + 1)2 + 2(x + 1) – 3, determine two functions f (x) and g(x) which, when composed, generate h(x).
• This is asking you to notice patterns and to figure out what is "inside" something else. In this case, this looks similar to the quadratic x2 + 2x – 3, except that, instead of squaring x, they're squaring x + 1. In other words, this is a quadratic into which they've plugged x + 1. So let's make g(x) = x + 1, and then plug this function into f (x) = x2 + 2x – 3:

( f o g)(x) = f (g(x))
= f (x + 1)
= (         )2 + 2(         ) – 3
= (x + 1)2 + 2(x + 1) – 3

Then h(x) may be stated as the composition of  f (x) = x2 + 2x – 3 and g(x) = x + 1.

• Given h(x) = sqrt(4x + 1), determine two functions f (x) and g(x) which, when composed, generate h(x).
• Since the square root is "on" (or "around") the "4x + 1", then the 4x + 1 is put inside the square root. I need to take x, do "4x + 1" to it, and then take the square root of the result:

g(x) = 4x + 1,  f(x) = sqrt(x), and h(x) = ( f o g)(x).

<< Previous  Top  |  1 | 2 | 3 | 4 | 5 | 6  |  Return to Index  Next >>

 Cite this article as: Stapel, Elizabeth. "Composing Functions with Functions." Purplemath. Available from     https://www.purplemath.com/modules/fcncomp4.htm. Accessed [Date] [Month] 2016

Reviews of
Internet Sites:
Free Help
Practice
Et Cetera

Study Skills Survey

Tutoring from Purplemath
Find a local math tutor