Example  3

Express \(y = \left| 5x + 1 \right|\) as a piecewise function.

The function will remain the same when \(5x + 1\) is positive, and will become negative when \(5x + 1\) is negative. The zeros of \(y = 5x + 1\) can be used to split the function into these two regions.

\[\begin{align}
 0 &= 5x + 1 \\
  - 1 &= 5x \\
  - \frac{1}{5} &= x
 \end{align}\]

The expression \(5x + 1\) is positive for \(x \gt -\frac{1}{5}\) and negative for \(x \lt -\frac{1}{5}\), so

\[y = \left\{ \begin{align}
&5x + 1{\rm \thinspace { for }}\thinspace x \ge - \frac{1}{5} \\
-&\left({5x + 1} \right){\rm \thinspace { for }} \thinspace x < - \frac{1}{5} \\
 \end{align} \right.\]