My Calculus text book says if functions $f$ and $g$ are continuous on a closed interval $[a,b]$, then $$ \int_a^b (f(x)+g(x)) \, dx=\int_a^b f(x) \, dx+\int_a^b g(x) \, dx $$
where the integrals are in the Riemann sense. However, there are many important applications for functions with discontinuities. Does this identity also apply in all cases where all three integrals exist? If not what other constraints are needed to include functions with discontinuities?
*** Update ***
I think I have an example where excluding discontinuities is relevant. $ \int_0^{\infty } \left(\sin (x) \cos \left(\frac{1}{x}\right)-\sin (x)\right) \, dx $ is well defined but
$ \int_0^{\infty } \sin (x) \cos \left(\frac{1}{x}\right) \, dx-\int_0^{\infty } \sin (x) \, dx $ involves two integrals that don't exist. It seems the sufficient conditions used in my text book are not met in this example because sin(x) is not continuous at $\infty$.
For the equation $$ \int_a^b (f(x)+g(x)) \, dx=\int_a^b f(x) \, dx+\int_a^b g(x) \, dx \tag1$$ we can say: if any two of the integrals exist, then so does the third, and $(1)$ holds. This works for Riemann integral, and also for improper Riemann integral.