Writing a piecewise function from an absolute value expression is a core algebra skill that turns a compact distance-based formula into a clear set of rules. The absolute value function behaves differently on each side of its breakpoint, so the goal is to split the expression into two or more cases, each with its own domain condition. Once you identify where the inside of the absolute value equals zero, you can remove the absolute value bars, simplify each branch, and write a complete piecewise definition That alone is useful..
Why Absolute Value Becomes Piecewise
The absolute value of a number measures its distance from zero. That is why the output is never negative. Formally,
[ |x| = \begin{cases} x, & x \ge 0 \ -x, & x < 0 \end{cases} ]
This definition is already a piecewise function. If the inside is nonnegative, you keep it as it is. The expression inside the absolute value determines the sign of the quantity. If the inside is negative, you multiply it by (-1) to make it positive Simple as that..
For any expression (u), the same logic applies:
[ |u| = \begin{cases} u, & u \ge 0 \ -u, & u < 0 \end{cases} ]
So the central task is to find where (u=0), test the sign of (u) on each side, and then write the correct branch for each interval.
Step-by-Step Method for Writing the Piecewise Function
1. Identify the expression inside the absolute value
Start by isolating the part between the absolute value bars. Take this: in (|2x+1|), the inside expression is (2x+1). In (-3|x-4|+7), the inside expression is (x-4), while the (-3) and (+7) are outside transformations.
2. Solve the inside expression equal to zero
The breakpoint occurs where the inside expression equals zero. Solve:
[ u = 0 ]
For (|x-3|), solve (x-3=0), so the breakpoint is (x=3). For (|2x+1|), solve (2x+1=0), so the breakpoint is (x=-\frac{1}{2}).
3. Determine the sign of the inside expression on each interval
Choose a test value on each side of the breakpoint, or use inequality reasoning. If the inside expression is positive or zero on an interval, the absolute value branch is the expression itself. If the inside expression is negative, the branch is the negative of the expression.
4. Write one rule for each interval
Each branch needs two parts: the simplified expression and the domain condition. Do not forget the inequality that tells the reader when that branch applies It's one of those things that adds up. Surprisingly effective..
5. Simplify each branch carefully
Distribute negative signs and combine like terms. A common error is to negate only the first term instead of the entire inside expression. To give you an idea, (-(x-3)) becomes (-x+3), not (-x-3) No workaround needed..
6. Check the breakpoint
At the breakpoint, both branches should produce the same output. This is a quick way to catch sign mistakes.
Example 1: Writing (|x-3|) as a Piecewise Function
The inside expression is (x-3). It equals zero at (x=3).
- When (x \ge 3), the inside expression is nonnegative, so (|x-3|=x-3).
- When (x<3), the inside expression is negative, so (|x-3|=-(x-3)=-x+3).
So,
[ |x-3| = \begin{cases} x-3, & x \ge 3 \ -x+3, & x < 3 \end{cases} ]
At (x=3), both branches
At $x=3$, both branches give $0$, so the two pieces meet at the point $(3,0)$ and the graph has no jump or hole. A quick spot-check with test values confirms the signs: $|5-3|=2$ matches $5-3=2$, and $|0-3|=3$ matches $-0+3=3$.
Example 2: A Coefficient Inside the Absolute Value
Write $|2x+1|$