# Sum of $X\sim\chi^2_ \nu$ and $Y\sim\chi^2_ k$ and gamma function

Suppose $X\sim\chi^2_ \nu$ and $Y\sim\chi^2_ k$ are independent.

(a) Show that $X+Y\sim\chi^2_{\nu+k}.$

(b) Additionally, find the value of $$\int_0^1u^{\frac{\nu}{2}-1}(1-u)^{\frac{k}{2}-1}du$$ as a ratio of Gamma functions. This formula was discovered by Euler.

I was able to solve part (a) and this is my result.
Proof:
If $X$ is $\chi^2_\nu$ distributed then we can express $X$ as $X=A_1^2+\cdots+A_\nu^2$ where $A_1,\ldots,A_\nu$ are $N(0,1)$. Similarly, if $Y$ is $\chi^2_k$ distributed then we can express $Y$ as $Y=B_1^2+\cdots+B_k^2$ where $B_1,\ldots,B_k$ are $N(0,1)$.
These two statements can be made due to the definition of $\chi_\nu^2$ with $\nu$ degrees of freedom. Now, we know that the sum of two independent random variables preserves independence, therefore, adding $X+Y$ we obtain $$X+Y=A_1^2+B_1^2+\cdots+A^2_\nu+B_k^2$$ We can conclude that $$X+Y \sim \chi^2_{\nu+k}$$

However, I am uncertain as to how to compute (b). I have seen and computed Gamma integrals but they have been in the conventional form with an exponential term and $1$ variable. This integrals contains $2$ variables and so I am uncertain how to go about it.

Suppose the joint distribution of $R,S$ is $$\underbrace{\frac 1 {\Gamma(\nu/2)} \left( \frac r 2 \right)^{\nu/2-1} e^{-r/2} \, \frac{dr} 2} \times \underbrace{ \frac 1 {\Gamma(\kappa/2)} \left( \frac s 2 \right)^{\kappa/2} e^{-s/2} \, \frac{ds} 2} \tag 1$$ so $R,S$ are independent and each has a chi-square distribution.
Let $t = r+s$ and $u= r/(r+s)$. Then $r=tu$ and $s=t(1-u).$ Then we have the Jacobian $$dr\,ds = \left| \frac{\partial(r,s)}{\partial(t,u)} \right| \, dt\,du = \frac{dt\,du} t.$$ So $(1)$ becomes \begin{align} & \frac 1 {\Gamma(\nu/2)\Gamma(\kappa/2)} \left( \frac{tu} 2 \right)^{\nu/2-1} \left( \frac{t(1-u)} 2 \right)^{\kappa/2-1} e^{-t/2} \, \frac{dt\,du} {4t} \\[10pt] = {} & \underbrace{ \frac {\Gamma((\nu+\kappa)/2)} {\Gamma(\nu/2)\Gamma(\kappa/2)} u^{\nu/2-1} (1-u)^{\kappa/2-1} \, du} \times \underbrace{ \frac 1 {\Gamma((\nu+\kappa)/2)} \left( \frac t 2\right)^{(\nu+\kappa)/2-1} e^{-t/2} \, \frac{dt} 2} \end{align} and from this we conclude that $R/(R+S)$ has a Beta distribution with parameters $\nu,\kappa$ and $R+S$ has a chi-square distribution with $\nu+\kappa$ degrees of freedom, and that $R/(R+S), R+S$ are independent.
Since we know the second factor in the last expression above is a probability measure rather than a constant multiple of one, we can conclude the same about the first factor, and thus conclude that $$\int_0^1 u^{\nu/2-1} (1-u)^{\kappa/2-1} \,du = \frac{\Gamma(\nu/2)\Gamma(\kappa/2)}{\Gamma((\nu+\kappa)/2)}.$$