Algebra · real student question

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

Question

Solve the equation

x+x1=x2+x3.|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 x0x\le 0: (x)+(1x)=(2x)+(3x)(-x)+(1-x)=(2-x)+(3-x) gives 12x=52x1-2x=5-2x, a contradiction. For 2x32\le x\le 3: x+(x1)=(x2)+(3x)x+(x-1)=(x-2)+(3-x) gives 2x1=12x-1=1, so x=1x=1, which is not in [2,3][2,3] — rejected. For x3x\ge 3: 2x1=2x52x-1=2x-5, another contradiction.

  4. Handle the interval 0 <= x <= 1. Here x=x|x|=x, x1=1x|x-1|=1-x, x2=2x|x-2|=2-x, x3=3x|x-3|=3-x:

    x+(1x)=(2x)+(3x)  1=52x  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, x1=x1|x-1|=x-1, x2=2x|x-2|=2-x, x3=3x|x-3|=3-x:

    x+(x1)=(2x)+(3x)  2x1=52x  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 →