# Density of sum of independent exponential random variables

I have two independent exponential RV's $X$ and $Y$ with parameters $\lambda_1$ and $\lambda_2$ respectively. I want to find the density of $X + Y$. I've tried using the convolution formula and got the following:

\begin{align*} f_{X+Y}(t) &= \int_{-\infty}^{\infty}f_{X,Y}(x,t-x)\, dx \\ &= \int_{0}^{t}\lambda_1\lambda_2e^{-\lambda_1x-\lambda_2(t-x)}\, dx \\ &= \left[\frac{\lambda_1\lambda_2}{\lambda_2 - \lambda_1}e^{x(\lambda_2 - \lambda_1)- \lambda_2t}\right]^t_0\\ &= \frac{\lambda_1\lambda_2}{\lambda_2 - \lambda_1}e^{-\lambda_1t} + \frac{\lambda_1\lambda_2}{\lambda_1 - \lambda_2}e^{-\lambda_2t} \end{align*}

Is this correct? If so, that begs the question of what happens when $\lambda_1 = \lambda_2$ ? That is, since the denominators are $0$.

Yes, when $\lambda_1\neq \lambda_2$ then $f_T(t)=\dfrac{\lambda_1\lambda_2(e^{-\lambda_2t}-e^{-\lambda_1t})}{\lambda_1-\lambda_2}\mathbf 1_{t\in[0;\infty)}$
As to what happens when $\lambda_1=\lambda_2$ try making the substitution before performing the integration.
$$f_T(t)=\int_0^t \lambda^2 e^{-\lambda x-\lambda(t-x)}\operatorname d x=\ldots$$