Steply

f(x) = x + 2 if x < 1, 3x - 1 if x >= 1, find f(4)

Step by step, with the reason for every step · Piecewise functions · Algebra 2

Step by step

The question

Question: find f(4) 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 first rule!

It is only for x less than 1, and 4 is not.

Careful: not f(4) = 4 + 2 = 6 ✗

1 Find the right piece

Let's see where each rule works on a number line.

So we use this rule: 3x − 1.

2 Put 4 in

Put 4 in place of x in 3x − 1.

We write it in brackets.

f(4) = 3(4) − 1

Times comes before minus.

Order: ( ) → x² √ → × ÷ → + −
3(4) = 3 × 4

3(4) means 3 times 4.

3 times 4 is 12.

= 12 − 1

12 minus 1 is 11.

f(4) = 11

So f(4) = 11.

3 Check

Let's check: does 4 fit each rule's x's?

Only one must say yes.

first rule: 4 < 1 no ✗
second rule: 4 ≥ 1 yes

Only the second rule fits.

So f(4) is right!

Let's look back.

First: find the right piece.

Then: put 4 in.

Last: check.

Answer
f(4) = 11

Your turn

Try this one yourself, then check:

f(x) = x + 4 if x < 1, 3x − 2 if x ≥ 1, find f(2)
Show the answer
f(2) = 4

More from Piecewise functions

The whole lesson: Piecewise functions →