Suppose $g \in C([0,1])$ and $f_{n}$ is a sequence in $C([0,1])$ that converges uniformly to $f$. Prove the equality: $$\lim_{n \rightarrow \infty} \int_{0}^{1} f_{n}(x)g(x) dx = \int_{0}^{1} f(x)g(x) dx$$.
I had two different views on how to approach this:
Approach 1: (Feels as if it might be too good to be true)
Since this is a sequence of continuous functions on a compact set, by the Integral Convergence Theorem:
$$\lim_{n \rightarrow \infty} \int_{0}^{1} f_{n}(x)g(x) dx = \int_{0}^{1} \lim_{n \rightarrow \infty} f_{n}(x)g(x) dx = \int_{0}^{1} f(x)g(x) dx$$
Approach 2
Proving $$\lim_{n \rightarrow \infty} \int_{0}^{1} f_{n}(x)g(x) dx = \int_{0}^{1} f(x)g(x) dx \\ \iff \lim_{n \rightarrow \infty} \int_{0}^{1} f_{n}(x)g(x) - f(x)g(x) dx = 0$$
That being the case we examine:
$$|f_{n}(x)g(x) - f(x)g(x)| \leq |g(x)(f_{n}(x) - f(x)| + |f(x)g(x) - f(x)g(x)|$$
Since $[0,1]$ is compact we know by the Extreme Value THeorem, there exists $ x_{0} \in [0,1]$ such that $g(x) \leq g(x_{0}) =\ max$ for all $x \in [0,1]$.
As well we are given $f_{n}$ converge uniformly to $f$. So for all $\epsilon > 0 $ the is a $N > 0$ s.t $\|f_{n}(x) - f(x)\|_{\infty} < \frac{\epsilon}{|g(x_{0})|}$ for all $x \in [0,1]$.
Therefore:
$$|g(x)(f_{n}(x) - f(x)| + |f(x)g(x) - f(x)g(x)| \leq |g(x)||(f_{n}(x) - f(x)| + |f(x)g(x) - f(x)g(x)| \leq |g(x)|\ \|(f_{n}(x) - f(x)\|_{\infty} + |f(x)g(x) - f(x)g(x)| \leq |g(x_{0})| \frac{\epsilon}{|g(x_{0})|} = \epsilon$$
Thoughts on the solutions? Any of them correct?
Method 1 is correct a can far as you can justify that $f_ng\to fg$ uniformly on $[0,1]$ (and is a good and easy method). Method 2 is uselessly complicated. An other good method is:
3rd method $$\left|\int_0^1(f_ng-fg)\right|\leq \underbrace{\sup_{[0,1]}|f_n-f|}_{\to 0\text{ if }n\to \infty }\int_0^1 |g|\underset{n\to \infty }{\longrightarrow }0.$$