I want to check for any $x_0$ in its domain, whether this function is differentiable or not. $f: \mathbb{R} \rightarrow \mathbb{R}, x \mapsto \begin{cases} 2-\mathrm{e}^{-x} & ;\ x\geq 0 \\ \mathrm{e}^{-x} & ; x < 0 \end{cases}$
For $x \neq 0$ is $f$ obviously differentiable. Consider $x=0$
$\lim\limits_{x \downarrow 0}\frac{f(x)-f(0)}{x-0}= \lim\limits_{x \downarrow 0}\frac{2-\mathrm{e}^{-x}-2+\mathrm{e}^0}{x}=\lim\limits_{x \downarrow 0} \frac{-\mathrm{e}^{-x}+1}{x} \overset{L'Hôpital}{=} \lim\limits_{x \downarrow 0}\frac{\mathrm{e}^{-x}}{1}=1$
$\lim\limits_{x \uparrow 0}\frac{f(x)-f(0)}{x-0}= \lim\limits_{x \uparrow 0}\frac{\mathrm{e}^{-x}-1}{x} \overset{L'Hôpital}{=} \lim\limits_{x \uparrow 0}\frac{-\mathrm{e}^{-x}}{1}=-1$
Since right-hand and left-hand limit are not matching, $f$ is in $x_0=0$ not differentiable.
Could somebody please tell me, if this is correct?