Sub topic 2
Reading Function Notation \(f(x)\)
Assume you know arithmetic with integers, fractions, and decimals, order of operations, exponents, and basic one-variable equations. This chapter focuses on reading notation correctly so that you can evaluate functions and avoid confusing an input with multiplication.
What \(f(x)\) Means
A function is a rule that takes an input and produces one output. The notation \(f(x)\) means “the output of function \(f\) when the input is \(x\).”
The letter \(f\) names the function. The expression inside the parentheses identifies its input. The parentheses do not mean that \(f\) is multiplied by \(x\).
For example, if
f(x)=3x-5,then the rule says:
- Multiply the input by 3.
- Subtract 5.
To find \(f(4)\), replace every \(x\) in the rule with 4:
f(4)=3(4)-5=12-5=7.The value 4 is the input, and 7 is the output.
| Notation | Meaning |
|---|---|
| \(f(x)\) | General output for input \(x\) |
| \(f(4)\) | Output when the input is 4 |
| \(f(-2)\) | Output when the input is \(-2\) |
| \(f(a)\) | Output when the input is \(a\) |
The input letter does not have to be \(x\). A definition such as \(g(t)=t^2+1\) works the same way. The letter \(t\) is simply the name used for the input.
Evaluating a Function by Substitution
Use this routine:
- Copy the function rule.
- Replace the input variable with the given value.
- Put parentheses around substituted values, especially negative numbers or fractions.
- Apply order of operations.
Suppose
g(t)=2t^2+3t-1.For \(g(-2)\), substitute \((-2)\) for \(t\):
g(-2)=2(-2)^2+3(-2)-1.Now evaluate:
g(-2)=2(4)-6-1=1.The parentheses matter. The expression \((-2)^2\) equals 4, while \(-2^2\), under standard order of operations, means \(-(2^2)=-4\).
def g(t):
return 2 * t ** 2 + 3 * t - 1
print(g(-2)) # 1A function can also accept a fraction. If \(h(x)=x^2-2x\), then
h\left(\frac12\right)
=\left(\frac12\right)^2-2\left(\frac12\right)
=\frac14-1
=-\frac34.Function Names and Inputs
Different function names can represent different rules:
f(x)=x+4
\qquad\text{and}\qquad
g(x)=2x.At \(x=3\),
f(3)=7,\qquad g(3)=6.The same input can produce different outputs because the rules differ.
The input can also be an expression. If \(f(x)=x^2+1\), then
f(2a)= (2a)^2+1=4a^2+1.The entire expression \(2a\) replaces \(x\), so it must be enclosed in parentheses before squaring.
def f(x):
return x ** 2 + 1
a = 3
print(f(2 * a)) # 37A Function as an Input-Output Machine
The notation can be viewed as a simple process:
This viewpoint is useful when a question gives an output and asks for the input. For example, if \(f(x)=3x-5\) and \(f(x)=16\), write
3x-5=16.Then solve:
3x=21,\qquad x=7.Always distinguish between the rule \(f(x)=3x-5\), a specific value such as \(f(4)=7\), and an equation involving an unknown input.
Common Errors
- Treating \(f(x)\) as multiplication.
- Substituting a negative number without parentheses.
- Squaring only part of a multi-term input.
- Using the wrong function rule.
- Assuming two functions with the same input variable are the same function.
- Replacing the function name instead of replacing the input variable.
Exercise
Let f(x) = 2x^2 - x + 3. Find f(-3), and explain why parentheses are needed when substituting -3.
Show answer
f(-3) = 2(-3)^2 - (-3) + 3 = 2(9) + 3 + 3 = 24. Parentheses show that the entire value -3 is substituted, so (-3)^2 = 9.