Tutorials › Calculus I › Evaluating Functions from Formulas

Function Notation and Representations · Tutorial 4 of 1495

Evaluating Functions from Formulas

Evaluate linear and quadratic functions by replacing the input with the specified number and simplifying carefully.

Beginner 8 min read

What You'll Learn

  • Interpret \(f(a)\) as the output of the function when its input is \(a\).
  • Substitute a specified number for every occurrence of the input variable.
  • Use parentheses to keep negative inputs grouped correctly.
  • Evaluate linear formulas by following the order of operations.
  • Evaluate quadratic formulas while distinguishing \((x)^2\) from a negative square.
  • Check a result by recalculating the substituted expression.

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\).

Definition: To evaluate a function given by a formula at a specified numerical input, replace each occurrence of the input variable in the formula with that number, then simplify. The resulting number is the value of the function at that input.

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.

1
Identify the input.
Read the number inside the function notation, such as the \(5\) in \(f(5)\).
2
Replace the variable.
In the formula, replace every occurrence of \(x\) with the specified number. Use parentheses around a negative input.
3
Simplify in order.
Evaluate powers first, then multiplication, and then addition or subtraction.
4
Check the calculation.
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\):

$$ f(4)=2(4)+3. $$

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:

$$ g(-2)=5-3(-2). $$

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\):

$$ h(3)=(3)^2+2(3)-1. $$

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:

$$ q(-2)=(-2)^2-4(-2)+1. $$

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.

Justification: Suppose a function is specified by a formula \(f(x)=E(x)\), where \(E(x)\) is an expression involving the input variable \(x\). By the meaning of this formula, the output at input \(a\) is obtained by applying the same operations in \(E\) with \(a\) as the input. Replacing every occurrence of \(x\) by \(a\) records those operations with the chosen input, so the resulting numerical expression is \(f(a)\).

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:

$$ q(-2)=-2^2-4(-2)+1=-4+8+1=5. $$

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:

$$ q(-2)=(-2)^2-4(-2)+1=4+8+1=13. $$

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.

  1. If \(f(x)=3x+2\), what is \(f(5)\)?
  2. If \(g(x)=7-2x\), what is \(g(-3)\)?
  3. If \(h(x)=x^2+x-4\), what is \(h(2)\)?
  4. If \(q(x)=x^2-3x+2\), what is \(q(-1)\)?
  5. In your own words, why should a negative input be placed in parentheses when substituting it into a squared term?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon