Let $X_1∼\exp(λ)$ and $X_2∼\exp(λ)$ be two independent exponentially distributed random variables. Find the pdf of $Y = X_1−X_2$ through convolution.
My approach: Integrating the product of their probability density function taken into account that convolution is usually expressed as:
$$f_{Y}(y)=\int_{-\infty}^{\infty}f_{X1}(y-x)f_{X2}(x)\,\mathrm dx$$
$$f_{Y}(y)=\int \lambda e^{-\lambda(y-x)} . \lambda e^{\lambda x} $$
My initial thought was that even the convolution integration usually expressed as being defined from -infinity to infinity for this being about an exponential distribution it would need to be defined from zero to infinity but given $f_1(y-x)$ and $f_2(x)$ have to be higher than zero then $y-x>0$ and $x>0$, therefore: $y-x>0$, $y>x \; \rightarrow [-\infty,y]$ and $x>0 \rightarrow [0,\infty]$
The solution in the book for this convolution has limits of $[-\infty,y]$ and $[-\infty,0]$
My doubt is Is this convolution properly expressed and What is the logic for one of the limits to be $[-\infty,0]$ instead of $[0,\infty]$?
If $X_1$ and $X_2$ are independent the formula $$ f_{X_1+X_2}(y)=\int_{-\infty}^{\infty}f_{X1}(y-x)f_{X2}(x)\,\mathrm dx\tag1 $$ gives the density of the sum $X_1+X_2$. But if you want the density of the difference $X_1-X_2$, your book might be using this formula: $$ f_{X_1-X_2}(y)=\int_{-\infty}^{\infty}f_{X1}(y-x)f_{X2}(-x)\,\mathrm dx.\tag2 $$ If (2) is the formula your book is using, then plugging in $f$ in place of $f_{X_1}$ and $f_{X_2}$ gives $$ f_{X_1-X_2}(y)=\int_{-\infty}^{\infty}f(y-x)f(-x)\,\mathrm dx.\tag3$$ Here $f(t):=e^{-\lambda t}$ if $t>0$ and $f(t)=0$ otherwise. So plugging $y-x$ in place of $t$ gets us: $$ f(y-x)=\begin{cases} e^{-\lambda(y-x)}&y-x>0\ \leftrightarrow\ \color{red}{x<y}\\ 0&\text{otherwise} \end{cases}\tag4 $$ and substituting $-x$ in place of $t$ yields: $$ f(-x)=\begin{cases} e^{-\lambda(-x)}&-x>0\ \leftrightarrow\ \color{red}{x<0}\\ 0&\text{otherwise} \end{cases}\tag5 $$ Plugging (4) and (5) into (3) we get $$ f_{X_1-X_2}(y)=\int_{-\infty}^{\infty}e^{-\lambda(y-x)}I_{[-\infty,y]}(x)e^{\lambda x}I_{[-\infty,0]}(x)\,\mathrm dx\tag6 $$ This might explain the constraints $[-\infty,y]$ and $[-\infty,0]$ that your book uses.