Piecewise-defined functions and absolute value

Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

About this lesson

Integrated Math II › Quadratic functions and modeling

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

Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits

Piecewise-defined functions and absolute value

Quadratic functions and modeling. parabolas, vertex form, factored form, absolute value functions, inverse functions

Warm-up

Three quick questions from earlier lessons.

  1. A candle is 32 cm tall when lit and burns 4 cm per hour. Let yy be its height after xx hours.
    1. Its height after 2 hours, in cm:   ?\;?
    2. An equation for yy: y=  ?y = \;?
    3. After how many hours has it burned down?   ?\;?
    4. Let f(x)f(x) be its height after xx hours. Compute f(1)f(1).
    5. By what percent did its height decrease during the first hour?
    6. For how many hours at most is the candle at least 4 cm tall?
  2. f(x)=2x2+7f(x) = 2x^2 + 7. Find f(−2)f(-2).
  3. f(x)=x2+5f(x) = x^2 + 5. Find f(1+2)f(1 + 2).

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+8if x<62xif x≥6f(x) = \begin{cases} x + 8 & \text{if } x < 6 \\ 2x & \text{if } x \ge 6 \end{cases}. Find f(0)f(0).
  2. f(x)={x+42if x<109xif x≥10f(x) = \begin{cases} x + 42 & \text{if } x < 10 \\ 9x & \text{if } x \ge 10 \end{cases}. Find f(1)f(1).
  3. f(x)={x+9if x<83xif x≥8f(x) = \begin{cases} x + 9 & \text{if } x < 8 \\ 3x & \text{if } x \ge 8 \end{cases}. Find f(2)f(2).
  4. f(x)={x+25if x<1012xif x≥10f(x) = \begin{cases} x + 25 & \text{if } x < 10 \\ 12x & \text{if } x \ge 10 \end{cases}. Find f(1)f(1).

Watch out!

Practice ★★

  1. f(x)={x+2if x<12xif x≥1f(x) = \begin{cases} x + 2 & \text{if } x < 1 \\ 2x & \text{if } x \ge 1 \end{cases}. Find f(1)f(1).
  2. f(x)={x+43if x<127xif x≥12f(x) = \begin{cases} x + 43 & \text{if } x < 12 \\ 7x & \text{if } x \ge 12 \end{cases}. Find f(12)f(12).
  3. f(x)={x+6if x<23xif x≥2f(x) = \begin{cases} x + 6 & \text{if } x < 2 \\ 3x & \text{if } x \ge 2 \end{cases}. Find f(2)f(2).
  4. f(x)={x+32if x<129xif x≥12f(x) = \begin{cases} x + 32 & \text{if } x < 12 \\ 9x & \text{if } x \ge 12 \end{cases}. Find f(12)f(12).
  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+2if x<12xif x≥1f(x) = \begin{cases} x + 2 & \text{if } x < 1 \\ 2x & \text{if } x \ge 1 \end{cases}. Find f(1)f(1).
  2. f(x)={x+43if x<127xif x≥12f(x) = \begin{cases} x + 43 & \text{if } x < 12 \\ 7x & \text{if } x \ge 12 \end{cases}. Find f(12)f(12).
  3. f(x)={x+6if x<23xif x≥2f(x) = \begin{cases} x + 6 & \text{if } x < 2 \\ 3x & \text{if } x \ge 2 \end{cases}. Find f(2)f(2).

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.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. f(x)={x+aif x<14xif x≥1f(x) = \begin{cases} x + a & \text{if } x < 1 \\ 4x & \text{if } x \geq 1 \end{cases}. For which aa does the graph have no jump?
Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits