# 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

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,

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,

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.