\[f(x)= \left\{ \begin{array}{c} x \; x \lt 0 \\ 1 \; x=0 \\ x \; x \gt 0 \end{array} \right. \]
The limit of
\[f(x)\]
as x tends to 0, written \[lim_{x \rightarrow 0} f(x)\]
is not \[f(0)\]
. In fact we can define the limit in two ways - as \[x\]
tends to 0 from below, written \[x \rightarrow 0^{{}-{}}\]
and as \[x\]
tends to 0 from above, written \[x \rightarrow 0^{{}+{}}\]
. As \[x \rightarrow 0^{{}-{}}\]
, \[f(x) =x \rightarrow 0\]
and as \[x \rightarrow 0^{{}+{}}\]
, \[f(x) =x \rightarrow 0\]
so \[lim_{x \rightarrow 0} f(x)=0\]
, even while \[f(0)=1\]
.