Course contentsShow
← Mathematics
Lesson 541 of 3,12114. Functions in DepthFree lesson

Evaluating Functions with Variable Inputs

Substitute algebraic expressions into functions and simplify the resulting expressions.

Evaluating Functions with Variable Inputs

What You'll Learn

You'll learn how to substitute algebraic expressions (not just numbers) into functions and simplify the results.

The Core Idea

You already know how to evaluate a function like f(x) = 2x + 3 with a number: f(5) = 2(5) + 3 = 13. But what if the input isn't a number—what if it's another variable or an entire expression like a + 1 or x²?

The process is exactly the same: replace every occurrence of the input variable with the new expression, then simplify using your algebra skills.

Example 1: Variable Input

If f(x) = 2x + 3, find f(a):

  • Replace every x with a
  • f(a) = 2a + 3

That's it! Sometimes the answer stays as an expression.

Example 2: Expression Input

If f(x) = x² - 4x, find f(t + 1):

  • Replace every x with (t + 1) — use parentheses!
  • f(t + 1) = (t + 1)² - 4(t + 1)
  • Expand: = t² + 2t + 1 - 4t - 4
  • Simplify: = t² - 2t - 3

Why Parentheses Matter

Think of the input slot as a container. When you substitute t + 1, you're putting the entire expression into that container. Without parentheses, 2x becomes 2t + 1 instead of the correct 2(t + 1) = 2t + 2.

Analogy

Imagine a function as a recipe that says "take your ingredient and double it, then add 3." If your ingredient is "5 apples," you get "10 apples + 3." If your ingredient is "a basket of oranges," you get "2 baskets of oranges + 3." The recipe doesn't change—just what you're working with.

Key Takeaway: To evaluate a function with a variable input, substitute the entire expression for every instance of the input variable, wrap it in parentheses, then simplify the resulting algebraic expression.