Changing order of partial sum and integral all under limit to infinity $$ \lim_{n \rightarrow \infty} \int_{a}^b\  \sum_{k=1}^{n}f_k(x) \mathrm dx= \sum_{k=1}^{\infty}\int_{a}^b f_k(x) \mathrm dx  $$
Is this generaly true ? Integral is a sum , two sums can interchange, right?
I ve faced this in a proof of a theorem that says that integral of a uniformly convergent  sum  is equal to the sum of integral.
$\int \sum g_n = \sum \int g_n$   (   $ \sum g_n $ converges uniformly )
The problem i am facing is that the stament in the title is used to prove the previous theorem.
I dont think this is  a duplicate, this question is about a partial sum that changes order with an integral not an infinite
It is said the answer below is incorrect, can someone explain why
 A: This is true (only after my edits) directly by the linearity of the integral and the definition of infinite sum.
What you wrote is correct - An integral and a (finite) sum can be interchanged with no further conditions. This is exactly the linearity of the integral.
A: Consider the calculation attempt $$\lim_{n\to\infty}\int_a^b\sum_{k=1}^nf_k(x)dx=\lim_{n\to\infty}\sum_{k=1}^n\int_a^bf_k(x)dx=\sum_{k=1}^\infty\int_a^bf_k(x)dx.$$The first $=$ sign works provided each $\int_a^bf_k(x)dx$ is finite, since then$$\int_a^b\sum_{k=1}^nf_k(x)dx=\lim_{n\to\infty}\sum_{k=1}^n\int_a^bf_k(x)dx$$and both sides have the same $n\to\infty$ behaviour (which might involve a limit not existing).
The second $=$ sign is true by the definition of the summation operator $\sum_{k=1}^\infty$ as a limit of partial sums. In other words:


*

*If each $\int_a^bf_k(x)dx$ is finite then $\int_a^b\sum_{k=1}^nf_k(x)dx$ and $\sum_{k=1}^n\int_a^bf_k(x)dx$ are equal and have the same limit or each have no limit; and

*$\lim_{n\to\infty}\sum_{k=1}^n\int_a^bf_k(x)dx$ is either $\sum_{k=1}^\infty\int_a^bf_k(x)dx$ if that exists, or non-existent if it doesn't.

