# Limit of a Piecewise Function

In this tutorial we shall discuss the limit of a piecewise function. Let us consider an example of limit of piecewise function.
For what value of $a$, $\mathop {\lim }\limits_{x \to 2} f\left( x \right)$ exist, 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 left hand and right hand limits. For left hand limit $x$ must approach 2 from left side, i.e. from the values less than 2 so left hand limit, we shall use the function part $2ax$. Thus,

For right hand limit $x$ must approach 2 from right side, i.e. from the values greater than 2, so for 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.