Evaluating Functions

Learning Objective

Introduction

Throughout this course, you have been working with algebraic equations. Many of these equations are functions. For example, `y = 4x+1` is an equation that represents a function. When you input values for `x`, you can determine a single output for `y`. In this case, if you substitute `x = 10` into the equation you will find that `y` must be `41`; there is no other value of `y` that would make the equation true.

Rather than using the variable `y`, the equations of functions can be written using function notationAn equation that takes the form `f(x)=`, and is read "`f "of " x " is..."`" For example, `f(x)=3x+7`.. Function notation is very useful when you are working with more than one function at a time, and substituting more than one variable in for `x`.

Function Notation

Some people think of functions as “mathematical machines.” Imagine you have a machine that changes a number according to a specific rule, such as “multiply by `3` and add `2`” or “divide by `5`, add `25`, and multiply by `-1`.” If you put a number into the machine, a new number will pop out the other end, having been changed according to the rule. The number that goes in is called the input, and the number that is produced is called the output.

You can also call the machine “`f`” for function. If you put `x` into the machine, `f(x)` comes out. Mathematically speaking, `x` is the input, or the “independent variable,” and `f(x)` is the output, or the “dependent variable,” since it depends on the value of `x`.

`f(x)=4x + 1` is written in function notation and is read “`f` of `x` equals `4x` plus `1`.” It represents the following situation: A function named `f` acts upon an input, `x`, and produces `f(x)` which is equal to `4x + 1`. This is the same as the equation `y = 4x + 1`.

Function notation gives you more flexibility because you don’t have to use `y` for every equation. Instead, you can use `f(x)` or `g(x)` or `c(x)`. This can be a helpful way to distinguish equations of functions when you are dealing with more than one at a time.

You could write the formula for perimeter, `P = 4s`, as the function `p(x) = 4x`, and the formula for area, `A = x^2`, as `a(x) = x^2`. This would make it easy to graph both functions on the same graph without confusion about the variables.

Which two equations represent the same function?

 

A) `y = 2x - 7` and `f(x) = 7 - 2x`

 

B) `3x = y - 2` and `f(x) = 3x - 2`

 

C) `f(x) = 3x^2 + 5` and `y = 3x^2 + 5`

 

D) None of the above

 

 

Evaluating Functions

Equations written using function notation can also be evaluated. With function notation, you might see a problem like this.

Given `f(x) = 4x + 1`, find `f(2)`.

You read this problem like this: “given `f` of `x` equals `4x` plus one, find `f` of `2`.” While the notation and wording is different, the process of evaluating a function is the same as evaluating an equation: in both cases, you substitute `2` for `x`, multiply it by `4` and add `1`, simplifying to get `9`. In both a function and an equation, an input of `2` results in an output of `9`.

`f(x) = 4x + 1`

`f(2) = 4(2) + 1=8 + 1 = 9`

You can simply apply what you already know about evaluating expressions to evaluate a function. It’s important to note that the parentheses that are part of function notation do not mean multiply. The notation `f(x)` does not mean `f` multiplied by `x`. Instead the notation means “`f` of `x`” or “the function of `x`” To evaluate the function, take the value given for `x` , and substitute that value in for `x` in the expression. Let’s look at a couple of examples.

Example

Problem

Given `f(x) = 3x - 4`, find `f(5)`.

 

 

`f(5) = 3(5) - 4`

Substitute `5` in for `x` in the function.

 

`f(5) = 15 - 4`

`f(5) = 11`

 

Simplify the expression on the right side of the equation.

Answer

Given `f(x)=3x - 4`, `f(5) = 11`.

 

Functions can be evaluated for negative values of `x`, too. Keep in mind the rules for integer operations.

Example

Problem

Given `p(x) = 2x^2 + 5`, find `p(-3)`.

 

`p(-3) = 2(-3)^2 + 5`

Substitute `-3` in for `x` in the function.

 

`p(-3) = 2(9) + 5`

`p(-3) = 18 + 5`

`p(-3) = 23`

Simplify the expression on the right side of the equation.

Answer

Given `p(x) = 2x^2 + 5`, `p(-3) = 23`.

You may also be asked to evaluate a function for more than one value as shown in the example that follows.

Example

Problem

Given `f(x) = 3x^2 + 2x + 1`, find `f(0)``f(2)`, and `f(-1)`.

 

`f(0) = 3(0)^2 + 2(0) + 1`

`f(0) = 0 + 0 + 1`

`f(0) = 1`

Treat each of these like three separate problems. In each case, you substitute the value in for `x` and simplify. Start with `x = 0`.

 

`f(2) = 3(2)^2 + 2(2) + 1`

`f(2) = 3(4) + 4+1`

`f(2) = 12 + 4 + 1`

`f(2) = 17`

Evaluate for `x = 2`.

 

`f(-1) = 3(-1)^2 + 2(-1) + 1`

`f(-1) = 3(1) + (-2) + 1`

`f(-1) = 3-2+1`

`f(-1) = 1 + 1`

`f(-1) = 2`

Evaluate for `x = -1`.

Answer

Given `f(x) = 3x^2 + 2x + 1`, `f(0) = 1`, `f(2) = 17`, and `f(-1) = 2`.

 

Given `h(x) = 4x + 7`, find `h(-10)`.

 

A) `-40h + 7`

 

B) `-33`

 

C) `4x + 17`

 

D) `47`

 

 

Evaluating Functions with Variable Inputs

So far, you have evaluated functions for inputs that have been constants. Functions can also be evaluated for inputs that are variables or expressions. The process is the same, but the simplified answer will contain a variable. The following examples show how to evaluate a function for a variable input.

Example

Problem

Given `f(x) = 3x^2 + 2x + 1`, find `f(b)`.

 

 

`f(b) = 3b^2 + 2b + 1`

 

This problem is asking you to evaluate the function for `b`. This means substitute `b` in the equation for `x`.

(That’s it! You're done.)

Answer

Given `f(x) = 3x^2 + 2x+1`, `f(b) = 3b^2 + 2b + 1`.

 

       

In the following example, you evaluate a function for an expression. So here you will substitute the entire expression in for `x` and simplify.

Example

Problem

Given `f(x) = 4x + 1`, find `f(h + 1)`.

 

 

`f(h + 1) = 4(h + 1) + 1`

This time, you substitute `(h+1)` into the equation for `x`.

 

`f(h + 1) = 4h+4 + 1`

`=4h + 5`

 

Use the distributive property on the right side, and then combine like terms to simplify.

Answer

Given `f(x) = 4x + 1`, `f(h + 1) = 4h+5`.

 

       

Summary

Function notation takes the form such as `f(x) = 18x - 10` and is read “`f` of `x` equals `18` times `x` minus `10`.” Function notation can use letters other than `f`, such as `c(x)`, `g(x)`, or `h(x)`. As you go further in your study of functions, this notation will provide you more flexibility, allowing you to examine and compare different functions more easily. Just as an algebraic equation written in `x` and `y` can be evaluated for different values of the input `x`, an equation written in function notation can also be evaluated for different values of `x`. To evaluate a function, substitute in values for `x` and simplify to find the related output.