# Understanding pdf of ratio of two random variables

I am not getting where i am doing mistake in deriving the PDF of ratio of two normalrandom variables. Here is what i had did:

Say we have two random variables $$X$$ and $$H$$ with PDF as $$f_{X}(x) = \frac{1}{\pi \sigma_x}K_0\left(\frac{|x|}{\sigma_x}\right)$$ and $$f_H(h)=\frac{1}{\sqrt{2\pi}\sigma_h}e^{-\frac{h^2}{2\sigma_h^2}}$$. Then using formula for PDF of ratio of two random variables from M.D.Springer book(P.No.92), the PDF of $$Z=\frac{\alpha X}{H}$$ is obtained as

$$f_Z(z)=\int_{-\infty}^{+\infty}h \frac{1}{\pi \sigma_x}K_0\left(\frac{|hz|}{\alpha\sigma_x}\right)\frac{1}{\sqrt{2\pi}\sigma_h}e^{-\frac{h^2}{2\sigma_h^2}}dh$$-------(1)

However in the research paper (which i am refereeing for the derivation), the PDFof $$Z$$ is given as $$f_Z(z)=\int_{-\infty}^{+\infty}|h| \frac{1}{\alpha\pi \sigma_x}K_0\left(\frac{|hz|}{\alpha\sigma_x}\right)\frac{1}{\sqrt{2\pi}\sigma_h}e^{-\frac{h^2}{2\sigma_h^2}}dh$$------(2)

I am not getting how the equation (2) is coming. Any help in this regard is highly appreciated.

Let $$Z=\alpha X/H$$ with $$\alpha>0$$. Then \begin{aligned} \mathsf P(Z\leq z)% &=\mathsf P(\alpha X/H\leq z)\\ &=\mathsf P(\alpha X/H\leq z,H>0)+\mathsf P(\alpha X/H\leq z,H<0)\\ &=\mathsf P(X\leq zH/\alpha,H>0)+\mathsf P(X\geq zH/\alpha,H<0). \end{aligned} Assuming $$X$$ is independent of $$H$$ we then have \begin{aligned} \mathsf P(Z\leq z)% &=\int_0^\infty\int_{-\infty}^{zh/\alpha}f_X(x)f_H(h)\,\mathrm dx\mathrm dh+\int_{-\infty}^0\int_{zh/\alpha}^\infty f_X(x)f_H(h)\,\mathrm dx\mathrm dh. \end{aligned} Differentiating we have by the Leibniz integral rule: \begin{aligned} f_Z(z)=\partial_z\mathsf P(Z\leq z)% &=\int_0^\infty \frac{h}{\alpha}f_X(zh/\alpha)f_H(h)\,\mathrm dh-\int_{-\infty}^0 \frac{h}{\alpha} f_X(zh/\alpha)f_H(h)\,\mathrm dh\\ &=\int_{-\infty}^\infty \frac{|h|}{\alpha}f_X(zh/\alpha)f_H(h)\,\mathrm dh. \end{aligned} Substituting in the appropriate quantities for $$f_X$$ and $$f_H$$ then gives $$(2)$$.