Composition of Piecewise Function Limit $$f(x) = \left\{\begin{array}{ll}
x^2 + 2 & : x < 1\\
2 & : x = 1\\
(x - 1)^2 + 4 & : x> 1
\end{array}
\right.$$
Why is the following limit equal to 3? $$\lim\limits_{x \to 0} \ f(1 - x^2)$$
My first thought was that it was nonexistent.
 A: $$\lim_{x \to 0}f(1-x^2)=\lim_{x\to0}(1-x^2)^2+2=(1-0)^2+2=3$$
Because $x\to0$, we can use the $x<1$ function and just plug in.
EDIT: The above statement implies, but we must explicitly say that for all $x\not=0$, $x^2>0$ therefore, $1-x^2<1$
A: The limit of a function at a given point is determined by the values it takes near, but not at, that point.  For example, to determine the limit of $x \mapsto f(1 - x^2)$ at zero, we need to examine the values of $f(1 - x^2)$ at values of $x$ that are close to but not equal to zero.
Assuming that $x$ is meant to be restricted to real numbers (which the piecewise definition of $f$ implicitly suggests), $x^2 > 0$ (and therefore $1 - x^2 < 1$) whenever $x \ne 0$.  Thus: $$f(1 - x^2) = (1 - x^2)^2 + 2 \quad \forall x \ne 0.$$
The limit of $(1 - x^2)^2 + 2$ as $x \to 0$ equals $3$.
A: Note that $x^2 > 0$ for $x \neq 0$, so if set $1-x^2=t$, we have $t < 1$. 
So we have that $$\lim_{x \to 0} f(1-x^2)=\lim_{t \to 1^{-}}f(t)=\lim_{t \to 1^{-}}(t^2+2)=3$$
As $f(t)=t^2+2$ for $t<1$. 
A: The first essential step in evaluating the value or form of a composite function in the form of $f(g(x))$, is to determine on which intervals of the domain of $f(x)$ does $g(x)$ apply(i.e where the domain of $f(x)$ coincides with the range of $g(x)$). In this case with a piece wise function we need to evaluate the range of $g(x)$, as this range is what will determine the interval of the domain of $f(x)$ to consider. Notice that $g(x)=1-x^2$ and  $1-x^2<1$ for all values of x except $x=0$. Thus, the domain of f(x) in question is x<1 which is where $f(x)=x^2 + 2$. Consequently
$$f(g(x))=(1-x^2)^2+2$$ and $$\lim_{x\to 0}\,f(g(x))=\lim_{x\to 0}\,(1-x^2)^2+2=(1)^2+2=3$$
