Steply

f(x) = 2x if x < 0, x + 5 if x >= 0, find f(3)

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

Step by step

The question

Question: find f(3) for f(x) = 2x if x < 0, x + 5 if x ≥ 0.

f(x) = 2x if x < 0
= x + 5 if x ≥ 0

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 0, and 3 is not.

Careful: not f(3) = 2(3) = 6 ✗

1 Find the right piece

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

So we use this rule: x + 5.

2 Put 3 in

Put 3 in place of x in x + 5.

f(3) = 3 + 5

3 plus 5 is 8.

f(3) = 8

So f(3) = 8.

3 Check

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

Only one must say yes.

first rule: 3 < 0 no ✗
second rule: 3 ≥ 0 yes

Only the second rule fits.

So f(3) is right!

Let's look back.

First: find the right piece.

Then: put 3 in.

Last: check.

Answer
f(3) = 8

Your turn

Try this one yourself, then check:

f(x) = 2x if x < 0, x + 5 if x ≥ 0, find f(4)
Show the answer
f(4) = 9

More from Piecewise functions

The whole lesson: Piecewise functions →