Deriving the limit of an integral Consider a sequence of functions $f_n: \mathbb{R}\rightarrow \mathbb{R}$ and another function $g:\mathbb{R}\rightarrow \mathbb{R}$, $g\geq 0$. Suppose that 
$$
\lim_{n \rightarrow \infty}\int_{a}^b (f_n(x))^2dx=0
$$
Is there a way to show that
$$
\lim_{n \rightarrow \infty}\int_{a}^b (g(x))^2(f_n(x))^2dx=0
$$
?
 A: If $g$ is bounded you have it:
if $ g(x) \le A\;\forall x$ then $g^2(x)\le A^2$ and
$$0 \le \int\limits_a^b {g^2\left( x \right){{\left( {{f_n}(x)} \right)}^2}dx}  \le \int\limits_a^b {A^2{{\left( {{f_n}(x)} \right)}^2}dx}  = A^2\int\limits_a^b {{{\left( {{f_n}(x)} \right)}^2}dx}  \to 0$$
and the Sandwich theorem implies that $\int\limits_a^b {g^2\left( x \right){{\left( {{f_n}(x)} \right)}^2}dx}\to 0$
A: Take $f_n(x) = 1_{[0,\frac{1}{n}]} $ the indicator function of the interval from zero to $1/n$. Then 
$$ \lim_{n \rightarrow \infty}\int_{0}^1 (f_n(x))^2dx =  \lim_{n \rightarrow \infty}\int_{0}^{\frac{1}{n}} dx =  \lim_{n \rightarrow \infty}\frac{1}{n} = 0$$
Now take $g(x) = (x)^{-1/2}$, then
$$ \lim_{n \rightarrow \infty}\int_{0}^1 g(x)^2(f_n(x))^2dx  $$
$$ = \lim_{n \rightarrow \infty}\int_{0}^{\frac{1}{n}} \frac{1}{x}dx $$
And that is divergent. If $g$ were more well behaved your proof would work. Clearly you want it to be square integrable among whatever else is needed. For example here if we used $g(x) = 1/x$ that would have worked.
