EN FR

FUN-1: Function Notation and Operations

Module 3 · Functions and Models

Section 1: Introduction

Here is a rule you have quietly been using since middle school, but probably never had a name for: every time you wrote \( y = 3x + 2 \) or \( y = x^2 \), you were saying — same input, same output, every time. That is a function. And it turns out that all of calculus is about how functions change.

But notation matters enormously here, and most calculus errors come from misreading what the notation actually says. The expression \( f(x) \) does not mean "f multiplied by x." It means "apply the rule named f to the input x." Those are completely different things.

And here is the expression that follows you through every single lesson in calculus:

\[ \frac{f(x+h) - f(x)}{h} \]

To work with this difference quotient, you need to know exactly what \( f(x+h) \) means — and why it is completely different from \( f(x) + h \). You will learn both today. The difference quotient itself arrives in BTC-2; this lesson builds the toolkit.

After this lesson, you will be able to:

  • Identify whether a relation is a function, using the definition and the Vertical Line Test
  • Evaluate a function f at any input — constants, expressions, and the critical \( f(x+h) \)
  • Combine two functions using addition, subtraction, multiplication, and division
  • Compute the composition of two functions: \( (f \circ g)(x) = f(g(x)) \)
  • Decompose a complex function into simpler inside and outside parts — the essential skill for the chain rule

Section 2: Prerequisites

FUN-1 builds on two earlier lessons. Here is exactly what you will need from each.

From ALG-2 (Exponent Laws and Radicals) — you need these when evaluating \( f(x+h) \):

  • Squaring a binomial: \( (x + h)^2 = x^2 + 2xh + h^2 \) — not \( x^2 + h^2 \). The middle term \( 2xh \) is the one that decides everything in calculus.
  • No shortcuts: \( (x+h)^n \) requires a full expansion — you cannot just power each term separately. The Freshman's Dream error, \( (a+b)^n = a^n + b^n \), will break every difference quotient you ever write.

From COM-1 (Formal Notation and Logic) — notation precision that matters here:

  • f(x) is not multiplication. Parentheses after a function name mean "apply to this input" — not "times."
  • Domain and set notation: Domain \( = \{\, x \in \mathbb{R} : \text{condition} \,\} \) — you will read and write this throughout FUN-1 and FUN-2.

Quick self-check before you start:

Section 3: Core Concepts

C1 — What Is a Function?

Function

A function f from a set A to a set B is a rule that assigns exactly one output \( f(x) \) in B to each input x in A. The set A is the domain; the set of all actual outputs is the range.

The key word is exactly one. An input cannot produce two different outputs. Think of a vending machine: you press B3 and you always get the same snack. If pressing B3 sometimes gave you chips and sometimes gave you a soda, it would be broken — not a function.

Vertical Line Test

A graph represents a function if and only if every vertical line intersects it at most once. Two intersection points on any vertical line means one x-value maps to two y-values — that is not a function.

A circle is not a function. The equation \( x^2 + y^2 = 25 \) describes a circle. A vertical line at \( x = 3 \) crosses it at \( (3, 4) \) and \( (3, -4) \) — two outputs for one input. To make it a function, you must restrict to either the top half \( y = \sqrt{25 - x^2} \) or the bottom half \( y = -\sqrt{25 - x^2} \).

C2 — Function Notation and Evaluation

Function Notation

The notation f(x) (read "f of x") means: apply the rule named f to the input value x. It does not mean f multiplied by x.

To evaluate f at any input: replace every occurrence of x in the formula with the new input. The input can be a number, a variable, or an entire expression.

The most important input you will ever substitute is not a number — it is the expression (x + h):

\[ f(x) = 2x^2 - 3x + 1 \]

\[ f(\mathbf{x+h}) = 2(\mathbf{x+h})^2 - 3(\mathbf{x+h}) + 1 \]

Every x in the formula becomes (x + h). The parentheses are not optional — they ensure the expression stays grouped when you expand.

\( f(x+h) \neq f(x) + h \) and \( f(x+h) \neq f(x) + f(h) \).

For \( f(x) = x^2 \), the correct computation is:

\[ f(x+h) = (x+h)^2 = x^2 + 2xh + h^2 \]

But \( f(x) + h = x^2 + h \) — the cross term \( 2xh \) is missing, and h is used wrong. And \( f(x) + f(h) = x^2 + h^2 \) — still missing \( 2xh \). The only correct approach is to substitute \( (x+h) \) for every x, then expand.

C3 — Function Operations

Arithmetic on Functions

Given two functions f and g with overlapping domains, define:

  • Sum: \( (f + g)(x) = f(x) + g(x) \)
  • Difference: \( (f - g)(x) = f(x) - g(x) \)
  • Product: \( (fg)(x) = f(x) \cdot g(x) \)
  • Quotient: \( \left(\dfrac{f}{g}\right)(x) = \dfrac{f(x)}{g(x)}, \quad g(x) \neq 0 \)

The domain of each new function is the intersection of the domains of f and g, with the additional restriction \( g(x) \neq 0 \) for the quotient.

C4 — Composition of Functions

Composition

The composition of f and g, written \( f \circ g \) (read "f after g" or "f composed with g"), is:

\[ (f \circ g)(x) = f(g(x)) \]

To compute \( f(g(x)) \): first apply g to x to get an intermediate value, then apply f to that intermediate value. The output of g becomes the input of f.

Composition is not commutative. In general, \( f(g(x)) \neq g(f(x)) \). The order matters: f after g is different from g after f.

The notation \( (f \circ g)(x) \) is not the same as \( f(x) \cdot g(x) \). The circle \( \circ \) means composition — substituting g(x) as the input to f. The dot \( \cdot \) means multiplication. These produce completely different results.

For \( f(x) = x + 1 \) and \( g(x) = x^2 \):

\[ (f \circ g)(x) = f(x^2) = x^2 + 1 \]

\[ f(x) \cdot g(x) = (x+1)(x^2) = x^3 + x^2 \]

These are different functions entirely.

C5 — Decomposing Composite Functions

For calculus — especially the chain rule — you need to work backward: given a complex function h(x), find two simpler functions f and g such that \( h = f \circ g \).

Decomposition Strategy

  1. Identify the "last operation" performed — the one that wraps everything else.
  2. That last operation is the outer function f.
  3. Everything inside it is the inner function g(x).

For example, in \( h(x) = (x^2 + 5)^3 \): the last operation is "raise to the 3rd power," so \( f(u) = u^3 \) (outer) and \( g(x) = x^2 + 5 \) (inner). Check: \( f(g(x)) = (x^2 + 5)^3 = h(x) \quad ✓ \)

Why does decomposition matter? In calculus, the chain rule says: "to differentiate f(g(x)), differentiate the outside, leave the inside alone, then multiply by the derivative of the inside." Knowing which function is inside and which is outside is not optional — it is the whole calculation.

Section 4: Worked Examples

Example 1 — Evaluating f(a) and f(x+h) (Fully Worked)

Let \( f(x) = 2x^2 - 5x + 3 \). Evaluate \( f(0) \), \( f(-1) \), \( f(a) \), and \( f(x+h) \).

Evaluating \( f(0) \): Replace every x with 0.

\[ f(0) = 2(0)^2 - 5(0) + 3 = 0 - 0 + 3 = 3 \]

Evaluating \( f(-1) \): Replace every x with \( -1 \). Note: \( (-1)^2 = 1 \), not \( -1 \).

\[ f(-1) = 2(-1)^2 - 5(-1) + 3 = 2(1) + 5 + 3 = 10 \]

Evaluating \( f(a) \): Replace every x with \( a \) — straightforward.

\[ f(a) = 2a^2 - 5a + 3 \]

Evaluating \( f(x+h) \): This is the critical one. Replace every x with \( (x+h) \). Keep parentheses.

\[ f(x+h) = 2(x+h)^2 - 5(x+h) + 3 \]

Now expand term by term:

\[ = 2(x^2 + 2xh + h^2) - 5(x + h) + 3 \]

\[ = 2x^2 + 4xh + 2h^2 - 5x - 5h + 3 \]

Notice that \( f(x+h) \) is a polynomial in two variables, x and h. Every term that originally had an x may now contribute an h-term. The \( 4xh \) and \( 2h^2 \) terms are the new ones — they came from expanding \( (x+h)^2 \). In BTC-2, those are the terms that survive when we subtract \( f(x) \) and cancel h.

Example 2 — Function Operations (Partially Scaffolded)

Let \( f(x) = x^2 + 4 \) and \( g(x) = 2x - 1 \). Find \( (f+g)(x) \), \( (f-g)(x) \), and \( (fg)(x) \).

Before you read on: For each operation, just add, subtract, or multiply f(x) and g(x) as you would any two polynomials. Predict the degrees of each result — then check below.

Sum:

\[ (f+g)(x) = f(x) + g(x) = (x^2 + 4) + (2x - 1) = x^2 + 2x + 3 \]

Difference: Watch the minus sign — it distributes across the entire second function.

\[ (f-g)(x) = f(x) - g(x) = (x^2 + 4) - (2x - 1) = x^2 + 4 - 2x + 1 = x^2 - 2x + 5 \]

Product: Use FOIL or the distributive property.

\[ (fg)(x) = f(x) \cdot g(x) = (x^2 + 4)(2x - 1) \]

\[ = 2x^3 - x^2 + 8x - 4 \]

The minus sign distributes across the whole function. In \( (f-g)(x) = (x^2+4) - (2x-1) \), the minus applies to every term in \( g(x) \): \( -(2x-1) = -2x+1 \), not \( -2x-1 \). Write the parentheses explicitly before distributing.

Example 3 — Composition: f∘g vs. g∘f (Minimal Scaffold)

Let \( f(x) = x + 2 \) and \( g(x) = x^2 \). Compute \( (f \circ g)(x) \) and \( (g \circ f)(x) \). Are they equal?

Show Solution

\( (f \circ g)(x) = f(g(x)) \): First apply g, then f.

\[ f(g(x)) = f(x^2) = x^2 + 2 \]

\( (g \circ f)(x) = g(f(x)) \): First apply f, then g.

\[ g(f(x)) = g(x+2) = (x+2)^2 = x^2 + 4x + 4 \]

Are they equal? No. \( x^2 + 2 \neq x^2 + 4x + 4 \) for most values of x. The order of composition matters — composition is not commutative.

Sanity check: try \( x = 3 \):

  • \( (f \circ g)(3) = f(9) = 11 \)
  • \( (g \circ f)(3) = g(5) = 25 \)

These are completely different numbers — confirming the order matters.

Two function machines arranged in a row. An input value x flows into the first machine (g), producing an intermediate value g(x), which then flows into the second machine (f) to produce the final output f(g(x)). Click Evaluate to animate the computation step by step. input x = 3 g g(x) = x² g(x) = ? f f(x) = x + 1 f(g(x)) ? Step 1 Step 2 ↓ Step 3
Computing: f(g(x))

Interactive: select a function pair, enter any integer x from −9 to 9, and click Evaluate to see the value flow step by step. Then click Swap Order to compute g(f(x)) — notice the results change!

Example 4 — Decomposition for the Chain Rule (Application Twist)

Given \( h(x) = (3x^2 - 7)^4 \), express h as a composition \( f \circ g \) — identify the outer function f and the inner function g.

Strategy: Ask "what is the last operation applied?"

The last thing done to \( x \) is raising to the 4th power. So:

Verify:

\[ f(g(x)) = f(3x^2 - 7) = (3x^2 - 7)^4 = h(x) \quad ✓ \]

Multiple valid decompositions exist. For example, you could also write \( f(u) = (u-7)^4 \) and \( g(x) = 3x^2 \). Both are valid. However, for the chain rule, the most useful decomposition is the one where the inner function is as "complex" as possible and the outer function is a single recognizable operation — because that is what you differentiate.

Section 5: Guided Practice

Work through each problem. Dropdowns give immediate feedback — wrong answers include a rationale explaining the misconception.

P1 — Which Correctly Represents f(x+h)?

For each function below, select the correctly computed \( f(x+h) \). Then click Try a similar problem for more practice.

Given \( f(x) = 5x - 2 \), which of the following equals \( f(x+h) \)?

Given \( f(x) = -3x + 7 \), which of the following equals \( f(x+h) \)?

Given \( f(x) = x^2 + 6 \), which of the following equals \( f(x+h) \)?

Given \( f(x) = 3x^2 - 2x \), which of the following equals \( f(x+h) \)?

Given \( f(x) = 4 - 2x^2 \), which of the following equals \( f(x+h) \)?

P2 — Computing (f∘g)(x) Step by Step

Let \( f(x) = x^2 - 5 \) and \( g(x) = 3x + 1 \). Work through the composition \( (f \circ g)(x) \) one step at a time.

Step 1 — What is the inner function?

Step 2 — What expression do you substitute into f? \( f(x) = x^2 - 5 \) — replace x with...

Step 3 — What is \( f(3x+1) \)? Substitute \( (3x+1) \) for x in \( f(x) = x^2 - 5 \).

Step 4 — Simplify completely.

P3 — Identify the Decomposition

For each function below, identify the inner function g(x) and outer function f(u) such that \( h(x) = (f \circ g)(x) \). Click Try a similar problem to practice with a different function.

Given \( h(x) = (x^2 + 3)^5 \), identify f and g.

Inner function g(x):

Outer function f(u):

Given \( h(x) = \sqrt{x - 4} \), identify f and g.

Inner function g(x):

Outer function f(u):

Given \( h(x) = (5x + 2)^3 \), identify f and g.

Inner function g(x):

Outer function f(u):

Given \( h(x) = (x^2 - 1)^4 \), identify f and g.

Inner function g(x):

Outer function f(u):

Given \( h(x) = \sqrt{2x^2 + 7} \), identify f and g.

Inner function g(x):

Outer function f(u):

Section 6: Independent Practice

These problems have no step-by-step guidance. Work each one through, then reveal the solution. Problems are interleaved across all five core concepts.

IP1 — Compute f(x+h) and Simplify

For the given function, compute \( f(x+h) \) and write the result in fully simplified (expanded) form.

Given \( f(x) = 3x + 1 \), compute \( f(x+h) \).

Show Solution

\[ f(x+h) = 3(x+h) + 1 = 3x + 3h + 1 \]

Notice: the difference \( f(x+h) - f(x) = (3x+3h+1) - (3x+1) = 3h \). When we divide by h in BTC-2, we get 3 — the slope of this linear function.

Given \( f(x) = x^2 - 4x \), compute \( f(x+h) \).

Show Solution

\[ f(x+h) = (x+h)^2 - 4(x+h) \]

\[ = x^2 + 2xh + h^2 - 4x - 4h \]

Check: The result has terms involving \( h \) (\( 2xh, h^2, -4h \)) and terms without h (\( x^2, -4x \)). This is expected — the h-terms are new, the h-free terms reproduce the original function.

Given \( f(x) = 2x^2 + x - 3 \), compute \( f(x+h) \).

Show Solution

\[ f(x+h) = 2(x+h)^2 + (x+h) - 3 \]

\[ = 2(x^2 + 2xh + h^2) + x + h - 3 \]

\[ = 2x^2 + 4xh + 2h^2 + x + h - 3 \]

Given \( f(x) = 7 - 3x \), compute \( f(x+h) \).

Show Solution

\[ f(x+h) = 7 - 3(x+h) = 7 - 3x - 3h \]

The difference: \( f(x+h) - f(x) = (7-3x-3h) - (7-3x) = -3h \). Divide by h in BTC-2 to get \(-3\) — the slope.

Given \( f(x) = x^3 \), compute \( f(x+h) \) and expand fully.

Show Solution

Use the binomial cube formula: \( (a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3 \)

\[ f(x+h) = (x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3 \]

The difference: \( f(x+h) - f(x) = 3x^2h + 3xh^2 + h^3 \). Factor out h: \( h(3x^2 + 3xh + h^2) \). As \( h \to 0 \), this approaches \( h \cdot 3x^2 \) — divide by h to get \( 3x^2 \), which is the derivative of \( x^3 \).

IP2 — Evaluate a Composition at a Specific Point

IP3 — From a Formula to a Decomposition

Express each function h(x) as a composition \( h = f \circ g \) by identifying the inner and outer functions. Solutions are revealed when you expand.

Given \( h(x) = (x+5)^3 \), find f and g such that \( h = f \circ g \).

Show Solution

The last operation is "cube," so:

\( g(x) = x + 5 \) (inner — the linear shift) and \( f(u) = u^3 \) (outer — the cube).

Verify: \( f(g(x)) = f(x+5) = (x+5)^3 = h(x) \quad ✓ \)

Given \( h(x) = \sqrt{x^2 + 1} \), find f and g such that \( h = f \circ g \).

Show Solution

The last operation is "take the square root," so:

\( g(x) = x^2 + 1 \) (inner) and \( f(u) = \sqrt{u} \) (outer).

Verify: \( f(g(x)) = f(x^2+1) = \sqrt{x^2+1} = h(x) \quad ✓ \)

Given \( h(x) = (2x-3)^4 \), find f and g such that \( h = f \circ g \).

Show Solution

The last operation is "raise to the 4th power," so:

\( g(x) = 2x - 3 \) (inner) and \( f(u) = u^4 \) (outer).

Verify: \( f(g(x)) = f(2x-3) = (2x-3)^4 = h(x) \quad ✓ \)

Given \( h(x) = \dfrac{1}{x^2+x+1} \), find f and g such that \( h = f \circ g \).

Show Solution

The last operation is "take the reciprocal," so:

\( g(x) = x^2 + x + 1 \) (inner) and \( f(u) = \dfrac{1}{u} \) (outer).

Verify: \( f(g(x)) = f(x^2+x+1) = \dfrac{1}{x^2+x+1} = h(x) \quad ✓ \)

Domain restriction: \( x^2 + x + 1 \neq 0 \) — but its discriminant is \( 1 - 4 = -3 < 0 \), so it never equals zero. No real exclusions needed.

Given \( h(x) = (x^3 - 2x)^2 \), find f and g such that \( h = f \circ g \).

Show Solution

The last operation is "square," so:

\( g(x) = x^3 - 2x \) (inner) and \( f(u) = u^2 \) (outer).

Verify: \( f(g(x)) = f(x^3-2x) = (x^3-2x)^2 = h(x) \quad ✓ \)

IP4 — A Preview of the Difference Quotient

Let \( f(x) = x^2 + 1 \). Compute \( f(x+h) - f(x) \) and factor the result completely.

Show Solution

Step 1 — Compute f(x+h):

\[ f(x+h) = (x+h)^2 + 1 = x^2 + 2xh + h^2 + 1 \]

Step 2 — Subtract f(x):

\[ f(x+h) - f(x) = (x^2 + 2xh + h^2 + 1) - (x^2 + 1) \]

\[ = 2xh + h^2 \]

Step 3 — Factor out h:

\[ = h(2x + h) \]

In BTC-2, you will divide this by h to get \( \dfrac{f(x+h)-f(x)}{h} = \dfrac{h(2x+h)}{h} = 2x + h \). As \( h \to 0 \), this approaches \( 2x \) — the derivative of \( x^2 + 1 \). You have just seen the birth of differential calculus.

Section 7: Mastery Check

No hints, no scaffolds. These measure genuine understanding.

Question 1 — Feynman Test

Explain in your own words: why is \( f(x+h) \) different from \( f(x) + h \)? Use the function \( f(x) = x^2 \) as a concrete example to illustrate your explanation.

See a Model Answer

The key distinction: \( f(x+h) \) means "substitute \( x+h \) as the input to f," while \( f(x)+h \) means "compute f at x, then add h to the output afterward." These are different operations done in a different order.

For \( f(x) = x^2 \): substituting \( x+h \) for x gives \( f(x+h) = (x+h)^2 = x^2 + 2xh + h^2 \). But \( f(x)+h = x^2 + h \). The difference is the cross term \( 2xh + h^2 - h \) — these terms encode how the function changes, which is exactly what the derivative measures.

Question 2 — Apply

Given \( f(x) = x^3 \) and \( g(x) = 2x - 5 \), find:

  1. \( (f \circ g)(2) \)
  2. \( (g \circ f)(2) \)
  3. Are the two values equal? Should they be in general?
Show Solution

Part 1: \( g(2) = 2(2)-5 = -1 \). Then \( f(-1) = (-1)^3 = -1 \). So \( (f \circ g)(2) = -1 \).

Part 2: \( f(2) = 8 \). Then \( g(8) = 2(8)-5 = 11 \). So \( (g \circ f)(2) = 11 \).

Part 3: The values are not equal: −1 ≠ 11. In general, composition is not commutative — changing the order changes the result because a different function receives the output of the other.

Question 3 — Find the Error

Carlos tried to compute \( f(x+h) \) for \( f(x) = x^2 - 3x \). There is exactly one error. Find it and correct it.

\[ f(x+h) = x^2 + h^2 - 3x - 3h \]

Show Correction

Carlos applied the Freshman's Dream: \( (x+h)^2 \neq x^2 + h^2 \). The correct expansion is \( (x+h)^2 = x^2 + 2xh + h^2 \).

Correct answer:

\[ f(x+h) = (x+h)^2 - 3(x+h) = x^2 + 2xh + h^2 - 3x - 3h \]

The missing \( 2xh \) term is the one that carries the rate-of-change information — without it, the difference quotient gives the wrong derivative.

How confident are you that you can evaluate \( f(x+h) \) correctly for any polynomial function?

Not yet — need more practice Very confident

Section 8: Boss Fight

Two paths, equal difficulty — different mathematical style. Choose the one that suits how you think.

🔬 The Analyst

Four functions, all the operations. You compute; the functions reveal what's interesting.

🏗️ The Architect

One complex function, taken apart. You design; the composition reveals the structure.

Path A — The Analyst 🔬

Let \( f(x) = x + 2 \), \( g(x) = 3x - 1 \), and \( h(x) = x^2 \).

  1. Compute \( (f \circ g)(x) \) and simplify.
  2. Compute \( (g \circ f)(x) \) and simplify.
  3. Evaluate \( (f \circ g \circ h)(2) \) step by step.
  4. Compute \( f(x+k) - f(x) \) and simplify. (Using k instead of h to avoid confusion with the function h above.)
  5. The equations from (1) and (2) are linear functions of x. Are they parallel, intersecting, or the same line? Explain what this says about whether \( (f \circ g)(x) = (g \circ f)(x) \) has any solutions.
Show Solution

1. \( (f \circ g)(x) = f(3x-1) = (3x-1)+2 = 3x + 1 \)

2. \( (g \circ f)(x) = g(x+2) = 3(x+2)-1 = 3x+6-1 = 3x + 5 \)

3. Work from the inside out: \( h(2) = 4 \), then \( g(4) = 3(4)-1 = 11 \), then \( f(11) = 13 \). So \( (f \circ g \circ h)(2) = 13 \).

4. \( f(x+k) - f(x) = (x+k+2) - (x+2) = k \). Just k — because f is linear, its finite difference equals its slope (which is 1) times k.

5. Both compositions have slope 3: \( 3x+1 \) and \( 3x+5 \) are parallel lines (same slope, different intercepts). Setting them equal: \( 3x+1 = 3x+5 \Rightarrow 1 = 5 \) — impossible. So there is no value of x where \( (f \circ g)(x) = (g \circ f)(x) \): the two compositions are never equal.

Reflection: The difference between the two compositions is always a constant: \( (g \circ f)(x) - (f \circ g)(x) = (3x+5)-(3x+1) = 4 \). The commutativity "gap" here is exactly 4, independent of x.

Path B — The Architect 🏗️

Consider the function \( p(x) = \left(2(x^2+1)+3\right)^3 \).

  1. Express p as a triple composition \( f \circ g \circ r \). Identify all three functions clearly.
  2. Verify your decomposition by computing \( p(0) \) two ways: directly from the formula, and step by step through \( r \to g \to f \).
  3. Can you express p as a composition of just two functions? If so, give one valid two-function decomposition. If not, explain why.
  4. Which decomposition — two-function or three-function — would be most useful when differentiating p using the chain rule? Explain your reasoning.
Show Solution

1. Triple decomposition:

  • Innermost: \( r(x) = x^2 + 1 \)
  • Middle: \( g(u) = 2u + 3 \)
  • Outer: \( f(v) = v^3 \)

Check: \( g(r(x)) = g(x^2+1) = 2(x^2+1)+3 = 2x^2+5 \). Then \( f(g(r(x))) = (2x^2+5)^3 = p(x) \quad ✓ \)

2. Verification at x = 0:

  • Step by step: \( r(0)=1 \), then \( g(1)=5 \), then \( f(5)=125 \)
  • Direct: \( p(0)=(2(0+1)+3)^3=(2+3)^3=5^3=125 \quad ✓ \)

3. Two-function version: Let \( a(x) = 2x^2 + 5 \) (combine r and g into one function) and \( f(v) = v^3 \). Then \( p = f \circ a \).

4. Best for calculus: The three-function decomposition is better. The chain rule is applied one layer at a time — differentiating the outer, then the middle, then the inner. Keeping the layers separate gives you three simple derivatives to multiply together rather than one complicated derivative of a merged function.

Section 9: Challenge Problems

These problems go beyond the lesson objectives. They are optional stretch material for students who want to explore further.

C1 — When Can Composition Be Commutative?

We showed that composition is generally not commutative. But there are exceptions.

  1. Find two functions f and g, neither of which is the identity \( f(x) = x \) or a constant function, such that \( (f \circ g)(x) = (g \circ f)(x) \) for all x.
  2. Describe the algebraic property that makes this work.
Show Solution

Example: Let \( f(x) = 3x \) and \( g(x) = 5x \).

\( (f \circ g)(x) = f(5x) = 3(5x) = 15x \)

\( (g \circ f)(x) = g(3x) = 5(3x) = 15x \quad ✓ \)

Why it works: Both functions are of the form \( f(x) = ax \) (scalar multiples — lines through the origin). Composition of such functions is just multiplication of constants: \( f(g(x)) = a(bx) = abx \) and \( g(f(x)) = b(ax) = bax \). Since \( ab = ba \) (real multiplication is commutative), the compositions are equal.

More generally: any two functions from the same "commutative family" — e.g., all power functions \( x^n \), all scalar multiples — will commute under composition.

C2 — Functions That Are Their Own Inverse

A function f is an involution if \( f(f(x)) = x \) for all x in its domain — applying f twice brings you back to where you started.

  1. Find two different involutions. (The identity \( f(x) = x \) does not count.)
  2. Verify that \( f(x) = \dfrac{1}{x} \) is an involution for \( x \neq 0 \).
Show Solution

Involution 1: \( f(x) = -x \). Check: \( f(f(x)) = f(-x) = -(-x) = x \quad ✓ \)

Involution 2: \( f(x) = a - x \) for any constant a. Check: \( f(f(x)) = f(a-x) = a-(a-x) = x \quad ✓ \). This family includes \( f(x) = 5 - x \), which geometrically reflects the number line about the midpoint \( a/2 \).

Verification for \( f(x) = 1/x \): \( f(f(x)) = f(1/x) = \dfrac{1}{1/x} = x \quad ✓ \)

. Note the domain restriction \( x \neq 0 \) — applying f twice brings you back, but you must avoid 0 each time.

C3 — A Triple Composition

Express \( h(x) = \sqrt{x^2 + 4x + 3} \) as a triple composition \( f \circ g \circ r \) — identify three functions such that \( h = f(g(r(x))) \).

Hint: Consider what algebraic transformation simplifies the expression under the radical.

Show Solution

Notice that completing the square gives:

\[ x^2 + 4x + 3 = (x+2)^2 - 1 \]

This suggests a natural three-layer decomposition:

  • Innermost: \( r(x) = x + 2 \) (shift left by 2)
  • Middle: \( g(u) = u^2 - 1 \) (square and subtract 1)
  • Outer: \( f(v) = \sqrt{v} \) (take the square root)

Verify:

\[ g(r(x)) = g(x+2) = (x+2)^2 - 1 = x^2 + 4x + 4 - 1 = x^2 + 4x + 3 \quad ✓ \]

\[ f(g(r(x))) = \sqrt{x^2 + 4x + 3} = h(x) \quad ✓ \]

Section 10: Solutions

Complete, step-by-step solutions for all problems in Sections 5–9 are available on the solutions page. Solutions include common mistakes and what to check if your answer doesn't match.

View Full Solutions →

What to do if you're stuck: Re-read the relevant Core Concept in Section 3, then try the worked example that corresponds to the concept (the example numbers align with the concept numbers). The solutions page shows the reasoning behind every step, not just the answer.