Commuting an $\int$ improper at its both ends and $\lim$ I am working on the following problem:

Let $f, g$ be continuous nonnegative functions defined and improperly-integrable on $(0, \infty)$ Furthermore, assume they satisfy
  $$
\lim_{x\rightarrow 0}f(x) = 0 \wedge \lim_{x\rightarrow\infty}xg(x)=0.
$$
  Then prove that
  $$
\lim_{n\rightarrow\infty}n\int_0^\infty f(x)g(nx)dx = 0.
$$

I tried to swap $\lim$ and $\int$.  I know that if the improper integral and its integrand converge uniformly, they commute.  But I am at a loss as to how to prove this condition.
I would be grateful if you could help me in this regard.

Here is a way to use a direct bound for looking at the integral over  $[1,\infty)$:
$\int_1^\infty f(x) ng(nx) dx \leq \int_n^\infty f(u/n) g(u) du = \int_n^\infty \frac{f(u/n)}{u} (u g(u)) du \leq \frac{1}{n} \int_n^\infty f(u/n) (ug(u)) du$ 
The latter inequality follows from the fact that in the integrand $u > n \geq 1$.
If you get here, then by assumption, for sufficiently large $n$,   $u(g(u))$ is small for $u > n$. See if you can finish from this angle.

Okay, there is a delicate procedure I have in mind which I will outline here: (Let $\epsilon > 0$ be given)


*

*Use continuity of $f$ near $0$ , find a $\delta$ such that $|f(x)| < \epsilon$ for $|x| < \delta$.

*Separate the integral to $\int_0^\delta$ and $\int_\delta^\infty$.

*Bound $\int_0^\delta f(x) ng(nx) dx < \epsilon \int_0^\delta ng(nx) dx = \epsilon \int_0^{n\delta} g(u) du < \epsilon |g|_1$

*For $\int_\delta^\infty$, use the procedure above to get a bound of the form $|f|_1 \epsilon$. (Now that $\delta$ is fixed, if $n$ is large enough $u g(u) < \epsilon$ for $u > \delta n$.


So the full bound is $\epsilon(|f|_1 + |g|_1)$, so now you can adjust a few parameters above to get it back to $\epsilon$ if you wish, though it suffices that you can bound by a quantity that is arbitrarily small, and hence the limit is $0$.
