# Probability density function of X + Y

Q: The random variables $$X$$ and $$Y$$ have joint probability density function

$$f_{X,Y}(x,y)$$ = $$\begin{cases} 8xy, & \text{0 < x < y < 1} \\ 0 & \text{otherwise} \end{cases}$$

Find the probability density function of X + Y

I attempted this question and got the answer wrong; when I looked at the solutions, they were as follows:

"First we find the CDF of Z = X + Y. A sketch of the region 0 < x < y < 1 and the line x + y = z shows that the region we need to integrate the joint PDF over is fundamentally different for $$z$$ $$\in$$ $$(0,1]$$ and $$z$$ $$\in$$ $$(1,2)$$. For z $$\in$$ $$(0,1]$$ we have

$$F_Z(z)$$ = P($$Z$$ $$\leq$$ $$z$$) = $$\int_{0}^{z/2}$$ $$\int_{x}^{z-x}$$ $$8xy$$ $$dy$$ $$dx$$

The question then calculates this, then does the same for z $$\in$$ (1,2), then eventually differentiating to get the answer.

The question is; where on earth have they gotten z/2 from? Graphically I can see the other limits but I can't see where they have gotten z/2 from at all?

For $$z\in (0,1)$$, the region to integrate is between the lines $$x=0$$, $$x+y=z$$ and $$x=y$$. It's a triangle with corners at $$(0,0),(z/2,z/2),(0,1)$$. If you write the integral as $$\int (.) dydx$$, the outer integral is for $$x$$ dimension and its limits are $$0$$ and $$z/2$$.