Can the independence of random variables hold for their functions? Suppose $X$ and $Y$ are two independent continuous random variables on $\mathbb{R}$. Define: $f:\mathbb{R}\mapsto\mathbb{R}$ as a $C^\infty$ map on $\mathbb{R}$.
Then is it possible to find the necessary and sufficient condition(s) such that:
$X$ and $f(Y)$ are still two independent random variables?

Independence of $X,Z$ random variables occurs when we verify the following relation:
$$ P(X \in A, Z \in B)= P(X \in A) P(Z \in B)$$
In our case $Z = f(Y)$ we check
$$P(X \in A, f(Y) \in B)= P(X \in A, Y \in f^{-1}(B)) = P(X \in A) P(Y \in f^{-1}(B)) = P(X \in A) P(f(Y) \in B) = P(X \in A) P(Z \in B) $$
Hence independence follows.
