9.3: Evaluating Functions
- Page ID
- 173881
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Media
Definitions and Theorems
For the notation \(y=f(x)\), \(f\) is the name of the function, \(x\) is the domain value, also known as the argument or the independent variable, and \(f(x)\) is the range value of the function \(f\) at \(x\). Since \(y = f(x)\), we can also say that the range value of the function \(f\) at \(x\) is \(y\). In this case, we say that \(y\) is the dependent variable (as its value depends on \(x\)). We read \(f(x)\) as "\(f\) of \(x\)" or the value of \(f\) at \(x\).
The symbol \(f(x)\) denotes the output of the function \(f\) at the input \(x\). It does not mean \(f\) multiplied by \(x\). The parentheses signal the application of a function, not a product.
The value of a function \(f\) at an element \(x\) (from its domain) is denoted by \(f(x)\).
To evaluate a function at a particular input is to determine its value at that input. When the function is defined by an expression in its variable, you evaluate it by replacing every occurrence of the variable with the input and then simplifying the result.
When you replace the variable with an input, enclose that input in parentheses before simplifying. This preserves the sign of a negative number and applies each operation to the entire input, so that, for instance, the square in \((-3)^2\) acts on the full value \(-3\) rather than on \(3\) alone.
The argument of a function need not be a number. It may be a constant, another variable, or an entire algebraic expression. In every case the procedure is identical: substitute the argument for the variable wherever the variable appears, then simplify.
Examples
Let \(f(x)=x^2-3x+2\). Find \(f(4)\).
- Solution
-
Replace each \(x\) with \(4\) and simplify.
\[f(4)=(4)^2-3(4)+2=16-12+2=6.\nonumber\]Thus \(f(4)=6\).
Let \(f(x)=x^2-3x+2\). Find \(f(-3)\).
- Solution
-
Replace each \(x\) with \(-3\), keeping the input in parentheses so the square applies to the entire value.
\[f(-3)=(-3)^2-3(-3)+2=9+9+2=20.\nonumber\]Thus \(f(-3)=20\).
Let \(f(x)=x^2-3x+2\). Find \(f\!\left(\frac{1}{2}\right)\).
- Solution
-
Replace each \(x\) with \(\frac{1}{2}\).
\[f\!\left(\dfrac{1}{2}\right)=\left(\dfrac{1}{2}\right)^2-3\left(\dfrac{1}{2}\right)+2=\dfrac{1}{4}-\dfrac{3}{2}+2.\nonumber\]Rewriting each term with a common denominator of \(4\) gives
\[\dfrac{1}{4}-\dfrac{6}{4}+\dfrac{8}{4}=\dfrac{3}{4}.\nonumber\]Thus \(f\!\left(\frac{1}{2}\right)=\dfrac{3}{4}\).
Let
\[g(x)=\begin{cases} 2x+1 & \text{if } x<0, \\ x^2 & \text{if } 0\leq x\leq 3, \\ 5 & \text{if } x>3. \end{cases}\nonumber\]Find \(g(-2)\), \(g(2)\), and \(g(5)\).
- Solutions
-
For each input, first identify which condition the input satisfies, then substitute into the corresponding branch.
Since \(-2<0\), use the first branch, \(2x+1\):
\[g(-2)=2(-2)+1=-3.\nonumber\]Since \(0\leq 2\leq 3\), use the second branch, \(x^2\):
\[g(2)=(2)^2=4.\nonumber\]Since \(5>3\), use the third branch, the constant \(5\):
\[g(5)=5.\nonumber\]
Let \(f(x)=x^2-3x+2\). Find each of the following.
- \(f(a)\)
- \(f(x+2)\)
- Solutions
-
(a) Replace each \(x\) with \(a\). Because \(a\) is a single symbol, no further simplification is possible.
\[f(a)=a^2-3a+2.\nonumber\](b) Replace each \(x\) with the entire expression \(x+2\), enclosed in parentheses.
\[f(x+2)=(x+2)^2-3(x+2)+2.\nonumber\]Expand and combine like terms.
\[f(x+2)=x^2+4x+4-3x-6+2=x^2+x.\nonumber\]
Let \(f(x)=x^2-3x+2\). Find each of the following, where \(h\neq 0\).
- \(f(x+h)\)
- \(\dfrac{f(x+h)-f(x)}{h}\)
- Solutions
-
(a) Replace each \(x\) with \(x+h\), then expand.
\[f(x+h)=(x+h)^2-3(x+h)+2=x^2+2xh+h^2-3x-3h+2.\nonumber\](b) Subtract \(f(x)=x^2-3x+2\) from the result in part (a). The \(x^2\), \(-3x\), and \(+2\) terms cancel.
\[f(x+h)-f(x)=\left(x^2+2xh+h^2-3x-3h+2\right)-\left(x^2-3x+2\right)=2xh+h^2-3h.\nonumber\]Factor \(h\) from the numerator and divide, which is valid because \(h\neq 0\).
\[\dfrac{f(x+h)-f(x)}{h}=\dfrac{h(2x+h-3)}{h}=2x+h-3.\nonumber\]The expression \(\dfrac{f(x+h)-f(x)}{h}\) is the difference quotient, a construction you will use to define the derivative.
Sources
Several parts of this text use modifications from the following source:
- Wikipedia article: "Function (mathematics)"
This source is released under the Creative Commons Attribution-Share-Alike License 4.0.


