Composition Chains Examples: 44 Problems with Answers

Worked examples of Composition Chains to try before you open each solution, then practice problems with answers.

Worked Examples

Example 1

easy
Let f(x)=x+1, g(x)=2x, h(x)=x2. Compute (f∘g∘h)(3) step by step.
Show solution

Answer

(f∘g∘h)(3)=19

First step

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

Full solution

  1. 2.
    Apply g: g(h(3))=g(9)=2(9)=18.
  2. 3.
    Apply f: f(g(h(3)))=f(18)=18+1=19. So (f∘g∘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) and (f∘g)(x) where f(x)=x2+1 and g(x)=x. Show they are not equal.

Example 3

medium
Let f(x)=x2−1 and g(x)=x+1. Find (f∘g)(x) and state where it is defined.

Example 4

medium
Given f(x)=ex, g(x)=2x, h(x)=x+3, find (f∘g∘h)(x).

Example 5

medium
Decompose H(x)=(x+4)5 into two simpler functions f and g so that H=f∘g.

Example 6

hard
Decompose H(x)=sin⁡(3x) into three simpler functions.

Example 7

hard
Given f(x)=x2+1 and (g∘f)(x)=2x2+5, find g(x).

Example 8

hard
Let f(x)=x+a and g(x)=bx. Find a and b so that (f∘g)(x)=2x+5 and (g∘f)(x)=2x+10.

Example 9

challenge
Let f(x)=xx+1 defined for x≠−1. Find f(f(f(x))) in simplest form.

Practice Problems

Try each one, then open the solution to compare your method.

Example 1

easy
Given f(x)=3x−1 and g(x)=x2, find (f∘g)(x) and evaluate it at x=2.

Example 2

hard
Decompose H(x)=sin⁡(ex2) as a composition H=f∘g∘h of three simpler functions.

Example 3

easy
If f(x)=x+1 and g(x)=2x, find (f∘g)(3)=f(g(3)).

Example 4

easy
If g(x)=x2 and f(x)=x−5, find (g∘f)(7)=g(f(7)).

Example 5

easy
With h(x)=x+2, g(x)=3x, f(x)=x−1, find (f∘g∘h)(1).

Example 6

easy
If f(x)=x+4 and g(x)=x−4, find (f∘g)(x).

Example 7

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

Example 8

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

Example 9

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

Example 10

easy
If f(x)=x and g(x)=x+9, find (f∘g)(7).

Example 11

medium
With f(x)=x2 and g(x)=x−3, write both (f∘g)(x) and (g∘f)(x) and find where they are equal.

Example 12

medium
If (f∘g)(x)=f(g(x)) with g(x)=x+1 and (f∘g)(x)=x2+2x+1, find f(x).

Example 13

medium
Express H(x)=3x+1 as a composition f(g(x)) with f and g as simple as possible.

Example 14

medium
With f(x)=x+1 applied repeatedly, find (f∘f∘f)(x) (apply f three times).

Example 15

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

Example 16

medium
Functions: h(x)=x2, g(x)=x+1, f(x)=3x. Compute (f∘g∘h)(2).

Example 17

medium
Two functions: f(x)=1x (domain x≠0) and g(x)=x−2. State the domain restriction needed for (f∘g)(x).

Example 18

challenge
Given f(x)=x+a and g(x)=bx, find conditions on a and b so that f∘g=g∘f for all x.

Example 19

challenge
If f(f(x))=x for all x and f(x)=a−x1 form f(x)=c−x, verify f is its own inverse and find f(f(5)) for c=8.

Example 20

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

Example 21

medium
With f(x)=x2 and g(x)=x+2, find (g∘f)(3) and (f∘g)(3) to show they differ.

Example 22

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

Example 23

easy
Let f(x)=x+5 and g(x)=2x. Find (f∘g)(4).

Example 24

easy
Let f(x)=x2 and g(x)=x+1. Find (g∘f)(3).

Example 25

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

Example 26

easy
Let f(x)=x and g(x)=x+16. Find (f∘g)(0).

Example 27

easy
Let f(x)=2x+1 and g(x)=x−4. Write the formula for (g∘f)(x).

Example 28

medium
For f(x)=1/x and g(x)=x−2, find (g∘f)(x) and state where it is defined.

Example 29

medium
Let f(x)=2x−1 and g(x)=(x+1)/2. Compute (f∘g)(x) and (g∘f)(x).

Example 30

medium
If f(x)=x2 and g(x)=3x+1, find (f∘g)(x) and (g∘f)(x) as formulas.

Example 31

medium
For f(x)=ln⁡(x) and g(x)=x2+1, find the domain of (f∘g)(x).

Example 32

medium
Given f(x)=2x, compute (f∘f∘f)(5).

Example 33

hard
If f(x)=ax+b and (f∘f)(x)=9x+8, find a and b (with a>0).

Example 34

hard
For f(x)=x and g(x)=4−x2, find the domain of (f∘g)(x).

Example 35

hard
For f(x)=x2 and g(x)=x−3, find all x with (f∘g)(x)=(g∘f)(x).

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.

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

Concept recap

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

Nested gift boxes: you put the gift in the smallest box first, then that box into a bigger one, then into the biggest. The innermost box is handled first even though, in f(g(h(x))), it is written last. Unwrapping runs the other way, outer layer first, which is how an inverse undoes a chain.

Read the full lesson on Composition Chains

Background knowledge

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

composition