Evaluate formulas one number at a time
Quick review (2 minutes)
Keep two recipe cards on a counter.
For 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.
1. Expand circle notation into parentheses if needed.
2. Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
3. Complete that arithmetic and write the intermediate output.
4. Copy the outer formula and replace every input letter with that output.
5. Complete the arithmetic and check by substituting into a combined formula.
Let f(t) = − 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.
f(h(1)) = 20.
h(f(1)) = 2.
Replacing only the squared input in − t. The same input goes into both positions, so f(5) is − 5.
1. Expand circle notation into parentheses if needed.
2. Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
3. Complete that arithmetic and write the intermediate output.
4. Copy the outer formula and replace every input letter with that output.
5. Complete the arithmetic and check by substituting into a combined formula.
Function
A rule that gives exactly one output for each input it accepts.
Input
The starting value you give a function. It goes inside the parentheses in function notation.
Output
The answer a function produces from an accepted input.
Evaluate
Find the output of a function or the value of an expression for a given input.
Undefined
Having no permitted output under the rule being used, as with division by zero or a negative real square-root radicand.
Inner function
The function evaluated first in a composition. Its output becomes the next function's input.
Substitution
Replacing a variable with a number or expression everywhere that variable appears. Parentheses hold a multi-term replacement together.
Formula
A written rule using numbers, symbols, and operations to describe how a quantity is calculated.
Variable
A symbol that stands for a number or quantity. Its value may change or may be the unknown you need to find.
Denominator
The bottom of a fraction. It names the divisor and cannot be zero.
Order of operations
The agreed calculation order: parentheses, exponents, multiplication and division left to right, then addition and subtraction left to right.
Fraction
One number divided by another nonzero number. The top is divided by the bottom; equal pieces give a picture of its size.
Intermediate answer
The in-between output of the first function, which becomes the next function’s input.
Linear
A formula built from a constant times the input plus a constant. Its graph is a straight line.
1 In plain words
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) = and f(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.
2 Picture it
Reminder
Reminder: Order of operations, Signed arithmetic, Substitution, Composition order, Input-slot names
- Order of operations. Square before subtracting: − 5 = 25 − 5 = 20.
- Signed arithmetic. (−4 = 16 and 16 − (−4) = 20.
- Substitution. Both slots in − t receive the same number: f(5) = − 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.
3 Why
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, − t and − 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.
4 The rule
For 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
f of h of one
Put 1 into h’s formula, then put its resulting number into f’s formula.
- h(x) = 3x + 2
- f(h(1)) = f(5) = 20
The first recipe makes the ingredient measured into the second recipe.
The same idea, other ways
Finish the first recipe before beginning the second. A finished intermediate value becomes the ingredient measured into the second recipe.
f(t) = − t has two blanks holding the same input. At input 5 the blanks become − 5. Calling the blanks u would not change either operation.
Part 1: Number 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.
Worked example
A 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.
Show the steps and the answer
- .Replace the input letter with −2 and keep its sign inside parentheses.
- .A positive times a negative is negative, and adding 2 moves two steps toward zero.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Keep a negative input inside parentheses until multiplication is complete.
Part 2: Intermediate 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.
- The square happens before the subtraction.
Worked example
Finish a negative intermediate path
For f(t) = − 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.
Show the steps and the answer
- , so .The inner output becomes the outer input.
- .A negative squared is positive, and subtracting a negative adds its opposite.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Circle every occurrence of the outer input letter before substituting.
5 How
- Expand circle notation into parentheses if needed.
- Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
- Complete that arithmetic and write the intermediate output.
- Copy the outer formula and replace every input letter with that output.
- Complete the arithmetic and check by substituting into a combined formula.
Evaluate formulas at a numerical input
- Expand circle notation into parentheses if needed.
- Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
- Complete that arithmetic and write the intermediate output.
- Copy the outer formula and replace every input letter with that output.
- Complete the arithmetic and check by substituting into a combined formula.
6 Worked example
Worked example
Both orders at input 1
Let f(t) = − 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.
Show the steps and the answer
- For f(h(1)), start with .h is the inner function for this order.
- .The output 5 replaces both occurrences of t in f.
- For h(f(1)), start with .f is the inner function for the reversed order.
- .The intermediate output 0 is a valid numerical input to h.
- f(h(1)) = 20.
- h(f(1)) = 2.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 4
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.
Show the steps and the answer
- .The circle means composition, so g is the inner function.
- .The original input goes into g first.
- .The output 3 from g is the input to f.
Rung 2 of 4
Fill every outer slot and reverse the order
Let f(t) = − 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.
Show the steps and the answer
- For f(h(1)), start with .h is the inner function for this order.
- .The output 5 replaces both occurrences of t in f.
- For h(f(1)), start with .f is the inner function for the reversed order.
- .The intermediate output 0 is a valid numerical input to h.
- f(h(1)) = 20.
- h(f(1)) = 2.
Rung 3 of 4
Carry a negative output
For f(t) = − 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.
Show the steps and the answer
- , so .The inner output becomes the outer input.
- .A negative squared is positive, and subtracting a negative adds its opposite.
Rung 4 of 4
A fractional final answer
Let q(x) = 2x + 3 and p(u) = . 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.
Show the steps and the answer
- .The inner formula acts first, with multiplication before addition.
- .Both u slots receive the same whole inner answer 5.
- and , so .The top and bottom must each be completed before division; the bottom 3 is nonzero.
Counterexamples
What it is not, and the tempting wrong moves.
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.
7 The trap
Replacing only the squared input in − t. The same input goes into both positions, so f(5) is − 5.
Problems marked OpenStax come from Precalculus 2e by Jay Abramson, published by OpenStax, under the CC BY-NC-SA 4.0 licence. Access for free at https://openstax.org/books/precalculus-2e/pages/1-introduction-to-functions.