$f$ is positive continuous function on $[0,1]$. $f$ is positive continuous function on $[0,1]$. Define 
$$\int_{0}^{a_n} f(x) dx =  \frac{1}{n} \int_{0}^1 f(x) dx$$
where $a_n>0$.
Find $ \lim_{n\to \infty} n a_n$.
It is clear that $lim_{n\to \infty} a_n =0$ because $f(x)$ is positive.I tried to use Weierstrass approximation of continuous function by polynomials but could no quite get the right way.I do not see a  way to bring down this equation $\int_{0}^{a_n} f(x) dx =  \frac{1}{n} \int_{0}^1 f(x) dx$ to $n a_n$.
This is a qualifying problem of real analysis.
Small hint works for me. 
Thanks.

HINT: Call $F$ a primitive of $f$; thus your relation yelds to
$$
F(a_n)-F(0)=\frac1n[F(1)-F(0)]
$$
