Solution (source code)

= Solution

Write $J_T(x)=|\det DT(x)|$, the absolute <Jacobian determinant>. Under the usual meaning of a $C^1$ map on domains, the injective <area formula> gives, for any nonnegative measurable $a$,
$$
\int_X a(T(x))J_T(x)\,dx=\int_Y a(y)\,dy.
$$
This version of the <change of variables formula> does not require $DT$ to be nonsingular everywhere. A $C^1$ map is a <locally Lipschitz function>, and the formula applies by exhaustion if the domains are unbounded. For non-open $X$, one needs the corresponding extension or regularity interpretation of the stated $C^1$ assumption.

First suppose $f(x)=g(T(x))J_T(x)$ almost everywhere with respect to <Lebesgue measure>. For each bounded nonnegative measurable $a$,
$$
\int_X a(T(x))f(x)\,dx
=\int_X a(T(x))g(T(x))J_T(x)\,dx
=\int_Y a(y)g(y)\,dy.
$$
Taking <indicator functions> proves $T_\#\mu=\nu$.

Conversely, the <area formula> shows that the measure $\widetilde\mu$ with <probability density function> $g(T(x))J_T(x)$ has total mass one and satisfies $T_\#\widetilde\mu=\nu$. The assumed equality $T_\#\mu=\nu$ then implies $\mu=\widetilde\mu$, since the measurable <bijection> $T$ has a measurable inverse on these domains. Equivalently, apply both <pushforward measure> identities to $T(A)$ for each <Borel set> $A\subseteq X$. Uniqueness of the <Radon-Nikodym derivative> yields
$$
\boxed{T_\#\mu=\nu\quad\Longleftrightarrow\quad f(x)=g(T(x))|\det DT(x)|\ \text{Lebesgue-almost everywhere}.}
$$