Show that $f^{(n)}(0)=0$ for $n=0,1,2, \dots$

Let $f: \mathbb{R} \rightarrow \mathbb{R}$ an infinitely many times differentiable function and $f(\frac{1}{n})=0$ for each $n \in \mathbb{N}$. Show that $f^{(n)}(0)=0$ for $n=0,1,2, \dots$

$$$$

Could you give me some hint what I could do?? I got stuck right now..


A straightforward approach using Rolle's Theorem:

Let $n\in\mathbb{N}^*$. Since $f$ is differentiable on $\left(\dfrac1{n+1},\dfrac1n\right)$ and continuous on $\left[\dfrac1{n+1},\dfrac1n\right]$, there exists $c_n\in\left(\dfrac1{n+1},\dfrac1n\right)$ such that $f'(c_n)=0$.

This shows that there exists a sequence $(c_n)_{n\in\mathbb{N}^*}$ that is decreasing and $\lim\limits_{n\to+\infty}c_n=0$ such that for all $n\in\mathbb{N}^*$, $f'(c_n)=0$. Since $f'$ is continuous at $0$, we must have: $$f'(0)=\lim_{n\to+\infty}f'(c_n)=0.$$

Now repeat the process.


Assume $f$ is differentiable and there are $a_n \rightarrow 0$ such that $f(a_n)=0$ then appying the mean value to $[a_n, a_{n+1}]$ we get $b_n \in [a_n, a_{n+1}]$

$$f(a_{n+1})-f(a_n)=f^{\prime}(b_n)(a_{n+1}-a_n)$$ so $f^{\prime}(b_n)=0$. This should solve the problem.