# Limits of Piecewise Functions

Now that we have seen how to find limits graphically, we will begin to look at finding limits algebraically. In this situation, we found that we will often find limits by calculating the function value at the given point. This will work for “nice” (that is continuous) functions, so we will often looking at functions that aren’t “nice” so that we can see something interesting. The first type of function we will look at that is not nice are piecewise defined functions, in particular, at break points.

## Piecewise Function

For this example we will let $$f(x)$$ be defined as
$f(x)= \begin{cases} \frac{1}{x-2} \text{ if } x \leq 0, \\ x^{2}-\frac{1}{2} \text{ if } 0 < x < 1, \\ x+1 \text{ if } 1 \leq x. \end{cases}$ With this example, we will try to determine what the function look like at its break points, $$x=0$$ and $$x=1$$.

### Let $$x=0$$.

At $$x=0$$ we note that the function is defined differently if we look at values close to but smaller than $$0$$ compared to values close to but larger than $$0$$. Because of this, we will have to look at each of these cases as separate examples.

We will first look at what happens as $$x$$ gets close to $$0$$ from the left. In this case, we see that the $$x$$ values we are interested in are slightly less than $$0$$. For these function values, we get that $$f(x)$$ is defined as $$\frac{1}{x-2}$$. We can, therefore, see that
\begin{align*}
\lim_{x \to 0^{-}}f(x)&=\lim_{x \to 0^{-}}\frac{1}{x-2} \\
&=\frac{1}{0-2} \\
&=\frac{-1}{2}.
\end{align*}
We are allowed to substitute $$0$$ into $$\frac{1}{x-2}$$ since this is a well behaved function at $$x=0$$.

In a similar way, we see that $$f(x)$$ look like $$x^{2}-\frac{1}{2}$$ for $$x$$s slightly larger than $$0$$. We can then see that
\begin{align*}
\lim_{x \to 0^{+}}f(x)&=\lim_{x \to 0^{+}}x^{2}-\frac{1}{2} \\
&=0^{2}-\frac{1}{2} \\
&=\frac{1}{2}.
\end{align*}

We now compare these two answers. Since the limit from both directions is $$-\frac{1}{2}$$, we would say that the two sided limit is also $$-\frac{1}{2}$$. That is
\begin{align*}
\lim_{x \to 0}f(x)=-\frac{1}{2}.
\end{align*}

As a further note, if we want to find the function value at $$0$$, we would see that $$f(x)=\frac{1}{x-2}$$ when $$x \leq 0$$. Since $$\leq$$ includes the equality, we would get that $$f(0)=\frac{1}{0-2}=-\frac{1}{2}$$. We can now see that the limit exists, the function value exists and the limit is equal to the function value. We would therefore say that $$f(x)$$ is continuous (or nice) at the point $$x=0$$.

Below, we can see the graph of the function near $$x=0$$. Notice that we will be able to trace the function to the point $$(0,\frac{-1}{2})$$ from the left, touch the point, and continue on without lifting our writing utensil we are using to trace. ### Let $$x=1$$.

We now go through a similar process for at $$x=1$$. Note that, from the left, our values are slightly smaller than $$1$$. Therefore, they should fall between $$0$$ and $$1$$. Therefore, for these values, $$f(x)$$ is $$x^{2}-\frac{1}{2}$$. Using this, we can find that
\begin{align*}
\lim_{x \to 1^{-}}f(x)&=\lim_{x \to 1^{-}}x^{2}-\frac{1}{2} \\
&=1-\frac{1}{2} \\
&=\frac{1}{2}.
\end{align*}

Next, if we choose $$x$$ values slightly larger than $$1$$, we will note that $$f(x)$$ is $$x+1$$. We, therefore, get that
\begin{align*}
\lim_{x \to 1^{+}}f(x)&=\lim_{x \to 1^{+}}x+1 \\
&=1+1 \\
&=2.
\end{align*}

Now that we know both one sided limits, we can compare them. Since $$\frac{1}{2} \neq 1$$, we get that the two sided limit does not exist. That is,
\begin{align*}
\lim_{x \to 1}f(x) \text{ does not exist.}
\end{align*}

Finally, we can find $$f(1)$$. In this case, if $$x=1$$, we fall into the situation where $$f(x)=x+1$$, so $$f(1)=1+1=2$$. We should note here that, since the limit does not exist, we will not have a continuous function at this point. In fact, if we draw the graph, we will see that there is a jump discontinuity. ## Conclusion

We have seen that a piecewise defined function may or may behave nicely its breakpoint. In order to determine this behavior, we had to look closely at the two one-sided limits and the function value. Based on the one-sided limits, we can determine if the two sided limits. If the two one-sided limits are equal and are equal to the function value, then we do indeed get that the function will be continuous at the point. Otherwise, we will have some type of break in the function.

I hope you learned something and enjoyed the process. If you did, make sure to share the post through Social Media with anyone else that may find this useful. Also check out more Calculus study help posts.

This site uses Akismet to reduce spam. Learn how your comment data is processed.