Could you verify the following solution?
Let, $$ f(x) = \begin{cases} x^\alpha \sin \left(\frac{1}{x} \right), &x\neq 0\\ 0, & x=0, \end{cases} $$ where $\alpha \in \Bbb R$ is a constant.
Find largest $n$ such that the $n$th derivative of $f$ at $x=0$ exists.
Since, each time we differentiate $f,$ we will get terms of the form $x^i \cdot \sin(1/x)$ or $x^i \cdot \cos(1/x)$
differentiating 1st time, the lowest value of $i$ obtained is $\alpha-2$
differentiating 2nd time, the lowest value of $i$ obtained is $\alpha-4$
differentiating $n$ times, the lowest value of $i$ obtained is $\alpha-2n$
for $f^n(0)$ to exist we need, we need $f^{n-1}$ to be differentiable. hence we need: $$\alpha-2(n-1)>1 \implies \alpha-2n+2>1 \implies \frac{\alpha+1}{2}>n \implies n<\frac{\alpha+1}{2}$$
hence the largest $n$ such that $f^n(0)$ exists is $n=\left\lceil\frac{\alpha-1}{2}\right\rceil$
so, if $\alpha=100$, then $n=49$
if $\alpha=1$, then $n=0$
if $\alpha=2$, then $n=1$
if $\alpha=3$, then $n=1$
if $\alpha=4$, then $n=2$
if $\alpha=5$, then $n=2$
if $\alpha=6$, then $n=3$
and so on...
is this correct??
edit: what i am doing is this. first calculate, $f'(x)$ as follows $$ f'(x) = \begin{cases} \alpha \cdot x^{\alpha-1}\sin \left(\frac{1}{x}\right) - x^{\alpha-2}\cos(\frac{1}{x}), &x\neq 0\\ 0, & x=0, \end{cases} $$ where, $f'(0)$ is calculated using 1st principles.
this way, we keep differentiating, and keep finding $f^i(x)$ and we keep evaluating $\lim_{x \to 0} \frac{f^i(x)-f^i(0)}{x-0}$
going this way, say for some $i$, $\lim_{x \to 0} \frac{f^i(x)-f^i(0)}{x-0}$ does not exist, then our choice of $n$ is that $i$,
how is this wrong??