I am trying implement importance sampling of this integral $$ \mathfrak{I} = \int\limits_{-\infty }^{\infty }{\sqrt{\left| \frac{\theta }{1-\theta } \right|}}f(\theta )\text{d}\theta $$ where $f(\theta )\propto {{(1+{{\theta }^{2}}/5)}^{-3}}$ is a t-distribution with df=5.
I already sampled from the above distribution and was told to use samples from 1 and 2 below:
Importance function equal to $$ 0.5\{{{g}_{1}}(\theta )+{{g}_{2}}(\theta )\}, $$ where $$ {{g}_{1}}(\theta )=\frac{1}{\pi }\frac{1}{1+{{\theta }^{2}}} $$ and
$$ {{g}_{2}}(\theta )=\frac{1}{4\sqrt{\left|1-\theta \right| }} \quad\text{on}\quad\space [0,2] $$Importance function equal to $$ g'(\theta)\propto \frac{1}{\sqrt{\left| 1-\theta \right|}}\exp (-\left| 1-\theta \right|) $$
How should I do this? I have searched around, and vaguely understands concept. Could someone explain more in detail what I should do? Seems like I have all the tools I need.