TITLE: Continuity and limits at end point of interval
QUESTION [5 upvotes]: I am bad a calculus and I have question about continuity. If I have a polynomial, then the function is continuous on $\mathbb{R}$ because $\lim_{x\to a} f(x) = f(a)$ for all $a\in \mathbb{R}$.
My question is if $f(x) = \sqrt{x}$ is continuous at $0$. My text book doesn't say if this is continuous at $0$. It does say that the function is continuous from the right. But I have also heard that continuity is a more general concept.
My question is: under the real definition of continuity, if $f(x) = \sqrt{x}$ continuous at $0$?
Is it correct to say that $\lim_{x\to 0} \sqrt{x} = 0$ without specifying that $x$ is approaching from the right?

REPLY [7 votes]: I recall that a function $f:\Bbb R\to \Bbb R$ is continuous at a point $x$
provided for each $\varepsilon>0$ there exists $\delta>0$ such that for each point $x’$ with $|x’-x|<\delta$ holds $|f(x’)-f(x)|<\varepsilon$.
When we apply this definition to functions defined only on a proper subset $X$ of $\Bbb R$ (for instance, a function $\sqrt{x}$ is defined on a set $\Bbb R_+=\{x\in\Bbb R: x\ge 0\}$) we can encounter a problem if it will happen that for some point $x\in X$ for each $\delta>0$ there exists a point $x’\in\Bbb R$ such that $|x’-x|<\delta$, but $x’$ lies outside $X$ and therefore the value of $f(x’)$ is undefined (as $\sqrt{x’}$ is undefined for negative $x’$). 
This problem is solved by modifying the continuity definition by adding to it condition that $x’$ should belong to the domain of $f$, that is if $X$ is a subset of $\Bbb R$ then a function $f:X\to \Bbb R$ is continuous at a point $x\in X$ provided for each $\varepsilon>0$ there exists $\delta>0$ such that for each point $x’\in X$ with $|x’-x|<\delta$ holds $|f(x’)-f(x)|<\varepsilon$. 
This modification is formally (that is set-theoretically, or really or true, if you wish) correct because when we say that $f$ is a function from a set $X$ to a set $Y$ we mean that for each element $f(x)$ of $X$ there is a unique element $f(x)$ of $Y$. As use set, the domain of the function is included in its definition. Also this modification corresponds to common and very general (that is real) definitions of continuity (see the appendix).
But in calculus when we consider functions defined only on proper subsets of $\Bbb R$, for instance, rays or segments, can be useful notions of one-sided continuity. These are not a continuity in strict sence, but became it when we restrict the domain of the function to the corresponding side. 
For instance, the formal answer to your question is the following. A function $\sqrt{x}$ from $\Bbb R$ to $\Bbb R$ is not continuous at $0$, it is not even a function on $\Bbb R$. But a function $\sqrt{x}$ from $[0,\infty)$ to $\Bbb R$ is continuous at $0$.
I also note that when a function is continuous both from the left and from the right then its one-side continuities may be thought as kinds of half-continiuty, :-) which union with the other half coincides with the true continuity. 
Appendix.  General definitions of continuity.
We can straightforwardly generalize the $\varepsilon$-$\delta$-continuity defintion from $\Bbb R$ to so-called metric spaces. A function $f$ from a metric space $(X,d_X)$ to a metric space $(Y,d_Y)$ is continuous at a point $x$ provided for each $\varepsilon>0$ there exists $\delta>0$ such that for each point $x’\in X$ with $d_X(x’,x)<\delta$ holds $d_Y(f(x’),f(x))<\varepsilon$. By the way, it is equivalent to the following definition: if a sequence $\{x_n\}$ (of points of $X$) converges to $x$ then a sequence $\{f(x_n)\}$ (of points of $Y$) converges to $\{f(x)\}$. Moreover, we can generalize continuity from metric spaces to much more general topological spaces.
A function $f$ from a topological space $(X,\tau_X)$ to a topological space $(Y,\tau_Y)$ is continuous at a point $x$ provided for each neighborhood $O_{f(x)}\in\tau_Y$ of the point $f(x)$ there exists a neighborhood $O_x\in\tau_X$ of the point $f(x)$ such that $f(O_x)\subset O_{f(x)}$. 
Remark, that all these definitions require that the function $f$ is defined on the whole space $X$.