What are the points of discontinuity of $\tan x$?

$f(x) = \tan x$ is defined from $\mathbb R - \{\frac{\pi}{2} (2n+1) \mid n \in \mathbb Z\}$ to $\mathbb R$. For every $x$ in its domain, $$f(x) = \frac{\sin x}{\cos x}$$ where $\cos x$ is never 0. Thus, (in short) $\tan x$ is defined for all points in its domain. Now the question remains, is $\tan x$ discontinuous at $x = \pi/2$ (which is outside its domain)?

The question arises because the test for continuity in a textbook mentions that $f(x)$ is continuous at $x = c$ when:

1. $f(c)$ exists.
2. $\lim_{x \to c} f(x)$ exists.
3. $f(c) = \lim_{x \to c} f(x)$.

And my teacher says failure of any of the above results in $x = c$ being a point of discontinuity. Yet, according to me, first test above merely tests the point for its domain and should be the criteria for any point of discontinuity too.

-

There are no “right” or “wrong” definitions, but there are “standard” and “non-standard” definitions. In my opinion, the definition of continuity from your textbook is non-standard when applied to functions defined on sets with isolated points. For example, the function $f:{\mathbb Z} \to {\mathbb R}$ defined by $f(x) = x$ is a continuous function according to the standard definition but it is discontinuous according to the definition from your textbook.

Here is a standard definition.

Let $D \subset {\mathbb R}$ and $f:D \to {\mathbb R}$. We say that $f$ is continuous at point $c$ if one of the following condition holds:

1. $c$ is a limit point of $D$ and $\lim_{x\to c} f(x) = c$, or
2. $c$ is an isolated point of $D$.

Some textbooks define essential discontinuities even for points in $\bar D$ as follows.

Let $E \subset {\bar D}$. We say that $c\in E$ is an essential discontinuity of $f$ on $E$ if there is no function $\hat f: E \to {\mathbb R}$ such that

1. ${\hat f}(x) = f(x)$ for $x\in D\cap E$,
2. $\hat f(x)$ is continuous at point $c$.

According to this definition, $\pi/2$ is an essential discontinuity of $\tan x$ on $\mathbb R$. Of course, it's important what the set $E$ is, in this definition. For example, consider the the function $g(x):{\mathbb R} \setminus {\mathbb Z}\to \mathbb R$ defined by $g(x) = x - \lfloor x \rfloor$. Then 0 is not an essential discontinuity of $g(x)$ on $[0, 1)$, nor on $(-1,0]$. But 0 is an essential discontinuity of $g(x)$ on $(-1,1)$.

-
So you are saying any discreet function is continuous? That is logical if one comes to think about it. Plus, I am sorry I couldn't get the part of essential discontinuity. What does the notation D-dash mean? –  Anurag Kalia Aug 8 '12 at 3:12
(a) Yes, absolutely. Every function defined on a discrete set is continuous. (b) ${\bar D}$ is the closure of $D$, that is, the set that contains $D$ and all limit points of $D$ (in other words, $\bar D$ is the smallest closed set that contains $D$). –  Yury Aug 8 '12 at 3:44

This is a real nightmare, for university teachers. Every student of mine comes to my class from high school and is sure that $x \mapsto 1/x$ is discontinuous at $0$. The reason why calculus textbooks are so ambiguous is that their authors do not like to leave something undiscussed. For some reason, the answer to any question should be "yes" or "no"; hence they tend to formally state that functions are discontinuous outside their domain of definition.

In my opinion, this is a very bad approach: it is a matter of fact that discontinuous should not be read as the negative of continuous. The domain of definition makes a difference, and the most useful idea is that of continuous extension.

Almost any mathematician would say that the tangent function is continuous inside its own domain of definition.

-

I am afraid that the definition of the continuity of a function $f$ in given point $x$ requires that function to be defined in $x$. If $x$ is outside of the domain of $f$, then you can say that neither f is continuous in $x$ nor that $f$ is discontinuous in $x$. Definition just do not cover such a situation.

You may also want to consult the Definition of continuity or Classification of discontinuities.

-
Actually, the definition in any textbook I referred to give the definition of points of continuity only. They are dead silent when talking about discontinuity, whether f(c) needs to be defined or not adding to the confusion. –  Anurag Kalia Aug 8 '12 at 3:07

$\tan$ is continuous. As others have mentioned, considering continuity outside domain doesn't make sense.

The continuity can be made more apparent if you consider $\tan$ as a restriction of its natural extension to a function from $\mathbf R$ to the one-point compactification of reals $\mathbf R\cup \{\infty\}$. The extension makes full "circles" in a continuous way, and a restriction of a continuous function is again continuous.

In general, quotients of continuous functions are continuous where defined, because the function $\varphi:(x,y)\mapsto x/y$ is continuous for nonzero $y$, so for continuous $f,g$ we can consider $f/g$ as a composition $\varphi\circ (f,g)$, and composition of continuous functions is continuous.

-
I read about the extended real line in calculus as $\mathbb R \bigcup \infty$. That is, they treat $\infty$ and $-\infty$ as the same. How can they be same? There is at least a minus sign as a point of difference between the two. Wikipedia on compactification asks to treat real line as a circle where its open ends meet at $\infty$. Yet real line is infinite in length! Do we treat the radius of this circle to be infinite too? Isn't it just more practical to add two points, $+\infty$ and $-\infty$ to real line, and more intuitive too? –  Anurag Kalia Aug 8 '12 at 3:04
@AnuragKalia: that depends on what you want to obtain. The two-point compactification $\mathbf R\cup\lbrace +\infty,-\infty\}$ is sometimes considered, too, although, from what I know, not quite as often, as it is not always more natural, for example, consider a line with slope $\alpha$ on a plane. For $\alpha$ real, different $\alpha$ yield different lines. Yet clearly for $\alpha$ infinite, the sign does not matter, so it does not make sense to differentiate the infinities. This is the basic idea behind $\mathbf R\cup \{\infty\}$ as the projective line $\mathbf{RP^1}$. –  tomasz Aug 8 '12 at 12:02

One way to interpret point 1. is to say that if $x=c$ is not in the domain of $f$, then $f$ is not continuous at $x=c$.

-
However what can be said is that $\tan x$ has no continuous extension $\mathbb R\to \mathbb R$ because every such extension has to be discontinuous in $\pi/2 + n\pi$. Note that this no longer holds if you extend the codomain, see tomasz's answer. –  celtschk Aug 7 '12 at 16:30