TITLE: Find density functions of $Z=X+Y$ when the joint density function is known.
QUESTION [6 upvotes]: Find the density function of $Z=X+Y$, $X$, $Y$ where the joint density function of $(X,Y)$ is given by $f(x,y) = \frac{1}{2} (x+y) e^{-(x+y)},\, x,y \geq 0$.
My initial idea is to calculate the distribution function of $Z$ like this:
$P(Z < z) = P(X+Y < z) = P(X < z-Y)$
$F_{z} = \frac{1}{2}\int\limits^{z}_{0}\int\limits^{z-y}_{0} (x+y) e^{-(x+y)} dx\, dy$
and then calculate its derivative $F_{z}^{'}$
Is this the way to go ?

REPLY [4 votes]: Joint density is $f(x,y) = \frac{1}{2} (x+y) e^{-(x+y)},\, x,y \geq 0$ and the distribution function is 
$F_Z(z) = P(Z < z) = P (X+Y < z) = P ( X < z, Y < z - X)$
then we have for the density of Z
\begin{array}[rl]{l}
f_{Z}(z) &= \frac{\partial}{\partial z} F_z(z) = \frac{\partial}{\partial z} \int\limits_{0}^{z}\int\limits_{0}^{z-x} f(x,y)\,dy\,dx \\
         &= \frac{\partial}{\partial z} F_z(z) =  \int\limits_{0}^{z}\frac{\partial}{\partial z} \int\limits_{0}^{x-z} f(x,y)\,dy\,dx \\
         &=   \int\limits_{0}^{z} f(x,z-x)\cdot 1 - f(x,0)\cdot 0 \,dx \\
           &= \frac{1}{2} \int\limits_{0}^{z} z\, e^{-z}\, dx \\
           &= \frac{1}{2} z\cdot e^{-z} \int\limits_{0}^{z} \, dx \\
f_{Z}(z) &= \frac{1}{2} z^2\,e^{-z} \\
\end{array}