How to solve equations involving modulus function of the type $|x+1| - |1-x|=2 $ and $ |x-1|=|x|+a$?

For the first one, $$|x+1| - |1-x|=2$$ Or, $$|x+1| - |x-1|=2$$ as $|x|=|-x|$, I just rearranged just because I prefer x first, not necessary; Now break a number line into three parts: Use: $|x|=\begin{cases}+x,\;x>0\\-x,\;x<0\end{cases}$

Part I:$\;x\in(-\infty,-1]$

Now, $$x+1\le0\wedge x-1<0$$

So, $$-(x+1)+(x-1)=-2$$ no solution here;

Part II:$\;x\in(-1,1]$

Now, $$x+1>0\wedge x-1\le0$$

So, $$(x+1)+(x-1)=2\implies x=1$$which is in this range;

Part III:$\;x\in(1,\infty)$

Now, $$x+1>0\wedge x-1>0$$

So, $$+(x+1)-(x-1)=2$$which is true for all x in the required range;


So, $$\large\boxed{x\in[1,\infty)}$$


Solve second one similiarly by breaking into $(\infty,0],(0,1],(1,\infty)$


Note: There is a simpler way way for first, which is a special case: Consider it as: $$|x-(-1)|-|x-(1)|=(1)-(-1)$$ Let P(x),A(-1) and B(1) be points on number line, then: $$PA-PB=AB$$ And it is clear from the following figure that $x\in[1,\infty)$ enter image description here