Number of points of discontinuity of $1/\log|x|$ I was solving a few questions from limits continuity and discontinuity when I came across a question asking for the number of points of discontinuity of $f(x)=1/\log|x|$.
I could easily observe that at $x=±1$, the limits tend to different infinities so the function was discontinuous at these 2 points.
However on checking the answer key, it said that there were 3 points of discontinuity which included $x=0$.
However I believed that continuity is checked by finding the functional value at a point only for the points within the domain,else the limits to the point are checked (If they exist in the domain too) and $x=0$ was definitely outside it. Also the limits at either side of $0$ tend to $0$. So it should have been continuous.
I also found this solution on several sites like Quora however everyone said there were 3 points including $0$ calling it a removable discontinuity.
Please correct my understanding if faulty.
 A: This function is continuous everywhere in its domain of definition.
Its domain of definition is $\mathbb R\setminus \{-1,0,1\}$. That's because the expression $1/\log(|x|)$ only makes sense on that set, since the expressions $1/\log(|-1|)$, $1/\log(|0|)$, and $1/\log(|1|)$ are meaningless. This does not make these points of discontinuity, it simply means they are not in the domain of the function -- a completely separate concept.
This is not to say, however, that the function doesn't have a continuous extension to include $\{0\}$ in the domain, but that's not the same question.
A: The first part of this answer is written largely from a "Calculus viewpoint".  The question is tagged real analysis and that viewpoint is added afterwards.

There are several kinds of discontinuity and all of them can occur at points outside the domain of the function and all but one of them can occur at points in the domain of the function.
A removable discontinuity may (and, by parallelism with removable singularities) occur at a point outside the domain of the function.  An example is $f(x) = x^2/x$ (with, as is intended when nothing is explicitly said, its maximal real domain).  You may think to cancel $x$s, but that operation changes the domain of the function, hence replaces the function with a different function.  This $f$ has a removable discontinuity at $x = 0$, which we verify by

*

*$f$ is undefined at $x = 0$, since its defining expression entails division by $0$ when $x = 0$ and

*$\lim_{x \rightarrow 0^-} f(x) = 0 = \lim_{x \rightarrow 0^+} f(x)$.

Another (common) way to have a removable discontinuity in a function is to define the function piecewise, leave a point out of the domains of the pieces (but include pieces on intervals ending on that point from both sides), and arrange for the expressions defining the piece on its left and the piece on its right to be continuous through the point and agree at the point.  This method can be used to make additional removable discontinuities by defining the function at the previously omitted point to have a value different from the limits.  This last version is used at the given link.
For a function, $g$ to have a jump discontinuity at $x = a$, the limits from the left and right must exist (hence, must be finite) and disagree.  The point $a$ may or may not be in the domain of $g$.  Examples (all with a jump discontinuity at $x = 0$):

*

*$g_1(x) = \begin{cases} 0 &, x < 0 \\ 1 &, x > 0  \end{cases}$.

*$g_2(x) = \begin{cases} 0 &, x \leq 0 \\ 1 &, x > 0  \end{cases}$.

*$g_3(x) = \begin{cases} 0 &, x < 0 \\ 1 &, x \geq 0  \end{cases}$.

An infinite discontinuity occurs when either the limit from the left or the limit from the right is $\infty$ or $-\infty$.  (Some books require that both limits are each one of the infinities, which leads to the absurdity that $\mathrm{e}^{-1/x}$ does not have an infinite discontinuity at $x = 0$, which failure of definition I will not propagate here.)  The point may or may not be in the domain of the function.
(Remember an infinite limit does not exist.  The particular behaviours of "growing so as to eventually remain above any specific bound" and "decreasing so as to eventually remain below any specific bound" are such common forms of a limit failing to exist, and are both practically and conceptually useful, that these two kinds of nonexisting limit have names and abbreviations, "$\lim_{\dots} \dots = \infty$" and $"\lim_{\dots} \dots = -\infty$", respectively.)
Essential discontinuities are associated with infinitely rapid oscillations.  These oscillations prevent the limit from one or both sides from existing.  Examples (both with essential discontinuities at $x = 0$):

*

*$h_1(x) = \sin(1/x)$ and

*$h_2(x) = \begin{cases} 0 ,& x \leq 0 \\ \sin(1/x) ,& x > 0 \end{cases}$.

Again, note that the discontinuity may or may not be in the domain of the function.
In your particular example, $1/\ln|x|$, the function has infinite discontinuities at $x = \pm 1$ (left and right limits are to infinities of opposite sign and this point is outside the domain because $\ln |\pm 1| = 0$, entailing division by zero at those points) and a removable discontinuity at $x = 0$ (left and right limits are both $0$ and this point is outside the domain because $\ln |0|$ is undefined).
It is likely that you are thinking of the interpretation of the phrase "$f$ is continuous", which means "$f$ is continuous at each point of its domain".  Note that this usage makes no promise about continuity or discontinuity at points outside the domain of $f$.  And if such an $f$ has a discontinuity, it is necessarily outside $f$'s domain.
Note that there are two "schools of thought" regarding discontinuities.  One school (rigorous real analysis) holds that discontinuities must be in the domain of the function.  The other (many, many Calculus classes and texts) holds that discontinuities are characterized by the behaviour of right and left limits of the function.  If your class/text has the concept "removable discontinuity" then very likely your context does not require discontinuities to be in the domain of the function.

You tag your question "Real Analysis".  Typically in that context, you are working in the extended reals, so that $\infty$ and $-\infty$ are actual values that functions and limits can take (so infinite limits now exist).  In that setting, infinite limits are still a thing, but $1/x^2$ has $0$ in its domain and is continuous at $0$ (the limits from the left and right agreeing with the value of the function).
In that setting, one is usually careful to define that points of discontinuity are in the domain of the function.  This is less stringent than it sounds because of access to the extended reals, so many functions that would be discontinuous in a Calculus class become continuous in the extended topology.
