Cannot find the p.d.f. with jacobian transformation. Suppose $X$ and $Y$ are continuous random variable with joint probability density function
$$f(x,y)=
\begin{cases}
12xy(1-x)&0<x<1,0<y<1\\
0&\text{for other } x
\end{cases}.
$$
If $Z_1=X^2Y$, determine the probability density function of $Z_1$.
Because of the p.d.f. is consist of two random variables, I am making other transformation $Z_2=X$. So, the domain of $Z_1$ and $Z_2$ are $0<Z_1<1$ and $0<Z_2<1$. Now I find the inverse of $Z_1$ and $Z_2$, i.e. $X$ and $Y$ as below.
$$X=Z_2,$$
$$Y=\dfrac{Z_1}{X^2}=\dfrac{Z_1}{Z_2^2}.$$
Next I find the jacobian determinant,
$$
\vert J\vert= 
\left\vert
\begin{matrix}
\dfrac{\partial X}{\partial Z_1}&\dfrac{\partial X}{\partial Z_2}\\
\dfrac{\partial Y}{\partial Z_1}&\dfrac{\partial Y}{\partial Z_2}\\
\end{matrix}
\right\vert
=
\vert J\vert= 
\left\vert
\begin{matrix}
0&1\\
\dfrac{1}{Z_2^2}&-2\dfrac{Z_1}{Z_2^3}\\
\end{matrix}
\right\vert
=
\left\vert-\dfrac{1}{Z_2^2}\right\vert
=
\dfrac{1}{Z_2^2}.
$$
Next, I find the joint p.d.f. of $Z_1$ and $Z_2$.
\begin{eqnarray}
g(z_1,z_2)&=&f(x,y)\vert J\vert\\
&=&f\left(z_2,\dfrac{z_1}{z_2^2}\right)\vert J\vert\\
&=&12z_2\left(\dfrac{z_1}{z_2^2}\right)\left(1-z_2\right)\dfrac{1}{z_2^2}\\
&=&12\dfrac{z_1}{z_2^3}\left(1-z_2\right).
\end{eqnarray}
So, the joint p.d.f. of $Z_1$ and $Z_2$ is
$$
\begin{cases}
12\dfrac{z_1}{z_2^3}\left(1-z_2\right)&0<z_1<1,0<z_2<1\\
0&\text{for other } x
\end{cases}.
$$
Now I want to find the $g(z_1)$, i.e. marginal p.d.f. of $g(z_1,z_2)$.
\begin{eqnarray}
g(z_1)&=&\int\limits_{Z_2}g(z_1,z_2)dz_2\\
&=& \int\limits_{0}^1 12\dfrac{z_1}{z_2^3}\left(1-z_2\right) dz_2\\
&=& 12z_1\int\limits_{0}^1 \left(\dfrac{1}{z_2^3}-\dfrac{1}{z_2^2}\right) dz_2\\
&=& 12z_1 \left[-\dfrac{1}{2z_2^2}+\dfrac{1}{z_2}\right]_0^1\\
&=& 12z_1 \left(\dfrac{1}{2}-\infty\right)\\
&=& \infty
\end{eqnarray}
My question: Why I found the p.d.f. is infinity? Can this problem be solved? What the mistake for my answer?

$Z_1$ and $Z_2$ cannot take all values between $0$ and $1$. There is an extra inequality they have to satisfy: $Z_1 =X^{2}Y <X^{2}=Z_2^{2}$. So the joint density vanishes if $z_1 >z_2^{2}$. Now see if yo get the density of $Z_1$ correctly.
