I want to find the density of $\cos(X)$ where $X$ is an exponential with density given by
$$ f_{X}(x) = re^{-rx}\mathbb{1}_{[0,+\infty}(x),\quad r>0 $$
My attempt is the following : First we notice, since the law of $X$ is a density measure (of density $f_{X}$) with respect to the Lebesgue measure and using a well known measure-theoretic result on the pushforward measure, that :
$$ \mathbb{E}[\cos(X)] = \int_{\mathbb{R}}\cos(x)\,d\mathbb{P}_{X} = \int_{\mathbb{R}}\cos(x)f_{X}(x)\,d\lambda = \int_{0}^{+\infty}\cos(x)re^{-rx}\,dx $$
Now the idea is to make the change of variable $y = \cos(x)$ however we are integrating with respect to $x$. So for the moment we start to work on interval of the form $[k\pi, (k+1)\pi[$ for $k\in\mathbb{N}$ where the cosine function is monotonic in order to consider his inverse function $x = \arccos(y)$.
Now by the standard change of variable formula we end up with something like this if there is no mistake:
$$ \int_{}^{}\left\lvert\frac{-1}{\sqrt{1-y^2}}\right\rvert re^{-r\cos^{-1}(y)}dy $$
No if we consider the domain of integration, I think I should use the fact that $\cos(k\pi) = (-1)^{k}$ and $\cos(k\pi + \pi) = (-1)^{k+1}$ but this gives me for $k\in\mathbb{N}$ something between $-1$ and $1$ and I don't see how to handle this.
I think this problem is a consequence of the fact that I have not been able to make a bridge between the integral over $[0, +\infty[$ and $[k\pi, (k+1)\pi]$ for $k\in\mathbb{N}$. To this latter problem, my first idea was to use dominated convergence on the sequence defined by
$$ f_n(x) = \sum_{k=0}^{n}\cos(x)re^{-rx}\mathbb{1}_{[k\pi, (k+1)\pi[}(x) $$
But the dominating hypothesis is not verified from what I have tried.
Thus, I would like to have your help on this issue by providing some hints, for example.. or just telling me what is wrong in my attempt, please.
Thank you a lot!
Let $-1\leq y\leq 1$
$$P(\cos(X)\leq y)=1-P(\cos(X)>y)$$
And $$P(\cos(X)>y)=P(X\in\bigcup_{k\in\Bbb{Z}} [2k\pi-\arccos(y),2k\pi+\arccos(y)])$$
Which is given by $$\int_{0}^{\arccos(y)}re^{-rx}\,dx+\sum_{k=1}^{\infty}\int_{2k\pi-\arccos(y)}^{2k\pi+\arccos(y)}re^{-rx}\,dx$$
(Note that the domain of $\arccos$ is $[-1, 1]$ and the range is $[0,\pi]$)
So the CDF is given by $$F(y)=\begin{cases}1-\bigg(\int_{0}^{\arccos(y)}re^{-rx}\,dx+r\sum_{k=1}^{\infty}\int_{2k\pi-\arccos(y)}^{2k\pi+\arccos(y)}re^{-rx}\,dx\bigg)\,,-1< y\leq 1\\0\,,\text{otherwise}\end{cases}$$
Now, either you can compute the density by differentiating under the integral sign and by making use of Monotone Convergence Theorem or you can compute the integrals first and then sum (in both cases, you'll end up with a geometric series).
\begin{align}f(y)=&\frac{1}{\sqrt{1-y^{2}}}re^{-r\arccos(y)}\\& +\frac{1}{\sqrt{1-y^{2}}}r\sum_{k=1}^{\infty}(\exp(-r(2k\pi+\arccos(y))-\exp(-r(2k\pi-\arccos(y))\bigg)\,\end{align} for $y\in[-1,1]$ and is $0$ everywhere else.
Now one can apply the Geometric sum formula to get a cleaner expression.
$$\sum_{k=1}^{\infty}\exp(-r(2k\pi+\arccos(y))=\exp(-r\arccos(y))\frac{\exp(-2r\pi)}{1-\exp(-2r\pi)}$$
Combine all of these to get the pdf (modulo possible calculation errors)
\begin{align}f(y)=&\frac{1}{\sqrt{1-y^{2}}}re^{-r\arccos(y)}\\&+\frac{r\exp(-2r\pi)}{1-\exp(-2r\pi)}\bigg(\exp(-2r\arccos(y))-\exp(2r\arccos(y))\bigg)\end{align}
for $y\in[-1,1]$
That's the idea atleast. I'll leave it to you to check the calculations and computations and verify if they're correct.