What is the probability Distribution function of $X-Y$ where $X$ and $Y$ are exponential? How to find the pdf of $X-Y$ where $X\sim \exp(\lambda)$ and $Y\sim \exp(\mu)$ and $X,Y$ are independent?
I have tried to consider $U=X+Y$ and $V=X-Y$ and tried to find the marginal of $V$. The marginal I am getting is $f(v)=\frac{\lambda\mu}{\lambda+\mu}e^{-\frac{\lambda-\mu}{2}v}$. Is this correct?
 A: No, that cannot be correct because the support of $V$ must be $(-\infty, \infty)$, yet if $\mu > \lambda$, your density becomes unbounded for $v > 0$.
There are two cases:  $v \ge 0$ and $v < 0$.  In the first case,
$$\begin{align}
\Pr[V \le v] &= \Pr[X \le Y + v] \\
&= \int_{y=0}^\infty \Pr[X \le y + v]f_Y(y) \, dy \\
&= \int_{y=0}^\infty (1 - e^{-\lambda(y+v)})\mu e^{-\mu y} \, dy \\
&= 1 - \mu e^{-\lambda v} \int_{y=0}^\infty e^{-(\lambda + \mu) y} \, dy\\
&= 1 - \frac{\mu}{\lambda + \mu} e^{-\lambda v}.
\end{align}$$
In the second case, we need to be a bit more careful because $\Pr[X \le y+v] = 0$ when $y \le -v$.  To resolve this, we do the calculation a little differently, noting that when $v < 0$, $x-v > 0$ always:
$$\begin{align}
\Pr[V \le v] &= \Pr[Y \ge X - v] \\
&= \int_{x=0}^\infty \Pr[Y \ge x - v]f_X(x) \, dx \\
&= \int_{x=0}^\infty e^{-\mu (x-v)} \lambda e^{-\lambda x} \, dx \\
&= \lambda e^{\mu v} \int_{x=0}^\infty e^{-(\lambda + \mu)x} \, dx \\
&= \frac{\lambda}{\lambda + \mu} e^{\mu v}.
\end{align}$$
Note that there are no issues with boundedness since $v < 0$.
Therefore, the full CDF is
$$F_V(v) = \begin{cases} \frac{\lambda}{\lambda + \mu} e^{\mu v}, & v < 0 \\ 1 - \frac{\mu}{\lambda + \mu} e^{-\lambda v}, & v \ge 0,  \end{cases}$$
and the PDF is
$$f_V(v) = F_V'(v) = \frac{\lambda \mu}{\lambda + \mu} \begin{cases} e^{\mu v}, & v < 0 \\ e^{-\lambda v}, & v \ge 0 \end{cases}.$$
