# Transformation of variables for a non-monotonic function

Question: Let $U \sim \mathrm{Unif}(−α, α)$ follow the uniform distribution on the interval $(−α, α)$ for some parameter $α > 0$ and consider the transformed random variable $X = \sin(U)$. Calculate the pdf of $X$ when $\alpha = 2\pi$

Could anyone help me with this question? I don't think you can use the transformation of variables formula as $\sin(U)$ isn't monotonic on the interval $(-2\pi,2\pi)$. I've tried doing this: $F_x(x) = P(X\le x) = P(\sin U \le x) = P(U \le \arcsin(x)) = F_U(\arcsin(x))$. Not too sure where to go from here. Any help would be appreciated.

You're right, $\sin$ is not monotonic over the entire support of $[-2\pi; 2\pi]$.   However, it is monotonic inside eight intervals, $[-2\pi-3\pi/2), [-3\pi/2;-\pi), [-\pi; -\pi/2)^\star, [-\pi/2; 0)^\star, [0;\pi/2), [\pi/2;\pi), [\pi;3\pi/2)^\star, [3\pi/2; 2\pi]^\star$.   The four of which (marked $^\star$) fold into $[-1;0)$ while the unmarked four fold into $[0;1]$, which are the halves of the support of $X$.   We can combine these transformations as follows
\begin{align}f_X(x) & = \left( \left\lvert\tfrac{\operatorname d \arcsin(x)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (x)\big) + \left\lvert\tfrac{\operatorname d \arcsin(-\pi-x)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (-\pi-x)\big) + \left\lvert\tfrac{\operatorname d \arcsin(\pi-x)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (\pi-x)\big) + \left\lvert\tfrac{\operatorname d \arcsin(x-2\pi)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (x-2\pi)\big) \right)\raise{0.5ex}\chi_{x\in[-1;0)} + \\ & \quad \left( \left\lvert\tfrac{\operatorname d \arcsin(x)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (x)\big) + \left\lvert\tfrac{\operatorname d \arcsin(\pi-x)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (\pi-x)\big) + \left\lvert\tfrac{\operatorname d \arcsin(2\pi+x)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (2\pi+x)\big) + \left\lvert\tfrac{\operatorname d \arcsin(-\pi-x)}{\operatorname d x}\right\rvert\cdot f_U\big(\arcsin (-\pi-x)\big) \right)\raise{0.5ex}\chi_{x\in[0;1]} \\[1ex] & = \frac{1}{\pi\sqrt{1-x^2}} \end{align}
Note: Using the characteristic indicator function: $\raise{0.5ex}\chi_{x\in A}=\begin{cases} 1 & : x\in A\\0 & : \textsf{otherwise}\end{cases}$
• Thanks for the response. Since $f_u(u)$ is just $1/4\pi$, would the answer simply be $1/\pi\sqrt(1-x^2)$? – Arron Nov 18 '15 at 22:20
• @Arron Yes, it is $\frac {1}{\pi\sqrt{1-x^2}}\;\raise{0.25ex}\chi_{x\in[-1;1]}$. and as a reality check: $$\int_{-1}^1 \frac {1}{\pi\sqrt{1-x^2}}\operatorname d x = 1$$ – Graham Kemp Nov 18 '15 at 23:07
• Sorry I was integrating something different. The interval in the question is $[-2\pi,2\pi]$, so I tried doing what you done but split over $$[-2\pi,\frac{-3\pi}{2}) , [\frac{-3\pi}{2},\frac{-\pi}{2}) , [\frac{-\pi}{2},\frac{\pi}{2}), [\frac{\pi}{2},\frac{3\pi}{2}) , [\frac{3/pi}{2},2\pi]$$. This gave me $$\frac{7}{(\pi\sqrt(1-x^2))}$$ – Arron Nov 18 '15 at 23:20
• And this obviously integrates to 7. How does your method take into account the fact that the interval is $[-2\pi,2\pi]$, or does that not make a difference? – Arron Nov 18 '15 at 23:28