How to solve $ 2^{\vert x + 1 \vert} - 2^x = \vert 2^x - 1\vert + 1 $ for $ x $ I am new to modulus and inequalities , I came across this problem:
$ 2^{\vert x + 1 \vert} - 2^x = \vert 2^x - 1\vert + 1 $ for $ x $
How to find $ x $ ?

Consider three cases:.
i) $\bf x\leq -1$. Then $x\leq -1$, $2^x< 1$, and the equation becomes
$\frac{1}{2}2^{-x} - 2^x = 1- 2^x + 1$, that is $2^{-x}=4$ which implies that $x=-2\leq -1$.
ii) $\bf -1<x<0$. Then $x>-1$, $2^x< 1$, and the equation becomes $2^x=2\cdot 2^{x} - 2^x = 1- 2^x + 1=2-2^x$, that is $2^x=1$ which is impossible for $-1<x<0$.
iii) $\bf 0\leq x$. Then $x>-1$, $2^x\geq 1$, and the equation becomes $2^x=2^x$ which holds for all $x\geq 0$.
Hence the complete set of solutions is $\{-2\}\cup [0,+\infty)$.
