3.9: Function Composition
- Page ID
- 34416
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)The following graphic is once again from the OER textbook Business Calculus by Calaway, Hoffman and Lippman, 2013 and is used with permission (Creative Commons Attribution 3.0 United States License).
Figure 4.9.1The notation \(f(g(x))\) and \(g(f(x))\) may be easier to understand than using the composition operator. For \(f(g(x))\), think of wrapping a package. The gift is put into the box (the gift is \(g(x)\), the box is \(f(x)\)) and the wrapped present, \(f(x)\), contains the gift \(g(x)\).
If \(f(x) = x^2 − 2\) and \(g(x) =\sqrt{x}\), find:
- \(f(g(x))\) and the domain of the composite function
- \(g(f(x))\) and the domain of the composite function
Solution
- The composition of functions, \(f(g(x))\) is:
\(\begin{aligned} f(g(x)) &&\text{ Function composition, }f \text{ of }g\text{ of }x \\ f(\sqrt{x}) &&\text{ Replace } g(x)\text{ with }\sqrt{x} \\ ( \sqrt{x})^2 − 2 && \text{ In the function } f(x)\text{, every }x \text{ is replaced with } g(x) =\sqrt{x} \\ x − 2 && f(g(x))\text{, answer simplified.} \end{aligned}\)
The domain of the composite function contains the restrictions of the domain of the inner function, as well as the restrictions of the composite function.
The domain of the inner function, \(g(x) = \sqrt{x}\) is that \(x\) must be nonnegative, or in interval notation \([0, \infty )\)
The domain of the composite function, \(x − 2\) is all real numbers, \((−\infty , \infty )\)
Therefore, the domain of \(f(g(x))\) is \([0, \infty )\).
- The composition of functions, \(g(f(x))\) is:
\(\begin{aligned} g(f(x)) &&\text{ Function composition, }g \text{ of } f \text{ of } x \\ g(x^2 − 2)&& \text{ Replace }f(x)\text{ with } x^2 − 2 \\ \sqrt{x^2 − 2} &&\text{ In the function } g(x)\text{, every }x \text{ is replaced with } f(x) = x^2−2 \\ x^2 − 2 && g(f(x))\text{, answer simplified. }\end{aligned}\)
The domain of the composite function contains the restrictions of the domain of the inner function, as well as the composite function.
The domain of the inner function, \(f(x) = x^2 − 2\) is all real numbers, or in interval notation \((−\infty , \infty )\)
The domain of the composite function, \(\sqrt{x^2} − 2\) is that the quantity \(x^2 −2\) must be nonnegative, or \(x^2 −2 \geq 0\).
Solving \(x^2 − 2 \geq 0\) for \(x\), \(x \geq 2\) and \(x \leq −2\). In interval notation, \((−\infty , −2] \cup [2, \infty )\)
Therefore, the domain of the composite function, g(f(x)) is the more restrictive domain, \((−\infty , −2] \cup [2, \infty )\).
If \(f(x) = \dfrac{1 }{x − 4}\) and \(g(x) = \dfrac{5 }{x} + 4\), find:
- \(f(g(x))\) and the domain of the composite function
- \(g(f(x))\) and the domain of the composite function
Solution
- The composition of functions, \(f(g(x))\) is:
\(\begin{aligned} f(g(x)) \text{ Function composition, } f\text{ of }g \text{ of }x\\ f\left( \dfrac{5}{ x} + 4\right) && \text{ Replace }g(x)\text{ with }\dfrac{5 }{x} + 4 \\ \dfrac{1 }{\left(5 x + 4\right)− 4} && \text{ In the function } f(x)\text{, every x is replaced with } g(x) = \dfrac{5}{ x} + 4 \\ \dfrac{1 }{\dfrac{5 }{x}}&&\text{ Simplify} \\ \dfrac{x }{5} && f(g(x))\text{, answer simplified. }\end{aligned}\)
The domain of the composite function contains the restrictions of the domain of the inner function, as well as the restrictions of the composite function.
The domain of the inner function, \(g(x) = 5 x + 4\) is all values of \(x\) such that \(x\) must not be 0, or in interval notation \((−\infty , 0) \cup (0, \infty )\)
The domain of the composite function, \(\dfrac{x }{5}\) is all real numbers, \((−\infty , \infty )\) Therefore, the domain of \(f(g(x))\) is \((−\infty , 0) \cup (0, \infty )\)
- The composition of functions, \(g(f(x))\) is
\(\begin{aligned} g(f(x))&&\text{Function composition, } g \text{ of } f\text{ of }x \\ g\left( \dfrac{1 }{x −4}\right) &&\text{Replace } f(x) \text{ with }\dfrac{1}{ x − 4}\\ \dfrac{5 }{\dfrac{1 }{x − 4}} + 4 &&\text{In the function } g(x)\text{, every x is replaced with } f(x) = \dfrac{1 }{x − 4}\\ 5(x − 4) + 4 && \text{ Simplify the fraction} \\ 5x − 20 + 4 &&\text{ Simplify more}\\ 5x − 16 && g(f(x))\text{, answer simplified.} \end{aligned}\)
The domain of the composite function contains the restrictions of the domain of the inner function, as well as the composite function.
The domain of the inner function, \(f(x) = \dfrac{1}{ x − 4 }\) is that \(x\neq 4\), or in interval notation \((−\infty , 4) \cup (4, \infty )\)
The domain of the composite function, \(5x − 16\) is all real numbers, \((−\infty , \infty )\).
Therefore, the domain of the composite function, \(g(f(x))\) is the more restrictive domain, \((−\infty , 4) \cup (4, \infty)\).
For the given functions, find both \(f(g(x))\) and \(g(f(x))\), and find the domain of the composite function.
- \(f(x) = 3x^ 2 + x − 10\), \(g(x) = 1 − 20x\)
- \(f(x) = 3x − 2\), \(g(x) = \dfrac{1}{ 3} x + \dfrac{2 }{3}\)
- \(f(x) = 4x − 1\), \(g(x) = \sqrt{6 + 7x}\)
- \(f(x) = 5x + 2\), \(g(x) = x^2 − 14x\)
- \(f(x) = x^ 2 − 2x + 1\), \(g(x) = 8 − 3x ^2\)
- \(f(x) = x ^2 + 3\), \(g(x) = \sqrt{5 + x^2} \)