Composition Chains Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Composition Chains.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

A composition chain is a sequence of functions applied one after another: (fโˆ˜gโˆ˜h)(x)=f(g(h(x)))(f \circ g \circ h)(x) = f(g(h(x))), evaluated inside-out from right to left.

Work from the innermost function outward โ€” compute h(x)h(x) first, then feed that result to gg, then feed that to ff. The order matters critically.

Read the full concept explanation โ†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: A composition chain feeds one function's output into the next, evaluated from the innermost function outward.

Common stuck point: The procedure for composition chains is the easy part; the trap is evaluating left to right. Asking "Is one function's output being fed as the input to the next in a fixed order?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Is one function's output being fed as the input to the next in a fixed order?

Worked Examples

Example 1

easy
Let f(x)=x+1f(x)=x+1, g(x)=2xg(x)=2x, h(x)=x2h(x)=x^2. Compute (fโˆ˜gโˆ˜h)(3)(f\circ g\circ h)(3) step by step.

Answer

(fโˆ˜gโˆ˜h)(3)=19(f\circ g\circ h)(3) = 19

First step

1
Start from the innermost function: h(3)=32=9h(3)=3^2=9.

Full solution

  1. 2
    Apply gg: g(h(3))=g(9)=2(9)=18g(h(3))=g(9)=2(9)=18.
  2. 3
    Apply ff: f(g(h(3)))=f(18)=18+1=19f(g(h(3)))=f(18)=18+1=19. So (fโˆ˜gโˆ˜h)(3)=19(f\circ g\circ h)(3)=19.
Function composition chains are evaluated from right to left (innermost to outermost). The output of each function becomes the input of the next. Keeping track of this order is essential for correct computation.

Example 2

medium
Find the formula for (gโˆ˜f)(x)(g\circ f)(x) and (fโˆ˜g)(x)(f\circ g)(x) where f(x)=x2+1f(x)=x^2+1 and g(x)=xg(x)=\sqrt{x}. Show they are not equal.

Example 3

medium
Let f(x)=x2โˆ’1f(x) = x^2 - 1 and g(x)=x+1g(x) = \sqrt{x + 1}. Find (fโˆ˜g)(x)(f \circ g)(x) and state where it is defined.

Example 4

medium
Given f(x)=exf(x) = e^x, g(x)=2xg(x) = 2x, h(x)=x+3h(x) = x + 3, find (fโˆ˜gโˆ˜h)(x)(f \circ g \circ h)(x).

Example 5

medium
Decompose H(x)=(x+4)5H(x) = (x + 4)^5 into two simpler functions ff and gg so that H=fโˆ˜gH = f \circ g.

Example 6

hard
Decompose H(x)=sinโก(3x)H(x) = \sqrt{\sin(3x)} into three simpler functions.

Example 7

hard
Given f(x)=x2+1f(x) = x^2 + 1 and (gโˆ˜f)(x)=2x2+5(g \circ f)(x) = 2x^2 + 5, find g(x)g(x).

Example 8

hard
Let f(x)=x+af(x) = x + a and g(x)=bxg(x) = bx. Find aa and bb so that (fโˆ˜g)(x)=2x+5(f \circ g)(x) = 2x + 5 and (gโˆ˜f)(x)=2x+10(g \circ f)(x) = 2x + 10.

Example 9

challenge
Let f(x)=xx+1f(x) = \dfrac{x}{x + 1} defined for xโ‰ โˆ’1x \neq -1. Find f(f(f(x)))f(f(f(x))) in simplest form.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Given f(x)=3xโˆ’1f(x)=3x-1 and g(x)=x2g(x)=x^2, find (fโˆ˜g)(x)(f\circ g)(x) and evaluate it at x=2x=2.

Example 2

hard
Decompose H(x)=sinโก(ex2)H(x)=\sin(e^{x^2}) as a composition H=fโˆ˜gโˆ˜hH=f\circ g\circ h of three simpler functions.

Example 3

easy
If f(x)=x+1f(x) = x + 1 and g(x)=2xg(x) = 2x, find (fโˆ˜g)(3)=f(g(3))(f \circ g)(3) = f(g(3)).

Example 4

easy
If g(x)=x2g(x) = x^2 and f(x)=xโˆ’5f(x) = x - 5, find (gโˆ˜f)(7)=g(f(7))(g \circ f)(7) = g(f(7)).

Example 5

easy
With h(x)=x+2h(x) = x + 2, g(x)=3xg(x) = 3x, f(x)=xโˆ’1f(x) = x - 1, find (fโˆ˜gโˆ˜h)(1)(f \circ g \circ h)(1).

Example 6

easy
If f(x)=x+4f(x) = x + 4 and g(x)=xโˆ’4g(x) = x - 4, find (fโˆ˜g)(x)(f \circ g)(x).

Example 7

easy
If f(x)=2xf(x) = 2x and g(x)=x+3g(x) = x + 3, write the formula for f(g(x))f(g(x)).

Example 8

easy
If f(x)=2xf(x) = 2x and g(x)=x+3g(x) = x + 3, write the formula for g(f(x))g(f(x)) and note it differs from f(g(x))f(g(x)).

Example 9

easy
Given the chain f(g(h(x)))f(g(h(x))), which function is applied to xx FIRST?

Example 10

easy
If f(x)=xf(x) = \sqrt{x} and g(x)=x+9g(x) = x + 9, find (fโˆ˜g)(7)(f \circ g)(7).

Example 11

medium
With f(x)=x2f(x) = x^2 and g(x)=xโˆ’3g(x) = x - 3, write both (fโˆ˜g)(x)(f \circ g)(x) and (gโˆ˜f)(x)(g \circ f)(x) and find where they are equal.

Example 12

medium
If (fโˆ˜g)(x)=f(g(x))(f \circ g)(x) = f(g(x)) with g(x)=x+1g(x) = x + 1 and (fโˆ˜g)(x)=x2+2x+1(f \circ g)(x) = x^2 + 2x + 1, find f(x)f(x).

Example 13

medium
Express H(x)=3x+1H(x) = \sqrt{3x + 1} as a composition f(g(x))f(g(x)) with ff and gg as simple as possible.

Example 14

medium
With f(x)=x+1f(x) = x + 1 applied repeatedly, find (fโˆ˜fโˆ˜f)(x)(f \circ f \circ f)(x) (apply ff three times).

Example 15

medium
With f(x)=2xf(x) = 2x applied repeatedly, find a formula for applying ff exactly nn times to xx.

Example 16

medium
Functions: h(x)=x2h(x) = x^2, g(x)=x+1g(x) = x + 1, f(x)=3xf(x) = 3x. Compute (fโˆ˜gโˆ˜h)(2)(f \circ g \circ h)(2).

Example 17

medium
Two functions: f(x)=1xf(x) = \frac{1}{x} (domain xโ‰ 0x \ne 0) and g(x)=xโˆ’2g(x) = x - 2. State the domain restriction needed for (fโˆ˜g)(x)(f \circ g)(x).

Example 18

challenge
Given f(x)=x+af(x) = x + a and g(x)=bxg(x) = bx, find conditions on aa and bb so that fโˆ˜g=gโˆ˜ff \circ g = g \circ f for all xx.

Example 19

challenge
If f(f(x))=xf(f(x)) = x for all xx and f(x)=aโˆ’x1f(x) = \frac{a - x}{1} form f(x)=cโˆ’xf(x) = c - x, verify ff is its own inverse and find f(f(5))f(f(5)) for c=8c = 8.

Example 20

challenge
Decompose H(x)=(2x+5)3+1H(x) = (2x + 5)^3 + 1 into a chain f(g(h(x)))f(g(h(x))) of three simple functions and identify the application order.

Example 21

medium
With f(x)=x2f(x) = x^2 and g(x)=x+2g(x) = x + 2, find (gโˆ˜f)(3)(g \circ f)(3) and (fโˆ˜g)(3)(f \circ g)(3) to show they differ.

Example 22

medium
If f(g(x))=6x+4f(g(x)) = 6x + 4 and g(x)=2xg(x) = 2x, find f(x)f(x).

Example 23

easy
Let f(x)=x+5f(x) = x + 5 and g(x)=2xg(x) = 2x. Find (fโˆ˜g)(4)(f \circ g)(4).

Example 24

easy
Let f(x)=x2f(x) = x^2 and g(x)=x+1g(x) = x + 1. Find (gโˆ˜f)(3)(g \circ f)(3).

Example 25

easy
For f(x)=x+3f(x) = x + 3 and g(x)=4xg(x) = 4x, find g(f(2))g(f(2)).

Example 26

easy
Let f(x)=xf(x) = \sqrt{x} and g(x)=x+16g(x) = x + 16. Find (fโˆ˜g)(0)(f \circ g)(0).

Example 27

easy
Let f(x)=2x+1f(x) = 2x + 1 and g(x)=xโˆ’4g(x) = x - 4. Write the formula for (gโˆ˜f)(x)(g \circ f)(x).

Example 28

medium
For f(x)=1/xf(x) = 1/x and g(x)=xโˆ’2g(x) = x - 2, find (gโˆ˜f)(x)(g \circ f)(x) and state where it is defined.

Example 29

medium
Let f(x)=2xโˆ’1f(x) = 2x - 1 and g(x)=(x+1)/2g(x) = (x + 1)/2. Compute (fโˆ˜g)(x)(f \circ g)(x) and (gโˆ˜f)(x)(g \circ f)(x).

Example 30

medium
If f(x)=x2f(x) = x^2 and g(x)=3x+1g(x) = 3x + 1, find (fโˆ˜g)(x)(f \circ g)(x) and (gโˆ˜f)(x)(g \circ f)(x) as formulas.

Example 31

medium
For f(x)=lnโก(x)f(x) = \ln(x) and g(x)=x2+1g(x) = x^2 + 1, find the domain of (fโˆ˜g)(x)(f \circ g)(x).

Example 32

medium
Given f(x)=2xf(x) = 2x, compute (fโˆ˜fโˆ˜f)(5)(f \circ f \circ f)(5).

Example 33

hard
If f(x)=ax+bf(x) = ax + b and (fโˆ˜f)(x)=9x+8(f \circ f)(x) = 9x + 8, find aa and bb (with a>0a > 0).

Example 34

hard
For f(x)=xf(x) = \sqrt{x} and g(x)=4โˆ’x2g(x) = 4 - x^2, find the domain of (fโˆ˜g)(x)(f \circ g)(x).

Example 35

hard
For f(x)=x2f(x) = x^2 and g(x)=xโˆ’3g(x) = x - 3, find all xx with (fโˆ˜g)(x)=(gโˆ˜f)(x)(f \circ g)(x) = (g \circ f)(x).

Background Knowledge

These ideas may be useful before you work through the harder examples.

composition