$\newcommand{\E}{\mathbb{E}}$I'm studying Expectation, according to the book, for two continuous random variables, we have
$$\E(X+Y)=\E(X) + \E(Y)$$
The proof is as follows.
$$\E[X+Y] = \int^∞_{-∞}\int^∞_{-∞}(x+y)f(x,y)dxdy$$ $$= \int^∞_{-∞}\int^∞_{-∞}xf(x,y)dydx + \int^∞_{-∞}\int^∞_{-∞}yf(x,y)dxdy\tag1$$ $$= \int^∞_{-∞}xf_X(x)dx + \int^∞_{-∞}yf_Y(y)dy\tag2$$ $$= \E[X] + \E[Y]$$
How can we get (2) from (1)? More specifically, why $\int^∞_{-∞}f(x,y)dy=f_X(x)$?
$$\int^∞_{-∞}\int^∞_{-∞}xf_{X,Y}(x,y)dydx = \int^∞_{-∞}x \left[\int^∞_{-∞}f_{X,Y}(x,y)dy \right]dx$$ $$= \int^∞_{-∞}x[f_X(x)]dx \tag{*}$$
We are given by definition that the marginal pdf of $X$ is
$$f_X(x) = \int^∞_{-∞}f_{X,Y}(x,y)dy$$
How do we know that this is also the pdf of $X$ given by $p_X(x)$? It is the pdf of $X$ iff
$$\int^x_{-∞} f_X(t) dt$$
or
$$\int^x_{-∞}\int^∞_{-∞}f_{X,Y}(t,y)dydt$$
is the cdf of $X$ which is given by $$P(X \le x) = \int^x_{-∞} p_X(t) dt$$
So I guess we have to show that for all $x$,
$$\int^x_{-∞}\int^∞_{-∞}f_{X,Y}(t,y)dydt$$ has all the properties of $$\int^x_{-∞} p_X(t) dt$$?
If so, these would be nondecreasing, approaching 1 as $x \to \infty$, approaching 0 as $x \to -\infty$ etc