Sub topic 3
Reading and Writing \(f(x)\)
Assume you can simplify algebraic expressions, substitute values for variables, and work with integer and fractional exponents. In this chapter, you will use function notation to describe an input-output rule and to calculate its outputs.
What does \(f(x)\) mean?
The notation \(f(x)\) names a function called \(f\) and shows its input, \(x\). Read \(f(x)\) as “\(f\) of \(x\).” It means the output produced by the function \(f\) when the input is \(x\).
For example:
\[ f(x)=2x+3 \]
This equation defines a function. The rule is “multiply the input by 2, then add 3.”
The expression \(f(x)\) does not mean \(f\) multiplied by \(x\). The parentheses identify the function's input.
A function can have a different name and input variable:
\[ g(t)=t^2-4 \]
Here, the function is named \(g\), and \(t\) is the input. The letter used for the input is a placeholder. The expressions \(g(t)\) and \(g(x)\) could describe the same rule if the variable is changed consistently.
Evaluating a function
To evaluate a function means to find its output for a particular input. Substitute the input everywhere the variable appears, then simplify.
For \(f(x)=2x+3\):
\[ f(4)=2(4)+3=11 \]
Therefore, the input \(4\) produces the output \(11\). The ordered pair \((4,11)\) lies on the graph of \(f\).
For a negative input, use parentheses during substitution:
\[ f(-1)=2(-1)+3=1 \]
For an algebraic input, substitute the entire expression:
\[ f(a+2)=2(a+2)+3=2a+7 \]
The input is \(a+2\), so every \(x\) in the rule is replaced by \(a+2\).
def f(x):
return 2 * x + 3
print(f(4)) # 11
print(f(-1)) # 1
print(f(1) + f(2)) # 12, because 5 + 7Reading function information
A function can be represented by an equation, table, graph, or mapping. Function notation connects the input to the output in each representation.
| Input | Function notation | Output |
|---|---|---|
| 0 | \(f(0)=2(0)+3\) | 3 |
| 1 | \(f(1)=2(1)+3\) | 5 |
| 2 | \(f(2)=2(2)+3\) | 7 |
If a table gives \(f(2)=7\), you can read this as “the output is 7 when the input is 2.” It also tells you that \((2,7)\) is a point on the graph.
A function can be evaluated only at inputs allowed by its definition. For instance, if a later rule includes a denominator \(x-5\), then \(f(5)\) is undefined because division by zero is not allowed.
A function as a process
You can picture function notation as a process:
The notation \(f(1)+f(2)\) means evaluate the function twice and add the two outputs. It does not mean evaluate the function at \(1+2\). In the example above:
\[ f(1)+f(2)=5+7=12 \]
This differs from:
\[ f(1+2)=f(3)=9 \]
Solving with function notation
If \(f(x)=3x-1\), then finding the input that produces \(11\) means solving \(f(x)=11\):
\[ 3x-1=11 \] \[ 3x=12 \] \[ x=4 \]
Thus, \(f(4)=11\), and \(4\) is the input associated with the output \(11\).
Exercise
Given g(x) = x^2 - 4x + 1, find g(3), g(-1), and g(a + 1).
Show answer
g(3) = 9 - 12 + 1 = -2. g(-1) = 1 + 4 + 1 = 6. g(a + 1) = (a + 1)^2 - 4(a + 1) + 1 = a^2 - 2a - 2.