# Sum of two different independent uniform random variables

If $X \sim U(a_1, b_1)$ and $Y \sim U(a_2, b_2)$ where $a_1<a_2<b_2<b_1$ (The first one has a higher standard deviation) how do I compute the density of $Z=X+Y$ using the convolution? I think Im getting confused while doing it. Here is what I have:

Denoting $f_x$ and $f_y$ the pdfs, th convolution is

$(f_x * f_y)(x)=\int_{-\infty}^\infty f_x(x-t)f_y(t)dt$

I divide it into different parts

$\int_{-\infty}^{a_1} f_x(x-t)f_y(t)dt+\int_{a_1}^{a_2} f_x(x-t)f_y(t)dt+\int_{a_2}^{b_1} f_x(x-t)f_y(t)dt+\int_{b_1}^{b_2} f_x(x-t)f_y(t)dt+\int_{b_2}^{\infty} f_x(x-t)f_y(t)dt$

Now im having troubles identifying how to compute the intrgals that are not zero, since the values of $f_X(t)$ are not the same as the ones for $f_X(z-t)$

Any help is appreciated, thanks

Correction: Your expression has reversed $b_1$ and $b_2$. The integral of interest is$\int_{a_2}^{b_2}f_X(x-t)f_Y(t)dt.$ To handle $f_X(t-x)$, requires $a_1\lt x-t\lt b_1$ or $x-a_1\gt t\gt x-b_1$. Therefore the lower limit of the integral is $max(a_2,x-b_1)$ while the upper limit is $min(b_2,x-a_1)$. Furthermore there are limits on x determined by the requirement that the upper limit is greater than the lower limit. These are $b_1+b_2\gt x \gt a_2+a_1$.
• The final integral range will depend on x. $a_1+a_2\le x\le a_1+b_2$ range is $(a_2,x-a_1)$. $a_1+b_2\le x\le a_2+b_1$ range is $(a_2,b_2)$. $a_2+b_1\le x\le b_2+b_1$ range is $(x-b_!,b_2)$. – herb steinberg May 15 '18 at 16:21