Find all $x\in\mathbb R$ that satisfy the equation $|x| − |x − 1| = 1/2$ . Sketch the graph of the equation $y = |x| − |x − 1|$ So I understand that given $|x|$, it will be in the form $|x|= \{-x: \text{if } x<0\}$ or $|x|= \{x: \text{if } x >= 0\}$. Also, I know that $|x-1| = \{-(x-1): \text{if } x-1 <0 \text{ or } x<1\}$ and $|x-1|= \{(x-1):\text{if } x >= 0 \text{ or } x >= 1\}$.
From here I have no idea how to combine these two equations to a function that could be plotted as a piecewise function, and I do not understand how to combine the boundaries since I am also confused about the negative sign in front of $|x − 1|$ and if it has an effect on the boundary.
 A: Guide:
Consider cases:
Figure out the expression of $|x|-|x-1|$ when 


*

*case $1$: $x < 0$, find expression $f_1$

*case $2$: $0 \le x < 1$, find expression $f_2$.

*case $3$: $x \ge 1$, find expression $f_3$.
For each case, consider whether it can be equal to $\frac12$.
$$|x|-|x-1|=\begin{cases} f_1(x) , & x<0 \\ f_2(x) & 0 \le x < 1 \\ f_3(x) &, x \ge 1\end{cases}$$
A: Using Mathematica
Reduce[Abs[x] - Abs[x - 1] == 1/2, x, Reals]

(* x == 3/4 *)

With ContourPlot  (http://reference.wolfram.com/language/ref/ContourPlot.html)
ContourPlot[Abs[x] - Abs[x - 1] == y,
 {x, -5, 5}, {y, -3/2, 3/2},
 MaxRecursion -> 5,
 FrameLabel -> Automatic,
 Epilog -> {Red, Dashed,
   Line[{{-5, 1/2}, {3/4, 1/2}, {3/4, -3/2}}]},
 AspectRatio -> 1/GoldenRatio]


With Piecewise (http://reference.wolfram.com/language/ref/Piecewise.html)
Reduce[Abs[x] - Abs[x - 1] == y, x, Reals]


y[x_] = Piecewise[{{-1, x <= 0}, {2 x - 1, 0 < x < 1}, {1, x >= 1}}]


Plot[y[x], {x, -5, 5},
 PlotRange -> {-3/2, 3/2},
 Frame -> True, Axes -> False,
 FrameLabel -> Automatic,
 Epilog -> {Red, Dashed,
   Line[{{-5, 1/2}, {3/4, 1/2}, {3/4, -3/2}}]}]


