Step by step
The question
Question: find f(−2) for f(x) = x + 2 if x < 1, 3x − 1 if x ≥ 1.
f(x) = x + 2 if x < 1
= 3x − 1 if x ≥ 1
This is a piecewise function.
It has 2 rules.
Which rule we use depends on x.
Each x uses only one rule.
piecewise: a different rule for different x's
each x uses only one rule
Careful!
Not the second rule!
It is only for x greater than or equal to 1, and −2 is not.
Careful: not f(−2) = 3(−2) − 1 = −7 ✗
1 Find the right piece
Let's see where each rule works on a number line.
So we use this rule: x + 2.
2 Put −2 in
Put −2 in place of x in x + 2.
f(−2) = −2 + 2
Start at −2.
Go up 2.
We land on 0.
f(−2) = 0
So f(−2) = 0.
3 Check
Let's check: does −2 fit each rule's x's?
Only one must say yes.
first rule: −2 < 1 yes
second rule: −2 ≥ 1 no ✗
Only the first rule fits.
So f(−2) is right!
Let's look back.
First: find the right piece.
Then: put −2 in.
Last: check.
Answer
f(−2) = 0