# How do you find one sided limits and limits of piecewise functions?

Sep 28, 2014

The only thing you need to worry about is that you choose the right formula since piecewise defined functions have multiple formulas.

Let us look at an example.

$f \left(x\right) = \left\{\begin{matrix}x + 2 \mathmr{if} x < - 2 \\ {x}^{2} \mathmr{if} - 2 \le x < 1 \\ \frac{1}{x} \mathmr{if} 1 \le x\end{matrix}\right.$

(1) ${\lim}_{x \to - {2}^{-}} f \left(x\right) = {\lim}_{x \to - {2}^{-}} \left(x + 2\right) = - 2 + 2 = 0$

(2) ${\lim}_{x \to - {2}^{+}} f \left(x\right) = {\lim}_{x \to - {2}^{+}} {x}^{2} = {\left(- 2\right)}^{2} = 4$

(3) ${\lim}_{x \to - 2} f \left(x\right)$ does not exist since $\left(1\right) \ne \left(2\right)$

(4) ${\lim}_{x \to {1}^{-}} f \left(x\right) = {\lim}_{x \to {1}^{-}} {x}^{2} = {\left(1\right)}^{2} = 1$

(5) ${\lim}_{x \to {1}^{+}} f \left(x\right) = {\lim}_{x \to {1}^{+}} \frac{1}{x} = \frac{1}{1} = 1$

(6) ${\lim}_{x \to 1} f \left(x\right) = 1$ since ($\left(4\right) = \left(5\right)$)

As you can see above, you simply need to choose the correct formula depending on which way it is approaching from. Two-sided limit exists only when the left-hand limit and the right-hand limit are the same.