I was asked to find the mclaurin series of $\int_0^x\frac{\arctan (t)}{t}dt$
using the known mclaurin for arctan: $\arctan(t)=\sum_{n=1}^{\infty} \frac{(-1)^{n+1}t^{2n-1}}{2n-1}$
Ok, so what I did is use the known formula: $$\int_0^x\frac{\arctan (t)}{t}=\int_0^x\frac{\sum_{n=1}^{\infty} \frac{(-1)^{n+1}t^{2n-1}}{2n-1}}{t}dt=\int_0^x\sum_{n=1}^{\infty}\frac{(-1)^{n+1}t^{2n-2}}{2n-1}dt$$
This is nothing more than $\int_0^x1-\frac{t^2}{3}+\frac{t^4}{5}-\cdots dt$.
If this was a finite sum, then yes, for sure I can divide it into separate integrals. But this is an infinite sum. The integrand is a polynomial, an integrable and even continuous function so I don't see any reason why we can't separate that integral of the sum into the sum of the integrals, but it's not apparent to me why it's obvious that we can do that either.
But if we can, then the mclaurin series we were looking for is $\sum_{n=1}^{\infty}\int_0^x\frac{(-1)^{n+1}t^{2n-2}}{2n-1}dt$
is this correct? if so - can we always separate the integral of the sum into sum of integrals? even infinite sums?