Stuck on this? Solve it with AI
Algebra · real student question

Solve the equation |x| + |x - 1| = |x - 2| + |x - 3|.

Question

Solve the equation

∣x∣+∣x−1∣=∣x−2∣+∣x−3∣.|x|+|x-1|=|x-2|+|x-3|.

Step-by-step solution

  1. Locate the breakpoints and split the line. Each modulus changes formula where its inside hits zero, at x=0,1,2,3x=0,1,2,3. These cut the real line into five intervals, and on each one every bar can be removed with a definite sign.

  2. Interpret the equation before computing. The left side is the total distance from xx to 00 and to 11; the right side is the total distance to 22 and to 33. Since the pair {2,3}\{2,3\} sits entirely to the right of {0,1}\{0,1\}, you should expect the solution somewhere in the middle — and this reading also predicts there will be exactly one.

  3. Handle the three outer intervals. For x≤0x\le 0: (−x)+(1−x)=(2−x)+(3−x)(-x)+(1-x)=(2-x)+(3-x) gives 1−2x=5−2x1-2x=5-2x, a contradiction. For 2≤x≤32\le x\le 3: x+(x−1)=(x−2)+(3−x)x+(x-1)=(x-2)+(3-x) gives 2x−1=12x-1=1, so x=1x=1, which is not in [2,3][2,3] — rejected. For x≥3x\ge 3: 2x−1=2x−52x-1=2x-5, another contradiction.

  4. Handle the interval 0 <= x <= 1. Here ∣x∣=x|x|=x, ∣x−1∣=1−x|x-1|=1-x, ∣x−2∣=2−x|x-2|=2-x, ∣x−3∣=3−x|x-3|=3-x:

    x+(1−x)=(2−x)+(3−x) ⟹ 1=5−2x ⟹ x=2,x+(1-x)=(2-x)+(3-x)\ \Longrightarrow\ 1=5-2x\ \Longrightarrow\ x=2,

    which lies outside [0,1][0,1] — rejected. Always test the candidate against the interval that produced it; this is where most attempts go wrong.

  5. Handle the interval 1 <= x <= 2. Now ∣x∣=x|x|=x, ∣x−1∣=x−1|x-1|=x-1, ∣x−2∣=2−x|x-2|=2-x, ∣x−3∣=3−x|x-3|=3-x:

    x+(x−1)=(2−x)+(3−x) ⟹ 2x−1=5−2x ⟹ 4x=6 ⟹ x=32,x+(x-1)=(2-x)+(3-x)\ \Longrightarrow\ 2x-1=5-2x\ \Longrightarrow\ 4x=6\ \Longrightarrow\ x=\tfrac32,

    and 32\tfrac32 does lie in [1,2][1,2], so it is accepted.

  6. Check the solution in the original equation. At x=32x=\tfrac32: the left side is 32+12=2\tfrac32+\tfrac12=2 and the right side is 12+32=2\tfrac12+\tfrac32=2 ✓. So the unique solution is x=32x=\tfrac32 — the midpoint of the two pairs, exactly as the distance reading suggested.

Answer

x=32x=\frac{3}{2}

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