Why am I getting a wrong answer on solving $|x-1|+|x-2|=1$

457 Views Asked by At

I'm solving the equation, $$|x-1| + |x-2| = 1$$

I'm making cases,

$C-1, \, x \in [2, \infty) $

So, $ x-1 + x-2 = 1 \Rightarrow x= 2$

$C-2, \, x \in [1, 2) $

$x-1 - x + 2 = 1 \Rightarrow 1 =1 \Rightarrow x\in [1,2) $

$C-3, \, x \in (- \infty, 1)$

$ - x + 1 - x+2 = 1 \Rightarrow x= 1 \notin (-\infty, 1) \Rightarrow x = \phi$ (null set)

Taking common of all three solution set, I get $x= \phi$ because of the last case. But the answer is supposed to be $x \in [1,2]$

But when I write this equation in graphing calculator, it shows $2$ lines $x=1$ and $ x= 2$ rather than a region between $[1,2]$

Graph

Someone explain this too?

4

There are 4 best solutions below

6
On BEST ANSWER

Case 1 tells you, that the only $x$ in $[2,\infty)$ satisfying the equation is $x=2$.

Case 2 tells you, that all $x$ in $[1,2)$ satisfy the equation.

Case 3 tells you that no $x$ in $(-\infty,1)$ satisfy the equation.

So the union of those, $[1,2]$ is the set of all $x$ satisfying the equation.

In other words: Let $x \in \mathbb{R}$ satisfy the equation. Then either C1) $x\in [2,\infty)$ or C2) $x\in [1,2)$ or C3) $x\in (-\infty,1)$. You tackle all three cases, but $x$ only has to fulfill one of the three cases.

Apparently, desmos graphing calculator shows a wrong plot. See two other examples. The green curve is plottet the right way, the red one is obviously false.

enter image description here

0
On

Alternative Solution

By the Triangle Inequality, $$|x-1|+|x-2|=|x-1|+|2-x|\geq \big|(x-1)+(2-x)\big|=1\,.$$ The inequality becomes an equality if and only if $2-x=0$, or $x-1=\lambda(2-x)$ for some $\lambda\geq0$ (which gives, by the way, $x=\frac{2\lambda+1}{\lambda+1}\in[1,2)$). It follows immediately that $[1,2]$ is the solution set for $x\in\mathbb{C}$ such that $|x-1|+|x-2|=1$.

0
On

By direct way we need to distinguish three cases

  • $x<1 \implies |x-1| + |x-2| = 1-x+2-x=1 \implies -2x=-2\implies x=1$

  • $1\le x<2 \implies |x-1| + |x-2| = x-1+2-x=1 \implies 1=1$

  • $x\ge 2 \implies |x-1| + |x-2| = x-1+x-2=1 \implies 2x=4\implies x=2$

therefore $1\le x\le 2$.

0
On

You are absolutely right. Just you should've plotted a strip whose endpoints are in $1,2$ in other word you should find the intersection points of the function with the following set$$S=\{(x,y)|1\le x\le 2\}$$