I'm having quite a bit of difficulty with the distribution function technique.
If $X_1$ and $X_2$ are independent random variables having exponential densities with parameter $\theta_1$ and $\theta_2$, use the distribution function technique to find the probability density of $Y = X_1 + X_2$ when (a) $\theta_1 \neq \theta_2$ and (b) $\theta_1 = \theta_2$
I know that the exponential distribution for this is $f(x_1,x_2)={\frac{1}{\theta_1}}{\frac{1}{\theta_2}}e^{-(\frac{x}{\theta_1})-(\frac{x}{\theta_2})}$ for $x_1,x_2 \gt 0$ and $f(x_1,x_2)=0$ otherwise.
I'm assuming that I would want to first find $\int_0^y\int_0^{y-x_2}f(x_1,x_2)dx_1dx_2$ and then find the derivative of that with respect $y$ or $[\int_0^y\int_0^{y-x_2}f(x_1,x_2)dx_1dx_2]\frac{d}{dy}$
My book says the answer is $\frac{1}{\theta_1 - \theta_2} (e^{\frac{-y}{\theta_1}}-e^{\frac{-y}{\theta_2}})$ for (a) and $\frac{1}{\theta^2} ye^{\frac{-y}{\theta}}$ for (b)
I can't see how it came upon this as even when using an integral calculator and taking the derivative I get a completely different answer. I am trying to figure out where I went wrong. Any help would be appreciated.