Express
as a piecewise function.
Start from the definition. For any expression ,
So the absolute value leaves its contents alone when they are non-negative and negates them otherwise. Applying it needs one thing: the value of at which the inside switches sign.
Find the split point. Set the inside to zero:
and more precisely exactly when . This single number divides the real line into the two branches.
Write each branch. For the inside is non-negative, so the bars simply drop. For the inside is negative, so it is negated — and the minus sign must reach both terms:
Writing instead of is the classic error; distributing the negative carefully avoids it.
Check continuity at the join. From the right, ; from the left, . Both branches meet at when , so the function is continuous — the graph is a V with its vertex at .
Verify with sample values. At : and the first branch gives ✓. At : and the second branch gives ✓. Direct evaluation matched the piecewise form at exact rational points ✓. Note the output is never negative, whichever branch applies.
Need to solve a different problem like this? Open the solver →