Piecewise-defined functions and absolute value

About this lesson

Algebra II › Transformations of functions

To save a PDF, choose “Save as PDF” in the print dialog.

Piecewise-defined functions and absolute value

Transformations of functions. shifts, reflections, even and odd functions, inverse functions

Warm-up

Three quick questions from earlier lessons.

Discover

A parking lot charges 5 dollars for up to 2 hours, and 9 dollars for a longer stay. What does a stay of exactly 2 hours cost?

  1. 5 dollars
  2. 9 dollars

Key idea

A piecewise function uses a different formula on different parts of its domain.

To find f(a)f(a): first find which condition aa satisfies, then use that piece's formula. Check the boundary carefully (<< or ≤\le).

The absolute value is piecewise: ∣x∣=x|x| = x if x≥0x \ge 0, and ∣x∣=−x|x| = -x if x<0x < 0.

Worked example

f(x)={x2if x<12x+3if x≥1f(x) = \begin{cases} x^2 & \text{if } x < 1 \\ 2x + 3 & \text{if } x \ge 1 \end{cases}. Find f(1)f(1).

Use the second piece, 2x+32x + 3
Check the conditions first: 1 is not less than 1, but 1 ≥ 1.
f(1)=2⋅1+3=5f(1) = 2 \cdot 1 + 3 = 5
Replace x by 1.

Your turn, guided

Your turn, with the same ff: find f(−2)f(-2).

Use the first piece, x2x^2
−2 < 1.
f(−2)=4f(-2) = 4
(−2)² = 4.

Practice ★

  1. f(x)={x+4if x<84xif x≥8f(x) = \begin{cases} x + 4 & \text{if } x < 8 \\ 4x & \text{if } x \ge 8 \end{cases}. Find f(0)f(0).
  2. f(x)={x+8if x<74xif x≥7f(x) = \begin{cases} x + 8 & \text{if } x < 7 \\ 4x & \text{if } x \ge 7 \end{cases}. Find f(2)f(2).
  3. f(x)={x+7if x<33xif x≥3f(x) = \begin{cases} x + 7 & \text{if } x < 3 \\ 3x & \text{if } x \ge 3 \end{cases}. Find f(1)f(1).
  4. f(x)={x+6if x<64xif x≥6f(x) = \begin{cases} x + 6 & \text{if } x < 6 \\ 4x & \text{if } x \ge 6 \end{cases}. Find f(1)f(1).

Watch out!

Practice ★★

  1. f(x)={x+3if x<53xif x≥5f(x) = \begin{cases} x + 3 & \text{if } x < 5 \\ 3x & \text{if } x \ge 5 \end{cases}. Find f(5)f(5).
  2. f(x)={x+4if x<32xif x≥3f(x) = \begin{cases} x + 4 & \text{if } x < 3 \\ 2x & \text{if } x \ge 3 \end{cases}. Find f(3)f(3).
  3. f(x)={x+1if x<15xif x≥1f(x) = \begin{cases} x + 1 & \text{if } x < 1 \\ 5x & \text{if } x \ge 1 \end{cases}. Find f(1)f(1).
  4. f(x)={x+2if x<52xif x≥5f(x) = \begin{cases} x + 2 & \text{if } x < 5 \\ 2x & \text{if } x \ge 5 \end{cases}. Find f(5)f(5).
  1. For x<7x < 7, which expression is equal to ∣x−7∣|x - 7|?
    1. 7−x7 - x
    2. x−7x - 7
    3. −x−7-x - 7
  2. For x<5x < 5, which expression is equal to ∣x−5∣|x - 5|?
    1. 5−x5 - x
    2. x−5x - 5
    3. −x−5-x - 5

Exit ticket

Three questions to check you have got it.

  1. f(x)={x+3if x<53xif x≥5f(x) = \begin{cases} x + 3 & \text{if } x < 5 \\ 3x & \text{if } x \ge 5 \end{cases}. Find f(5)f(5).
  2. f(x)={x+4if x<32xif x≥3f(x) = \begin{cases} x + 4 & \text{if } x < 3 \\ 2x & \text{if } x \ge 3 \end{cases}. Find f(3)f(3).
  3. f(x)={x+1if x<15xif x≥1f(x) = \begin{cases} x + 1 & \text{if } x < 1 \\ 5x & \text{if } x \ge 1 \end{cases}. Find f(1)f(1).

Summary card

Piecewise functions

  1. Find the piece whose condition the input satisfies.
  2. Use that piece's formula.
  3. ∣x∣=x|x| = x for x≥0x \ge 0, and −x-x for x<0x < 0.

Watch out: at a boundary, read << and ≥\ge carefully.

CC BY-SA 4.0