TITLE: Finding convolution of exponential and uniform distribution- how to set integral limits?
QUESTION [11 upvotes]: I am studying the convolution method for creating the density function of two independent random variables and I am struggling with understanding how the bounds for integrals are created.
There is one example of a problem where I don't get the right answer:
Let $X$ be an exponential random variable with parameter $\lambda$ and $Y$ be a uniform random variable on $[0,1]$ independent of $X$. Find the probability density function of  $X + Y$:
so I have two marginal functions
$\mathbf{\\ f_X(x)=\begin{cases}
\lambda e^{-\lambda x} & x\geq 0\\ 
0 & \text{otherwise} 
\end{cases}}
\ \hspace{20pt} \
\mathbf{f_Y(y)=\begin{cases}
1 & 0\leq x\leq 1\\ 
0 & \text{otherwise} 
\end{cases}}$
I am looking for $Z=X+Y$. My understanding is that two cases should be considered. First for $0\leq z\leq 1$  and second for $z>1$
for $\mathbf{0\leq z\leq 1\\
(f_X*f_Y)(z)=\int_{0}^{z} f_Y(z-y) \ f_X(y) \ dy = \int_0^z \lambda e^{-\lambda y} dy =
[-e^{-\lambda y}]_{0}^{z} = 1 - e^{-\lambda z}}$
It seems that I got it correct to this point (in line with the given answer).
for  $\mathbf{z>1}\\
 \mathbf{(f_X*f_Y)(z)= {\color{Red} \int_1^z f_Y(z-y) \ f_X(y) \ dy = \int_1^z \lambda e^{-\lambda y} \, dy =
[-e^{-\lambda y}]_{1}^{z} = 1 - e^{-\lambda z}=e^{-\lambda}(1-e^{-z})}}$
The result I got for $z>1$ is incorrect. I guess it is because I apply incorrect bounds to the integral and that's because I don't quite get the whole concept. I am looking for help with this example and more for general hint how to construct those intervals.
The correct answer should be:
$\mathbf{f_{X+Y}(z)=\begin{cases}
1-e^{-\lambda z} & 0 \leq  z \leq 1 & \\ 
e^{-\lambda z}(e^\lambda -1) & z \geq 1 & \\ 
0 & \text{otherwise} & 
\end{cases}}$

REPLY [5 votes]: I made a youtube video based on this question explaining the concept very thoroughly.
Solution video: 
https://www.youtube.com/watch?v=f63e7uJeCOw