Mellin transform - change of variables in double integral Together with a friend, I am trying to derive the Lamperti distribution from a ratio of stable random variables, and got stuck in a part of the proof which involves a substitution in a double integral that arises after applying a Mellin transform. I will show all steps as to be sure to not have done any mistakes.

Theorem: given two stable, independent, identically distributed and positive random variables $T_\nu^1$ and $T_\nu^2$ with density function $f$, then the ratio $W_\nu=\frac{T_\nu^1}{T_\nu^2}$ follows a Lamperti distribution, that is
  $$P(W_\nu \in dw)/dw = \frac{\sin(\pi\nu)}{\pi}\frac{w^{\nu-1}}{1+w^{2\nu}+2w^\nu\cos(\pi\nu)} \quad w>0$$

We proceeded in the following way. We have
$$P(W_\nu < w) = P\left(\frac{T_\nu^1}{T_\nu^2}<w\right) = \int_{\{ x,y\}:T_\nu^1 <wT_\nu^2}f(x)f(y)dxdy =$$
$$= \int_0^\infty f(x)\int_0^{wx}f(y)dydx$$
and by differentiating, we have that 
$$P(W_\nu \in dw)/dw = \int_0^\infty xf(x)f(wx)dx$$
since we are dealing with a ratio of random variables, we thought of applying the Mellin transform to this density function and checking that it coincides with the Mellin transform of the Lamperti distribution. We have for $\eta \in \mathbb{C}$
$$\mathcal{M}g(\eta) = \int_0^\infty w^{\eta-1}g(w)dw = \int_0^\infty w^{\eta-1}\int_0^\infty xf(x)f(wx)dxdw$$
and this is where problems start. My friend believes that a simple change of variable $wx = z$ will help, since we have $dw = \frac{dz}{x}$ and 
$$\mathcal{M}g(\eta) = \int_0^\infty \left(\frac{z}{x}\right)^{\eta-1}\frac{dz}{x}\int_0^\infty xf(x)f(z)dx = \mathcal{M}f(\eta) \mathcal{M}f(2-\eta)$$
rather magically I would add.
Question:
is the last passage a "legal" change of variable? We are substituting a variable that is a function of the variables of both integrals (assuming such a variable exists) and at the same time we are able to transform $f(wx)$ in $f(z)$, but then are we allowed to leave $x$ (which should by our change of variable be equal to $\frac{z}{w})$ unchanged so that everything neatly simplifies??
 A: Note that the Mellin transform does not necessarily exist for every $\eta \in \mathbb{C}$ . However, there are $a,b \in \mathbb{R}$ (depending on $f$) with $a<b$ such that the integral defining $\mathcal{M} g (\eta)$ converges absolutely for every $\eta \in \mathbb{C}$ with $a < \operatorname{Re}(\eta) < b$ . 
For such $\eta$ Fubini's theorem allows us to change the order of integration in any way we like. In particular, we may write
$$ \mathcal{M} g (\eta) = \int \limits_0^\infty x f(x) \left[\int \limits_0^\infty w^{\eta-1} f(x w) \, \mathrm{d} w\right] \mathrm{d} x \, .$$
Therefore we can compute the $w$-integral first, treating $x$ as a positive constant. The change of variables $z = x w$ is perfectly legal and we get
$$ \int \limits_0^\infty w^{\eta-1} f(x w) \, \mathrm{d} w = x^{-\eta}\int \limits_0^\infty z^{\eta-1} f(z) \, \mathrm{d} z = x^{-\eta} \mathcal{M}f(\eta) \, .$$
Then we plug this result back into the original integral to find
$$ \mathcal{M} g (\eta) = \mathcal{M} f (\eta) \int \limits_0^\infty x^{1 - \eta} f(x)  \mathrm{d} x = \mathcal{M} f (\eta) \mathcal{M} f (2-\eta)$$ 
as desired. This 'magic trick' works because the limits of integration do not change when we use the substitution. For limits other than $- \infty , 0 ,\infty$ the integrals would not be so easy to separate.
Alternatively, we could of course use the two-dimensional change of variables $(y,z) = (x,xw)$ and compute the Jacobian. 
