Here is a rule you have quietly been using since middle school, but probably never had a name for: every time you wrote or , 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 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:
To work with this difference quotient, you need to know exactly what means — and why it is completely different from . 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
Combine two functions using addition, subtraction, multiplication, and division
Compute the composition of two functions:
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. You must be comfortable with binomial expansion and the distinction between arithmetic and function notation.
From ALG-2: Binomial Expansion. Recall that . The middle term is the most important part of the difference quotient in calculus.
From COM-1: Notation Precision. The symbol means “apply the rule to the input .” It does not mean ” times .”
Domain Awareness: You should be familiar with interval notation (e.g., ) and set notation for describing which inputs are allowed in a function.
Algebraic Substitution: You should be able to replace every instance of a variable in an expression with another value or expression.
Retrieval Checkpoint
What is the correct expansion of ?
Success Factor: Almost all “calculus errors” are actually algebra errors. Specifically, many students forget the middle term when expanding . Master this expansion now, and you’ll avoid the most common trap in the first month of calculus.
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 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 describes a circle. A vertical line at crosses it at and — two outputs for one input. To make it a function, you must restrict to either the top half or the bottom half .
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):
Every x in the formula becomes (x + h). The parentheses are not optional — they ensure the expression stays grouped when you expand.
and .
For , the correct computation is:
But — the cross term is missing, and h is used wrong. And — still missing . The only correct approach is to substitute for every x, then expand.
C3 — Function Operations
Arithmetic on Functions
Given two functions f and g with overlapping domains, define:
Sum:
Difference:
Product:
Quotient:
The domain of each new function is the intersection of the domains of f and g, with the additional restriction for the quotient.
C4 — Composition of Functions
Composition
The composition of f and g, written (read “f after g” or “f composed with g”), is:
To compute : 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, . The order matters: f after g is different from g after f.
The notation is not the same as . The circle means composition — substituting g(x) as the input to f. The dot means multiplication. These produce completely different results.
For and :
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 .
Decomposition Strategy
Identify the “last operation” performed — the one that wraps everything else.
That last operation is the outer function f.
Everything inside it is the inner function g(x).
For example, in : the last operation is “raise to the 3rd power,” so (outer) and (inner). Check:
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 . Evaluate , , , and .
Evaluating : Replace every x with 0.
Evaluating : Replace every x with . Note: , not .
Evaluating : Replace every x with — straightforward.
Evaluating : This is the critical one. Replace every x with . Keep parentheses.
Now expand term by term:
Notice that is a polynomial in two variables, x and h. Every term that originally had an x may now contribute an h-term. The and terms are the new ones — they came from expanding . In BTC-2, those are the terms that survive when we subtract and cancel h.
Example 2 — Function Operations (Partially Scaffolded)
Let and . Find , , and .
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:
Difference: Watch the minus sign — it distributes across the entire second function.
Product: Use FOIL or the distributive property.
The minus sign distributes across the whole function. In , the minus applies to every term in : , not . Write the parentheses explicitly before distributing.
Example 3 — Composition: f∘g vs. g∘f (Minimal Scaffold)
Let and . Compute and . Are they equal?
Show Solution
: First apply g, then f.
: First apply f, then g.
Are they equal? No. for most values of x. The order of composition matters — composition is not commutative.
Sanity check: try :
These are completely different numbers — confirming the order matters.
Example 4 — Decomposition for the Chain Rule (Application Twist)
Given , express h as a composition — identify the outer function f and the inner function g.
Strategy: Ask “what is the last operation applied?”
The last thing done to is raising to the 4th power. So:
Outer function: — takes whatever is inside and raises it to the 4th power
Inner function: — the expression being raised to the 4th power
Verify:
Multiple valid decompositions exist. For example, you could also write and . 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.
Problem 1 — Which Correctly Represents f(x+h)? — Generative
For each function below, select the correctly computed . Then click Try a similar problem for more practice.
Given , which of the following equals ?
Given , which of the following equals ?
Given , which of the following equals ?
Given , which of the following equals ?
Given , which of the following equals ?
Problem 2 — Computing (f∘g)(x) Step by Step
Let and . Work through the composition one step at a time.
Step 1 — What is the inner function?
Step 2 — What expression do you substitute into f? — replace x with…
Step 3 — What is ? Substitute for x in .
Step 4 — Simplify completely.
Problem 3 — Identify the Decomposition — Generative
For each function below, identify the inner function g(x) and outer function f(u) such that . Click Try a similar problem to practice with a different function.
Given , identify f and g.
Inner function g(x):
Outer function f(u):
Given , identify f and g.
Inner function g(x):
Outer function f(u):
Given , identify f and g.
Inner function g(x):
Outer function f(u):
Given , identify f and g.
Inner function g(x):
Outer function f(u):
Given , 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.
Problem 1 — Compute f(x+h) and Simplify
For the given function, compute and write the result in fully simplified (expanded) form.
Given , compute .
Show Solution
Notice: the difference . When we divide by h in BTC-2, we get 3 — the slope of this linear function.
Given , compute .
Show Solution
Check: The result has terms involving () and terms without h (). This is expected — the h-terms are new, the h-free terms reproduce the original function.
Given , compute .
Show Solution
Given , compute .
Show Solution
The difference: . Divide by h in BTC-2 to get — the slope.
Given , compute and expand fully.
Show Solution
Use the binomial cube formula:
The difference: . Factor out h: . As , this approaches — divide by h to get , which is the derivative of .
Problem 2 — Evaluate a Composition at a Specific Point
Problem 3 — From a Formula to a Decomposition — Generative
Express each function h(x) as a composition by identifying the inner and outer functions. Solutions are revealed when you expand.
Given , find f and g such that .
Show Solution
The last operation is “cube,” so:
(inner — the linear shift) and (outer — the cube).
Verify:
Given , find f and g such that .
Show Solution
The last operation is “take the square root,” so:
(inner) and (outer).
Verify:
Given , find f and g such that .
Show Solution
The last operation is “raise to the 4th power,” so:
(inner) and (outer).
Verify:
Given , find f and g such that .
Show Solution
The last operation is “take the reciprocal,” so:
(inner) and (outer).
Verify:
Domain restriction: — but its discriminant is , so it never equals zero. No real exclusions needed.
Given , find f and g such that .
Show Solution
The last operation is “square,” so:
(inner) and (outer).
Verify:
Problem 4 — A Preview of the Difference Quotient
Let . Compute and factor the result completely.
Show Solution
Step 1 — Compute f(x+h):
Step 2 — Subtract f(x):
Step 3 — Factor out h:
In BTC-2, you will divide this by h to get . As , this approaches — the derivative of . You have just seen the birth of differential calculus.
Section 7: Mastery Check
▾
No hints. No scaffolding. These questions test whether you can recognize and apply function concepts on your own.
Question 1 — Feynman Test — f(x+h) vs f(x)+h (C2)
Explain in your own words: why is different from ? Use the function as a concrete example to illustrate your explanation.
0 / 600
See a Model Answer
The key distinction: means “substitute as the input to f,” while means “compute f at x, then add h to the output afterward.” These are different operations done in a different order.
For : substituting for x gives . But . The difference is the cross term — these terms encode how the function changes, which is exactly what the derivative measures.
Question 2 — Apply (C4)
Given and , find:
Are the two values equal? Should they be in general?
Show Solution
Part 1:. Then . So .
Part 2:. Then . So .
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 — Analyze (C2)
Carlos tried to compute for . There is exactly one error. Find it and correct it.
Show Correction
Carlos applied the Freshman’s Dream: . The correct expansion is $(x+h)^2 = x^2 + 2xh + h^2.
Correct answer:
The missing term is the one that carries the rate-of-change information — without it, the difference quotient gives the wrong derivative.
Self-Assessment
How confident are you with the six notation conventions from this lesson?
Still shakyVery confident
Section 8: Boss Fight
▾
Two paths. Same difficulty. Pick the one that matches how you think.
🔬 Path A: The Analyst
You have a set of base functions. Your job: compose them, simplify the result, and reason about the properties of the resulting graphs. Think like a pure mathematician.
🏗️ Path B: The Architect
One complex function, taken apart. You design; the composition reveals the structure. Identify layers for calculus. Think like a mathematical engineer.
Path A: The Analyst
Let , , and .
Task A1 — Compose and analyze.
(1) Compute and simplify. (2) Compute and simplify. (3) Evaluate step by step. (4) Compute and simplify. (5) Are the compositions from (1) and (2) parallel, intersecting, or identical? Explain what this implies.
0 / 1200
Show Full Solution
1.
2.
3. Work from the inside out: , then , then . So .
4.. Just k — because f is linear, its finite difference equals its slope (which is 1) times k.
5. Both compositions have slope 3: and are parallel lines (same slope, different intercepts). Setting them equal: — impossible. So there is no value of x where : the two compositions are never equal.
Reflection: The difference between the two compositions is always a constant: . The commutativity “gap” here is exactly 4, independent of x.
Path B: The Architect
Consider the function .
Task B1 — Decompose and optimize.
(1) Express p as a triple composition . (2) Verify your decomposition by computing two ways. (3) Can you express p as a composition of just two functions? (4) Which decomposition would be most useful for the chain rule in calculus? Why?
0 / 1200
Show Full Solution
1. Triple decomposition:
Innermost:
Middle:
Outer:
Check: . Then
2. Verification at x = 0:
Step by step:, then , then
Direct:
3. Two-function version: Let (combine r and g into one function) and . Then .
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.
Challenge 1 — When Can Composition Be Commutative?
We showed that composition is generally not commutative. But there are exceptions.
Find two functions f and g, neither of which is the identity or a constant function, such that for all x.
Describe the algebraic property that makes this work.
Show Solution
Example: Let and .
Why it works: Both functions are of the form (scalar multiples — lines through the origin). Composition of such functions is just multiplication of constants: and . Since (real multiplication is commutative), the compositions are equal.
More generally: any two functions from the same “commutative family” — e.g., all power functions , all scalar multiples — will commute under composition.
Challenge 2 — Functions That Are Their Own Inverse
A function f is an involution if for all x in its domain — applying f twice brings you back to where you started.
Find two different involutions. (The identity does not count.)
Verify that is an involution for .
Show Solution
Involution 1:. Check:
Involution 2: for any constant a. Check: . This family includes , which geometrically reflects the number line about the midpoint .
Verification for :. Note the domain restriction — applying f twice brings you back, but you must avoid 0 each time.
Challenge 3 — A Triple Composition
Express as a triple composition — identify three functions such that .
Hint: Consider what algebraic transformation simplifies the expression under the radical.
Show Solution
Notice that completing the square gives:
This suggests a natural three-layer decomposition:
Innermost: (shift left by 2)
Middle: (square and subtract 1)
Outer: (take the square root)
Verify:
Section 10: Solutions Reference
▾
Complete, step-by-step solutions for all problems in Sections 5–9 are available on the solutions page. Solutions include worked arithmetic, common mistakes to watch for, and interpretation guidance.
If you’re stuck: Re-read the relevant Core Concept in Section 3, then find the Worked Example that maps to that concept (e.g., Example 1 maps to Concept 1). The solutions page shows the reasoning behind every step, not just the final answer.
Quick-Reference Formulas
Function Operations:, .
Composition:. Apply first, then .
Difference Quotient:.
Decomposition:
Identify the outer operation (applied last) as and the inner expression as .