Suppose that $f:\mathbb R^n\to[0,\infty)$ is a probability density on $\mathbb R^n$. Let $t=t(x_1,\ldots, x_n)$ and $u=u(x_1,\ldots, x_n)$ be some functions of $x\in\mathbb R^n$.
If $f(x_1,\ldots, x_n) = g(t)h(u)$, then are $T=t(X_1,\ldots, X_n)$ and $U=u(X_1,\ldots, X_n)$ independent? (Assuming $X_1,\ldots, X_n$ are distributed according to the distribution defined by $f$)
This question is inspired by another question, where you have the density of $X$ and $Y$ iid $N(0,1)$ variables with density $f(x,y) = \frac{1}{2\pi} e^{-\frac{x^2+y^2}{2}} = \frac{1}{2\pi} e^{-r^2/2}$ where $r^2 = x^2+y^2$. I wanted to immmediately conclude that $R=\sqrt{X^2+Y^2}$ is independent of $\theta = \text{angle of }(X,Y)$, without computing the joint density of $(R=\sqrt{X^2+Y^2},\Theta)$.
I think I have come up with a counterexample to my own question: let $h(u)=1$.