Definition of continuity not clear According to my book continuity is (informally) defined as follows:

Function $f$ is continuous at $c$ iif it is both right continuous and left         continuous at $c$.

Now according to the book the function $f(x) = \sqrt{4 - x^2}$ is continuous at every point of its domain, $[-2, 2]$. I understand this holds for $(-2, 2)$,but what about the endpoints? 
If I look at the definition and consider the left and right endpoints, then how could it be left continuous at its left endpoint or right continuous at its right endpoint? Since there's no function beyond $-2$, then how can there be a limit from the left? 
 A: It’s a matter of convention. When we say that a function $f$ is continuous on a closed interval $[a,b]$, we mean that it is both left and right continuous at each point of the open interval $(a,b)$, right continuous at $a$, and left continuous at $b$. In other words, it has every possible one-sided continuity at each point of the closed interval.
Added: The real culprit here is the assertion that $f$ is continuous at a point $c$ if and only if it is both left and right continuous at $c$. This is fine if the domain of $f$ is the whole real line or an open interval, but it’s not quite right for arbitrary domains. Suppose that $f$ has domain $D$, and $c\in D$. Then $f$ is continuous at $c$ if it satisfies the following two conditions:


*

*if $c$ is a limit point of $\{x\in D:x<c\}$, then $f$ is left continuous at $c$, and  

*if $c$ is a limit point of $\{x\in D:x>c\}$, then $f$ is right continuous at $c$.


When $D$ is a closed interval $[a,b]$, any $c\in(a,b)$ is a limit point of both $$\{x\in[a,b]:x<c\}=[a,c)$$ and $$\{x\in[a,b]:x>c\}=(c,b]\;.$$ When $c=a$, however, the first of these sets is empty, so $a$ isn’t a limit point of it, and we don’t require $f$ to be left continuous at $a$. When $c=b$, the second set is empty, and we don’t require $f$ to be right continuous at $c$.
Many standard first-year calculus texts are a bit sloppy about such details.
