For in GOD we live, and move, and have our being. - Acts 17:28

The Joy of a Teacher is the Success of his Students. - Samuel Chukwuemeka

# Solved Examples on the Composition of Functions

For ACT Students
The ACT is a timed exam...$60$ questions for $60$ minutes
This implies that you have to solve each question in one minute.
Some questions will typically take less than a minute a solve.
Some questions will typically take more than a minute to solve.
The goal is to maximize your time. You use the time saved on those questions you solved in less than a minute, to solve the questions that will take more than a minute.
So, you should try to solve each question correctly and timely.
So, it is not just solving a question correctly, but solving it correctly on time.
Please ensure you attempt all ACT questions.
There is no "negative" penalty for any wrong answer.

For JAMB and CMAT Students
Calculators are not allowed. So, the questions are solved in a way that does not require a calculator.

Solve all questions.
Show all work.

(1.) $f(x) = -3x -1$
$g(x) = x^2 - 1$
Calculate $(f \circ g)(1)$ using at least two methods.

First Method (long way)
$(f \circ g)(x) \\[3ex] = f(g(x)) \\[3ex] = f(x^2 - 1) \\[3ex] But, f(x) = -3x - 1 \\[3ex] f(x^2 - 1) = -3(x^2 -1) - 1 \\[3ex] = -3x^2 + 3 - 1 \\[3ex] = -3x^2 + 2 \\[3ex] \therefore (f \circ g)(x) = -3x^2 + 2 \\[3ex] (f \circ g)(1) = -3(1)^2 + 2 \\[3ex] = -3(1) + 2 \\[3ex] = -3 + 2 \\[3ex] = -1 \\[3ex] (f \circ g)(1) = -1 \\[3ex]$ Second Method (short way)
$(f \circ g)(1) \\[3ex] = f(g(1)) \\[3ex] g(x) = x^2 - 1 \\[3ex] g(1) = 1^2 - 1 \\[3ex] g(1) = 1 - 1 \\[3ex] g(1) = 0 \\[3ex]$ We now need to find $f(0)$
$f(x) = -3x - 1 \\[3ex] f(0) = -3(0) - 1 \\[3ex] f(0) = 0 - 1 \\[3ex] f(0) = -1 \\[3ex] (f \circ g)(1) = -1$
(2.) Calculate:
(a.) $(f \circ g)(x)$
(b.) $(g \circ f)(x)$
(c.) the domain for each composite function
$f(x) = 5x$
$g(x) = 7x - 3$

$(f \circ g)(x) \\[3ex] = f(g(x)) \\[3ex] = f(7x - 3) \\[3ex] But, f(x) = 5x \\[3ex] f(7x - 3) = 5(7x - 3) \\[3ex] = 35x - 15 \\[3ex] (f \circ g)(x) = 35x - 15 \\[3ex]$ The domain of $(f \circ g)(x)$ is all $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$
Let us look at $g(x)$
$g(x) = 7x - 3 \\[3ex] D = (-\infty, \infty) \\[3ex]$ Next, we look at $(f \circ g)(x)$
$(f \circ g)(x) = 35x - 15 \\[3ex] D = (-\infty, \infty) \\[3ex]$ $\therefore D = (-\infty, \infty)$

$(g \circ f)(x) \\[3ex] = g(f(x)) \\[3ex] = g(5x) \\[3ex] But, g(x) = 7x - 3 \\[3ex] g(5x) = 7(5x) - 3 \\[3ex] = 35x - 3 \\[3ex] (g \circ f)(x) = 35x - 3 \\[3ex]$ The domain of $(g \circ f)(x)$ is all $x$ in the domain of $f$ such that $f(x)$ is in the domain of $g$
Let us look at $f(x)$
$f(x) = 5x$
There is no restriction in this domain.
Any input value will give an output.
$D = (-\infty, \infty)$

Next, we look at $(g \circ f)(x)$
$(g \circ f)(x) = 35x - 3$
Each input value in this domain will give an output value.
$D = (-\infty, \infty)$

$\therefore D = (-\infty, \infty)$
$D$ = {$x | x \in \mathbb{R}$}
(3.) $g(x) = x^2 - 4x - 9$
Calculate $(g \circ g)(-3)$ using at least two methods.

First Method (long way)
$(g \circ g)(x) \\[3ex] = g(g(x)) \\[3ex] = g(x^2 - 4x - 9) \\[3ex] But, g(x) = x^2 - 4x - 9 \\[3ex] g(x^2 - 4x - 9) = (x^2 - 4x - 9)^2 - 4(x^2 - 4x - 9) - 9 \\[3ex] = (x^2 - 4x - 9)(x^2 - 4x - 9) - 4x^2 + 16x + 36 - 9 \\[3ex] = x^4 - 4x^3 - 9x^2 - 4x^3 + 16x^2 + 36x - 9x^2 + 36x + 81 - 4x^2 + 16x + 27 \\[3ex] = x^4 - 8x^3 - 6x^2 + 88x + 108 \\[3ex] \therefore (g \circ g)(x) = x^4 - 8x^3 - 6x^2 + 88x + 108 \\[3ex] (g \circ g)(-3) = (-3)^4 - 8 * (-3)^3 - 6 * (-3)^2 + 88 * (-3) + 108 \\[3ex] = 81 - 8(-27) - 6(9) - 264 + 108 \\[3ex] = 81 + 216 - 54 - 264 + 108 \\[3ex] = 87 \\[3ex] (g \circ g)(-3) = 87 \\[3ex]$ Second Method (short way)
$(g \circ g)(-3) \\[3ex] = g(g(-3)) \\[3ex] But, g(x) = x^2 - 4x - 9 \\[3ex] g(-3) = (-3)^2 - 4(-3) - 9 \\[3ex] = 9 + 12 - 9 \\[3ex] = 12 \\[3ex]$ We now need to find $g(12)$
$g(x) = x^2 - 4x - 9 \\[3ex] g(12) = (12)^2 - 4(12) - 9 \\[3ex] = 144 - 48 - 9 \\[3ex] = 87 \\[3ex] (g \circ g)(-3) = 87 \\[3ex]$
(4.) Calculate:
(a.) $(f \circ g)(x)$
(b.) $(g \circ f)(x)$
(c.) the domain for each composite function
$f(x) = \dfrac{3}{1 - 7x}$

$g(x) = \dfrac{1}{x}$

$(f \circ g)(x) \\[3ex] = f(g(x)) \\[3ex] = f\left(\dfrac{1}{x}\right) \\[5ex] But, f(x) = \dfrac{3}{1 - 7x} \\[5ex] f\left(\dfrac{1}{x}\right) = \dfrac{3}{1 - 7\left(\dfrac{1}{x}\right)} \\[7ex] = \dfrac{3}{1 - \dfrac{7}{x}} \\[7ex] = \dfrac{3}{\dfrac{x}{x} - \dfrac{7}{x}} \\[7ex] = \dfrac{3}{\dfrac{x - 7}{x}} \\[7ex] = 3 \div \dfrac{x - 7}{x} \\[7ex] = 3 * \dfrac{x}{x - 7} \\[7ex] = \dfrac{3x}{x - 7} \\[5ex] (f \circ g)(x) = \dfrac{3x}{x - 7}$

The domain of $(f \circ g)(x)$ is all $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$
Let us look at $g(x)$
$g(x) = \dfrac{1}{x}$

$x$ cannot be equal to $0$
This is because that would make the function to be undefined.
You cannot divide anything by $0$
This means that $0$ is excluded from the domain.
$0$ is not in the domain of $g(x)$
Hence, $0$ cannot be in the domain of f(g(x))

Next, we look at $(f \circ g)(x) = \dfrac{3x}{x - 7} \\[3ex]$ $x - 7$ cannot be $0$
This is because that would make the function to be undefined.
You cannot divide anything by $0$
$x$ cannot be equal to $7$
$7$ is not in the domain of f(g(x))
$\therefore D = (-\infty, 0) \cup (0, 7) \cup (7, \infty)$

$(g \circ f)(x) \\[3ex] = g(f(x)) \\[3ex] = g\left(\dfrac{3}{1 - 7x}\right) \\[5ex] But, g(x) = \dfrac{1}{x} \\[5ex] g\left(\dfrac{3}{1 - 7x}\right) = \dfrac{1}{\dfrac{3}{1- 7x}} \\[7ex] = 1 \div \dfrac{3}{1 - 7x} \\[7ex] = 1 * \dfrac{1- 7x}{3} \\[7ex] = \dfrac{1- 7x}{3} \\[5ex] (g \circ f)(x) = \dfrac{1- 7x}{3}$

The domain of $(g \circ f)(x)$ is all $x$ in the domain of $f$ such that $f(x)$ is in the domain of $g$
Let us look at $f(x)$
$f(x) = \dfrac{3}{1 - 7x} \\$
$1 - 7x$ cannot be equal to $0$
This is because that would make the function to be undefined.
You cannot divide anything by $0$
Just set it to be equal to zero and solve.
$1 - 7x = 0 \\[3ex] 1 = 0 + 7x \\[3ex] 1 = 7x \\[3ex] 7x = 1 \\[3ex] x = \dfrac{1}{7} \\[5ex] So,$x$cannot be equal to$\dfrac{1}{7}$This means that$\dfrac{1}{7}$is excluded from the domain.$\dfrac{1}{7}$is not in the domain of$f(x)$Hence,$\dfrac{1}{7}$cannot be in the domain of g(f(x)) Next, we look at$(g \circ f)(x) = \dfrac{1- 7x}{3}$There is no restriction in the domain of$(g \circ f)(x)$Any real number can be in the domain of$g(f(x))\therefore D = \left(-\infty, \dfrac{1}{7}\right) \cup \left(\dfrac{1}{7}, \infty\right)$(5.)$f(x) = x^3$Calculate$(f \circ f)(-2)$using at least two methods. First Method (long way)$ (f \circ f)(x) \\[3ex] = f(f(x)) \\[3ex] = f(x^3) \\[3ex] But, f(x) = x^3 \\[3ex] f(x^3) = (x^3)^3 \\[3ex] = x^9 \\[3ex] \therefore (f \circ f)(x) = x^9 \\[3ex] (f \circ f)(-2) = (-2)^9 \\[3ex] = -512 \\[3ex] (f \circ f)(-2) = -512 \\[3ex] $Second Method (short way)$ (f \circ f)(-2) \\[3ex] = f(f(-2)) \\[3ex] But, f(x) = x^3 \\[3ex] f(-2) = (-2)^3 \\[3ex] = -8 \\[3ex] $We now need to find$f(-8) f(x) = x^3 \\[3ex] f(-8) = (-8)^3 \\[3ex] = -512 \\[3ex] (f \circ f)(-2) = -512 $(6.) Calculate: (a.)$(f \circ g)(x)$(b.)$(g \circ f)(x)$(c.) the domain for each composite function$f(x) = \sqrt{x+5}g(x) = 3x - 4 (f \circ g)(x) \\[3ex] = f(g(x)) \\[3ex] = f(3x - 4) \\[3ex] But, f(x) = \sqrt{x + 5} \\[3ex] f(3x - 4) = \sqrt{(3x - 4) + 5} \\[3ex] = \sqrt{3x - 4 + 5} \\[3ex] = \sqrt{3x + 1} \\[3ex] (f \circ g)(x) = \sqrt{3x + 1} \\[3ex] $The domain of$(f \circ g)(x)$is all$x$in the domain of$g$such that$g(x)$is in the domain of$f$Let us look at$g(x)g(x) = 3x - 4$There is no restriction in this domain. All real number input values will give output values.$D = (-\infty, \infty)$Next, we look at$(f \circ g)(x)(f \circ g)(x) = \sqrt{3x + 1}3x + 1$cannot be a negative number This is because the square root of any negative number is an imaginary number (not a real number). We are only concerned with real numbers. It has to be "at least" a nonnegative number. Let us set the radicand (the term inside the radical) to be "at least" a nonnegative number Nonnegative numbers includes zero and the positive numbers.$ 3x + 1 \ge 0 \\[3ex] 3x \ge 0 - 1 \\[3ex] 3x \ge -1 \\[3ex] x \ge -\dfrac{1}{3} \\[5ex] D = \left[-\dfrac{1}{3}, \infty\right) \\[5ex] \therefore D = \left[-\dfrac{1}{3}, \infty\right) (g \circ f)(x) \\[3ex] = g(f(x)) \\[3ex] = g(\sqrt{x + 5}) \\[3ex] But, g(x) = 3x - 4 \\[3ex] g(\sqrt{x + 5}) = 3(\sqrt{x + 5}) - 4 \\[3ex] = 3\sqrt{x + 5} - 4 \\[3ex] (g \circ f)(x) = 3\sqrt{x + 5} - 4 \\[3ex] $The domain of$(g \circ f)(x)$is all$x$in the domain of$f$such that$f(x)$is in the domain of$g$Let us look at$f(x)f(x) = \sqrt{x + 5}x + 5$cannot be a negative number This is because the square root of any negative number is an imaginary number (not a real number). We are only concerned with real numbers. It has to be "at least" a nonnegative number. Let us set the radicand (the term inside the radical) to be "at least" a nonnegative number Nonnegative numbers includes zero and the positive numbers.$ x + 5 \ge 0 \\[3ex] x \ge 0 - 5 \\[3ex] x \ge -5 \\[3ex] D = [-5, \infty) \\[3ex] $Next, we look at$(g \circ f)(x)(g \circ f)(x) = 3\sqrt{x + 5} - 4x + 5$cannot be a negative number This is because the square root of any negative number is an imaginary number (not a real number). We are only concerned with real numbers. It has to be "at least" a nonnegative number. Let us set the radicand (the term inside the radical) to be "at least" a nonnegative number Nonnegative numbers includes zero and the positive numbers.$ x + 5 \ge 0 \\[3ex] x \ge 0 - 5 \\[3ex] x \ge -5 \\[3ex] D = [-5, \infty)\therefore D = [-5, \infty)D$= {$x | x \ge 5$} (7.) Calculate: (a.)$(f \circ g)(x)$(b.)$(g \circ f)(x)$(c.) the domain for each composite function$f(x) = \sqrt{x + 4}g(x) = x^2 - 4 (f \circ g)(x) \\[3ex] = f(g(x)) \\[3ex] = f(x^2 - 4) \\[3ex] But, f(x) = \sqrt{x + 4} \\[3ex] f(x^2 - 4) = \sqrt{(x^2 - 4) + 4} \\[3ex] = \sqrt{x^2 - 4 + 4} \\[3ex] = \sqrt{x^2} \\[3ex] = |x| \\[3ex] (f \circ g)(x) = |x|\\[3ex] $Student: Why is the answer the absolute value of$x$? Is it okay to write it as just$x$? Teacher: I would accept$x$. However, we are interested in only the positive value of$x$The absolute value of$x$gives only the positive value of$x$(because of the$\sqrt{x^2}$). The domain of$(f \circ g)(x)$is all$x$in the domain of$g$such that$g(x)$is in the domain of$f$Let us look at$g(x)g(x) = x^2 - 4$There is no restriction in this domain. Any real number input value will give a result.$D = (-\infty, \infty)$Next, we look at$(f \circ g)(x)(f \circ g)(x) = x$There is also no restriction in this domain. Any real number input value will give an output value.$D = (-\infty, \infty)\therefore D = (-\infty, \infty) (g \circ f)(x) \\[3ex] = g(f(x)) \\[3ex] = g(\sqrt{x + 4}) \\[3ex] But, g(x) = x^2 - 4 \\[3ex] g(\sqrt{x + 4}) = (\sqrt{x + 4})^2 - 4 \\[3ex] = x + 4 - 4 \\[3ex] = x \\[3ex] (g \circ f)(x) = x \\[3ex] $The domain of$(g \circ f)(x)$is all$x$in the domain of$f$such that$f(x)$is in the domain of$g$Let us look at$f(x)f(x) = \sqrt{x + 4}x + 4$cannot be a negative number This is because the square root of any negative number is an imaginary number (not a real number). We are only concerned with real numbers. It has to be "at least" a nonnegative number. Let us set the radicand (the term inside the radical) to be "at least" a nonnegative number Nonnegative numbers includes zero and the positive numbers.$ x + 4 \ge 0 \\[3ex] x \ge 0 - 4 \\[3ex] x \ge -4 \\[3ex] D = [-4, \infty)$Next, we look at$(g \circ f)(x)(g \circ f)(x) = x$Each input value in this domain will give an output value.$D = (-\infty, \infty)\therefore D = [-4, \infty)D$= {$x | x \ge -4$} (8.) If$f(x) = 9x^2 + 1$and$g(x) = 4x + a$; Find$a$such that the graph of$f \circ g$crosses the$y-axis$at$730 f(x) = 9x^2 + 1 \\[3ex] g(x) = 4x + a \\[3ex] (f \circ g)(x) = f(g(x)) \\[3ex] = f(4x + a) \\[3ex] But,\:\: f(x) = 9x^2 + 1 \\[3ex] = 9(4x + a)^2 + 1 \\[3ex] = 9[(4x + a)(4x +a)] + 1 \\[3ex] = 9(16x^2 + 4ax + 4ax + a^2) + 1 \\[3ex] = 9(16x^2 + 8ax + a^2) + 1 \\[3ex] = 144x^2 + 8ax + 9a^2 + 1 \\[3ex] f \circ g$crosses the$y-axis$at$730144x^2 + 8ax + 9a^2 + 1 = 730$On the$y-axis$,$x-values = 0 144(0)^2 + 8a(0) + 9a^2 + 1 = 730 \\[3ex] 9a^2 + 1 = 730 \\[3ex] 9a^2 = 730 - 1 \\[3ex] 9a^2 = 729 \\[3ex] a^2 = \dfrac{729}{9} \\[5ex] a^2 = 81 \\[3ex] a = \pm \sqrt{81} \\[3ex] a = \pm 9 \\[3ex] a = 9 \:\:OR\:\: a = -9 $(9.) ACT For the$2$functions$f(x)$and$g(x)$, tables of values are shown below. What is the value of$g(f(3))$?$xf(x)-57-2-51332xg(x)-231-12-33-5 g(f(3)) \\[3ex] f(3) = 2 \\[3ex] g(f(3)) = g(2) \\[3ex] g(2) = -3 $(10.) If$f(x) = 9x^2 + 1$and$g(x) = 4x + a$; Find$a$such that the graph of$f \circ g$crosses the$y-axis$at$730 f(x) = 9x^2 + 1 \\[3ex] g(x) = 4x + a \\[3ex] (f \circ g)(x) = f(g(x)) \\[3ex] = f(4x + a) \\[3ex] But,\:\: f(x) = 9x^2 + 1 \\[3ex] = 9(4x + a)^2 + 1 \\[3ex] = 9[(4x + a)(4x +a)] + 1 \\[3ex] = 9(16x^2 + 4ax + 4ax + a^2) + 1 \\[3ex] = 9(16x^2 + 8ax + a^2) + 1 \\[3ex] = 144x^2 + 8ax + 9a^2 + 1 \\[3ex] f \circ g$crosses the$y-axis$at$730144x^2 + 8ax + 9a^2 + 1 = 730$On the$y-axis$,$x-values = 0 144(0)^2 + 8a(0) + 9a^2 + 1 = 730 \\[3ex] 9a^2 + 1 = 730 \\[3ex] 9a^2 = 730 - 1 \\[3ex] 9a^2 = 729 \\[3ex] a^2 = \dfrac{729}{9} \\[5ex] a^2 = 81 \\[3ex] a = \pm \sqrt{81} \\[3ex] a = \pm 9 \\[3ex] a = 9 \:\:OR\:\: a = -9 $(11.) ACT Tables of values for the$2$functions$f$and$g$are shown below. What is the value of$g(f(5))?xf(x)-79-3-71553xg(x)-351-13-55-7 A.\:\: -21 \\[3ex] B.\:\: -7 \\[3ex] C.\:\: -5 \\[3ex] D.\:\: 3 \\[3ex] E.\:\: 9 \\[3ex]  g(f(5)) = ? \\[3ex] f(5) = 3 \\[3ex] g(3) = -5 \\[3ex] \therefore g(f(5)) = -5 $(12.) ACT Let$f(x) = \sqrt{x}$and$g(x) = 10x + b$In the standard$(x, y)$coordinate plane,$y = f(g(x))$passes through$(4, 6)$. What is the value of$b$?$ f(x) = \sqrt{x} \\[3ex] g(x) = 10x + b \\[3ex] (f \circ g)(x) \\[3ex] = f(g(x)) \\[3ex] = f(10x + b) \\[3ex] But, f(x) = \sqrt{x} \\[3ex] f(10x + b) = \sqrt{10x + b} \\[3ex] y = (f \circ g)(x) = \sqrt{10x + b} \\[3ex] Passes\:\:through\:\:(4, 6) \\[3ex] x = 4 \\[3ex] y = 6 \\[3ex] \implies 6 = \sqrt{10(4) + b} \\[3ex] \sqrt{40 + b} = 6 \\[3ex] Square\:\:both\:\:sides \\[3ex] 40 + b = 6^2 \\[3ex] 40 + b = 36 \\[3ex] b = 36 - 40 \\[3ex] b = -4 $(13.)$ A.\:\: -21 \\[3ex] B.\:\: -7 \\[3ex] C.\:\: -5 \\[3ex] D.\:\: 3 \\[3ex] E.\:\: 9 \\[3ex]  g(f(5)) = ? \\[3ex] f(5) = 3 \\[3ex] g(3) = -5 \\[3ex] \therefore g(f(5)) = -5 $(14.) ACT Given$f(x) = x^2 + 3x$and$g(x) = x + 1$, what is$f(g(x))$?$ A.\:\: x^2 + 5x + 4 \\[3ex] B.\:\: x^2 + 3x + 1 \\[3ex] C.\:\: x^3 + 5x^2 + 4x \\[3ex] D.\:\: x^3 + 4x^2 + 3x \\[3ex] E.\:\: x^4 + 4x^3 + 3x^2 \\[3ex]  f(x) = x^2 + 3x \\[3ex] g(x) = x + 1 \\[3ex] f(g(x)) = f(x + 1) \\[3ex] f(x + 1) \implies x = x + 1 \\[3ex] f(x + 1) = (x + 1)^2 + 3(x + 1) \\[3ex] f(x + 1) = (x + 1)(x + 1) + 3x + 3 \\[3ex] f(x + 1) = x^2 + x + x + 1 + 3x + 3 \\[3ex] f(x + 1) = x^2 + 5x + 2 \$