Bug introduced in 9.0 or earlier and persisting through 12.0; reported as CASE:2323185
Let's say $X>0$ is a random variable with probability density $p_X(x)={\rm e}^{-x}$. Define the random variable $Y=\sin(X)$. From the transformation theorem for probabilities we know that its probability density can be obtained as the integral \begin{equation} p_Y(y)=\int_0^\infty{\rm d}x\;p_X(x)\;\delta\big(y-\sin(x)\big) = \int_0^\infty{\rm d}x\;{\rm e}^{-x}\;\delta\big(y-\sin(x)\big) \ . \end{equation} I was disappointed to see that Mathematica (8.0.1.0) misbehaves badly with this integral. The line
Integrate[Exp[-x]*DiracDelta[y - Sin[x]], {x, 0, Infinity},
Assumptions -> {y > 0, y < 1}]
is evaluated to $\exp\{-\arcsin(y)\}/\sqrt{1-y^2}$, an answer one gets from the rather naive substitution $z=\sin(x)$, ${\rm d}z=\cos(x)\,{\rm d}x=\sqrt{1-z^2}\,{\rm d}x$, combined with a daring interpretation of $\sin(\infty)$ in the upper integral boundary. I haven't yet had the patience to work out what the correct answer is, but it is relatively easy to see that $p_Y(0^+)=(1-{\rm e}^{-\pi})^{-1}\approx 1.045$, whereas Mathematica's answer would give $p_Y(0^+)=1$. One can also just sample the distribution and plot its histogram, which will show that Mathematica's answer$-$while looking qualitatively similar$-$is quantitatively off.
Am I using Mathematica incorrectly here? Am I expecting too much? Clearly, the trouble is that the argument of the $\delta$-function has infinitely many zeros, and so the answer will involve an infinite sum. Would I have to tell this Mathematica explicitly? Or does it really blunder ahead and not worry about these things? If the latter is the case, I'm getting quite nervous about using the $\delta$-function at all$-$except for simple cases where its argument can be uniquely inverted.
Any thoughts?