Sometimes it is useful to evaluate a function at a variable expression. One such time is when determining "the difference quotient" of a given function. The difference quotient is discussed in detail an aptly titled link of this section. For now, let's just note that its construction requires one to evaluate a function at an input of the variable expression "$x+h\text{.}$"

For example, consider the function

\begin{equation*} f(x)=7x-5\text{.} \end{equation*}

To evaluate the function at "$x+h$" we need to replace each occurrence of $x$ with the expression "$x+h$". Because $x$ is multiplied by $7$ on the right side of the equation, we will need to write "$x+h$" in parentheses to indicate the entire expression needs to be multiplied by $7\text{.}$ Let's go ahead and perform the operation.

\begin{align*} f(\highlight{x})\amp=7\highlight{x}-5\\ f(\highlight{x+h})\amp=7(\highlight{x+h})-5\\ \amp=7x+7h-5 \end{align*}

Lets see some more examples.

###### Example5.5.1.

Determine $f(x+h)$ for each of the following functions. Make sure that you completely simplify each expression.

1. $f(x)=x^2-x$
2. $f(x)=3-\sqrt{9x^2+4}$
3. $f(x)=\frac{x+7}{2x+7}$
Solution
1. \begin{aligned}[t] f(\highlight{x})\amp=\highlight{x}^2-\highlight{x}\\ f(\highlight{x+h})\amp=(\highlight{x+h})^2-(\highlight{x+h})\\ \amp=(x+h)(x+h)-x-h\\ \amp=x^2+2xh+h^2-x-h \end{aligned}
2. \begin{aligned}[t] f(\highlight{x})\amp=3-\sqrt{9\highlight{x}^2+4}\\ f(\highlight{x+h})\amp=3-\sqrt{9(\highlight{x+h})^2+4}\\ \amp=3-\sqrt{9(x+h)(x+h)+4}\\ \amp=3-\sqrt{9(x^2+2xh+h^2)+4}\\ \amp=3-\sqrt{9x^2+18xh+9h^2+4} \end{aligned}
3. \begin{aligned}[t] f(\highlight{x})\amp=\frac{\highlight{x}+7}{2\highlight{x}+7}\\ f(\highlight{x+h})\amp=\frac{\highlight{x+h}+7}{2(\highlight{x+h})+7}\\ \amp=\frac{x+h+7}{2x+2h+7} \end{aligned}

You can see several more examples by entering difference second degree polynomial formulas ($ax^2+bx+c$) into Figureย 5.5.2. After a few examples, try working yourself first before putting the formula into the app.

Of course, "$x+h$" isn't the only variable expression that we use as an input for a function. Let's see several other examples.

###### Example5.5.3.

Evaluate $g(x^2+3)$ for the function $g(x)=x^2+3x-2\text{.}$

Solution

\begin{aligned}[t] g(\highlight{x})\amp=\highlight{x}^2+3\highlight{x}-2\\ g(\highlight{x^2+3})\amp=(\highlight{x^2+3})^2+3(\highlight{x^2+3})-2\\ \amp=(x^2+3)(x^2+3)+3x^2+9-2\\ \amp=x^4+6x^2+9+3x^2+7\\ \amp=x^4+9x^2+16 \end{aligned}

###### Example5.5.4.

Evaluate $h(\abs{x+10})$ for the function $h(x)=3+\abs{5x-3}\text{.}$

Solution

\begin{aligned}[t] h(\highlight{x})\amp=3+\abs{5\highlight{x}-3}\\ h(\highlight{\abs{x+10}})\amp=3+\abs{5\highlight{\abs{x+10}}-3}\\ \end{aligned}

###### Example5.5.5.

Evaluate $k(5-t)$ for the function $k(t)=\sqrt[3]{t^2-10t+25}\text{.}$

Solution

\begin{aligned}[t] k(\highlight{t})\amp=\sqrt[3]{\highlight{t}^2-10\highlight{t}+25}\\ k(\highlight{5-t})\amp=\sqrt[3]{(\highlight{5-t})^2-10(\highlight{5-t})+25}\\ \amp=\sqrt[3]{(5-t)(5-t)-50+10t+25}\\ \amp=\sqrt[3]{25-10t+t^2+10t-25}\\ \amp=\sqrt[3]{t^2} \end{aligned}

In later classes you will learn how to modify function formulas to produce specific changes to the graph of the function. Sometimes this will entail making changes to the function formula rather than the expression input. For example, adding $3$ to a function formula moves the function curve upward by three units. Consider

\begin{equation*} f(x)=2x^2-9x-8\text{.} \end{equation*}

Adding three to the function formula results in the following.

\begin{align*} f(x)\highlightr{+3}\amp=2x^2-9x-8\highlightr{+3}\\ \amp=2x^2-9x-5 \end{align*}

Frequently we make changes to both the expression input and the function formula. Let's close with several examples of those types of expressions.

###### Example5.5.6.

Evaluate $g(t-5)-7$ for the function $g(t)=-2t+6\text{.}$

Solution
\begin{align*} g(\highlight{t-5}){\highlightr{-7}}\amp=-2(\highlight{t-5})+6\highlightr{-7}\\ \amp=-2t+10-1\\ \amp=-2t+9 \end{align*}
###### Example5.5.7.

Evaluate $-f(5t+3)+4$ for the function $f(t)=-t-11\text{.}$

Solution
\begin{align*} \highlightr{-}f(\highlight{5t+3})\highlightr{+4}\amp=\highlightr{-}(-(\highlight{5t+3})-11)\highlightr{+4}\\ \amp=-(-5t-3-11)+4\\ \amp=5t+3+11+4\\ \amp=5t+18 \end{align*}
###### Example5.5.8.

Evaluate $k(x-7)-k(7-x)$ for the function $k(x)=6x-9\text{.}$

Solution
\begin{align*} k(\highlight{x-7})-k(\highlightb{7-x})\amp=(6(\highlight{x-7})-9)-(6(\highlightb{7-x})-9)\\ \amp=6x-42-9-(42-6x-9)\\ \amp=6x-42-9-42+6x+9\\ \amp=12x-84 \end{align*}
###### Example5.5.9.

Evaluate $5h(3x)+6$ for the function $h(x)=2x^2-8x+4\text{.}$

Solution
\begin{align*} \highlightr{5}h(\highlight{3x})\highlightr{+6}\amp=\highlightr{5} \cdot (2(\highlight{3x})^2-8(\highlight{3x})+4)\highlightr{+6}\\ \amp=5 \cdot (9x^2-24x+4)+6\\ \amp=90x^2-120x+20+6\\ \amp=90x^2-120x+26 \end{align*}

### ExercisesExercises

Simplify each indicated expression.

###### 1.

Simplify $f(x-7)$ for the function $f(x)=3x+12\text{.}$

Solution
\begin{align*} f(\highlight{x-7})\amp=3(\highlight{x-7})+12\\ \amp=3x-21+12\\ \amp=3x-9 \end{align*}
###### 2.

Simplify $g(x)+9$ for the function $g(x)=14-7x\text{.}$

Solution
\begin{align*} g(x)\highlightr{+9}\amp=14-7x\highlightr{+9}\\ \amp=23-7x \end{align*}
###### 3.

Simplify $h(5-2t)$ for the function $h(t)=\sqrt{3-t^2}\text{.}$

Solution
\begin{align*} h(\highlight{5-2t})\amp=\sqrt{3-(\highlight{5-2t})^2}\\ \amp=\sqrt{3-(5-2t)(5-2t)}\\ \amp=\sqrt{3-(25-20t+4t^2)}\\ \amp=\sqrt{3-25+20t-4t^2}\\ \amp=\sqrt{-4t^2+20t-22} \end{align*}
###### 4.

Simplify $k(x+4)+3$ for the function $k(x)=2x^2-3\text{.}$

Solution
\begin{align*} k(\highlight{x+4})\highlightr{+3}\amp=2(\highlight{x+4})^2-3\highlightr{+3}\\ \amp=2(x+4)(x+4)\\ \amp=2(x^2+8x+16)\\ \amp=2x^2+16x+32 \end{align*}
###### 5.

Simplify $r(\sqrt{t-4})$ for the function $r(t)=3-7t^2\text{.}$

Solution
\begin{align*} r(\highlight{\sqrt{t-4}})\amp=3-7(\highlight{\sqrt{t-4}})^2\\ \amp=3-7(t-4)\\ \amp=3-7t+28\\ \amp=31-7t \end{align*}
###### 6.

Simplify $y(t+5)-y(t-3)$ for the function $y(t)=3t-16\text{.}$

Solution
\begin{align*} y(\highlight{t+5})-y(\highlightb{t-3})\amp=(3(\highlight{t+5})-16)-(3(\highlightb{t-3})-16)\\ \amp=3t+15-16-(3t-9-16)\\ \amp=3t-1-(3t-25)\\ \amp=3t-1-3t+25\\ \amp=24 \end{align*}
###### 7.

Simplify $w(x-2)+w(2-x)+2$ for the function $w(x)=5-x\text{.}$

Solution
\begin{align*} w(\highlight{x-2})+w(\highlightb{2-x})\highlightr{+2}\amp=(5-(\highlight{x-2}))+(5-(\highlightb{2-x}))\highlightr{+2}\\ \amp=5-x+2+5-2+x+2\\ \amp=12 \end{align*}
###### 8.

Simplify $s(t-8)$ for the function $s(t)=\frac{t+8}{t}\text{.}$

Solution
\begin{align*} s(\highlight{t-8})\amp=\frac{\highlight{t-8}+8}{\highlight{t-8}}\\ \amp=\frac{t}{t-8} \end{align*}
###### 9.

Simplify $3u(2x)$ for the function $u(x)=-x^2\text{.}$

Solution
\begin{align*} \highlightg{3}u(\highlight{2x})\amp=\highlightg{3\cdot}-(\highlight{2x})^2\\ \amp=-3 \cdot 4x^2\\ \amp=-12x^2 \end{align*}
###### 10.

Simplify $\frac{1}{2}h(2t-7)-8$ for the function $h(t)=8t-12\text{.}$

Solution
\begin{align*} \highlightg{\frac{1}{2}}h(\highlight{2t-7})\highlightr{-8}\amp=\highlightg{\frac{1}{2}}(8(\highlight{2t-7})-12)\highlightr{-8}\\ \amp=\frac{1}{2}(16t-56-12)-8\\ \amp=8t-28-6-8\\ \amp=8t-42 \end{align*}