How can I prove this formula $\int_0^\infty f\left( a^2x^2+\frac{b^2}{x^2}\right)\mathrm{d}x=\frac{1}{a}\int_0^\infty f(x^2+2ab)\mathrm{d}x$? While solving this trigonometric integral :
$$\int_0^\infty \sin\left(a^2x^2+\frac{b^2}{x^2}\right)\mathrm{d}x$$
I came across this formula :
$$\int_0^\infty f\left( a^2x^2+\frac{b^2}{x^2}\right)\mathrm{d}x=\frac{1}{a}\int_0^\infty f(x^2+2ab)\mathrm{d}x$$
And I'm wondering if I can prove it, but I hadn't any idea, because it seems like it depends on the properties of the function $f$.

Assume that $a,b > 0$. If $\displaystyle{t = a x - \frac{b}{x}}$, then
$$t^2 + 2 a b = a^2 x^2 + \frac{b^2}{x^2} - 2 ab + 2 a b = 
a^2 x^2 + \frac{b^2}{x^2}.$$
Also one has
$$dt = \left(a + \frac{b}{x^2} \right) dx$$
as $x$ varies from $0$ to $\infty$, we see that $t$ varies from $-\infty$ to $\infty$. Hence, as long as one is careful about convergence, you formally get
$$\int_{-\infty}^{\infty} f(t^2 + 2 a b) dt = \int_{0}^{\infty} f \left(a^2 x^2 + \frac{b^2}{x^2} \right) \left(a + \frac{b}{x^2} \right) dx$$
$$ = a  \int_{0}^{\infty} f \left(a^2 x^2 + \frac{b^2}{x^2} \right) dx +  \int_{0}^{\infty}  f \left(a^2 x^2 + \frac{b^2}{x^2} \right) \frac{b \cdot dx}{x^2}.$$
In the second integral, make the substitution $x \mapsto (b/a) u^{-1}$.
This replaces $a^2 x^2$ by $b^2/u^2$  and $b^2/x^2$ to $a^2 u^2$,
it
changes the integrand from $[0,\infty)$ to $(\infty,0]$, and it changes
$$\frac{b  \cdot  dx}{x^2} = \frac{b \cdot   d((b/a) u^{-1})}{(b/a)^2 u^{-2}} = \frac{- (b^2/a) u^{-2}}{b^2 a^{-2} u^{-2}}
= -a \cdot du,$$
and thus (with the minus sign accounting for reversing the integrand)
$$\int_{-\infty}^{\infty} f(t^2 + 2 a b) dt 
= 
 a  \int_{0}^{\infty} f \left(a^2 x^2 + \frac{b^2}{x^2} \right) dx + a  \int_{0}^{\infty}  f \left(a^2 u^2 + \frac{b^2}{u^2} \right)  du.$$
Since the LHS is symmetric it $t \mapsto -t$, replacing the integrand by $[0,\infty)$ divides both sides by $2$ giving
$$\frac{1}{a} \int_{0}^{\infty} f(t^2 + 2 a b) dt 
= 
  \int_{0}^{\infty} f \left(a^2 x^2 + \frac{b^2}{x^2} \right) dx.$$
