Back to homeMathematics · Secondary Year 5 · Change subject
Start for free
Secondary 5 · Mathematics
Functions · Real functions

Composition of Functions

An electronics store in Santiago first applies a $15\%$ discount and then subtracts a fixed coupon of $\text{RD}\$200$. Does it make no difference if you subtract the coupon first and then apply the discount? The final price depends on the starting price through two functions applied one after the other. This operation is called composition, and the order in which the functions are applied changes the result.

What it means to compose two functions

Sequential diagram of composition: the input x enters function f to produce f(x), and this result is fed into function g to generate g(f(x)). x f f(x) g g(f(x)) (g ∘ f)(x) = g(f(x)): first f, then g

You can also chain three functions: $(h \circ g \circ f)(x) = h(g(f(x)))$. You always work from the inside out, starting with the function closest to the $x$.

Composing by reading graphs

If you don't have the formulas but you do have the graphs, the procedure is the same, from the inside out. For $(f \circ g)(2)$: find $x=2$ on the horizontal axis, go up to the graph of $g$, and read its height; that value $g(2)$ is the new input. Then find that number on the horizontal axis, go up to the graph of $f$, and read its height. That height is $(f \circ g)(2)$.

Practice★☆☆Not started
Given the functions $f(x) = 3x + 2$ and $g(x) = x^2 - 1$, calculate the numerical value of the composite function $(g \circ f)(2)$.

Given the functions $f(x) = 3x + 2$ and $g(x) = x^2 - 1$, calculate the numerical value of the composite function $(g \circ f)(2)$.

Solve
Practice★☆☆Not started
Consider the functions $f(x) = x - 2$, $g(x) = 3x$ and $h(x) = x^2$. Calculate the numerical value of the repeated composite function $(h \circ g \circ f)(4)$.

Consider the functions $f(x) = x - 2$, $g(x) = 3x$ and $h(x) = x^2$. Calculate the numerical value of the repeated composite function $(h \circ g \circ f)(4)$.

Solve
Practice★★☆Not started
Observe the following graph where the functions $f(x)$ (in blue) and $g(x)$ (in green) are represented. From the visual information and without needing to obtain their…

Observe the following graph where the functions $f(x)$ (in blue) and $g(x)$ (in green) are represented. From the visual information and without needing to obtain their algebraic expressions, determine the numerical values of $(f \circ g)(2)$ and $(g \circ f)(-1)$.

X Y f(x) g(x)
Solve

Algebraic expression of the composition

Composition is also useful for chaining quantities. If the radius of a wave grows with time, $r(t)=2.5t$, and the area depends on the radius, $A(r)=\pi r^2$, then $(A \circ r)(t) = \pi (2.5t)^2 = 6.25\pi t^2$: the area is now written directly as a function of time.

Decomposing a function

Sometimes you have to go the other way: see a function as a chain of simpler functions.

If you are given the composite and the inner function, you can find the outer one by writing the composite in terms of $f(x)$. For example, if $f(x)=x+1$ and $(g\circ f)(x)=x^2+2x+1=(x+1)^2$, then $g(x)=x^2$.

Practice★☆☆Not started
Find the algebraic expression for the composite function $(f \circ g)(x)$ given that $f(x) = 5x - 4$ and $g(x) = x^2 + 3x$.

Find the algebraic expression for the composite function $(f \circ g)(x)$ given that $f(x) = 5x - 4$ and $g(x) = x^2 + 3x$.

Solve
Practice★☆☆Not started
Given the composite function $h(x) = \sqrt{2x + 5}$, express it as the composite of two simpler functions $(g \circ f)(x)$, clearly stating the expression for $f(x)$ and…

Given the composite function $h(x) = \sqrt{2x + 5}$, express it as the composite of two simpler functions $(g \circ f)(x)$, clearly stating the expression for $f(x)$ and for $g(x)$.

Solve
Practice★★☆Not started
The daily production cost of $x$ parts in a factory is given by the function $C(x) = 900x + 30\,000$ pesos. The number of parts assembled by a machine in $t$ hours of…

The daily production cost of $x$ parts in a factory is given by the function $C(x) = 900x + 30\,000$ pesos. The number of parts assembled by a machine in $t$ hours of continuous operation is $x(t) = 40t$. Express the production cost as a function of the machine's operating time and calculate the total cost after a shift of $8$ hours.

Solve
Practice★★☆Not started
Given that $f(x) = 3x + 2$ and that the composite function is $(g \circ f)(x) = 9x^2 + 12x + 5$, determine the algebraic expression for the outer function $g(x)$.

Given that $f(x) = 3x + 2$ and that the composite function is $(g \circ f)(x) = 9x^2 + 12x + 5$, determine the algebraic expression for the outer function $g(x)$.

Solve

Composition is not commutative

The store example confirms it: applying the $15\%$ first and then subtracting the coupon does not give the same final price as subtracting the coupon first and then applying the $15\%$.

Some functions are special. The identity function $I(x)=x$ changes nothing: $(f \circ I)(x) = f(x) = (I \circ f)(x)$. A constant function $f(x)=7$ always gives $7$, so $(g \circ f)(x)=g(7)$ is a fixed number, while $(f \circ g)(x)=7$.

Practice★☆☆Not started
Using the functions $f(x) = 5x - 4$ and $g(x) = x^2 + 3x$, find the expression for $(g \circ f)(x)$ and prove analytically that function composition is not commutative.

Using the functions $f(x) = 5x - 4$ and $g(x) = x^2 + 3x$, find the expression for $(g \circ f)(x)$ and prove analytically that function composition is not commutative.

Solve
Practice★☆☆Not started
Given the rational functions $f(x) = \frac{2}{x}$ and $g(x) = x + 3$, determine the simplified expression for $(f \circ g)(x)$ and for $(g \circ f)(x)$.

Given the rational functions $f(x) = \frac{2}{x}$ and $g(x) = x + 3$, determine the simplified expression for $(f \circ g)(x)$ and for $(g \circ f)(x)$.

Solve
Practice★☆☆Not started
Given the constant function $f(x) = 7$ and the quadratic function $g(x) = 2x^2 - x$, determine the algebraic expressions for $(f \circ g)(x)$ and $(g \circ f)(x)$.

Given the constant function $f(x) = 7$ and the quadratic function $g(x) = 2x^2 - x$, determine the algebraic expressions for $(f \circ g)(x)$ and $(g \circ f)(x)$.

Solve
Practice★☆☆Not started
Prove analytically that composing the function $f(x) = \frac{3x + 1}{x - 2}$ with the identity function $I(x) = x$ yields the original function itself. Calculate and…

Prove analytically that composing the function $f(x) = \frac{3x + 1}{x - 2}$ with the identity function $I(x) = x$ yields the original function itself. Calculate and simplify both $(f \circ I)(x)$ and $(I \circ f)(x)$.

Solve
Practice★★☆Not started
An electronics store applies a discount of $15\%$ to all its products, which is modeled by the function $d(x) = 0.85x$. In addition, a customer has a loyalty voucher for…

An electronics store applies a discount of $15\%$ to all its products, which is modeled by the function $d(x) = 0.85x$. In addition, a customer has a loyalty voucher for a direct discount of $1\,200$ pesos, modeled by the function $c(x) = x - 1\,200$. Determine the expressions for $(c \circ d)(x)$ and $(d \circ c)(x)$. Which order of composition benefits the customer more if they want to buy a computer with an initial price of $36\,000$ pesos?

Solve
Practice★★☆Not started
Given the functions $f(x) = 2x + k$ and $g(x) = 4x - 3$, find the value of the parameter $k$ so that the commutative property holds in this particular case, that is,…

Given the functions $f(x) = 2x + k$ and $g(x) = 4x - 3$, find the value of the parameter $k$ so that the commutative property holds in this particular case, that is, $(f \circ g)(x) = (g \circ f)(x)$ for any value of $x$.

Solve

Composing a function with itself

If a function is composed with itself, $(f \circ f)(x)=f(f(x))$, you substitute the formula for $f$ in place of $x$ in $f$ itself. The notation $f^{[n]}$ means composing $f$ with itself $n$ times: $f^{[2]}=f\circ f$, $f^{[3]}=f\circ f\circ f$. It is not a power: $f^{[2]}(x)\neq (f(x))^2$.

Calculating the first few iterates and looking for a pattern lets you deduce $f^{[n]}$. If $f \circ f$ gives $x$, then $f$ is its own inverse.

When an iterate gives the identity ($f^{[2]}(x)=x$), the pattern has period 2: even iterates equal $x$ and odd iterates equal $f(x)$. That is the idea for deducing $f^{[n]}$ according to the parity of $n$.

Practice★★★Not started
Let $f(x) = \frac{x}{x - 1}$ be the rational function. Calculate the successive compositions $(f \circ f)(x)$ and $(f \circ f \circ f)(x)$. From the results obtained,…

Let $f(x) = \frac{x}{x - 1}$ be the rational function. Calculate the successive compositions $(f \circ f)(x)$ and $(f \circ f \circ f)(x)$. From the results obtained, deduce with justification the expression of $f^{[n]}(x)$ (the composition of $f$ with itself $n$ times) depending on whether $n$ is an even or an odd number.

Solve
Practice★★★Not started
Prove algebraically that, if $f(x) = \frac{ax + b}{cx - a}$ (with the condition $a^2 + bc \neq 0$), the function is its own inverse by verifying that…

Prove algebraically that, if $f(x) = \frac{ax + b}{cx - a}$ (with the condition $a^2 + bc \neq 0$), the function is its own inverse by verifying that $(f \circ f)(x) = x$ for all $x$ belonging to its domain.

Solve

Domain of the composite function

When $f$ is defined piecewise, the composition is also defined piecewise: you decide which interval the value $g(x)$ falls in and use the corresponding branch of $f$.

Practice★★☆Not started
Rigorously determine the domain of the composite function $(g \circ f)(x)$ given that $f(x) = x - 4$ and $g(x) = \sqrt{x}$.

Rigorously determine the domain of the composite function $(g \circ f)(x)$ given that $f(x) = x - 4$ and $g(x) = \sqrt{x}$.

Solve
Practice★★★Not started
Given the functions $f(x)$ and $g(x)$, where $f(x) = 2x$ if $x < 1$ and $f(x) = x^2$ if $x \geq 1$, and the function $g(x) = x + 3$. Determine the complete algebraic…

Given the functions $f(x)$ and $g(x)$, where $f(x) = 2x$ if $x < 1$ and $f(x) = x^2$ if $x \geq 1$, and the function $g(x) = x + 3$. Determine the complete algebraic expression for the composite function $(f \circ g)(x)$, paying special attention to the intervals of definition.

Solve
Practice★★★Not started
Consider the functions $f(x) = \sqrt{x + 3}$ and $g(x) = \frac{1}{x^2 - 4}$. Perform a rigorous analytical study to determine the domain of definition of the composite…

Consider the functions $f(x) = \sqrt{x + 3}$ and $g(x) = \frac{1}{x^2 - 4}$. Perform a rigorous analytical study to determine the domain of definition of the composite function $(f \circ g)(x)$.

Solve

More applications

Composition appears when one quantity depends on another that, in turn, depends on a third: electricity demand depends on temperature and temperature depends on time; cost depends on the number of parts and the number of parts depends on the hours worked; the surface area of a balloon depends on its radius and the radius depends on the volume, which grows with time.

To substitute two chained formulas, such as $V(t)=12t$ and $V=\frac{4}{3}\pi r^3$, first solve for the radius in terms of the volume and then substitute the volume with its expression in $t$.

Practice★★☆Not started
When a stone is dropped into a pond, a circular ripple is formed whose radius increases over time according to the function $r(t) = 2.5t$ (with $r$ in centimeters and…

When a stone is dropped into a pond, a circular ripple is formed whose radius increases over time according to the function $r(t) = 2.5t$ (with $r$ in centimeters and $t$ in seconds). Given that the area of the circle is given by $A(r) = \pi r^2$, find the function $(A \circ r)(t)$ describing the area as a function of time and calculate the area of the affected surface after $4$ seconds.

Solve
Practice★★☆Not started
The electricity demand of a city, in megawatts, depends on the ambient temperature according to the function $D(T) = 50T^2 - 100T + 200$. In turn, the temperature varies…

The electricity demand of a city, in megawatts, depends on the ambient temperature according to the function $D(T) = 50T^2 - 100T + 200$. In turn, the temperature varies with time in hours according to $T(t) = 1.5t + 10$. Calculate the exact electricity demand after $6$ hours.

Solve
Practice★★★Not started
A spherical hot-air balloon is inflated using a compressor that injects air at a constant rate, such that its volume in cubic meters is given by $V(t) = 12t$ (with $t$…

A spherical hot-air balloon is inflated using a compressor that injects air at a constant rate, such that its volume in cubic meters is given by $V(t) = 12t$ (with $t$ in minutes). Knowing that the volume of a sphere is $V = \frac{4}{3}\pi r^3$ and its surface area is $S = 4\pi r^2$, find the composite function $S(t)$ that gives the surface area of the balloon directly as a function of the time elapsed.

Solve
Practice★★★Not started
A light beam passes through a series of optical filters. A type A filter reduces light intensity by $20\%$, modelled by $f_A(I) = 0.8I$. A type B filter reduces…

A light beam passes through a series of optical filters. A type A filter reduces light intensity by $20\%$, modelled by $f_A(I) = 0.8I$. A type B filter reduces intensity by a fixed amount of $15 \text{ W/m}^2$, modelled by $f_B(I) = I - 15$. If the initial intensity is $I_0$, find the expression for the final intensity after passing through $3$ type A filters followed by $2$ type B filters. Is the result equivalent to passing through the $2$ type B filters first and then the $3$ type A filters?

Solve
Practice★★★Not started
Observe the graph of the function $f(x)$. From it, obtain the piecewise analytical expression for $f(x)$ and calculate the detailed algebraic expression for…

Observe the graph of the function $f(x)$. From it, obtain the piecewise analytical expression for $f(x)$ and calculate the detailed algebraic expression for $(f \circ f)(x)$.

f(x) 2 −2 2 X Y
Solve
Practice★★★Not started
Decompose the complex function $H(x) = \frac{1}{\sqrt{3^{\sin x} + 2}}$ as the successive composition of four elementary functions $f_1, f_2, f_3, f_4$ such that…

Decompose the complex function $H(x) = \frac{1}{\sqrt{3^{\sin x} + 2}}$ as the successive composition of four elementary functions $f_1, f_2, f_3, f_4$ such that $H(x) = (f_4 \circ f_3 \circ f_2 \circ f_1)(x)$. Clearly state the algebraic expression for each of the four functions.

Solve

Back to the beginning: with the $15\%$ discount $d(x)=0.85x$ and the coupon $c(x)=x-200$, the store applies $(c \circ d)(x) = 0.85x - 200$. For an item costing $\text{RD}\$1{,}000$ you would pay $\text{RD}\$650$, whereas with the reverse order $(d \circ c)(1000) = 0.85 \times 800 = \text{RD}\$680$. It is better to take off the percentage first and then the coupon.

Summary

See all the exercises in this section