I have in general issues understanding the transition of sums from in to out( or from out to in) of integrals. Like in this example:
$$\sum^{n}_{k=0}\int^{1}_{0}(-t)^{k}f(t)dt =\int^{1}_{0}\sum^{n}_{k=0}(-t)^{k}f(t)dt $$
Why is this possible? It does seem to me that it fundamentally changes the part that needs to be integrated, yet it still holds true.
And when can't I do this? What's the general rule for such manipulations?