Back to the on-screen lesson ·

Piecewise and absolute value functions

Evaluate functions defined by several rules, solve absolute value equations, and decide whether the pieces meet at a boundary.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

In this lesson a single function carries more than one rule, and a condition beside each rule says which inputs it governs. You learn to test the input against the conditions before substituting, to see that the boundary belongs to whichever condition is inclusive, and to read absolute value as a piecewise rule — which is why $|x - 3| = 5$ has two solutions rather than one. Finally you compare what the two rules give at a boundary and decide whether the graph runs smoothly through it or jumps.

2. What you bring to this

You already substitute a number into a rule, and you already decide whether an inequality is true: $-2 < 5$ yes, $4 < 4$ no. A piecewise function needs nothing more than those two skills, used in that order — first decide, then substitute.

3. Words you will need

Piecewise function: one function defined by several rules, each with a condition saying which inputs it governs.

Boundary point: an input where the governing rule changes.

Absolute value, $|x|$: the distance from $x$ to $0$, so $|5| = 5$ and $|-5| = 5$; never negative.

Continuous at a point: no break there — what the pieces approach is what the function takes.

Strict ($<$) and inclusive ($\le$) conditions: only an inclusive one owns its boundary point.

4. Piecewise rules, absolute value, and where the pieces meet

A piecewise function is one function carrying several rules, each with a condition: $$f(x) = \begin{cases} x + 1 & x < 2 \\ 3x & x \ge 2\end{cases}$$ To evaluate it, test the input against the conditions first, then substitute into the single rule that accepts it. $f(0)$: since $0 < 2$, the first rule gives $f(0) = 1$. $f(2)$: since $2 < 2$ is false and $2 \ge 2$ is true, the second gives $f(2) = 6$. The conditions must cover every input and never overlap, which is why one is strict and the other inclusive.

Absolute value is a piecewise rule in disguise: $|x| = x$ when $x \ge 0$ and $|x| = -x$ when $x < 0$. That is why $|x - 3| = 5$ splits into $x - 3 = 5$ or $x - 3 = -5$, giving $x = 8$ or $x = -2$ — both genuine, both exactly $5$ units from $3$.

A piecewise graph is continuous at a boundary when the two rules agree there. Above, at $x = 2$ the first rule heads for $3$ while the second gives $6$, so the graph jumps by $3$. Change the first rule to $x + 4$ and both give $6$: the jump closes.

Another way: picture

A graph in two parts: a line climbing gently to $x = 2$ and stopping at an open circle at height $3$, then a steeper line from a filled circle at height $6$. Open means the point is not on the graph, filled means it is; the gap between them is the jump.

Another way: story

A piecewise function is a price list. Postage costs one amount up to $100$ g and another above it, and the boundary belongs to whichever line says "up to and including".

5. Three things that trip people up

Using both rules, or the wrong one. Every input satisfies exactly one condition. Check the conditions first and substitute into one rule only; adding or averaging the two answers is meaningless.

Guessing at the boundary. If the pieces are $x < 4$ and $x \ge 4$, then $f(4)$ comes from the second rule, because $4 < 4$ is false and $4 \ge 4$ is true. The inclusive sign says who owns the point.

"$|x| = 5$ means $x = 5$." It means $x = 5$ or $x = -5$: two numbers sit five units from zero. And $|x| = -3$ has no solution, because a distance is never negative.

6. Evaluate $f(-1)$ and $f(5)$ for $f(x) = x^2$ when $x < 5$, and $f(x) = 2x$ when $x \ge 5$

  1. $f(-1)$: is $-1 < 5$? Yes, so the first rule applies: $f(-1) = (-1)^2 = 1$.

    Decide first, substitute second.

  2. $f(5)$: is $5 < 5$? No. Is $5 \ge 5$? Yes, so the second rule applies: $f(5) = 10$.

    The boundary belongs to the inclusive condition.

  3. Near $x = 5$ the first rule heads for $25$, but $f(5) = 10$.

    The pieces do not meet, so the graph breaks.

7. Solve $|2x - 1| = 7$

  1. The bars hide two cases: $2x - 1 = 7$ or $2x - 1 = -7$.

    Two numbers have absolute value $7$.

  2. First case: $2x = 8$, so $x = 4$. Second case: $2x = -6$, so $x = -3$.

    Solve each branch as an ordinary equation.

  3. Check both: $|2(4) - 1| = 7$ and $|2(-3) - 1| = |-7| = 7$.

    Both work, so both are solutions.

8. Your turn: for $f(x) = x - 2$ when $x < 3$ and $f(x) = 4x$ when $x \ge 3$, find $f(3)$ and say whether the graph breaks there

  1. Is $3 < 3$? No, so the second rule owns the boundary: $f(3) = 12$.

  2. Your turn: work this step out. Its working is at the end of the packet.

    From the left the first rule heads for $3 - 2 = 1$, and $1 \neq 12$, so the graph jumps by $11$ at $x = 3$.

9. Guided practice

$f(x) = x + 5$ for $x < 3$, and $f(x) = 4x$ for $x \ge 3$. What is $f(3)$?

At the boundary, f(3) = answer.

10. Guided practice

$f(x) = x + 5$ for $x < 6$, and $f(x) = 6x$ for $x \ge 6$. What is $f(-6)$?

On the lower piece, f(-6) = answer.

11. Practice

Solve $|x - 4| = 2$. Type the larger solution.

The larger solution is answer.

12. Practice

$f(x) = x - 8$ for $x < -2$, and $f(x) = 5x$ for $x \ge -2$. Do the two pieces meet at $x = -2$?

13. Somewhere new

A car park charges $\$7$ for the first hour and $\$6$ for each hour after that. What does a stay of $4$ hours cost?

The stay costs answer dollars.

14. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

15. Test question

$f(x) = x + 5$ for $x < 4$, and $f(x) = 4x$ for $x \ge 4$. What is $f(4)$?

At the boundary, f(4) = answer.

16. What you can do now

You can evaluate a piecewise function, solve an absolute value equation and test a boundary. For $f(x) = x + 1$ when $x < 2$ and $f(x) = 3x$ when $x \ge 2$, find $f(2)$; then solve $|x - 4| = 6$ and say whether the graph of $f$ breaks at $x = 2$.

Working for the steps left to you

8. Your turn: for $f(x) = x - 2$ when $x < 3$ and $f(x) = 4x$ when $x \ge 3$, find $f(3)$ and say whether the graph breaks there, step 2