If a function is defined in pieces, and if the definition changes
at $x=a$, then we use the definition for $x \lt a$ to compute
$\displaystyle{\lim_{x \to a^-} f(x)}$, we use the definition at
$x=a$ to compute $f(a)$, and the definition for $x \gt a$ to
compute $\displaystyle{\lim_{x \to a^+} f(x)}$, and then we
compare the three quantities.
Example: If $f(x) = \begin{cases} 1-x & x< 0, \cr
x^2 & x \ge 0, \end{cases} \qquad $ then
DO: Check that the
values above are correct, using the given piecewise definition
of $f$.
Since the limits from the left and right do not agree, the limit
does not exist, and the function is discontinuous at $x=0$.
DO:Consider the
limits above, and try to sketch what happens to the graph of $f$ near
$x=0$. Don't worry about other parts of the function;
use only the limits as $x\to 0^-$ and as $x\to 0^+$, and $f(0)$,
not the definition of the function.