$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.
 A: HINT: Call $F$ a primitive of $f$; thus your relation yelds to
$$
F(a_n)-F(0)=\frac1n[F(1)-F(0)]
$$
A: HINT:
Find the limit
$$\lim_{n\to \infty}\left(\frac{1}{a_n}\int_{0}^{a_n}\,f(x)\,dx\right)$$
SPOILER ALERT:
SCROLL TO SEE ANSWER

$$\begin{align}\lim_{n\to \infty}n\,a_n&=\lim_{n\to \infty}n\,a_n\frac{\int_0^{a_n}f(x)dx}{\int_0^{a_n}f(x)dx}\\\\&=\lim_{n\to \infty}\frac{n\,\int_0^{a_n}f(x)dx}{\frac{1}{a_n}\int_0^{a_n}f(x)dx}\\\\&=\lim_{n\to \infty}\frac{\int_0^{1}f(x)dx}{\frac{1}{a_n}\int_0^{a_n}f(x)dx}\\\\&=\frac{1}{f(0)}\int_0^{1}f(x)dx\end{align}$$

A: Let $u = nx \to du = ndx \to \dfrac{1}{n}\displaystyle \int_{0}^1f(x)dx= \displaystyle \int_{0}^{a_n} f(x)dx = \displaystyle \int_{0}^{na_n} f\left(\dfrac{u}{n}\right)\left(\dfrac{1}{n}du\right)=\dfrac{1}{n}\displaystyle \int_{0}^{na_n} f\left(\dfrac{u}{n}\right)du\Rightarrow \displaystyle \int_{0}^1 f(x)dx = \displaystyle \int_{0}^{na_n} f\left(\dfrac{u}{n}\right)du$. Now let $L = \displaystyle \lim_{n\to\infty} na_n$, and observe due to continuity of $f$ at $x = 0$, $\displaystyle \lim_{n\to \infty} f\left(\dfrac{u}{n}\right) = f(0)$, we have: $\displaystyle \int_{0}^1 f(x)dx = \displaystyle \int_{0}^L f(0)du = Lf(0) \to L = \dfrac{\displaystyle \int_{0}^1 f(x)dx}{f(0)}$
A: Let $F(x)=\int_0^x f(y) dy$. Then $F$ is a strictly increasing function satisfying $F(a_n)=\frac{1}{n} F(1)$. This means that $\lim_{n \to \infty} a_n = 0$. Hence $F(a_n)=f(0) a_n + o(a_n)$ (which is what the FTC gives) is a useful approximation. So
$$f(0) a_n + o(a_n) = \frac{1}{n} F(1) \Rightarrow n a_n = \frac{F(1)}{f(0)} + o(n a_n).$$
Move the error term to the other side:
$$(1+o(1)) n a_n = \frac{F(1)}{f(0)}.$$
Take limits on both sides:
$$\lim_{n \to \infty} n a_n = \frac{F(1)}{f(0)}.$$
A: Hint: You might want to consider the limit of
$$ \frac{1}{a_n} \int_0^{a_n} f(x) \mathrm d x = \frac{1}{a_n n} \int_0^1 f(x) \mathrm d x $$
and use $a_n\to 0$ for $n\to\infty$.
Since $f$ is positive and continuous, we have $\frac{1}{a_n} \int_0^{a_n} f(x) \mathrm d x > 0$ and by fundamental theorem of calculus we have
$$ 
\lim_{n\to\infty} a_n n 
= \frac{\int_0^1 f(x) \mathrm d x}{\lim_{n\to\infty}\frac{1}{a_n} \int_0^{a_n} f(x) \mathrm d x} 
= \frac{\int_0^1 f(x) \mathrm d x}{f(0)}. 
$$
