The problem I have is: $X \sim U(0,1), Y \sim U(0,a)$ are independent random variables. Find the pdf of $X + Y$. I've got stuck in an integral-problem, and will show you what I've tried. Skip to the integral-problem itself if uninterested in the rest of the problem.
I will use the indicator-function notation: $1_{[a,b]}(x)$ in the following way...
If $a \leq x \leq b$ then $1_{[a,b]}(x) = 1$ else $1_{[a,b]}(x) = 0$.
$Z := X + Y, W := X \Rightarrow \frac{d(x,y)}{d(z,w)} = -1$. By the transformation theorem we get: $$f_{Z,W}(z,w) = f_{X}(w)f_{Y}(z - w) \cdot |-1| = 1_{[0,1]}(w)\cdot1_{[0,a]}(z-w)\cdot\frac{1}{a}$$
Now to the integral-problem: $$f_{Z}(z) = \int_{-\infty}^{\infty} f_{Z,W}(z,w)dw$$
If $ 0 \leq w \leq 1$ and $0 \leq z - w \leq a$ then $f_{Z,W}(z,w) = \frac{1}{a}$ else $f_{Z,W}(z,w) =0$.
The problem that remains is... how do I compute the integral? How do I re-express the region where $f_{Z,W}(z,w) \neq 0$ so that the lower and upper bound of $w$ is expressed with z, and z is bounded by constants, so that I can eliminate $w$ by integration?
Thank you.
I've been told that it is wise to divide the problem into two cases: one where a < 1 and one where a >= 1.
Don't forget to include the indicator function for $0\leq z\leq a+1$
You have (assuming $a>1$):
$$\begin{align} f_{Z,W}(z,w) & \tag{1} =\tfrac 1 a \mathbf 1_{[0;a+1]}(z)\mathbf 1_{[0;1]}(w)\mathbf 1_{[0;a]}(z-w) \\[1ex] & \tag{2} =\tfrac 1 a \mathbf 1_{[0;a+1]}(z)\mathbf 1_{[0;1]}(w)\mathbf 1_{[z-a;z]}(w) \\[1ex] & \tag{3} =\tfrac 1 a \mathbf 1_{[0;a+1]}(z)\mathbf 1_{[\max(z-a,0);\min(z,1)]}(w) \\[1ex] & \tag{4} = \tfrac 1 a \Big(\mathbf 1_{[0;a]}(z)\mathbf 1_{[0;\min(z,1)]}(w)+\mathbf 1_{(a;a+1]}(z)\mathbf 1_{[z-a;1]}(w)\Big) \\[1ex] & \tag{5} = \tfrac 1 a \Big(\mathbf 1_{[0;1]}(z)\mathbf 1_{[0;z]}(w)+\mathbf 1_{(1;a]}(z)\mathbf 1_{[0;1]}(w)+\mathbf 1_{(a;a+1]}(z)\mathbf 1_{[z-a;1]}(w)\Big) \\[4ex] f_Z(z) & = \tfrac 1 a \Big(\mathbf 1_{[0;1]}(z)\int_0^z\operatorname d w+\mathbf 1_{(1;a]}(z)\int_0^1\operatorname d w+\mathbf 1_{(a;a+1]}(z)\int_{z-a}^1\operatorname d w\Big) \\[1ex] & = \frac z a \mathbf 1_{[0;1]}(z) + \frac 1 a \mathbf 1_{(1;a]}(z)+\frac{1+a-z}{a}\mathbf 1_{(a;a+1]}(z) \end{align}$$
Can you do the case for $a<1$ ?