Let f(x) = x + |2x − 1|. Find all solutions to the equation f(x) = 8

x + |2x-1| = 8

so, for 2x-1 >= 0,
x + 2x-1 = 8
3x = 9
x = 3
That meets the condition, so it's a solution
For 2x-1 < 0,
x - (2x-1) = 8
x = -7
That meets the condition, so it's a solution

So, x = 3 or -7
check:
x = 3: 3+|-5| = 3+5 = 8
x = -7: -7 + |-14-1| = -7+15 = 8