Algebra · real student question

Solve the equation |x| + |x − 1| = 1.

Question

Solve

x+x1=1|x|+|x-1|=1

Step-by-step solution

  1. Read the left side as a total distance. x|x| is the distance from xx to 00 and x1|x-1| is the distance from xx to 11. The equation asks for the points whose distances to 00 and to 11 add up to 11 — and 11 is exactly the gap between those two points.

  2. Split into the three cases. The critical points 00 and 11 divide the line into three regions.

    Case x<0x<0: x=x|x|=-x and x1=1x|x-1|=1-x, so the equation reads x+1x=1-x+1-x=1, i.e. 2x=0-2x=0, giving x=0x=0 — which contradicts x<0x<0. No solution here.

  3. Case 0 ≤ x ≤ 1. Here x=x|x|=x and x1=1x|x-1|=1-x, so

    x+(1x)=1x+(1-x)=1

    This is an identity — true for every xx in the interval. So the whole of [0,1][0,1] solves the equation.

  4. Case x > 1. Here x=x|x|=x and x1=x1|x-1|=x-1, so x+x1=1x+x-1=1, i.e. 2x=22x=2 and x=1x=1 — which contradicts x>1x>1. No solution here either.

  5. Collect the solution set.

    0x1, i.e. x[0,1]\boxed{0\le x\le 1,\ \text{i.e. }x\in[0,1]}

    The answer is an interval, not a finite list — a point worth stressing, since absolute-value equations are usually expected to have isolated solutions.

  6. Check the endpoints and an interior point. At x=0x=0: 0+1=10+1=1 ✓. At x=1x=1: 1+0=11+0=1 ✓. At x=0.3x=0.3: 0.3+0.7=10.3+0.7=1 ✓. Outside: at x=2x=2, 2+1=312+1=3\neq 1 ✗; at x=1x=-1, 1+2=311+2=3\neq 1 ✗. This also matches the triangle inequality x+x1x(x1)=1|x|+|x-1|\ge|x-(x-1)|=1, with equality exactly on [0,1][0,1].

Answer

x[0,1]x\in[0,1]

Need to solve a different problem like this? Open the solver →