I have two independent random variables, X and Y. The marginal density of x is 6x(1-x), and the marginal density of y is 2y. The variable Z = X + Y
X and Y are confined to the interval (0,1). I am trying to find the density of X + Y, denoted as Z. I used the convolution function $$f_{X+Y}(z) = \int_{0}^{1} f_Y(z - x) \cdot f_X(x) \, dx$$
However, when I perform this integration, I get 2z - 1 (I didn't integrate wrong--I verified this step with Wolphram-Alpha). Integrating this from 0 to 2 should get a value of 1, since z must be in the interval (0,2), but it doesn't, and therefore 2z - 1 can't be the correct density for Z. What did I do wrong?
Note that $\color{#C00}{0\le x\le1}$ and $\color{#090}{0\le z-x\le 1}$. Therefore, using Iverson brackets: $$ \begin{align} f_{X+Y}(z) &=\int_{\mathbb{R}}6x(1-x)2(z-x)\overbrace{\color{#C00}{[0\le x\le1]}\color{#090}{[z-1\le x\le z]}}^{\substack{[0\le x\le z]&\text{ if }z\lt1\\ [z-1\le x\le1]&\text{ if }z\ge1}}\,\mathrm{d}x\\ &=\left\{\begin{array}{l} \displaystyle\int_0^z6x(1-x)2(z-x)\,\mathrm{d}x&=2z^3-z^4&\text{if $z\lt1$}\\ \displaystyle\int_{z-1}^16x(1-x)2(z-x)\,\mathrm{d}x&=z^4-2z^3-6z^2+16z-8&\text{if $z\ge1$} \end{array}\right. \end{align} $$