Term by term integration of $\int_0^1 \sum_{n=0}^{\infty}a_nx^n g(x)dx$ If $\displaystyle \sum_{n=0}^{\infty}a_nx^n$ converges uniformly to $f(x)$ on $[0,1]$ and $g(x)$ is any integrable function. Can we perform term by term integration, in other words, is the following true $$\displaystyle\int_0^1f(x)g(x)dx=\displaystyle\int_0^1 \sum_{n=0}^{\infty}a_nx^n g(x)dx=\displaystyle  \sum_{n=0}^{\infty}a_n\int_0^1x^n g(x)dx$$
I don't have series representation of $g(x)$. What are the conditions on $f$ and $g$ that ensure such a term by term integration?
 A: The usual result, in your case, is the following : if the series 
$$\sum a_n \int_0^1 x^n |g(x)| \mathrm{dx}$$
converges, you can deduce that $fg$ is integrable and that 
$$\int_0^1 f(x)g(x)\mathrm{dx} = \sum_{n=0}^{+\infty} a_n \int_0^1 x^n g(x) \mathrm{dx}$$
A: Assuming $f_n(x)=\sum_{i=0}^n a_i x^i$ converges uniformly to $f$, we have that $f$ is a continuous function (as a uniform limit of continuous functions) and $fg$ is integrable. Since $\sup_{x}|f(x)-f_n(x)|= M_n \to 0$ as $n\to\infty$, we have
$$
\left|\int_0^1 f_ng-\int_0^1 fg\right|\le \int_0^1 |f-f_n||g|\ \le \ M_n\int_0^1 |g|\to 0,
$$
which implies that
$$
\lim_{n\to\infty}\int_0^1 f_ng =\lim_{n\to\infty}\sum_{i=0}^n a_i \int_0^1 x^ig(x)\ dx\to \int_0^1 fg.
$$ So we can integrate term by term. If we have some $h(x)\ge 0$ such that for every $n$, $|f_n(x)|\le h(x)$ for almost all $x$, $h(x)|g(x)|$ is integrable, then we can also conclude
$$
\lim_{n\to\infty}\int_0^1 f_ng = \int_0^1 fg
$$ by Lebesgue's dominated convergence theorem.
