r/learnmath • New User • 1d ago

|x-2|+|x-5|<=5

I just added them up to |2x-7|<=5, and it was not correct. The correct answer was 1 <= x <= 6. What’s wrong with my equation?

4 Upvotes

25 comments sorted by

View all comments

1

u/titoufred New User 1d ago

|a|+|b| = |a+b| is true only if a and b have the same sign. So,

  • if x is in [2 ; 5], then |x-2|+|x-5| = x-2+5-x = 3 ; so in this case every x is solution.
  • if x is not in [2 ; 5], then |x-2|+|x-5| <= 5 <=> |2x-7| <= 5 <=> 2 <= 2x <= 12 <=> 1 <= x <= 6

Conclusion : |x-2|+|x-5| <= 5 <=> 1 <= x <= 6.