Question
Differentiability and derivative of x squared sine one over x at zero
Original question: 8. Is the following function differentiable in ?
If so, find the derivative , and discuss the continuity of .
Expert Verified Solution
Expert intro: This piecewise function is one of the standard examples where the formula looks wild near the origin but still behaves nicely enough to be differentiable. The real test is not whether the expression is defined away from —it is—but whether the quotient at settles down cleanly.
Detailed walkthrough
Yes, the function is differentiable on .
For ,
so by the product rule and chain rule,
which simplifies to
Now check differentiability at from the definition:
Since ,
so
Therefore
2x\sin\frac1x-\cos\frac1x, & x\ne 0,\\ 0, & x=0. \end{cases}$$ ### Continuity of $f'(x)$ For $x\neq 0$, the formula is a combination of continuous functions, so $f'$ is continuous there. At $x=0$, $$\lim_{x\to 0} \left(2x\sin\frac1x-\cos\frac1x\right)$$ does not exist because $\cos(1/x)$ oscillates without a limit. So $f'(x)$ is **not continuous at $0$**. ### 💡 Pitfall guide A frequent slip is to claim $f'(0)$ is 1 or to forget that the derivative at the origin must come from the limit definition, not from the formula for $x\neq 0$. Another trap is thinking differentiability automatically implies continuity of the derivative. Here $f$ is differentiable everywhere, but $f'$ fails to be continuous at $0$. ### 🔄 Real-world variant If the function were $g(x)=x^n\sin(1/x)$ for $x\ne 0$ and $g(0)=0$, the same idea shows differentiability at $0$ gets easier as $n$ grows. In particular, for $n\ge 2$, the factor $x^n$ usually controls the oscillation enough to give a derivative at $0$, but continuity of $g'$ still needs a separate check. ### 🔍 Related terms chain rule, piecewise function, continuity of derivativeFAQ
Is x^2 sin(1/x) differentiable at 0?
Yes. Use the derivative definition at 0: lim h->0 [h^2 sin(1/h)]/h = lim h->0 h sin(1/h) = 0 by squeezing.
Is the derivative continuous at 0?
No. For x != 0, f'(x)=2x sin(1/x)-cos(1/x), and the cosine term oscillates as x approaches 0, so f' is not continuous at 0.