Let $f(x,y)$ be a joint probability density function (pdf) of two random variables $X$ and $Y$. To check whether $X$ and $Y$ are independent, we can compute the marginal densities and check if their product equals $f(x,y)$.
My question is: Is there a characterization of functions that are pdf of independent random variables, i.e., can we "easily" decide whether $X$ and $Y$ are independent without determining the marginal density functions?
If this is not the case, is a characterization known when we restrict $f(x,y)$ so simple functions, say, polynomials?