Why does $$\int_{-L}^{L} \sum_{n=1}^{\infty}a_n\cos \frac{n\pi x}{L}=\sum_{n=1}^{\infty}a_n\int_{-L}^{L}\cos \frac{n\pi x}{L}$$
This is used in a derivation of the Fourier coefficients. I see why they flip them but I don't understand why this is true and when we are allowed to do such a thing.
Thanks
These are conditions allowing the interchange of integration and summation, from stronger to weaker:
In the study of Fourier series, it is assumed that the interchange is valid to motivate the definition of the Fourier coefficients.