Suppose that $\sum |a_k| < \infty$, show that
$$\int_0^1 \left(\sum_{k=0}^\infty a_kx^k\right)dx = \sum_{k=0}^\infty \frac{a_k}{k+1}.$$
I know I have to use the theorem that says,
If $f_k$ is $\mathscr{R}[a,b] $ for all $k \in \mathbb{N}$, and if $f(x) = \sum_{k=1}^\infty f_k(x) , x \in [a,b],$ where the series converges uniformly on $[a,b]$, then $ f \in \mathscr{R}[a,b] $ and $\int_a ^b f(x) dx = \sum_{k=1}^\infty \int_a^b f_k(x) dx $.
What I have done,
Proof: for all $x \in [0,1] $ we have $|x| \leq 1$ , thus $|x|^k \leq 1$, so $|a_kx^k| = |a_k||x|^k \leq |a_k|$ for all $x \in [0,1]$. Since $\sum |a_k| < \infty $ then $\sum_{k=0}^\infty a_kx^k $ converges uniformly to a function $f(x)$ on $[0,1]$ by the Weierstrass M-Test. If $S_n = \sum_{k=0}^n a_kx^k$ is the $n$th partial sum, then we see that the partial sums are polynomials and are therefore continuous on $[0,1]$, thus each $f_k \in \mathscr{R}[a,b]$. By the theorem we have \begin{align} \int_0^1 f(x)dx &= \int_0^1 \sum_{k=0}^\infty a_kx^k dx \\ &= \int_0^1 [ \lim_{n\to \infty} \sum_{k=0}^n a_kx^k] dx\\ &= \lim_{n\to \infty} \int_0^1 [ \sum_{k=0}^n a_kx^k] dx \\ &= \lim_{n\to \infty} \sum_{k=0}^n \int_0^1 a_kx^k dx \\ &= \sum_{k=0}^\infty \int_0^1 a_kx^k dx = \sum_{k=0}^\infty [\frac {a_k}{k + 1}] \end{align} Can someone please examine my proof and let me know if it is correct or what errors I have made if any.
In the second to last line the last expression should have $\sum_{k=0}^n \int_0^1 a_k x^k dx$ but other than that the proof looks fine.