TITLE: Conditions for function to be discontinuous at 0
QUESTION [6 upvotes]: I'm supposed to find out the set of values of $m$ for which f is discontinuous at 0, for $f(x)=x^m\sin\frac{1}{x}$. The solutions obviously mention the interval $(-\infty, 0]$. However;
In the left-side limit, where the $x$ is negative, i.e.
$$
\lim_{x \to 0^-}x^m\sin\frac{1}{x},
$$
if $m$ is of the form $\frac{1}{2^n}$ where $n$ is any natural number, wouldn't the resultant number become complex? Wouldn't the function only be defined in 0 and $\mathbf R^+$? The left-hand limit for $0$ wouldn't exist.
Wouldn't this be considered a discontinuity? If so, why isn't this set included with set $(-\infty, 0]$?

REPLY [2 votes]: I think the problem formulation is incorrect. Indeed, the domain and the range of $f$ (and the topologies on them) are not specified. In this setting there is no much sense to speak about continuity of $f$. Trying to fix this we assume that $f$ has natural domain $\operatorname{dom} f$ and range, endowed with natural topologies.
The value of $\tfrac 1x$ is undefined when $x=0$. The value of $x^m$ can be complex and non-unique when $x<0$ and $m$ is non-integer. So it is natural to put $\operatorname{dom} f=\Bbb R\setminus\{0\}$, when $m$ is integer and $\operatorname{dom} f=(0,\infty)$, otherwise.
But in both cases $0\not\in\operatorname{dom} f$. So I guess that a corrected question should be whether we can extend a function $f(x)= x^m\sin\tfrac 1x$  to a continuous function, whose domain contains a point $0$. That is, whether  there exists $L=\lim_{x\to 0,\, x\in\operatorname{dom} f} f(x)$.
Suppose firtst that $m$ is integer. If $m=0$ then $f(x)=\sin\tfrac 1x$ and so $L$ does not exist. If $m>0$ then $|f(x)|\le |x|^m\le |x|$, so $L=0$. If $m<0$ then it is easy to check that $L$ does not exist.
Suppose now that $m$ is not an integer. Then $\operatorname{dom} f=(0,\infty)$. If $m=0$ then $f(x)=\sin\tfrac 1x$ and so $L$ does not exist. If $m>0$ then $|f(x)|\le x^m$, and since $|\sin x|\le 1$ for each $x$ and $\lim_{x\to 0^+} x^m=0$, we have $L=0$. If $m<0$ then it is easy to check that $L$ does not exist.