When can the limit of a function be equal to the function of the limit? When can the limit of a function be equal to the function of a limit? For example what are the conditions that the following holds true?
$$
\lim_{x\to a} \sqrt{f(x)} = \sqrt{\lim_{x\to a} f(x)}
$$
 A: I assume that $f$ is a real-valued function and that $\lim_{x \rightarrow a} f(x)$ exists. 
Define $F$ by
$$
F(x)=\begin{cases}
f(x) & \text{if }x\neq a\\
\lim_{y\rightarrow a}f(y) & \text{if }x=a.
\end{cases}
$$
Note, in particular, that $F$ is continuous at $a$.
Therefore,
$$
\lim_{a \neq x\rightarrow a}\sqrt{f(x)}=\lim_{x\rightarrow a}\sqrt{F(x)}=\sqrt{F(a)}=\sqrt{\lim_{x\rightarrow a}f(x)}
$$
where we have used the fact that $g(x) \equiv \sqrt{F(x)}$ is continuous at $x = a$ and the following result:
Theorem: Let $g$ be a mapping (between, for simplicity, metric spaces $X$ and $Y$) which is continuous at a point $a$ in $X$.
Let $(x_{n})_{n}$ be a sequence which converges to $a$.
Then, $g(x_{n})\rightarrow g(a)$.
Proof. Let $\epsilon>0$.
There exists $\delta>0$ such that for all $x$, $d_{Y}(g(x),g(a))<\epsilon$ whenever $d_{X}(x,a)<\delta$.
Now, pick $N$ large enough such that $d_{X}(x_{n},a)<\delta$ whenever
$n\geq N$.
Therefore, $d_{Y}(g(x_{n}),g(a))<\epsilon$ whenever $n\geq N$.
Since $\epsilon$ was arbitrary, we conclude that $g(x_{n})\rightarrow g(a)$. ∎
