Prove that the function must be differentiable at $0$ 
Let $n$ be a positive integer and set $f(x) = x^{2n}\sin{\frac{1}{x}}$ for $x \neq 0$ and $f(0) = 0$. Prove that $f^{(k)}(0)$ exists for all $0 \leq k \leq n$ and $f^{(n)}(x)$ is not continuous at zero.

We first must show that the function is continuous $x = 0$. Then we have to prove that the left and right derivatives are equal at $0$. In other words, for $f'(x) =  x^{(2 n-2)} (2 n x \sin\left(\frac{1}{x}\right)-\cos\left(\frac{1}{x}\right))$ we must show continuity and differentiability around $f(0) = 0$ for example. I don't see a systematic way of proving this for all $k$, though. Inducting on $k$ might work.
 A: Let $f(x) = P(x)\sin(\frac{1}{x}) + Q(x)\cos(\frac{1}{x})$, for $P(x)$ and $Q(X)$ are polynomials.
Then $f'(x) = (P'(x)+\frac{Q(x)}{x^2})\sin(\frac{1}{x}) + (Q'(x)+\frac{P(x)}{x^2})\cos(\frac{1}{x})$.
We can show that $\frac{\sin(\frac{1}{x})}{x^m}$ has no limit when $x \to 0$. That means, in order $f'(x)$ to be continuous, each $P(x)$ and $Q(x)$ must be in the form $x^2.p(x)$ and $x^2.q(x)$ respectively where $p(x)$ and $q(x)$ are polynomials.
So, say the minimum power of $x$ in $P(x)$ & $Q(x)$ is $u$ & $v$, respectively, then minimum powers of $P_1(x)$ & $Q_1(x)$ is $(v-2)$ & $(u-2)$,respectively, where
$f'(x) = P_1(x)\sin(\frac{1}{x}) + Q_1(x)\cos(\frac{1}{x})$
In the OP, for the function $f(x)$ we have the polynomial $x^{2n}$, so for $f'(x)$, we have $x$ powers of $x^{2n-2}$.
Iteratively, replace $f'(x)$ to be the new $f(x)$, we conclude that $f(x)$ can be differentiable up to $n$ times as we remain $x^{2n-2n}$ (as $P(x)$ or $Q(x)$) where 0 to be the minimum power of $x$.
EDIT: PROOF OF DIFFERENTIABILITY UNDER CERTAIN SITUATION:
$f(x) = x^2.p(x)sin(\frac{1}{x}) + x^2.q(x)cos(\frac{1}{x}) \implies $
$f'(0) = \lim_{h \to 0 } \frac{ f(h)-f(0) }{h} = \lim_{h \to 0 } \frac{ h^2.p(h)sin(\frac{1}{h}) + h^2.q(h)cos(\frac{1}{h}) }{h}$
$f'(0) = \lim_{h \to 0 } h.p(h)sin(\frac{1}{h}) + h.q(h)cos(\frac{1}{h}) = 0$ (since $\sin$ and $\cos$ are bounded and $h.p(h)$ and $h.q(h)$ goes to 0.
