# Limit of a Piecewise Function

In this tutorial we shall discuss the limit of a piecewise function. Let us consider an example of the limit of a piecewise function.

For what value of $a$, $\mathop {\lim }\limits_{x \to 2} f\left( x \right)$ exists, where
$f\left( x \right) = \left\{ {\begin{array}{*{20}{c}} {2ax,\,\,\,\,\,\,\,\,\,\,x < 2} \\ {6 – 2ax,\,\,\,x > 2} \end{array}} \right.$

The given function $f$ is split into two parts: one is defined for $x < 2$ and the other is defined for $x > 2$. So, we have to take the left hand and right hand limits. For the left hand limit $x$ must approach 2 from the left side, i.e. from the values less than 2, so for the left hand limit we shall use the function part $2ax$. Thus,
$\begin{gathered} \mathop {\lim }\limits_{x \to {2^ – }} f\left( x \right) = \mathop {\lim }\limits_{x \to 2} \left( {2ax} \right) \\ \Rightarrow \mathop {\lim }\limits_{x \to {2^ – }} f\left( x \right) = 2a\mathop {\lim }\limits_{x \to 2} \left( x \right) \\ \Rightarrow \mathop {\lim }\limits_{x \to {2^ – }} f\left( x \right) = 2a\left( 2 \right) = 4a \\ \end{gathered}$

For the right hand limit $x$ must approach 2 from the right side, i.e. from the values greater than 2, so for the right hand limit we shall use the function part $6 – 2ax$. Thus,
$\begin{gathered} \mathop {\lim }\limits_{x \to {2^ + }} f\left( x \right) = \mathop {\lim }\limits_{x \to 2} \left( {6 – 2ax} \right) \\ \Rightarrow \mathop {\lim }\limits_{x \to {2^ + }} f\left( x \right) = \left[ {6 – 2a\left( 2 \right)} \right] \\ \Rightarrow \mathop {\lim }\limits_{x \to {2^ + }} f\left( x \right) = 6 – 4a \\ \end{gathered}$

It is given that the limit $\mathop {\lim }\limits_{x \to 2} f\left( x \right)$ exists, so the left and right hand limits must be the same, i.e.
$\mathop {\lim }\limits_{x \to {2^ – }} f\left( x \right) = \mathop {\lim }\limits_{x \to {2^ + }} f\left( x \right)$
$\begin{gathered} \Rightarrow 4a = 6 – 4a \Rightarrow 8a = 6 \\ \Rightarrow a = \frac{3}{4} \\ \end{gathered}$