Verify differentiability at $x=0$ So the problem statement I working on is

Find the indefinite integral of $\exp(-|x|)$ with respect to $x$.

I have provided an answer below, but I have a few question at the end. I guess it's easier if I show my work first (alternatively head to the last paragraph to jump directly to my question).
My Answer
\begin{align*}
  \int \exp(-|x|)  dx &= \begin{cases}
    \int \exp(-x) dx \text{ if } x\geq0\\
    \int \exp(x) dx \text{ if } x<0\\
  \end{cases}\\
  &\overset{(\star)}{=} \begin{cases}
    -\exp(-x) + 2 + C \text{ if } x\geq0\\
    \exp(x) + C \text{ if } x<0
  \end{cases}
\end{align*}
I added $2$ to the right-hand side of the graph since at $x=0$,
\begin{align*}
  -\exp(-0) + C_1 &= \exp(0) + C_2 \\
  \implies -1 + C_1 &= 1 + C_2 \\
  \implies C_1 &= 2 + C_2
\end{align*}
I added a graph to visualize the discontinuity that needs to be removed. Strictly speaking, I'm not done here because I still need to show that the anti-derivative is differentiable at the origin. Therefore I tried to use the definition of a derivative, i.e.
\begin{equation*}
  f'(x_0) = \lim_{x\to x_0}\frac{f(x_0+h)-f(x_0)}{h}
\end{equation*}
but I am not really sure if this is correct:
Left-Hand Limit
\begin{align*}
  F(x_0) &= \lim_{h\to0^-}\frac{F(x_0+h)-F(x_0)}{h} \\
         &= \lim_{h\to0^-}\frac{\exp(x_0+h)+C-(\exp(x_0)+C)}{h} && x_0 = 0 \\
         &= \lim_{h\to0^-}\frac{\exp(h)-1}{h} && \text{Rule of L'hopital}\\
         &= 1
\end{align*}
Right-Hand Limit
\begin{align*}
  F(x_0) &= \lim_{h\to0^+}\frac{F(x_0+h)-F(x_0)}{h} \\
         &= \lim_{h\to0^+}\frac{-\exp(-x_0-h)+2+C-(-\exp(-x_0)+2+C)}{h} \\
         &= \lim_{h\to0^+}\frac{-\exp(x_0)\exp(-h)+\exp(x_0)}{h} && x_0 = 0 \\
         &= \lim_{h\to0^+}\frac{-\exp(-h)+1}{h} && \text{Rule of L'hopital} \\
         &= 1
\end{align*}
from this it looks like adding $2$ didn't really make a difference in this proof for differentiablity? I also don't feel good about myself using Rule of L'hopital in a limit proof, but I didn't really any other way to continue so that's the best I could come up with in this situation.

 A: Adding $2$ helps a lot in the calculation of the limits. It affects the left-hand limit greatly. Look at the numerator
$$
F(x_0+h)-F(x_0)
$$
Here, the left $F$ uses $C_1$ and the right $F$ uses $C_2$, so this numerator doesn't approach $0$ at all unless you add the $2$.
As for how to avoid l'Hopital, that depends on how you define $\exp$. At any rate, you can note that your left-hand limit is actually equal to the left-side derivative of $e^x$ at $x=0$ (just insert that into the definition of the derivative, and see that you get the same thing). Similarly, the right-hand limit is equal to the right-side derivative of $-e^{-x}$ at $x=0$. So if you already know what these two derivatives are, you're done.
A: $f(x)=\exp(-\vert x \vert)$ is a continuous map as it is a composition of continuous map.
Therefore, you don’t have to check that the derivative of its indefinite integral exists. It exists by the fundamental theorem of calculus.
The equality
$$\int \exp(-|x|)  dx = \begin{cases}
    \int \exp(-x) dx \text{ if } x\geq0\\
    \int \exp(x) dx \text{ if } x<0\\
  \end{cases}$$ that you wrote doesn’t make sense.
The indefinite integral is one, it is not different on the left and on the right side of zero.
What you can write is
$$\int \exp(-\vert t \vert) dt= C + \int_0^x f(t) dt$$
And then separate the cases $x<0$ and $x \ge 0$.
A: If you don't add that $2$, your function will not even be continuous at $0$, and therefore it will not be differentiable at that point. If you don't put that $0$, the left derivative at $0$ will be$$\lim_{h\to0^-}\frac{\exp(h)+C-(-\exp(0)+C)}h=\lim_{h\to0^-}\frac{\exp(h)+1}h=-\infty.$$
A: On the left the antiderivative is
$$e^{x}+C_-$$ and on the right
$$-e^{-x}+C_+.$$
Continuity must be ensured at the meeting point (because it is an antiderivative), and $$f(0)=1+C_-=-1+C_+$$ is required.

Now for positive $h$
$$f'^+(0)\leftarrow\frac{f(h)-f(0)}h=\frac{-e^{-h}+1}h$$ and $$f'^-(0)\leftarrow\frac{f(-h)-f(0)}{-h}=-\frac{e^{-h}-1}h$$ so that if the limit in the RHS exists, the derivative exists. And it certainly exists, as it is the right derivative of the negative exponential.
