When is x^(n−1) sin(1/x) continuous at 0?
Let $$ f(x) = x^{n-1}\sin\left(\frac1x\right), \quad x \neq 0, \qquad f(0) = 0. $$ Determine the values of $n$ for which $f$ is continuous at $x=0$, and the values of $n$ for which $f$ is differentiable at $x=0$.
Explanation of Method
Both questions come down to bounding an oscillating factor, $\sin(1/x)$, between $-1$ and $1$, and using the Squeeze Theorem on the remaining power of $x$. For continuity, the relevant power is $x^{n-1}$ itself; for differentiability, forming the difference quotient introduces an extra factor of $\frac1h$, which lowers the effective exponent by one, to $n-2$. In each case, the limit is $0$ exactly when the corresponding exponent is strictly positive.
- Bound $f(x)$ using $-1\le\sin(1/x)\le1$ and apply the Squeeze Theorem to find the continuity condition.
- Form the difference quotient $\frac{f(h)-f(0)}{h}$ and simplify.
- Bound the difference quotient the same way to find the differentiability condition.
Step 1 · Continuity at $x=0$
For continuity at $x=0$, we need $\lim_{x\to0} f(x) = f(0) = 0$. For $x \neq 0$, since $-1 \le \sin(1/x) \le 1$:
$$ -|x|^{n-1} \le x^{n-1}\sin\left(\frac1x\right) \le |x|^{n-1}. $$
If $n-1>0$ (i.e. $n>1$), then $|x|^{n-1}\to0$ as $x\to0$, and both bounds tend to $0$. By the Squeeze Theorem:
$$ \lim_{x\to0} f(x) = 0 = f(0) \qquad \text{whenever } n > 1, $$
so $f$ is continuous at $x=0$ precisely when $n>1$. (If $n\le1$, the factor $|x|^{n-1}$ does not tend to $0$ — it either tends to $1$, blows up, or is undefined — so the limit fails to be $0$ or fails to exist.)
Step 2 · Set up the difference quotient
By definition, $f$ is differentiable at $x=0$ when the following limit exists:
$$ f'(0) = \lim_{h \to 0} \frac{f(h)-f(0)}{h} = \lim_{h\to0} \frac{h^{n-1}\sin\left(\frac1h\right)}{h} = \lim_{h\to0} h^{n-2}\sin\left(\frac1h\right). $$
Step 3 · Differentiability at $x=0$
Applying the same bounding argument to this new expression, using $-1\le\sin(1/h)\le1$:
$$ -|h|^{n-2} \le h^{n-2}\sin\left(\frac1h\right) \le |h|^{n-2}. $$
If $n-2>0$ (i.e. $n>2$), then $|h|^{n-2}\to0$ as $h\to0$, and by the Squeeze Theorem:
$$ f'(0) = \lim_{h\to0} h^{n-2}\sin\left(\frac1h\right) = 0 \qquad \text{whenever } n > 2. $$
So $f$ is differentiable at $x=0$ precisely when $n>2$, with $f'(0)=0$ in that case.
Summary Table
| Property | Governing exponent | Condition on $n$ | Result |
|---|---|---|---|
| Continuity at $0$ | $|x|^{n-1}\to0$ | $n>1$ | $f(0)=0$ matches the limit |
| Differentiability at $0$ | $|h|^{n-2}\to0$ | $n>2$ | $f'(0)=0$ |
Additional Notes
- The requirement for differentiability ($n>2$) is strictly stronger than the requirement for continuity ($n>1$) — this reflects the general fact that differentiability always implies continuity, but not conversely. For $1
- The oscillating factor $\sin(1/x)$ never itself needs a limit; the Squeeze Theorem sidesteps it entirely by bounding the whole product between two functions that do converge.
- This problem is a slight variant of the classic example $g(x)=x^2\sin(1/x)$ (with $g(0)=0$), which corresponds to $n=3$ here: continuous and differentiable at $0$ (since $n=3>2$), with $g'(0)=0$, even though $g'(x)$ itself is discontinuous at $x=0$.
Result
The function $f(x)=x^{n-1}\sin(1/x)$, $f(0)=0$, is: