Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How could we solve $x$, in $|x+1|-|1-x|=2$?

How should I solve: $|x-2| + |x-5|=3$

Please suggest a way that I could use in other problems of this genre too Any help to solve this problem would be greatly appreciated. Thank you,

share|cite|improve this question

marked as duplicate by robjohn Aug 9 '12 at 23:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

The methods used here should work. Can you try reviewing those answers and possibly updating your question with any progress you make? – The Chaz 2.0 Jun 4 '12 at 16:45
@TheChaz: my hint applies there as well :-) – robjohn Jun 4 '12 at 16:57
Robjohn argues that the two questions are the same. I think that there is a slight difference between $|x-1|-|x+1|=2$ and $|x-1|+|x+1|=2$, so I voted to reopen. – Martin Sleziak Aug 30 '14 at 11:53
up vote 10 down vote accepted

Well, there are a couple of ways.

Method 1. By cases.

One is to consider cases: note that $$\begin{align*} |x-2|&=\left\{\begin{array}{ll} x-2 & \text{if }x\geq 2\\ 2-x &\text{if }x\lt 2 \end{array}\right.\\ |x-5|&=\left\{\begin{array}{ll} x-5 &\text{if }x\geq 5\\ 5-x &\text{if }x\lt 5 \end{array}\right. \end{align*}$$ So, you consider what happens if $x\geq 5$, if $2\leq x\lt 5$, and if $x\lt 2$. In the first case, you have $$x-2+x-5 = 3$$ which is the same as $2x-7 = 3$, or $2x=10$, or $x=5$. Since this satisfies $x\geq 5$, that is one solution.

If $2\leq x \lt 5$, then you get $$x-2 + 5-x = 3$$ which is always true. So all numbers between $2$ and $5$ work (check and see this is true).

And if $x\lt 2$, you get $$2-x + 5-x = 3$$ which is the same as $7-2x = 3$, or $2x=4$; that is, $x=2$. But $x=2$ does not satisfy $x\lt 2$, so there are no solutions here.

So the solution is that $x$ satisfies the equation if and only if $2\leq x\leq 5$.

Method 2. The absolute value is a measure of distance. $|x-2|$ is how far $x$ is from $2$, and $|x-5|$ is how far $x$ is from $5$. you are trying to find all numbers whose distance from $2$ plus their distance from $5$ equal $3$. Note that no number greater than $5$ can work, because then their distance to $2$ is already greater than $3$. No number smaller than $2$ can work because their distance to $5$ is already greater than $3$. And any number between $2$ and $5$, inclusively, will work, because if $2\leq x \leq 5$, then adding the distance from $x$ to $2$ and from $x$ to $5$ will necessarily add up to $3$. So the answer is that $x$ satisfies the equation if and only if $2\leq x \leq 5$.

share|cite|improve this answer
explicit, but very explanatory (+1) – robjohn Jun 4 '12 at 16:54
@Arturo Magidin:can i take the first case as x>5 like the third case? – mgh Jun 4 '12 at 17:22
@meg_1997: I don't understand your question. I divided the $x$ axis into $x\lt 2$, $2\leq x\lt 5$, and $5\leq x$. If you change the third case to $5\lt x$, then you need to change the second case to $2\leq x\leq 5$ to include all numbers. – Arturo Magidin Jun 4 '12 at 17:25
@Arturo Magidin yes i got your point.And also it seems that its extremely necessary to consider the right cases – mgh Jun 4 '12 at 17:29
@Arturo Magidin:What does it means when it is said that solve the above question using geometric interpretation of |x-a| – mgh Jun 4 '12 at 18:00


One characterization of "$x$ is between $a$ and $b$" is $$ |x-a|+|x-b|=|a-b| $$

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.