Steply

Piecewise functions

Algebra 2 · 21 problems, easy to harder

▶ Watch the first one solved

How we do it

  1. Make a table
  2. Draw the grid
  3. Draw the first piece
  4. Draw the second piece
  5. Check

The steps for Graph f(x) = x^2 if x < 1, 4 - x if x >= 1. Every solution names its steps, so you always know what comes next.

Worked examples

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

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

▶ Watch it solved

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

The question

Question: find f(1) 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!

1 is an edge: two rules meet there.

It belongs to the rule with the "or equal to" sign.

Careful: x = 1 goes where the "or equal to" is

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 1 in

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

We write it in brackets.

f(1) = 3(1) − 1

Times comes before minus.

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

3(1) means 3 times 1.

3 times 1 is 3.

= 3 − 1

3 minus 1 is 2.

f(1) = 2

So f(1) = 2.

3 Check

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

Only one must say yes.

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

Only the second rule fits.

So f(1) is right!

Let's look back.

First: find the right piece.

Then: put 1 in.

Last: check.

Answer
f(1) = 2

▶ Watch it solved

Graph f(x) = x^2 if x < 1, 4 - x if x >= 1 Harder

The question

Question: graph f(x): x² if x < 1, 4 − x if x ≥ 1.

f(x) = x2 if x < 1
= 4 − x 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!

At an edge, look at the sign.

Less than or greater than: the edge is not in, an open dot.

With "or equal to": a filled dot.

Careful: < >: open dot, ≤ ≥: filled dot

1 Make a table

Each rule gets its own x's, in its own colour.

The edge 1 we work out with both rules: it shows where each piece ends.

2 Draw the grid

Draw the grid.

3 Draw the first piece

x² is for x less than 1.

Plot its points.

At the edge 1: 1 is not in, so an open dot at (1, 1).

Join them with a curve, only for these x's.

It keeps going on the open side.

4 Draw the second piece

4 − x is for x greater than or equal to 1.

Plot its points.

At the edge 1: 1 is in, so a filled dot at (1, 3).

Join them with a straight line, only for these x's.

It keeps going on the open side.

5 Check

Let's check the edge x = 1.

Every x has only one y, so only one dot there can be filled.

1 belongs to the second rule.

f(1) = 3: the filled dot (1, 3).

It works!

f(1) = 4 − 1 = 3

Let's look back.

First: make a table.

Then: draw the grid.

Then: draw the first piece.

Then: draw the second piece.

Last: check.

Answer
= 4 − x if x ≥ 1

▶ Watch it solved

Practice

Try each one, then open the answer. Stuck? Open the problem to watch every step.

Easy

  1. f(x) = x + 2 if x < 1, 3x - 1 if x >= 1, find f(4)
    Answer
    f(4) = 11
  2. f(x) = x + 2 if x < 1, 3x - 1 if x >= 1, find f(-2)
    Answer
    f(−2) = 0
  3. f(x) = 2x if x < 0, x + 5 if x >= 0, find f(3)
    Answer
    f(3) = 8
  4. f(x) = 4 if x < 2, x - 1 if x >= 2, find f(-1)
    Answer
    f(−1) = 4
  5. f(x) = x - 3 if x <= 1, 2x if x > 1, find f(5)
    Answer
    f(5) = 10
  6. f(x) = x^2 if x < 0, 2x + 1 if x >= 0, find f(-3)
    Answer
    f(−3) = 9
  7. f(x) = 6 - x if x < 3, 2x - 4 if x >= 3, find f(0)
    Answer
    f(0) = 6

Medium

  1. f(x) = x + 2 if x < 1, 3x - 1 if x >= 1, find f(1)
    Answer
    f(1) = 2
  2. f(x) = x^2 if x <= 2, x + 1 if x > 2, find f(2)
    Answer
    f(2) = 4
  3. f(x) = -1 if x < -2, x + 1 if -2 <= x < 2, 3 if x >= 2, find f(2)
    Answer
    f(2) = 3
  4. f(x) = -1 if x < -2, x + 1 if -2 <= x < 2, 3 if x >= 2, find f(0)
    Answer
    f(0) = 1
  5. graph f(x) = x + 1 if x < 2, 5 - x if x >= 2
    Answer
    = 5 − x if x ≥ 2
  6. graph f(x) = 2 if x < 1, x + 3 if x >= 1
    Answer
    = x + 3 if x ≥ 1
  7. graph f(x) = -x if x <= 0, x + 2 if x > 0
    Answer
    = x + 2 if x > 0
  8. graph f(x) = x - 1 if x < -1, 3 if x >= -1
    Answer
    = 3 if x ≥ −1

Harder

  1. graph f(x) = x^2 if x < 1, 4 - x if x >= 1
    Answer
    = 4 − x if x ≥ 1
  2. graph f(x) = -2 if x < -1, x if -1 <= x < 2, 4 if x >= 2
    Answer
    = 4 if x ≥ 2
  3. graph f(x) = 2x + 3 if x < 0, x^2 - 1 if x >= 0
    Answer
    = x2 − 1 if x ≥ 0
  4. f(x) = x^2 - 4 if x < -1, 3x if -1 <= x <= 2, 7 - x if x > 2, find f(-3)
    Answer
    f(−3) = 5
  5. f(x) = 5 - 2x if x <= -1, x^2 if x > -1, find f(-1)
    Answer
    f(−1) = 7
  6. graph f(x) = 3 - x if x < 2, 2x - 4 if x >= 2
    Answer
    = 2x − 4 if x ≥ 2