Composite Functions¶
Functions can be chained, for example \(gf(5)\), these are called composite functions.
Example¶
Example functions: \(f(x) = 7x - 3\) and \(g(x) = 3x + 8\). Given these examples, \(gf(3)\) would equal \(62\).
\[
\begin{align}
f(3) & = 7(3) - 3 \\
& = 21 = 3 \\
& = 18 \\ \\
g(18) & = 3(18) + 8 \\
& = 54 + 8 \\
& = 62 \\
\end{align}
\]
Algebraic Example¶
Using the previously given example functions, you could work out a function for \(gf(x)\).
\[
\begin{align}
gf(x) & = 3(7x - 3) + 8 \\
& = 21x - 9 + 8 \\
& = 21x -1
\end{align}
\]
Given that \(gf(x) = 21x - 7\), you can work out \(gf(3)\) using a single function.
\[
\begin{align}
gf(x) & = 21(3) - 1 \\
& = 63 -1 \\
& = 62
\end{align}
\]
Except as otherwise noted, the content of this page is licenced under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Mozilla Public License 2.0.