Show that the equation $\tan x=x$ has an infinity of solution Given the function $f$ defined as :


for every $x \in (0,1]$ : $f(x)=x\sin(\frac{\pi}{x})$
$f(0)=0$


Show using roll's theorem that the equation $\tan x=x$ has an infinity of solutions

What I have tried

$f$ is differentiable in $(0,1]$

In $(0,1]$ we have $f(1)=\sin(\pi)=f(0)=0$

By Roll's : there exists $c \in(0,1)$ such that $f'(c)=0$

$$f'(x)=\sin(\pi/x)-x\cos(\pi/x)$$

In $(0,1)$ we have $f'(c)=\sin(\pi/c)-x\cos(\pi/c)=0$ 

so $\sin(\pi/c)=x\cos(\pi/c)$

Dividing by $\cos(\pi/c)$ 

we obtain $\tan(\pi/x)=x$

I am blocked here 
No problem if you give me any other information about an other way .
$f(x)=x\sin \dfrac{\pi}{x}$ is differentiable on $(0,1].$ Moreover, we have that $f(1/n)=\dfrac{1}{n}\sin (n\pi)=0.$ So, we can apply Rolle's theorem on $\left[\dfrac{1}{n+1},\dfrac{1}{n}\right].$ Thus there exists $c_n\in\left(\dfrac{1}{n+1},\dfrac{1}{n}\right)$ such that $f'(c_n)=0.$ Or, equivalently, $\tan c_n=c_n.$ This shows that $\tan x=x$ has infinitely many positive solutions.
Over arbitrary interval of definition tangent goes from minus infinity to infinity. That is, it goes from less than x to more than x (monotonically) Thus by intermediate value theorem it is the same as x precisely once on each interval of definition. There are infinitely many such intervals.