<s>[INST] Finding the convolution of two chi squared variables? If I have variables $X_i^2$ that are chi squared distributed with $1$ degree of freedom: $$f_{X_i^2}=\frac 1 {\sqrt{2\pi}}\frac 1 {\sqrt x}e^{-\frac x 2}$$
Then I want to derive the distribution of $Z^2=X_1^2+X_2^2$ where these $X's$ are i.i.d. 
We do this by convolution: 
$$f_{Z^2}=\int_0^\infty \frac 1 {\sqrt{2\pi}}\frac 1 {\sqrt x}e^{-\frac x 2}\frac 1 {\sqrt{2\pi}}\frac 1 {\sqrt {y-x}}e^{-\frac {y-x} 2}dx=\frac 1 {\sqrt{2\pi}^2}e^{-\frac {y} 2}\int_0^\infty \frac 1 {\sqrt x}\frac 1 {\sqrt {y-x}}dx$$
I think I can rewrite the latter integral as $$\int_0^\infty \frac {2 \sqrt x \sqrt y} {\sqrt x\sqrt {y-x}}d\left(\frac {\sqrt x} {\sqrt y}\right)=2\int_0^\infty \frac 1  {\sqrt {1-\frac x y}}d\left(\frac {\sqrt x} {\sqrt y}\right)$$
However, I don't know how to proceed from this to get the desired result.
 [/INST] Let $u=\sqrt{x} \implies \frac{du}{dx}=\frac1{2\sqrt{x}} \implies 2\, du = \frac1{\sqrt{x}}\, dx$. Also $u^2=x$ implies $y-x=y-u^2$. So your integral is 
$$\int_0^{\sqrt{y}}\frac{dx}{\sqrt{x(y-x)}}=\int_0^{\sqrt{y}}\frac{2}{\sqrt{y-x}}\cdot \frac1{2\sqrt{x}}\, dx=\int_0^{\sqrt{y}}\frac{2}{\sqrt{y-u^2}}\, du$$ as $0\le x\le \sqrt{y}$. This evaluates to $\left[2\sin^{-1}\left(\frac u{\sqrt{y}}\right)\right]_0^{\sqrt{y}}=2\left(\frac\pi2\right)=\pi$.
</s>