If $X_1,X_2$ are independent beta then showing $\sqrt{X_1X_2}$ is beta Here is a problem that came in a semester exam in our university few years back which I am struggling to solve.

If $X_1,X_2$ are independent $\beta$ random variables with densities $\beta(n_1,n_2)$ and $\beta(n_1+\dfrac{1}{2},n_2)$ respectively then show that $\sqrt{X_1X_2}$ follows $\beta(2n_1,2n_2)$.

I used the Jacobian method to obtain that the density of $Y=\sqrt{X_1X_2}$ is as follows:
$$f_Y(y)=\dfrac{4y^{2n_1}}{B(n_1,n_2)B(n_1+\dfrac{1}{2},n_2)}\int_y^1\dfrac{1}{x^2}(1-x^2)^{n_2-1}(1-\dfrac{y^2}{x^2})^{n_2-1}dx$$
I am lost at this point actually. Now, in the main paper, I found a hint had been supplied. I tried to use the hint but could not obtain the desired expressions. The hint is verbatim as follows:

Hint: Derive a formula for the density of $Y=\sqrt{X_1X_2}$ in terms of the given densities of $X_1$ and $X_2$ and try to use a change of variable with $z=\dfrac{y^2}{x}$.

So at this point, I try to make use of this hint by considering this change of variable. Hence I get, $$f_Y(y)=\dfrac{4y^{2n_1}}{B(n_1,n_2)B(n_1+\dfrac{1}{2},n_2)}\int_{y^2}^y\dfrac{z^2}{y^4}(1-\dfrac{y^4}{z^2})^{n_2-1}(1-y^2.\dfrac{z^2}{y^4})^{n_2-1}\dfrac{y^2}{z^2}dz$$which after simplification turns out to be (writing $x$ for $z$)$$f_Y(y)=\dfrac{4y^{2n_1}}{B(n_1,n_2)B(n_1+\dfrac{1}{2},n_2)}\int_{y^2}^y\dfrac{1}{y^2}(1-\dfrac{y^4}{x^2})^{n_2-1}(1-\dfrac{x^2}{y^2})^{n_2-1}dx$$
I do not really know how to proceed. I am not even sure that I am interpreting the hint properly. Anyway, here goes the rest of the hint:

Observe that by using the change of variable $z=\dfrac{y^2}{x}$, the required density can be expressed in two ways to get by averaging $$f_Y(y)=constant.y^{2n_1-1}\int_{y^2}^1(1-\dfrac{y^2}{x})^{n_2-1}(1-x)^{n_2-1}(1+\dfrac{y}{x})\dfrac{1}{\sqrt{x}}dx$$Now divide the range of integration into $(y^2,y)$ and $(y,1)$ and write $(1-\dfrac{y^2}{x})(1-x)=(1-y)^2-(\dfrac{y}{\sqrt{x}}-\sqrt{x})^2$ and proceed with $u=\dfrac{y}{\sqrt{x}}-\sqrt{x}$.

Well, honestly, I cannot understand how one can use these hints: it seems I am getting nowhere. Help is appreciated. Thanks in advance.
 A: You have probably discovered the answer to this by now, but just so that this is answered...
We can find the distribution of $Y$ by using the 'moment matching method'. 
The $r$th order raw moment of $Y$ is given by 
$\mathbb{E}(Y^r)=\mathbb{E}(X_1^{r/2})\mathbb{E}(X_2^{r/2})=\dfrac{B(n_1+\frac{r}{2},n_2)}{B(n_1,n_2)}.\dfrac{B(n_1+\frac{r}{2}+\frac{1}{2},n_2)}{B(n_1+\frac{1}{2},n_2)}$
$=\dfrac{\Gamma(n_1+\frac{r}{2})\Gamma(n_1+\frac{r}{2}+\frac{1}{2})}{\Gamma(n_1)\Gamma(n_1+\frac{1}{2})}.\dfrac{\Gamma(n_1+n_2)\Gamma(n_1+n_2+\frac{1}{2})}{\Gamma(n_1+n_2+\frac{r}{2})\Gamma(n_1+n_2+\frac{r}{2}+\frac{1}{2})}$
Now using Legendre's Duplication formula we simplify the above to get
$\mathbb{E}(Y^r)=\dfrac{\Gamma(2n_1+r)\Gamma(2n_2)}{\Gamma(2n_1+2n_2+r)}.\dfrac{\Gamma(2n_1+2n_2)}{\Gamma(2n_1)\Gamma(2n_2)}$
$\qquad\quad=\dfrac{B(2n_1+r,2n_2)}{B(2n_1,2n_2)}$, 
which is the $r$th order raw moment of a $\beta(2n_1,2n_2)$ distribution. As $Y$ is a bounded random variable with $\mathbb{P}(0<Y<1)=1$, its distribution is uniquely determined from its moments and hence the result.
A: The problem can be solved more generally, and then the OP's problem is just a special case. This also nests problems presently unanswered on mathSE such as: Product of two Beta distributed random variables
Let $X \sim \text{Beta}(a,b)$ with pdf $f(x)$ be independent of $Y \sim \text{Beta}(\alpha,\beta)$ with pdf $g(y)$:

Then, a general solution for the pdf of the product $Z = X Y$, say $h(z)$, is:

where I am using the TransformProduct function from the mathStatica package for Mathematica to automate the nitty-gritties (as disclosure: I am one of the authors), expressed as a function of Hypergeometric $_2F_1$ functions. 
In the OP's special case where $\alpha = a + \frac12$ and $\beta = b$, the pdf of the product $Z$ simplifies to:

It is then easy to show that the pdf of $\sqrt{Z} \sim \text{Beta}(2a,2b)$.
