Proving that function is continuous and differentiable at $x=0$ I have the following function:
$$
f(x)=\begin{cases}
|x|^{m}\sin\left(\frac{1}{|x|^{n}}\right) & x\neq0 
\\ 
0 & x=0
\end{cases}
$$
I'm trying to find for which $n,m$:


*

*The function $f$ is continuous at $0$.

*The function $f$ is differentiable at $0$.

*The derivative of $f$ is continuous at $0$.


I know that for every $x$ we get $-1\leq sin\leq 1$, but how does it help us? Would be glad to see some guidelines on how to solve it.
 A: Case $m>0$. From $|\sin t|\leq 1$ you get $|f(x)|\leq |x^m|$ for all $x\in \mathbb{R}$. From which you get $\lim_{x\to 0} f(x)=0=f(0)$. Hence $f$ is continous at $0$.
Case $m\leq 0$. In this case, you want $\sin\left(\frac{1}{|x|^n}\right)$ to have limit $0$ at $0$. This forces $n<0$, and you have $$f(x)=\frac{\sin\left(|x|^{-n}\right)}{|x|^{-m}}\sim \frac{|x|^{-n}}{|x|^{-m}}\sim |x|^{m-n}$$
near $0$. So $m>n$.
Thus for $f$ to be continuous at $0$, the only conditions you need are either $m>0$ or $n<m\leq0$.
For the differentiability you do the same but with $\frac{f(x)}{x}$ instead. The only difference is you need to be careful with the sign, and the limit at $0$ need not to be $0$, it only needs to be finite.
A: *

*As you said, $ -1\le\sin(x)\le 1$, hence you can write:
$$|x|^m \sin\Big(\frac{1}{|x|^n}\Big)\le |x|^m  $$
So for each $m>0$ the function is continuous. Fo $m=0$ the sin has no limit except in the trivial case $n=m=0$ for which our function is just the constant $\sin(1)$ everywhere but in $x=0$. Note that even in this case the function is not continuous.
Now, the case $m<0$: if $n>0$, than you easily see that the limit is $\infty$.
But if $n<0$ than:
$$f(x)=\frac{\sin\Big(|x|^{-n}\Big)}{|x|^{-m}}  $$
For the behavious of $\sin(x)$, you know that if $-n>-m$ the sin is "stronger" than the power of $x$, and hence if $m>n$ the limit exists and it's $0$. Finally, for the special case $m=n$ the limit would be $1$, but the function will tunr out to be discontinuous

*We use the definition of derivative:
$$ \lim_{x\to 0} \frac{f(x)-f(0)}{x-0}  = \lim_{x\to 0} \frac{f(x)}{x} = \lim_{x\to 0} |x|^{m-1} \sin\Big(\frac{1}{|x|^n}\Big) $$ Similarly as before, we can evaluate the limit if $m>1$. The value of the derivative in $0$ is hence 0.

*Let's calculate the derivative as usual. For semplicity consider $x> 0$. The case $x$ negative is the same. It turns out to be:
$$ f'(x)= m|x|^{m-1} \sin\Big(\frac{1}{|x|^n}\Big)  + |x|^{m} \cos\Big(\frac{1}{|x|^n}\Big)\frac{-n}{|x|^{n+1}} $$
and calculate the limit for $x\to0$
The first piece is definied again if $m>1$ and, in this case, gives us $0$.
The second addend is more interesting: it converges to $0$ only if $x$ has strictly positive exponent, i.e. $ m-n-1>0$ that is $m>n+1$. in this case, the limit of the derivative of $f$ is $0$ and hence is continuous. 

