What Does It Mean to Evaluate a Function?
A function formula describes how to produce an output from an input. Evaluating the function means choosing a particular input, putting that number into the formula wherever the input variable appears, and calculating the resulting number.
For example, if \(f(x)=2x+3\), then \(f(4)\) asks for the output when the input is \(4\). The notation \(f(4)\) names an output; it does not mean \(f\) multiplied by \(4\). To find the output, replace \(x\) with \(4\): \(f(4)=2(4)+3=11\).
In the examples here, the function formulas are linear or quadratic, and the specified inputs are numbers that can be used in those formulas. The input is often written as \(a\), giving the notation \(f(a)\), while the formula itself may use \(x\). The letter is a placeholder: the input \(a\) takes the place of \(x\) during the calculation.
A Reliable Substitution Procedure
Substitution works best when it is made explicit before simplifying. In particular, if the input is negative, place it in parentheses. Those parentheses show that the entire negative number is being used as the input, especially when the formula squares that input.
Read the number inside the function notation, such as the \(5\) in \(f(5)\).
In the formula, replace every occurrence of \(x\) with the specified number. Use parentheses around a negative input.
Evaluate powers first, then multiplication, and then addition or subtraction.
Recalculate the substituted expression, keeping its grouping and operation order unchanged.
The variable is not a number to be found after the function value is requested. It is a place in the formula for the input. Once the input has been inserted, the expression can be evaluated using ordinary arithmetic.
Worked Examples with Linear Formulas
Worked Example: Evaluating a Linear Function at a Positive Input
Let \(f(x)=2x+3\). Find \(f(4)\).
The specified input is \(4\), so replace \(x\) with \(4\):
Multiply first: \(2(4)=8\). Then add \(3\): \(8+3=11\). Therefore, \(f(4)=11\).
Check: Recalculating the substituted expression gives \(2(4)+3=8+3=11\), confirming the value.
Worked Example: Evaluating a Linear Function at a Negative Input
Let \(g(x)=5-3x\). Find \(g(-2)\).
Replace \(x\) with the entire input \(-2\), keeping it in parentheses:
Multiply: \(3(-2)=-6\). Therefore, \(5-3(-2)=5-(-6)\). Subtracting a negative is addition, so \(5-(-6)=5+6=11\). Thus, \(g(-2)=11\).
Check: The product of \(3\) and \(-2\) is \(-6\), and \(5-(-6)=11\). This agrees with the evaluated function.
These examples have the same essential structure even though the second includes a negative input. In each case, the number inside the parentheses of the function notation is used in place of the formula's variable. The arithmetic can then be completed one operation at a time.
Evaluating Quadratic Formulas
A quadratic formula contains a squared input, such as \(x^2\). When the input is negative, it is especially important to show the substitution with parentheses. The notation \((-3)^2\) means the product \((-3)(-3)\), which is positive \(9\). By contrast, \(-3^2\), without parentheses, is interpreted as \(-(3^2)\), which is \(-9\). Parentheses make clear which number is being squared.
Worked Example: Evaluating a Quadratic Function at a Positive Input
Let \(h(x)=x^2+2x-1\). Find \(h(3)\).
Replace each \(x\) with \(3\):
Evaluate the power: \((3)^2=9\). Multiply: \(2(3)=6\). Then calculate \(9+6-1=15-1=14\). Therefore, \(h(3)=14\).
Check: Using the substituted expression again, \(3^2+2(3)-1=9+6-1=14\). The result is consistent.
Worked Example: Evaluating a Quadratic Function at a Negative Input
Let \(q(x)=x^2-4x+1\). Find \(q(-2)\).
Replace each \(x\) with \(-2\), using parentheses for each occurrence:
Evaluate the square: \((-2)^2=(-2)(-2)=4\). Multiply the next term: \(-4(-2)=8\). Now add the terms: \(4+8+1=12+1=13\). Thus, \(q(-2)=13\).
Check: Recomputing the grouped expression gives \(4+8+1=13\), confirming the output.
Why Substitution Gives the Function Value
The reason this procedure works is built into the meaning of a formula for a function. The formula specifies how the output depends on its input. If \(f(x)=2x+3\), then the rule says: take the input, multiply it by \(2\), and add \(3\). For input \(4\), those instructions become multiply \(4\) by \(2\), then add \(3\). The written substitution records precisely that instruction.
This reasoning also explains why every occurrence of the variable must be replaced. If the formula is \(x^2+2x-1\), both appearances of \(x\) refer to the same input. Substituting \(3\) gives \(3^2+2(3)-1\), not an expression in which one occurrence has been replaced and the other left unchanged.
A Common Mistake: Losing the Negative Input
A frequent error is to square a negative input without parentheses. For \(q(x)=x^2-4x+1\), an incorrect calculation might be:
The error is in the first term. Substitution puts \(-2\) in place of \(x\), so the square is \((-2)^2\), not \(-2^2\). The corrected calculation is:
The parentheses do not change the input. They show that the whole input, including its negative sign, is being squared. A related error is to change the signs in the formula while substituting. In \(x^2-4x+1\), the subtraction between the first and second terms remains in place; substituting \(-2\) makes the second term \(-4(-2)\), which is positive \(8\).
Distinguishing Input from Output
Function notation keeps the input and output in different roles. In \(f(4)=11\), the number \(4\) is the input and \(11\) is the resulting output. The formula is a rule connecting them. Different inputs can produce the same output, and one must evaluate each requested input by applying the formula rather than guessing from a previous result.
It is also useful to keep the function name and formula separate. If a question gives \(g(x)=5-3x\), then evaluating \(g(-2)\) means using the rule \(5-3x\) with input \(-2\). The letters \(f\), \(g\), and \(h\) simply distinguish function names; the substitution procedure does not depend on which name is used.
Evaluation from a formula is a basic computational skill used throughout calculus. Later work will involve more complicated formulas, but the central habit remains useful: identify the input, replace every occurrence of the variable carefully, and simplify without changing the expression's structure.
Summary
To evaluate a function formula, put the specified numerical input wherever the input variable occurs, then calculate. For linear formulas, take care with subtraction and multiplication. For quadratic formulas, use parentheses around a negative input before squaring. Finally, check the arithmetic by recalculating the substituted expression.
Check Your Understanding
For each question, write the substituted expression before simplifying. Use parentheses when the input is negative.
- If \(f(x)=3x+2\), what is \(f(5)\)?
- If \(g(x)=7-2x\), what is \(g(-3)\)?
- If \(h(x)=x^2+x-4\), what is \(h(2)\)?
- If \(q(x)=x^2-3x+2\), what is \(q(-1)\)?
- In your own words, why should a negative input be placed in parentheses when substituting it into a squared term?