We know most integrands can easily be transformed to the unit hypercube: $$\int_{a_1}^{b_1}\cdots\int_{a_d}^{b_d}{\rm d}^{d}x\, f(\vec{x})=\int_0^1{\rm d}^dx\,f(\vec{x})\prod_{i=1}^{d}(b_i-a_i)\ ,$$ where $x_i=a_i+(b_i-a_i)y_i$, you can see this document at page3: ACAT 05. Such as, $$\int_a^b{\rm d}x\,f(x)=\int_0^1{\rm d}y\,f\big(a+(b-a)y\big)(b-a)\ .$$ We also have other transformative method, such as, $$\int_a^{+\infty}{\rm d}x\, f(x)=\int_0^1{\rm d}t\,f\big(a+(1-t)/t\big)/t^2\ ,$$ $$\int_{-\infty}^{+\infty}{\rm d}x\,f(x)=\int_0^1{\rm d}t\,\Big[f\Big((1-t)/t\Big)+f\Big(-(1-t)/t\Big)\Big]/t^2\ ,$$ $$\int_{-\infty}^b{\rm d}x\, f(x)=\int_0^1{\rm d}t\,f\Big(b-(1-t)/t\Big)/t^2 \ .$$
Now my question is: How to define a function that can transform integrands to the unit hypercube? It maybe have follow form:
formatting[fun_,{x_,xmin_,xmax_},{y_,ymin_,yMax_},...]:=(* Define *)
When I calculate $$\int_0^{+\infty}\exp(-x)\cdot\sin(x){\rm d}x\ .$$ I use function
formatting[Exp[-x]*Sin[x],{x,0,\[Infinity]}]
I can get $$\exp\Big(-(1-t)/t\Big)\cdot\sin\Big((1-t)/t\Big)/t^2 \ .$$
I think I can use Which
to construct this function, but branch is too many.