How can I calculate this limit with the given graph? []
$$\lim_{x\to 0}f\big(f(x)\big)$$
(Original image here.)
I don't need an answer, I just want to know how I can calculate the limit based on the given information.
 A: I want to disagree with Stefan. You got it right that $\lim_{x\to 0}f(x)$  is 2, but notice that it approaches 2 from the negative direction, going from below 2 towards 2. Therefore you need to calculate $\lim_{x\to 2}f(x)$ as it approaches 2 from the negative direction, which is -2. 
A: The limit at a point exists in general if the right hand and left hand limit at that point equal the actual value of the function at that point. For example at $x=2$, we see that the function maps to $-1$. So if the left hand and right hand limit as $x$ approaches $x=2$ both equal $-1$, then the function is continuous at $x=2$ and the limit exists in general. From the left, the function approaches $-2$ as $x$ approaches $x=2$. From the right the function approaches $2$ as $x$ approaches $x=2$. Therefore since the left hand and right hand limits are not equal to the function value at the point $x=2$ the limit does not exist and the function is discontinuous at $x=2$.
I meant above to be a general case for limits not a direct answer to the question. For composite functions we check the limit of the inside function as $x$ approaches a given value. If this limit exists and equals $L$, all we need to do is check the limit of the outside function as it approaches $L$. We check this limit from the left if the inside function strictly approaches $L$ from underneath, and we check from the right if the inside function approaches $L$ from above. We check the right hand and left hand limit if the inside function approaches $L$ from above and below.
