When we know an input value and want to determine the corresponding output value for a function, we evaluate the function. Evaluating will always produce one result because each input value of a function corresponds to exactly one output value.
When we know an output value and want to determine the input values that would produce that output value, we set the output equal to the function’s formula and solve for the input. Solving can produce more than one solution because different input values can produce the same output value.
Evaluation of Functions in Algebraic Forms
When we have a function in formula form, it is usually a simple matter to evaluate the function. For example, the function [latex]f(x)=5−3x^2[/latex] can be evaluated by squaring the input value, multiplying by [latex]3[/latex], and then subtracting the product from [latex]5[/latex].
How to: Given the formula for a function, evaluate.
Substitute the input variable in the formula with the value provided.
Calculate the result.
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]
In addition to evaluating functions for a particular input, we can also solve functions for the input that creates a particular output.
How to: Solve a Function.
Replace the output in the formula with the value provided.
Solve for the input variable that makes the statement true.
Given the function [latex]h\left(p\right)={p}^{2}+2p[/latex], solve for [latex]h\left(p\right)=3[/latex].
[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 [latex]0[/latex]). We will set each factor equal to [latex]0[/latex] and solve for [latex]p[/latex] in each case.
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].
We can also verify by graphing, as seen above. The graph verifies that [latex]h\left(1\right)=h\left(-3\right)=3[/latex] and [latex]h\left(4\right)=24[/latex].