# For What $n, m$ is $f(x)$ Differentiable? Continuously Differentiable?

Let

$$f(x) = \begin{cases} |x|^m\sin{\left(\frac{1}{|X|^n}\right)} & x\neq 0\\ 0 & x=0\end{cases}$$.

Questions:

1. For what values of $$m,n \in \mathbb{R}$$ is $$f$$ continuous at $$0$$?
2. Differentiable at $$0$$?
3. Continuously Differentiable at $$0$$?

My (partly successful) attempt:

1. $$f$$ continuous at $$0$$ precisely when $$0 or $$n\lt m\leq0$$. This is because if $$m>0$$ then $$\lim_{x\to 0}{|x|^m}=0$$ and $$\sin{\left(\frac{1}{|X|^n}\right)}$$ is bounded. Else, if $$n then $$|x|^{m-n} \frac{\sin{\left(\frac{1}{|X|^{n}} \right)}}{\frac{1}{|X|^n}}$$ converges to $$0$$ as well.

2. I know I need to check when the limit $$\lim_{x\to 0}{\frac{f(x)}{x}}$$ exists. This is too difficult and divided into too many subcases. Is there an easier way to do it which I am missing? How do you divide the cases and show for each case?

3. Same as 2. Is there an easier way to do it which I am missing? How do you divide the cases and show for each case?

• For the second question, you can use the first order approximation $\sin(x) = x + o(|x|^2)$ to simplify the problem. Also, you should specify if $n,m$ are natural or relative integers. – nicomezi Jan 8 at 8:55
• @nicomezi edited to answer your question. Thanks, but we haven't learned that approximation yet... – Mathguy Jan 8 at 9:35
• Thank you for editing. For the last questions, you can just compute the derivative formally, without taking care of the actual value of $m$ and $n$. Once it is done, then you can think further about the values you need for the derivative to be defined (and continuous). – nicomezi Jan 8 at 9:39

Note that $$f = f_{m,n}$$ is an even function, thus it suffices to consider $$s_{m,n} : [0,\infty) \to \mathbb R, s(x) = \begin{cases} x^m \sin (x^{-n}) & x > 0 \\ 0 & x = 0 \end{cases}$$ This function is continuously differentiable on $$(0,\infty)$$ with $$s_{m,n}'(x) = mx^{m-1} \sin (x^{-n}) - nx^{m-n-1}\cos(x^{-n}) = ms_{m-1,n}(x) - nx^{m-n-1}\cos(x^{-n}).$$ Then

1. $$f$$ is continuous at $$0$$ iff $$s_{m,n}$$ is continuous at $$0$$ .

2. $$f$$ is differentiable at $$0$$ iff $$s_{m,n}$$ is (right) differentiable at $$0$$ with $$s_{m,n}'(0) = 0$$ which means that $$\lim_{x \to 0+} \dfrac {s_{m,n}(x)}{x} = \lim_{x \to 0+} s_{m-1,n}(x) = 0$$, i.e. that $$s_{m-1,n}$$ is continuous at $$0$$.

3. $$f$$ is continuously differentiable at $$0$$ iff $$s_{m,n}$$ is (right) differentiable at $$0$$ with $$s_{m,n}'(0) = 0$$ and $$\lim_{x \to 0+} s_{m,n}'(x) = 0$$. By 2. this is equivalent to $$s_{m-1,n}$$ being continuous at $$0$$ and [ $$n = 0$$ or $$\lim_{x \to 0+} x^{m-n-1}\cos(x^{-n}) = 0$$ ].

Case 1: $$n = 0$$.

Then $$s_{m,0}(x) = a x^m$$ with $$a = \sin 1$$. This is continuous at $$0$$ iff $$m > 0$$. It is differentiable at $$0$$ with derivative $$0$$ iff $$m > 1$$. It is also continuosly differentiable at $$0$$ with derivative $$0$$ iff $$m > 1$$.

Case 2: $$n > 0$$.

Then $$x^{-n} \to \infty$$ as $$x \to 0+$$ and $$\sin(x^{-n})$$ oscillates between $$-1$$ and $$1$$. Hence $$s_{m,n}$$ is continuous at $$0$$ iff $$m > 0$$ and differentiable at $$0$$ with derivative $$0$$ iff $$m > 1$$. Since also $$\cos(x^{-n})$$ oscillates between $$-1$$ and $$1$$, we see that $$s_{m,n}$$ is continuously differentiable at $$0$$ with derivative $$0$$ iff $$m > 1$$ and $$m - n - 1 > 0$$. These two conditions can be summarized to $$m > n +1$$ (recall $$n > 0$$).

Case 3: $$n < 0$$.

Then $$x^{-n} \to 0$$ as $$x \to 0+$$ and $$s_{m,n}(x) = x^{m-n} \dfrac{\sin(x^{-n})}{x^{-n}} .$$ Since $$\lim_{x \to 0+} \dfrac {\sin(x^{-n})}{x^{-n}} = 1$$ we conclude that $$s_{m,n}$$ is continuous at $$0$$ iff $$m > n$$ and differentiable at $$0$$ with derivative $$0$$ iff $$m > n+1$$. It is continuously differentiable at $$0$$ with derivative $$0$$ iff $$m > n+1$$ because this yields $$\lim_{x \to 0+} x^{m-n-1}\cos(x^{-n}) = 0$$.

Conclusion:

$$f$$ is continuous iff $$m > \min(0,n)$$, differentiable at $$0$$ with derivative $$0$$ iff $$m > \min(0,n) +1$$ and continuously differentiable at $$0$$ with derivative $$0$$ iff $$m > n+1$$.