A function $f: \mathbb{R}\rightarrow \mathbb{R}$ is defined by $$ f(x)= \begin{cases} 0,& \text{if } ~x=0 ~~\text{or}~~ x ~\text{is irrational} \\ \frac{1}{q^3}, & \text{if}~~ x=\frac{p}{q} ~~ \text{where}~~ p\in \mathbb{Z}, q\in \mathbb{N}~~ \text{and} \gcd(p,q)=1. \end{cases} $$
Show that $f$ is differentiable at $0$ and $f'(0)=0$.
A hints to the problem is given as $0\le |\frac{f(x)}{x}|\le x^2$ for $x \ne 0.$ I don't know how to solve this problem. Please help.