Function Notation and Evaluation
Learning goals
- Read as the function and as one value
- Copy any expression into every slot the argument marks
- Reject as a general rule
- Simplify the difference quotient into a secant slope
- Require equal domains before calling two functions equal
- Evaluate a piecewise rule by choosing the right case
The function is ; its value is
Start by separating two things that the phrase “the function ” quietly runs together. Strictly, is the function, the whole rule with its domain, as in Relations and Functions, while is a number: the output the rule produces at the input . Writing “the function ” is a mild abuse of language that everyone uses. But when a step gets subtle, it pays to remember that is the machine and is what comes out of it.
This also settles what the parentheses are not. They are not multiplication. does not mean times , and is not ; is a rule, not a number, so there is nothing to multiply it by. The parentheses do one job only: they hold the input the rule is about to act on. Keep that job in mind, because the next section widens what is allowed to sit inside them.
The argument is a slot, not the letter
Picture the rule with an empty box where the input goes:
The box says “whatever you feed me gets squared, then is added.” The in is just a name written in that box so we can talk about a general input; it is a placeholder, not a special number. So anything at all can go in the slot, and whatever goes in is copied into every place the box appears:
The input can even be another expression built from . Putting in the slot gives
and you may drop a function value into the slot too: , treating as just another expression. Combining functions this way earns its own lesson later in the chapter; here it is nothing more than substitution.
Because the slot only cares about what you put in, not what you call it, the name of the input variable carries no meaning. The rules and have the same domain, the same codomain, and pair every input with the same output. So by the equality test later in this lesson, those two rules are the same function. Renaming to changes the writing, not the function.
The slot also reads backward. Because is a number, an equation like is an ordinary equation in . You solve that equation for the input that produces that output, using only the equation solving of Chapter 1.
The one habit the slot demands is substitution with parentheses. Wrap the whole input before applying the rule. Skip the wrapping and you silently change the problem: for ,
The correct result squares the input; the careless negates a square, and the two disagree at every nonzero input (at , but ). The parentheses are what hold the whole expression together inside the slot.
Worked example 1 Substituting whole expressions into the slot
Let . Evaluate , , and , keeping every input wrapped in parentheses.
For , put in the slot and square the whole thing:
For , the factor is inside the slot, so it is squared along with :
For , the entire sum is squared:
Notice that came back equal to here, while is , not . The slot squares whatever it holds, coefficients and all.
Check your understanding
If , which expression equals ?
Put the whole input into the slot and square it.
Squaring gives , not , because the is squared along with the .
is usually not
Because the slot swallows the whole input, squares the sum ; it does not add the separate outputs. With ,
These differ by the cross term , which is almost never zero. A single pair of numbers makes the gap concrete: , while . Pulling a constant out fails the same way: , but . So is a rule, not a multiplier. Unless you have checked that the particular rule allows it, you may not distribute across a sum or slide a constant through it.
One family of rules does respect both moves: the straight-line rules through the origin, .
The rules add and scale, and scaling alone pins them down#
Take any rule of the form with a constant. For all inputs and , the distributive law gives
so the output of a sum is the sum of the outputs. For any constant ,
so scaling the input by scales the output by . Both identities hold for every rule .
The reverse direction holds too, and it is the scaling identity that delivers it. Suppose for every real and every . Put : then for all , which is exactly , a rule of the form with slope . So the pair of identities does pin down the through-origin lines, with no extra assumption needed. Additivity by itself is weaker: the identity alone does not force without a further hypothesis such as the graph having no breaks. Notice as well that adding a nonzero constant already destroys additivity: for ,
and these agree only when . Even the lines that everyday language calls linear are additive only when they pass through the origin.
So the rules are exactly the rules that respect scaling, and each of them is additive as well. The one caution is that additivity on its own is weaker: it does not single out without an added assumption. That gap is why the scaling identity is the one that pins the rules down.
The difference quotient
Now that is expressible, we can measure how much changes as the input moves from to . The change in output is , and dividing by the change in input gives the difference quotient
Work it out for . The numerator expands and the terms cancel:
Every term left has a factor of , so divide:
Hold on to that restriction , because it is the whole point. Cancelling the is a division, and you can only divide by when . The original difference quotient is undefined at , where it reads , while the simplified is perfectly happy at . The two expressions agree for every but have different domains, so they are genuinely different expressions that happen to match wherever both are defined. This is exactly the effect you met in Chapter 1, where clearing a denominator could change which inputs are allowed. Here cancelling an does the same thing, and the next section names why it matters.
The quantity itself has a meaning worth naming. The points and sit on the graph of , and is the slope of the straight line through them, the secant line. It is the average rate of change of between the two inputs. A later course lets shrink toward to turn this secant slope into the slope of the curve at a single point, but that is calculus. Here we go only as far as the algebra, and the algebra is exactly the careful substitution of this lesson.
Worked example 2 A difference quotient with a linear term
Simplify for , with .
Substitute into the whole rule, wrapping it in parentheses everywhere:
Subtract . The and terms cancel, leaving only terms with a factor of :
Now divide by , which is allowed because :
The linear term contributes the constant to the answer, and the squared term contributes the you saw for .
Worked example 3 A difference quotient for
Simplify for , with .
Put in the slot, then combine the two fractions over the common denominator :
Dividing by means multiplying by , and the in the numerator cancels the one in the denominator:
The equality holds where both sides are defined, and that needs , because you divided by to reach it. The equality also needs and , so that is defined at both and . The simplified is itself perfectly defined at , where it equals . That value of is the one the cancellation dropped, the same way clearing a denominator in Chapter 1 changed which inputs were allowed.
The same wrap-the-whole-input rule handles higher powers. For , expand the cube , subtract , and divide by :
Nothing new happens: the whole input is cubed, and every surviving term carries a factor of .
Check your understanding
For , simplify for .
Expand the numerator and subtract, then divide by .
The cancellation of is a division, so this holds only for .
When are two functions equal?
The difference quotient just handed us two expressions that agree everywhere they are both defined yet are not the same, because their domains differ. That is a clue about what equality of functions should mean, and it deserves a precise statement.
Two functions are equal exactly when their domains, codomains, and values all match#
Recall from Relations and Functions that a function is a set of input-output pairs, with no repeated first coordinate, together with a declared codomain. We prove that and are the same function if and only if three conditions all hold. The three are: the same domain, the same codomain, and at every input in that domain.
Suppose first that and are the same function. Then they are literally the same set of pairs and the same codomain. The domain of a function is the set of its first coordinates, so the two domains match. For each input the one pair with first coordinate is shared by both sets, so at every . Equal functions therefore agree on domain, codomain, and every value.
Conversely, suppose and have the same domain , the same codomain, and for every in . Then for each in the pair is the pair , so the two sets of pairs are identical, and the codomains match by assumption. Having the same pairs and the same codomain, and are the same function.
Both directions hold, so the equality of two functions is precisely the equality of their domains, their codomains, and all their values, no more and no less.
This is why and are different functions, not equal ones. For the fraction cancels, , so the two rules agree wherever both are defined. But lies in ‘s domain and not in ‘s, since reads there. Their domains differ, so by the test above they are not the same function. It is the same lesson the difference quotient taught: and agree for but part ways at , and matching values on the overlap is not enough. This is also why every cancelling step in Chapter 1 had to record the inputs it removed.
Worked example 4 Same formula after cancelling, different function
Decide whether and are the same function.
Factor the numerator with the difference of squares, . For the common factor cancels:
So the two rules agree at every input except possibly . Check that input directly. The denominator is there, so is , undefined, and is not in ‘s domain. But , so is in ‘s domain:
The domains differ, so and are different functions, even though simplifies to everywhere is defined.
Piecewise definitions
A piecewise definition gives a single function by splitting the input into cases and naming a rule on each. For example,
is one function, not two. To evaluate it, first find which case the input falls in, then use that case’s rule. Since , use the top rule: . Since , use the bottom rule: . The boundary input is caught by the second case, because is true while is false, so .
For a piecewise rule to define a function at all, the cases must do two things: cover the whole domain, and never assign one input two different outputs. If some input were left out of every case, it would get no output. And if two cases overlapped and disagreed on the overlap, that input would be handed two different outputs, which Relations and Functions forbids. Cases are allowed to overlap when they agree there. For instance can be written as for and for , which overlap at yet agree, since both give . The easy way to rule out any conflict is to make the cases disjoint, which is what this example does. Here and share no input and together cover every real number, so is well defined.
Worked example 5 Evaluating a piecewise rule
Evaluate , , , and for
For each input, pick the case whose condition it satisfies, then apply that rule.
At , the condition holds, so use : . At , the condition holds, so use : . At the boundary , the middle case still applies, because is true while is false, so . At , the condition holds, so use :
The only care needed is at a boundary: read the inequalities to see which single case owns that point.
Check your understanding
Let for and for . What is ?
The input satisfies , so use the second rule.
The first rule needs , which does not satisfy, so it does not apply, and the value is , not .