For every $n \in \mathbb{N}$, find a function $f$ which is differentiable $n$ times at $0$, but not $n+1$ times. For every $n \in \mathbb{N}$, (in this problem $\mathbb{N}$ starts at $n = 1$) find a function $f$ which is differentiable $n$ times at $0$, but not $n+1$ times.
The function I chose is the following:
$$
f_n(x) = \begin{cases} x^{n+1} &\mbox{if } x \le 0\\
x^{n} &\mbox{if } x > 0 \end{cases}
$$
Now I can't think of the best way to prove that $f$ is differentiable  $n$ times at $0$ but not $n+1$ times. 

Consider $x^\alpha\sin(x^{-1})$ for a suitable $\alpha$.
