Tutorial on Composition of Functions

How to find the composition of functions and its domain? A tutorial including detailed explanations is presented. Questions with answers are also included at the end of this page. Also examples of Applications of Composition of Functions are included in this website.

Question 1

Find \( (f \circ g)(-2) \) given that
\( f(x) = -3x + 2 \)    and    \( g(x) = |x - 4| \)

Solution to question 1
note that
\( (f \circ g)(-2) = f( g(-2) ) \)
evaluate g(-2).
\( g(-2) = |-2 - 4| = 6 \)
evaluate \( f( g(-2) ) \).
\( f( g(-2) ) = f(6) = -3 \times 6 + 2 = -16 \)
conclusion:
\( (f \circ g)(-2) = -16 \)

Question 2

Find \( (f \circ g)(x) \) and the domain of \( f \circ g \) given that
\( f(x) = \dfrac{{x - 1}}{{x + 2}} \)    and    \( g(x) = \dfrac{{x + 1}}{{x - 2}} \)

Solution to question 2
First find \( (f \circ g)(x) \)
\( (f \circ g)(x) = f( g(x) ) = \dfrac{{g(x) - 1}}{{g(x) + 2}} \)
=\( \dfrac{{(x + 1)/(x - 2) - 1}}{{(x + 1)/(x - 2) + 2}} \)
= \( \dfrac{{3}}{{3x - 3}} \)
First find domain of \( f \) and \( g \)
domain of \( f \) : \( x \) not equal to -2
domain of \( g \) : \( x \) not equal to 2
\( g(x) \) has to be in the domain of \( f \)
\( g(x) \) not equal to -2
solve for \( x \) the equation \( g(x) = -2 \)
\( \dfrac{{x + 1}}{{x - 2}} = -2 \)
\( x + 1 = -2x + 4 \)
\( 3x = 3 \)
\( x = 1 \)
for \( g(x) \) to be different from - 2, \( x \) has to be different from 1.
conclusion: The domain of \( f \circ g \) is: \( (- \infty , 1) \cup (1 , 2) \cup (2 , \infty) \)


Question 3

Find the composition \( (f \circ g)(x) \) and the domain of \( f \) o \( g \) given that
\( f(x) = x^2 + 2 \)    and    \( g(x) = \sqrt{x - 2} \)

Solution to question 3
First find \( (f \circ g)(x) \)
\( (f \circ g)(x) = f( g(x) ) = g(x)^2 + 2\)
\( = ( \sqrt{x - 2} )^2 + 2 \)
\( = x \)
First find domain of \( f \) and \( g \)
domain of \( f \) : all real numbers
domain of \( g \) : \( x - 2 \geq 0 \) ; \( x \geq 2 \)
Since the domain of \( f \) is all real numbers, we have to make sure that \( x \) is in the domain of \( g \) so that \( g \) has a real value.
conclusion: The domain of \( f \circ g \) is: \( [2 , \infty \))


More Questions on Composition of Functions

Find the composition \( (f \circ g)(x) \) and its domain given \( f \) and \( g \) below:
a) \( f(x) = 2x^3 + x - 1 \) and \( g(x) = x^2 \)
b) \( f(x) = | x^2 - 4 | \) and \( g(x) = x - 1 \)
c) \( f(x) = x^2 - 5 \) and \( g(x) = \sqrt{x + 5} \)
d) \( f(x) = \ln x \) and \( g(x) = \sqrt{x + 5} \)
e) \( f(x) = \sin x \) and \( g(x) = x - 2 \)

Answers to Above Questions.
Find the composition \( (f \circ g)(x) \) and its domain given \( f \) and \( g \) below:
a) \( (f \circ g)(x) = 2 x^6 + x^2 -1 \) , domain: \( (- \infty , + \infty ) \)
b) \( (f \circ g)(x) = | x^2 - 2x - 3 | \) , domain:\( (- \infty , + \infty ) \)
c) \( (f \circ g)(x) = x \) , domain: \( [ -5 , + \infty ) \)
d) \( (f \circ g)(x) = \dfrac{1}{2} \ln (x + 5) \) , domain: \( [ -5 , + \infty ) \)
e) \( (f \circ g)(x) = \sin (x - 2) \) , domain: \( (- \infty , + \infty ) \)


More References and links

Composition of Functions
A video with more on composite functions is available.
Composition of Functions Questions a
Questions on Composite Functions with Solutions.