The random variables X and Y have the following properties: X is positive, i.e., $P\{X > 0\} = 1$, with continuous density function $f_X(x)$, and $Y\mid X$ has a uniform distribution on $\{0,X\}$. Prove: If $Y$ and $X-Y$ are independently distributed, then $f_X(x) = a^2xe^{-ax},\:x>0,\:a>0.$
Progress: $Z := X-Y,\:Z\perp Y\:(\text{given}) \Rightarrow \psi_X(s) = \psi_Z(s)\psi_Y(s)\: (\text{since }X = Z + Y)$
$$f_{Y\mid X}(y\mid x) = \frac{1}{2}[\delta(y) + \delta(y-x)]\:\Rightarrow f_{X,Y}(x,y) = f(x)f_{Y\mid X}(y\mid x)$$
$$f_Y(y) = \frac{1}{2}[\delta(y) + f(y)]$$
$$Z := X-Y\geq 0,\: f_Z(z) = \int_0^\infty \frac{1}{2}f(z+y)[\delta(y) + \delta(y-(z+y))]\,dy$$
Since these are non-negative random variables, I decided to use Laplace transform and try to solve $\psi_X(s) = \psi_Z(s)\psi_Y(s)$ for $\psi_X(s)$ which is the Laplace transform of $f(x)$.