Contraction mapping problem in $\mathbb{R}$ 
Problem:In the mapping $T:\mathbb{R} \rightarrow \mathbb{R}$ defined by $Tx=\begin{cases} x-\frac{1}{2}e^x & \forall x \leq 0 \\ -1/2+1/2x & \forall x>0 \end{cases}$ a contraction?

Definition: A mapping f from a subset A of a normed space E into E is a contraction mapping if there exists a positive number $\alpha<1$ such that $\Vert f(x)-f(y) \Vert \leq \alpha \Vert x-y \Vert \forall x,y \in A$.
Example: Let $f(x)=x+e^{-x}$ as a mapping from $\mathbb{R}^+$ into $\mathbb{R}^+$. For $x,y \in \mathbb{R}^+$, by mean value theorem, $|f(x)-f(y)|<|x-y|$, since $|f'(\xi)|<1$ for all $\xi \in \mathbb{R}^+$. f is not a contraction, since there is no $\alpha<1$ such that $|f(x)-f(y)| \leq \alpha |x-y| \forall x,y \in \mathbb{R}^+$. f does not have a fixed point.
Discussion:This is a piecewise function,so mean value theorem cannot apply here. The traditional method does not work. Cannot make further observations here, so may someone please provide more insights on this problem, thanks!
Update: From @Sven Pistre, For Case 3, by inequality $e^x \geq x+1$ and set $x<0<y$, it's a smooth function, apply mean value theorem, I get $\Vert T(x)-T(y) \Vert= \Vert -1/2+1/2y-x+1/2e^x \Vert \geq 1/2 \Vert (x-y) \Vert$. To show not a contraction, I believe must show $ > \Vert x-y \Vert$. Still unable to figure out. Thanks for any help.
 A: To see that $T$ is not a contraction, consider $y=0$ and $x<0$.
Then by l'Hôpital:
$$
\begin{align*}
    \lim_{x\to-\infty}\tfrac{|T(x)-T(0)|}{|x|} 
    &= \lim_{x\to-\infty}\frac{\big|x-\tfrac{1}{2}e^x+\tfrac{1}{2}\big|}{|x|} 
    = \lim_{x\to-\infty}\big|1 + \tfrac{1}{2x}(1-e^x)\big|
\\
    &= \lim_{x\to-\infty}\big|1 + \tfrac{-e^x}{2}\big| = 1.
\end{align*}
$$
Therefore, for any $\alpha\in (0,1)$ there is $x_0\in(-\infty,0)$ such that
$$
    1 - \tfrac{|T(x_0)-T(0)|}{|x_0|} < 1 - \alpha
$$
or, in other words,
$$
    |T(x_0)-T(0)| > \alpha|x_0|.
$$
However, $T$ is still $1$-Lipschitz. To see this you don't actually need to consider three cases since $T$ is, in fact, differentiable at the origin (use the Taylor expansion of $e^x$ around the origin) and its derivative is bounded by $1$ everywhere. So you do get $|T(x)-T(y)|\leq |x-y|$ but as seen above the Lipschitz constant cannot be improved.

The following animation is similar to the one on wikipedia but for your specific function and Lipschitz constant $\alpha=1$. You can see that $T$ is $1$-Lipschitz because its graph stays inside the shaded area.


For any $\alpha$ strictly smaller than $1$ the graph will always leave the shaded area at some point $x_0$ "if you sail far enough to the west" as Tolkien would say. You can see this in the following animation for $\alpha=0.99$ on the interval $(-700,-690)$.

A: Assume $\alpha\in(0,1)$. For any $z\le\log\left(1-\alpha\right)<0$ we have $\alpha <1-\frac{1}{2}e^{z}=T'(z)$. So let $y=\log\left(1-\alpha\right)$ and $x=y-1$. Then $T$ is continuous on $[x,y]$ and differentiable on $(x,y)$. If it were Lipschitz with constant $\alpha$ then the mean value theorem would imply a point $z$ in $(x,y)$ with $T'(z)\le \alpha$. But we have chosen $x$ and $y$ so that no such point exists. Therefore $T$ cannot be a contraction.
