Quarry School

Evaluate formulas one number at a time

Explain it like I am five

Keep two recipe cards on a counter. For a composition, follow the inner recipe first, write its answer, and then use that answer in the outer recipe. A formula is a recipe written with letters. Each input letter labels a place to insert a value. The names x, t, and u can label the same place. For example, f(u) = u and f(x) = x describe the same root recipe. Using u for an outer input helps you keep it separate from the x inside another formula. The function name tells you which recipe to use; the letter inside the parentheses tells you where its input belongs.

ahh(a)ff(h(a))firstsecond
Each stage uses the result of the preceding stage.
Reminder
  • Order of operations. Square before subtracting: 52 − 5 = 25 − 5 = 20.
  • Signed arithmetic. (−4)2 = 16 and 16 − (−4) = 20.
  • Substitution. Both slots in t2 − t receive the same number: f(5) = 52 − 5.
  • Composition order. f(h(1)) starts with h(1), not f(1).
  • Input-slot names. h(x) = 3x + 2 and h(t) = 3t + 2 both say multiply the input by 3 and add 2. They define the same function.
Why it works. A variable in a function formula marks where an input will be inserted. Its name can change without changing the function's instructions. For example, t2 − t and u2 − u both say to square the input and subtract that same input. A composition specifies two substitutions: the original number fills the inner slots, and its resulting output fills every outer slot. Doing the arithmetic after each substitution follows exactly the function-machine definition and makes mistakes easier to locate.
RuleFor f(h(a)), calculate h(a) first; then substitute that entire numerical answer into every input slot of f.
The input-variable letter does not change the instructions.
The same idea, five ways
Say it

f of h of one

Write it

Put 1 into h’s formula, then put its resulting number into f’s formula.

In math
  • h(x) = 3x + 2
  • f(t) = t2 − t
  • f(h(1)) = f(5) = 20
Like

The first recipe makes the ingredient measured into the second recipe.

See it
1h: 3x + 25f: t² − t20firstsecond
The input letters differ, but the same number still fills every input place at each stage.
The same idea, other ways
As two recipe cards

Finish the first recipe before beginning the second. A finished intermediate value becomes the ingredient measured into the second recipe.

1triple, add 25f: t² − t20firstsecond
The second recipe receives 5 rather than the original 1.
As labeled blanks

f(t) = t2 − t has two blanks holding the same input. At input 5 the blanks become 52 − 5. Calling the blanks u would not change either operation.

f(t) = t2 − t
f(u) = u2 − u
f(5) = 52 − 5 = 20
Changing the placeholder letter does not change the recipe.
.1Number into the inner formula

First evaluate the formula closest to the starting number. A zero intermediate answer is allowed unless the next function rejects zero.

  • h(1) = 5 for h(x) = 3x + 2.
  • The intermediate answer is a complete input for the next function.
1h: 3x + 25inputoutput
The inner formula completes its arithmetic before the handoff.
Worked exampleA first-stage negative input

With h(x) = 3x + 2, evaluate h(−2). The input is −2; find the first-stage output. Plan: substitute the entire signed number in parentheses, then multiply before adding.

−23x + 2−4inputoutput
The minus sign stays with the input.
  1. h(−2) = 3(−2) + 2.Replace the input letter with −2 and keep its sign inside parentheses.
  2. = −6 + 2 = −4.A positive times a negative is negative, and adding 2 moves two steps toward zero.
Answer
h(−2) = −4.
Check Undo the recipe: (−4 − 2) ÷ 3 = −6 ÷ 3 = −2, the starting input.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: h(−2) = 3 − 2 + 2 = 3.
The 3 beside x means multiplication by the whole input, rather than adding 3 to it.
✓ Instead: h(−2) = 3(−2) + 2 = −6 + 2 = −4.
Tips and tricks
  • Keep a negative input inside parentheses until multiplication is complete.
.2Intermediate answer into the outer formula

The outer recipe receives a new input. Insert that input in every position, even when it is negative. Parentheses show that the square acts on the negative number itself.

  • f(−4) = (−4)2 − (−4).
  • The square happens before the subtraction.
−4f: t² − t20inputoutput
Subtracting the negative input adds 4 after the square.
Worked exampleFinish a negative intermediate path

For f(t) = t2 − t and h(x) = 3x + 2, find f(h(−2)). You want both stages completed. Plan: compute h(−2) = −4, then replace both t slots in f with that entire signed answer.

−2h−4f20firstsecond
A negative intermediate input can produce a positive final output.
  1. h(−2) = −4, so f(h(−2)) = f(−4).The inner output becomes the outer input.
  2. f(−4) = (−4)2 − (−4) = 16 + 4 = 20.A negative squared is positive, and subtracting a negative adds its opposite.
Answer
f(h(−2)) = 20.
Check The combined expression at −2 is (3(−2) + 2)2 − (3(−2) + 2) = (−4)2 − (−4) = 20.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: f(−4) = (−4)2 − 4 = 12.
The second input slot also receives −4. Writing +4 in that slot changes the input.
✓ Instead: f(−4) = (−4)2 − (−4) = 16 + 4 = 20.
Tips and tricks
  • Circle every occurrence of the outer input letter before substituting.
Strategy: step by step
  1. 1. Expand circle notation into parentheses if needed.
  2. 2. Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
  3. 3. Complete that arithmetic and write the intermediate output.
  4. 4. Copy the outer formula and replace every input letter with that output.
  5. 5. Complete the arithmetic and check by substituting into a combined formula.
Strategy
Evaluate formulas at a numerical input
1
Is the inserted number negative?
YesUse parentheses around the entire number, including its minus sign.
NoInsert the whole number in every input place.
↓
2
Does the outer formula have more than one input place?
YesReplace every occurrence with the same in-between answer.
NoReplace its one input place, then carry out the arithmetic.
↓
3
Is a denominator zero or an even-root inside negative after substitution?
YesThat stage is undefined, so the composition has no value at this start.
NoComplete the arithmetic and continue to the next stage.
  1. 1. Expand circle notation into parentheses if needed.
  2. 2. Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
  3. 3. Complete that arithmetic and write the intermediate output.
  4. 4. Copy the outer formula and replace every input letter with that output.
  5. 5. Complete the arithmetic and check by substituting into a combined formula.
Worked exampleBoth orders at input 1

Let f(t) = t2 − t and h(x) = 3x + 2. Find f(h(1)) and h(f(1)). You start at 1 and want the final output in each order. Plan: finish the inner arithmetic, then insert its answer into every outer slot. The input letters t and x are slot names; their difference does not change the method.

1h: 3x + 25f(t) = t² − t20firstsecond
h first makes 5, which f turns into 20.
1f(t) = t² − t0h: 3x + 22firstsecond
The reversed order passes 0 into h.
  1. For f(h(1)), start with h(1) = 3 × 1 + 2 = 5.h is the inner function for this order.
  2. f(h(1)) = f(5) = 52 − 5 = 25 − 5 = 20.The output 5 replaces both occurrences of t in f.
  3. For h(f(1)), start with f(1) = 12 − 1 = 1 − 1 = 0.f is the inner function for the reversed order.
  4. h(f(1)) = h(0) = 3 × 0 + 2 = 2.The intermediate output 0 is a valid numerical input to h.
Answer
  • f(h(1)) = 20.
  • h(f(1)) = 2.
Check Using the combined formulas with one starting letter gives f(h(x)) = (3x + 2)2 − (3x + 2), which gives 25 − 5 = 20 at x = 1. The reversed formula h(f(t)) = 3(t2 − t) + 2 gives 0 + 2 = 2 at t = 1. Different input-slot letters describe the same instructions.
Ladder: from easy to exam-hard. Press Try it first on any rung to hide its steps and use them as hints.
Rung 1Rung 1: one slot in each formula

Let g(x) = x + 1 and f(x) = 2x. Find (f ∘ g)(2). The input is 2; add 1 first, then use that answer as the input to the doubling function. Plan: finish g first, then carry its whole answer into f.

2g: add 13f: double6firstsecond
The 3 coming out of g goes into f.
  1. (f ∘ g)(2) = f(g(2)).The circle means composition, so g is the inner function.
  2. g(2) = 2 + 1 = 3.The original input goes into g first.
  3. f(g(2)) = f(3) = 2 × 3 = 6.The output 3 from g is the input to f.
Answer
(f ∘ g)(2) = 6.
Check Combining the rules gives f(g(x)) = 2(x + 1); at 2 this is 2(2 + 1) = 6. The separate product at 2 is f(2)g(2) = 4 × 3 = 12, confirming that the two operations differ.
Rung 2Rung 2: fill every outer slot and reverse the order

Let f(t) = t2 − t and h(x) = 3x + 2. Find f(h(1)) and h(f(1)). You start at 1 and want the final output in each order. Plan: finish the inner arithmetic, then insert its answer into every outer slot. The input letters t and x are slot names; their difference does not change the method.

1h: 3x + 25f(t) = t² − t20firstsecond
h first makes 5, which f turns into 20.
1f(t) = t² − t0h: 3x + 22firstsecond
The reversed order passes 0 into h.
  1. For f(h(1)), start with h(1) = 3 × 1 + 2 = 5.h is the inner function for this order.
  2. f(h(1)) = f(5) = 52 − 5 = 25 − 5 = 20.The output 5 replaces both occurrences of t in f.
  3. For h(f(1)), start with f(1) = 12 − 1 = 1 − 1 = 0.f is the inner function for the reversed order.
  4. h(f(1)) = h(0) = 3 × 0 + 2 = 2.The intermediate output 0 is a valid numerical input to h.
Answer
  • f(h(1)) = 20.
  • h(f(1)) = 2.
Check Using the combined formulas with one starting letter gives f(h(x)) = (3x + 2)2 − (3x + 2), which gives 25 − 5 = 20 at x = 1. The reversed formula h(f(t)) = 3(t2 − t) + 2 gives 0 + 2 = 2 at t = 1. Different input-slot letters describe the same instructions.
Rung 3Rung 3: carry a negative output

For f(t) = t2 − t and h(x) = 3x + 2, find f(h(−2)). You want both stages completed. Plan: compute h(−2) = −4, then replace both t slots in f with that entire signed answer.

−2h−4f20firstsecond
A negative intermediate input can produce a positive final output.
  1. h(−2) = 3(−2) + 2 = −6 + 2 = −4, so f(h(−2)) = f(−4).The inner output becomes the outer input.
  2. f(−4) = (−4)2 − (−4) = 16 + 4 = 20.A negative squared is positive, and subtracting a negative adds its opposite.
Answer
f(h(−2)) = 20.
Check The combined expression at −2 is (3(−2) + 2)2 − (3(−2) + 2) = (−4)2 − (−4) = 20.
Rung 4Rung 4: a fractional final answer

Let q(x) = 2x + 3 and p(u) = u+2u−2. Find p(q(1)). You start with 1 and want the output after the linear rule and then the fraction rule. Plan: compute q(1), replace both outer u slots with that answer, and divide only after computing the whole top and bottom.

1q: 2x + 35p: (u + 2)/(u− 2)7/3firstsecond
The first answer 5 fills both input places of the outer fraction.
  1. q(1) = 2 × 1 + 3 = 5.The inner formula acts first, with multiplication before addition.
  2. p(q(1)) = p(5) = 5+25−2.Both u slots receive the same whole inner answer 5.
  3. 5 + 2 = 7 and 5 − 2 = 3, so p(q(1)) = 73.The top and bottom must each be completed before division; the bottom 3 is nonzero.
Answer
p(q(1)) = 73.
Check Substitute directly into the combined expression: (2×1+3)+2(2×1+3)−2 = 73. Multiplying the answer by the bottom gives 73 × 3 = 7, the original top.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: f(−4) = −42 − 4 = −20.
This drops the input's parentheses and also changes the second input's sign. −42 means the opposite of 42, while (−4)2 squares the whole input.
✓ Instead: f(−4) = (−4)2 − (−4) = 16 + 4 = 20.
Tips and tricks
  • Write the intermediate output on its own line before the outer substitution.
  • Name the function before reading its formula. The letters inside formulas can be different and still represent input slots.
  • Know cold: one line per function, inner first. The output of the first line is the input of the second.
Trap. Replacing only the squared input in t2 − t. The same input goes into both positions, so f(5) is 52 − 5.