# $||x-1|-|x+2||=p$ find p for which the equation has one solution

Consider the equation $$||x-1|-|x+2||=p$$

Find the value of $$p$$ for which the above equation has one solution.

• My intuition tells me p=0 – YuiTo Cheng Jan 30 at 15:07

## 2 Answers

Hint:

Notice the range of $$||x-1|-|x+2||=[0,3]$$, so $$p\in [0,3]$$

for $$x\leqslant-2$$ or $$x \geqslant1$$ , $$p=3$$

if $$p\neq0$$, there are $$2$$ distinct solutions for $$x$$ (why?)

so $$p=0$$

Edit:

The graph of $$||x-1|-|x+2||$$

You need $$|x-1|=|x+2|$$ and you need that this has only one solution, which is the case for $$x=-0.5$$. So $$p=0$$is indeed the answer.