We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

Study Guides > College Algebra CoRequisite Course

Evaluating and Solving Functions

Learning Outcomes

  • Evaluate and solve functions in algebraic form.
  • Evaluate functions given tabular or graphical data.
When we have a function in formula form, it is usually a simple matter to evaluate the function. For example, the function [latex]f\left(x\right)=5 - 3{x}^{2}[/latex] can be evaluated by squaring the input value, multiplying by 3, and then subtracting the product from 5.

How To: EVALUATE A FUNCTION Given ITS FORMula.

  1. Replace the input variable in the formula with the value provided.
  2. Calculate the result.

Example: Evaluating Functions

Given the function [latex]h\left(p\right)={p}^{2}+2p[/latex], evaluate [latex]h\left(4\right)[/latex].

Answer:

To evaluate [latex]h\left(4\right)[/latex], we substitute the value 4 for the input variable [latex]p[/latex] in the given function.

[latex]\begin{align}h\left(p\right)&={p}^{2}+2p \\ h\left(4\right)&={\left(4\right)}^{2}+2\left(4\right) \\ &=16+8 \\ &=24 \end{align}[/latex]

Therefore, for an input of 4, we have an output of 24 or [latex]h(4)=24[/latex].

Watch the video below for more examples of evaluating a function for specific values of the input. https://youtu.be/Ehkzu5Uv7O0

evaluating functions

When evaluating functions, it's handy to wrap the input variable in parentheses before making the substitution. Ex. Given [latex]f(x)=x^2 - 8[/latex], find [latex]f(-3)[/latex] [latex-display]\begin{align}f(x)&=(x)^2 - 8 \\ &= (-3)^2 - 8 \\ &= 9 - 8 \\ &= 1\end{align}[/latex-display] The value of the function [latex]f(x)=x^2 - 8[/latex], at the input [latex]x=-3[/latex], is [latex]1[/latex].

Example: Evaluating Functions at Specific Values

For the function, [latex]f\left(x\right)={x}^{2}+3x - 4[/latex], evaluate each of the following.
  1. [latex]f\left(2\right)[/latex]
  2. [latex]f(a)[/latex]
  3. [latex]f(a+h)[/latex]
  4. [latex]\dfrac{f\left(a+h\right)-f\left(a\right)}{h}[/latex]

Answer: Replace the [latex]x[/latex] in the function with each specified value.

  1. Because the input value is a number, 2, we can use algebra to simplify.
    [latex]\begin{align}f\left(2\right)&={2}^{2}+3\left(2\right)-4 \\ &=4+6 - 4 \\ &=6\hfill \end{align}[/latex]
  2. In this case, the input value is a letter so we cannot simplify the answer any further.
    [latex]f\left(a\right)={a}^{2}+3a - 4[/latex]
  3. With an input value of [latex]a+h[/latex], we must use the distributive property.
    [latex]\begin{align}f\left(a+h\right)&={\left(a+h\right)}^{2}+3\left(a+h\right)-4 \\[2mm] &={a}^{2}+2ah+{h}^{2}+3a+3h - 4 \end{align}[/latex]
  4. In this case, we apply the input values to the function more than once, and then perform algebraic operations on the result. We already found that
    [latex]f\left(a+h\right)={a}^{2}+2ah+{h}^{2}+3a+3h - 4[/latex]
    and we know that
    [latex]f\left(a\right)={a}^{2}+3a - 4[/latex]
    Now we combine the results and simplify.

    [latex]\begin{align}\dfrac{f\left(a+h\right)-f\left(a\right)}{h}&=\dfrac{\left({a}^{2}+2ah+{h}^{2}+3a+3h - 4\right)-\left({a}^{2}+3a - 4\right)}{h} \\[2mm] &=\dfrac{2ah+{h}^{2}+3h}{h}\\[2mm] &=\frac{h\left(2a+h+3\right)}{h}&&\text{Factor out }h. \\[2mm] &=2a+h+3&&\text{Simplify}.\end{align}[/latex]

[ohm_question]1647[/ohm_question]

Try It

Given the function [latex]g\left(m\right)=\sqrt{m - 4}[/latex], evaluate [latex]g\left(5\right)[/latex].

Answer: [latex-display]g\left(5\right)=\sqrt{5 - 4}=1[/latex-display]

[ohm_question]97486[/ohm_question]
In addition to evaluating functions for a particular input, we can also solve functions for the input that creates a particular output.

Example: Solving Functions

Given the function [latex]h\left(p\right)={p}^{2}+2p[/latex], solve for [latex]h\left(p\right)=3[/latex].

Answer:

[latex]\begin{align}&h\left(p\right)=3\\ &{p}^{2}+2p=3 &&\text{Substitute the original function }h\left(p\right)={p}^{2}+2p. \\ &{p}^{2}+2p - 3=0 &&\text{Subtract 3 from each side}. \\ &\left(p+3\text{)(}p - 1\right)=0 &&\text{Factor}. \end{align}[/latex]

If [latex]\left(p+3\right)\left(p - 1\right)=0[/latex], either [latex]\left(p+3\right)=0[/latex] or [latex]\left(p - 1\right)=0[/latex] (or both of them equal 0). We will set each factor equal to 0 and solve for [latex]p[/latex] in each case.

[latex]\begin{align}&p+3=0, &&p=-3 \\ &p - 1=0, &&p=1\hfill \end{align}[/latex]

This gives us two solutions. The output [latex]h\left(p\right)=3[/latex] when the input is either [latex]p=1[/latex] or [latex]p=-3[/latex]. Graph of a parabola with labeled points (-3, 3), (1, 3), and (4, 24). We can also verify by graphing as in Figure 5. The graph verifies that [latex]h\left(1\right)=h\left(-3\right)=3[/latex] and [latex]h\left(4\right)=24[/latex].

How To: Solve a Function.

  1. Replace the output in the formula with the value provided.
  2. Solve for the input variable that makes the statement true.
The next video shows another example of how to solve a function. https://youtu.be/GLOmTED1UwA

Try It

Given the function [latex]g\left(m\right)=\sqrt{m - 4}[/latex], solve [latex]g\left(m\right)=2[/latex].

Answer: [latex-display]m=8[/latex-display]

[ohm_question]15766[/ohm_question]

Evaluating Functions Expressed in Formulas

Some functions are defined by mathematical rules or procedures expressed in equation form. If it is possible to express the function output with a formula involving the input quantity, then we can define a function in algebraic form. For example, the equation [latex]2n+6p=12[/latex] expresses a functional relationship between [latex]n[/latex] and [latex]p[/latex]. We can rewrite it to decide if [latex]p[/latex] is a function of [latex]n[/latex].

functions, Equations, and formulas

We've seen that an equation such as [latex]ax+by=c[/latex] can be written in a different form by solving the equation for one of the variables. If we solve this linear equation for it can be written in the slope-intercept form of a line, [latex]y = mx+b[/latex]. Certain formulas can be written in function form by solving for one of the variables. For instance, can you see how to solve the formula for a rectangle having a perimeter of 21 feet, [latex]21 = 2l + 2w[/latex], for length?

Answer: [latex-display]\begin{align} 21 &= 2l + 2w \\ 21 - 2w &= 2l \\ \dfrac{21-2w}{2} &= l \end{align}[/latex-display] We can now declare a function, [latex]l = f(x)[/latex] that returns an output length for a rectangle having a perimeter of 21 feet based on different width inputs.

How To: Given a function in equation form, write its algebraic formula.

  1. Solve the equation to isolate the output variable on one side of the equal sign, with the other side as an expression that involves only the input variable.
  2. Use all the usual algebraic methods for solving equations, such as adding or subtracting the same quantity to or from both sides, or multiplying or dividing both sides of the equation by the same quantity.

Example: Finding an Equation of a Function

Express the relationship [latex]2n+6p=12[/latex] as a function [latex]p=f\left(n\right)[/latex], if possible.

Answer: To express the relationship in this form, we need to be able to write the relationship where [latex]p[/latex] is a function of [latex]n[/latex], which means writing it as [latex]p=[/latex] expression involving [latex]n[/latex].

[latex]\begin{align}&2n+6p=12\\[1mm] &6p=12 - 2n &&\text{Subtract }2n\text{ from both sides}. \\[1mm] &p=\frac{12 - 2n}{6} &&\text{Divide both sides by 6 and simplify}. \\[1mm] &p=\frac{12}{6}-\frac{2n}{6} \\[1mm] &p=2-\frac{1}{3}n \end{align}[/latex]

Therefore, [latex]p[/latex] as a function of [latex]n[/latex] is written as

[latex]p=f\left(n\right)=2-\frac{1}{3}n[/latex]

Analysis of the Solution

It is important to note that not every relationship expressed by an equation can also be expressed as a function with a formula.

Watch this video to see another example of how to express an equation as a function. https://www.youtube.com/watch?v=lHTLjfPpFyQ Sometimes a relationship between variables cannot be expressed as a function. See the example below for more information.

Example: Expressing the Equation of a Circle as a Function

Does the equation [latex]{x}^{2}+{y}^{2}=1[/latex] represent a function with [latex]x[/latex] as input and [latex]y[/latex] as output? If so, express the relationship as a function [latex]y=f\left(x\right)[/latex].

Answer: First we subtract [latex]{x}^{2}[/latex] from both sides.

[latex]{y}^{2}=1-{x}^{2}[/latex]

We now try to solve for [latex]y[/latex] in this equation.

[latex]\begin{align}y&=\pm \sqrt{1-{x}^{2}} \\[1mm] &=\sqrt{1-{x}^{2}}\hspace{3mm}\text{and}\hspace{3mm}-\sqrt{1-{x}^{2}} \end{align}[/latex]

We get two outputs corresponding to the same input, so this relationship cannot be represented as a single function [latex]y=f\left(x\right)[/latex].

Try It

If [latex]x - 8{y}^{3}=0[/latex], express [latex]y[/latex] as a function of [latex]x[/latex].

Answer: [latex]y=f\left(x\right)=\cfrac{\sqrt[3]{x}}{2}[/latex]

[ohm_question]111699[/ohm_question]

Q & A

Are there relationships expressed by an equation that do represent a function but which still cannot be represented by an algebraic formula? Yes, this can happen. For example, given the equation [latex]x=y+{2}^{y}[/latex], if we want to express [latex]y[/latex] as a function of [latex]x[/latex], there is no simple algebraic formula involving only [latex]x[/latex] that equals [latex]y[/latex]. However, each [latex]x[/latex] does determine a unique value for [latex]y[/latex], and there are mathematical procedures by which [latex]y[/latex] can be found to any desired accuracy. In this case, we say that the equation gives an implicit (implied) rule for [latex]y[/latex] as a function of [latex]x[/latex], even though the formula cannot be written explicitly.

Evaluating a Function Given in Tabular Form

As we saw above, we can represent functions in tables. Conversely, we can use information in tables to write functions, and we can evaluate functions using the tables. For example, how well do our pets recall the fond memories we share with them? There is an urban legend that a goldfish has a memory of 3 seconds, but this is just a myth. Goldfish can remember up to 3 months, while the beta fish has a memory of up to 5 months. And while a puppy’s memory span is no longer than 30 seconds, the adult dog can remember for 5 minutes. This is meager compared to a cat, whose memory span lasts for 16 hours. The function that relates the type of pet to the duration of its memory span is more easily visualized with the use of a table. See the table below.
Pet Memory span in hours
Puppy 0.008
Adult dog 0.083
Cat 16
Goldfish 2160
Beta fish 3600
At times, evaluating a function in table form may be more useful than using equations. Here let us call the function [latex]P[/latex]. The domain of the function is the type of pet and the range is a real number representing the number of hours the pet’s memory span lasts. We can evaluate the function [latex]P[/latex] at the input value of "goldfish." We would write [latex]P\left(\text{goldfish}\right)=2160[/latex]. Notice that, to evaluate the function in table form, we identify the input value and the corresponding output value from the pertinent row of the table. The tabular form for function [latex]P[/latex] seems ideally suited to this function, more so than writing it in paragraph or function form.

How To: Given a function represented by a table, identify specific output and input values.

  1. Find the given input in the row (or column) of input values.
  2. Identify the corresponding output value paired with that input value.
  3. Find the given output values in the row (or column) of output values, noting every time that output value appears.
  4. Identify the input value(s) corresponding to the given output value.

Example: Evaluating and Solving a Tabular Function

Using the table below,
  1. Evaluate [latex]g\left(3\right)[/latex].
  2. Solve [latex]g\left(n\right)=6[/latex].
[latex]n[/latex] 1 2 3 4 5
[latex]g(n)[/latex] 8 6 7 6 8

Answer:

  • Evaluating [latex]g\left(3\right)[/latex] means determining the output value of the function [latex]g[/latex] for the input value of [latex]n=3[/latex]. The table output value corresponding to [latex]n=3[/latex] is 7, so [latex]g\left(3\right)=7[/latex].
  • Solving [latex]g\left(n\right)=6[/latex] means identifying the input values, [latex]n[/latex], that produce an output value of 6. The table below shows two solutions: [latex]n=2[/latex] and [latex]n=4[/latex].
[latex]n[/latex] 1 2 3 4 5
[latex]g(n)[/latex] 8 6 7 6 8
When we input 2 into the function [latex]g[/latex], our output is 6. When we input 4 into the function [latex]g[/latex], our output is also 6.

Try It

Using the table from the previous example, evaluate [latex]g\left(1\right)[/latex] .

Answer: [latex]g\left(1\right)=8[/latex]

[ohm_question]3751[/ohm_question]

Finding Function Values from a Graph

ordered pairs of inputs and outputs

We can view a function as a set of inputs and their corresponding outputs. That is, we can see a function as a set of ordered pairs, [latex]\left(x, y \right).[/latex] Remember that, in function notation, [latex]y = f(x)[/latex], so the ordered pairs containing inputs and outputs can be written in the form of (inputoutput) or [latex]\left(x, f(x)\right)[/latex].
Evaluating a function using a graph also requires finding the corresponding output value for a given input value, only in this case, we find the output value by looking at the graph. Solving a function equation using a graph requires finding all instances of the given output value on the graph and observing the corresponding input value(s).

Example: Reading Function Values from a Graph

Given the graph below,
  1. Evaluate [latex]f\left(2\right)[/latex].
  2. Solve [latex]f\left(x\right)=4[/latex].
Graph of a positive parabola centered at (1, 0).

Answer:

  1. To evaluate [latex]f\left(2\right)[/latex], locate the point on the curve where [latex]x=2[/latex], then read the [latex]y[/latex]-coordinate of that point. The point has coordinates [latex]\left(2,1\right)[/latex], so [latex]f\left(2\right)=1[/latex].Graph of a positive parabola centered at (1, 0) with the labeled point (2, 1) where f(2) =1.
  2. To solve [latex]f\left(x\right)=4[/latex], we find the output value [latex]4[/latex] on the vertical axis. Moving horizontally along the line [latex]y=4[/latex], we locate two points of the curve with output value [latex]4:[/latex] [latex]\left(-1,4\right)[/latex] and [latex]\left(3,4\right)[/latex]. These points represent the two solutions to [latex]f\left(x\right)=4:[/latex] [latex]x=-1[/latex] or [latex]x=3[/latex]. This means [latex]f\left(-1\right)=4[/latex] and [latex]f\left(3\right)=4[/latex], or when the input is [latex]-1[/latex] or [latex]\text{3,}[/latex] the output is [latex]\text{4}\text{.}[/latex] See the graph below.Graph of an upward-facing parabola with a vertex at (0,1) and labeled points at (-1, 4) and (3,4). A line at y = 4 intersects the parabola at the labeled points.

Try It

Using the graph, solve [latex]f\left(x\right)=1[/latex]. Graph of a positive parabola centered at (1, 0) with the labeled point (2, 1) where f(2) =1.

Answer: [latex-display]x=0[/latex] or [latex]x=2[/latex-display]

[ohm_question]2471[/ohm_question] [ohm_question]2886[/ohm_question]

Try It

You can use an online graphing calculator to graph functions, find function values, and evaluate functions. Watch this short tutorial to learn how to within Desmos. Other online graphing tools will be slightly different. https://youtu.be/jACDzJ-rmsM Now try the following with an online graphing calculator:
  1. Graph the function [latex]f(x) = -\frac{1}{2}x^2+x+4[/latex] using function notation.
  2. Evaluate the function at [latex]x=1[/latex]
  3. Make a table of values that references the function. Include at least the interval [latex][-5,5][/latex] for [latex]x[/latex]-values.
  4. Solve the function for [latex]f(0)[/latex]

Licenses & Attributions

CC licensed content, Original

  • Revision and Adaptation. Provided by: Lumen Learning License: CC BY: Attribution.
  • Question ID 111699. Provided by: Lumen Learning License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.

CC licensed content, Shared previously

  • College Algebra. Provided by: OpenStax Authored by: Abramson, Jay et al.. Located at: https://openstax.org/books/college-algebra/pages/1-introduction-to-prerequisites. License: CC BY: Attribution. License terms: Download for free at http://cnx.org/contents/[email protected].
  • Learn Desmos: Functions. License: All Rights Reserved. License terms: Standard YouTube License.
  • Question ID 1647. Authored by: WebWork-Rochester, mb Lippman,David, mb Sousa,James. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Question ID 97486. Authored by: Carmichael,Patrick. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Question ID 15766, 2886. Authored by: Lippman,David. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Question ID 3751. Authored by: Lippman, David. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
  • Question ID 2471. Authored by: Greg Langkamp. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.