Skip to main content

Function Evaluator

Mathematics - Function Evaluator

Function Evaluator

Evaluate functions by substituting values with step-by-step explanation. Learn function notation, evaluate f(x) for any x, work with piecewise functions, and understand the relationship between inputs and outputs.

Evaluate a Function

Enter a function expression in terms of x and a value for x. Click Evaluate to substitute and calculate the result with step-by-step working. Use ^ for exponents (e.g., x^2 + 3x - 5).

Result will appear here.
Note: Enter the function using standard notation: x^2 for x², 3x for 3×x, 1/x for reciprocal, sqrt(x) for square root, abs(x) for absolute value, sin(x), cos(x), tan(x) for trig functions.

Function Evaluation – Complete Explanation

Evaluating a function means finding the output value that corresponds to a given input. It's the process of substituting a specific value for the variable and simplifying the expression. This fundamental skill is the gateway to understanding graphs, solving equations, and modeling real-world relationships.

Function Evaluation Process

Given f(x) = expression in x, to find f(a):
1. Replace every x with a (the input value)
2. Simplify the resulting expression
3. The result is f(a) — the output

1. What Is a Function?

A function is a rule that assigns exactly one output to each input. Think of it as a machine: you feed it an input x, and it produces exactly one output f(x).

Key characteristics:

  • Domain: The set of all possible input values (x-values).
  • Range: The set of all possible output values (f(x)-values).
  • Vertical Line Test: A graph represents a function if any vertical line crosses it at most once.
  • Notation: f(x) is read as "f of x" — it does NOT mean f times x.

2. Understanding Function Notation

Function notation can be one of the most confusing aspects for beginners:

f(x) does NOT mean multiplication.

f(x) means "the value of the function f when the input is x."

• f(3) means "find the output when x = 3."

• f(a + h) means "find the output when x = a + h."

• f(g(x)) means "find the output of f when the input is g(x)" — composition.

Common function names include f, g, h, p, and special names like sin, cos, log. The variable doesn't have to be x — it can be any letter.

3. How to Evaluate a Function

The process is straightforward but requires attention to detail:

  1. Identify the function rule (the expression).
  2. Replace every occurrence of the variable with the given input value, enclosed in parentheses.
  3. Simplify using the order of operations (PEMDAS): Parentheses, Exponents, Multiplication/Division (left to right), Addition/Subtraction (left to right).

4. Step-by-Step Examples

Example 1: Evaluating a Polynomial Function

Evaluate f(x) = x² + 3x - 5 at x = 4.

Step 1: Substitute x = 4 into the function:
        f(4) = (4)² + 3(4) - 5

Step 2: Follow the order of operations:
        = 16 + 12 - 5

Step 3: Simplify:
        = 23

Result: f(4) = 23

Example 2: Evaluating with Negative Input

Evaluate g(x) = 2x³ - x + 7 at x = -2.

Step 1: Substitute x = -2:
        g(-2) = 2(-2)³ - (-2) + 7

Step 2: Simplify powers first:
        = 2(-8) + 2 + 7

Step 3: Multiply:
        = -16 + 2 + 7

Step 4: Add:
        = -7

Result: g(-2) = -7

5. More Examples

Example 1: h(x) = 5x - 3, find h(2).

h(2) = 5(2) - 3 = 10 - 3 = 7

Example 2: p(x) = x² + 2x + 1, find p(-1).

p(-1) = (-1)² + 2(-1) + 1 = 1 - 2 + 1 = 0

Example 3: f(x) = √(x + 9), find f(7).

f(7) = √(7 + 9) = √16 = 4

Example 4: g(x) = 1/(x - 2), find g(5).

g(5) = 1/(5 - 2) = 1/3 = 0.333...

6. Evaluating Piecewise Functions

A piecewise function has different rules for different parts of its domain. To evaluate, first determine which piece applies based on the input value.

        ⎧ x²      if x < 0
f(x) =  ⎨ 2x + 1  if 0 ≤ x < 5
        ⎩ 10      if x ≥ 5

Evaluate f(3):
  Since 0 ≤ 3 < 5, use the middle rule: f(3) = 2(3) + 1 = 7

Evaluate f(-2):
  Since -2 < 0, use the first rule: f(-2) = (-2)² = 4

Evaluate f(7):
  Since 7 ≥ 5, use the last rule: f(7) = 10

7. Functions with Multiple Variables

Some functions have more than one input variable:

Example: f(x, y) = x² + 3xy - y²

Evaluate f(2, 3):

f(2, 3) = (2)² + 3(2)(3) - (3)² = 4 + 18 - 9 = 13

The principle is the same: substitute each value for its corresponding variable and simplify.

8. Common Mistakes to Avoid

  • Treating f(x) as multiplication: f(x) is notation, not "f times x." f(3) means substitute 3 for x, not multiply f by 3.
  • Forgetting parentheses when substituting negative numbers: If f(x) = x², then f(-3) = (-3)² = 9, not -3² = -9. Always put negative values in parentheses.
  • Incorrect order of operations: Remember PEMDAS — exponents before multiplication, multiplication before addition.
  • Not checking the domain: Some inputs may not be valid. For f(x) = 1/(x-2), x cannot be 2 (division by zero). For f(x) = √x, x must be ≥ 0 (in the real numbers).
  • Confusing function evaluation with solving: Evaluating f(4) = 23 means finding the output for input 4. Solving f(x) = 23 means finding which input(s) give output 23.

9. Real-World Applications

  • Physics: Position functions s(t) give position at time t; evaluating s(5) gives position after 5 seconds.
  • Economics: Cost functions C(x) give the cost of producing x items; evaluating C(100) gives the cost for 100 units.
  • Biology: Population models P(t) give population at time t; evaluating P(10) predicts population in year 10.
  • Computer Science: Complexity functions T(n) describe algorithm runtime; evaluating T(1000) estimates time for input size 1000.
  • Engineering: Stress-strain functions describe material behavior; evaluating at a given strain gives stress.
  • Finance: Compound interest functions A(t) = P(1+r)^t; evaluating gives account balance after t years.

10. Practice Problems with Solutions

Problem 1: f(x) = 3x² - 2x + 1. Find f(2).

Solution: f(2) = 3(4) - 2(2) + 1 = 12 - 4 + 1 = 9

Problem 2: g(x) = x³ - 4x. Find g(-1).

Solution: g(-1) = (-1)³ - 4(-1) = -1 + 4 = 3

Problem 3: h(x) = (x + 1)/(x - 1). Find h(3).

Solution: h(3) = (3+1)/(3-1) = 4/2 = 2

Problem 4: If f(x) = 2ˣ, find f(0), f(1), and f(3).

Solution: f(0)=1, f(1)=2, f(3)=8

11. Tips for Mastering Function Evaluation

  • Always write parentheses around the substituted value, especially for negative numbers.
  • Work step by step — don't try to do everything in your head at once.
  • Double-check the order of operations: exponents → multiply/divide → add/subtract.
  • If the function involves fractions, check for domain restrictions (denominator ≠ 0).
  • If the function involves square roots, check that the radicand is non-negative.
  • Practice with a variety of function types: linear, quadratic, polynomial, rational, radical, exponential.
  • Use the calculator to verify your manual work, but always try to work it out by hand first.

12. Final Thoughts

Function evaluation is the bridge between abstract algebraic expressions and concrete numerical understanding. Every time you plug a number into a function and get a result, you're discovering a point on a graph, making a prediction from a model, or calculating a real-world quantity. It's the most fundamental operation in algebra and the foundation for everything that follows — from graphing and transformations to calculus and beyond.

Master function evaluation, and you'll have the key skill needed to unlock the power of mathematical functions for modeling, problem-solving, and understanding the world through numbers.