Independence of Functions of random Variable Consider I am given two functions of one random variable each for example x=cos(at),y=rect(bt) where a  and b are random variables.And I am given Probability density function for a and b then if I am asked if the two functions are independent or  not so, I want to confirm that before proceeding I will have to convert the pdf of a and b to pdf of x and y or can I directly proceed with pdf of a and b by proceeding I mean checking if joint probability density is equal to product of marginal probability density.
It happens that if $X$ and $Y$ are independent then so will their functions $g(X)$ and $h(Y)$ be; but not $g(X,Y)$ and $h(X,Y)$.