Evaluating Functions

Hello! Today we are going to take a look at evaluating functions and expressions. All this requires is plugging in different values for variables and simplifying. Let’s start with a super simple example.

Evaluate the function $$f(x)=3x-7 \text{ at } x=6$$.

To solve, start by plugging in 6 anywhere you see an $$x$$.

$$f(6)=3(6)-7$$

Using parentheses helps you keep the operations straight; we know that we need to multiply 3 and 6.

Now, we were asked to evaluate the function at $$x=6$$. When written in function notation like this, all we need to do is solve for $$f(6)$$. So we just need to simplify the right side of the equation. Start by multiplying 3 and 6.

$$f(6)=18-7$$

Now, subtract.

$$f(6)=11$$

Let’s try another one.

Evaluate the function $$g(x)=2x^{2}+4x+1$$ at $$x=-3$$.

Don’t let the $$g(x)$$ confuse you! Treat it just like you would if it were an $$f(x)$$. Since we are evaluating at $$x=-3$$, solve for $$g(-3)$$.

Start by plugging in $$-3$$ anywhere you see an $$x$$.

$$g(-3)=2(-3)^{2}+4(-3)+1$$

Notice how important our parentheses are in our first term: $$2(-3)^{2}$$. If we didn’t have them, it would look like this: $$2-3^{2}$$. You would mistakenly subtract a positive number squared instead of multiplying by a negative number squared. So the parentheses are really important to keep our numbers straight.

Now that we’ve properly plugged in our value for $$x$$, let’s simplify the expression by following the order of operations. First, simplify the exponents.

$$g(-3)=2(9)+4(-3)+1$$

Then, multiply.

$$g(-3)=18-12+1$$

$$g(-3)=7$$

We’ve taken a look at evaluating functions. Now let’s take a look at evaluating expressions. In questions like these, we will follow the same steps we have been. The only difference is there will be more variables. Let’s try a problem.

Simplify the expression $$\frac{2x+3y}{z}$$ when $$x=-4$$, $$y=8$$, and $$z=-2$$.

First, plug in the given values for $$x$$, $$y$$, and $$z$$. Make sure to use parentheses!

$$\frac{2(-4)+3(8)}{(-2)}$$

Now, simplify the expression. We will start by simplifying the numerator. First, multiply.

$$\frac{-8+24}{-2}$$

It’s okay that we dropped the parentheses in the denominator because -2 is the only term. Now, add -8 and 24.

$$\frac{16}{-2}$$

Remember, a fraction bar means division, so divide $$16\div (-2)=-8$$.

Not too hard. Let’s try one last example together.

Simplify the expression $$\frac{2a}{b}-4c+d$$ when $$a=9$$, $$b=3$$, $$c=-7$$, and $$d=4$$.

Start by substituting in the numbers.

$$\frac{2(9)}{3}-4(-7)+(4)$$

Now, simplify the expression. We’re going to start by multiplying.

$$\frac{18}{3}+28+4$$

Now we’re going to divide.

$$6+28+4$$