If $X$ and $Y$ have joint density function $f(x,y)=\frac{1}{2}(x+y)e^{-x-y}$ when $x,y>0$ (and $0$ otherwise), find the density function of $X+Y$.
Let $Z=X+Y$. Then from my textbook, it says that $f_Z(z)=\int_{-\infty}^{\infty} f_{x,y}(u,z-u)du$, where $u=x, u>0$. When I plug the joint density function into this equation, I get $f_Z(z)=\int_{0}^{\infty} \frac{1}{2}ze^{-z}du$. This integral doesn't evaluate because you would have a $u$ being evaluated at infinity. The answer in the book says $f_{X+Y}(u)=\frac{1}{2}u^2e^{-u}$ for $u>0$. I don't see how this is the answer.
You made a small mistake: $$ f_Z(z) = \int_0^{\color{blue}{z}} \frac{1}{2} ze^{-z} \ du = \frac{1}{2} z^2 e^{-z}$$
EDIT: One way to obtain this formula is to consider new variables $U = X$ and $Z = X+Y$. The Jacobian for this transformation is 1 and so $$ f_Z(z) = \int_{-\infty}^\infty f_{U,Z}(u,z) \ du = \int_{-\infty}^\infty f_{X,Y}(u,z-u) \ du. $$