What is the technique to solve this integral? (Probability) Got to this integral: $$\int_0^\infty \frac{1}{y} \frac{\phi^{\frac{1}{2}}}{\sqrt{2\pi y^3}} exp[\frac{-\phi(y - \mu)^2}{2\mu^2y}]dy$$ while calculating the mean of the inverse of a Inverse Gaussian random variable.
Based on other statistics results I think the result should be $\frac{1}{\phi}$, but I can't find any substitution to get to any known form.
If this helps,  $$\int_0^\infty \frac{\phi^{\frac{1}{2}}}{\sqrt{2\pi y^3}} exp[\frac{-\phi(y - \mu)^2}{2\mu^2y}]dy = 1,$$ because it's a probability density function.

Here is an outline of a solution. One could probably do this in a shorter way, but I work to get rid of the parameters first, and then calculate one integral. I leave the details for you to fill in.
Define
$$
F(\mu,\phi)=\int_0^\infty \frac{1}{y} \frac{\phi^{\frac{1}{2}}}{\sqrt{2\pi y^3}} exp[\frac{-\phi(y - \mu)^2}{2\mu^2y}]\,dy.
$$
Differentiating with respect to $\mu$ gives
$$
D_\mu F=\frac{\phi}{\mu^3}-\frac{\phi}{\mu^2}F.
$$
This differential equation can easily be solved, using integrating factor. The result is
$$
F(\mu,\phi)=\frac{1}{\mu}+\frac{1}{\phi}+G(\phi)e^{-\phi/\mu},
$$
where $G$ is an arbitrary smooth function. The rest of the solution is devoted to show that $G(\phi)=0$.
Let
$$
H(\phi)=F(\phi,\phi)=\frac{2}{\phi}+G(\phi)e^{-1}.
$$
Then, differentiating (and integrating by parts), we find that
$$
H'(\phi)=-\frac{1}{\phi}H(\phi),
$$
and so
$$
H(\phi)=\frac{c}{\phi}
$$
for some constant $c$. This means that $G(\phi)=\tilde{c}/\phi$ for some constant $\tilde{c}$. We calculate $H(1)$ to find $c$ (and thus $\tilde{c}$).
We have
$$
H(1)=\int_0^{+\infty}\frac{1}{y\sqrt{2\pi y^3}}e^{-\frac{(y-1)^2}{2y}}.
$$
Now, it would be nice to be able to do the substitution
$$
u=\frac{y-1}{\sqrt{2y}}
$$
but then
$$
du=\frac{y+1}{2\sqrt{2}y^{3/2}}\,dy,
$$
and this does not really fit well with our expression. We try to differentiate a power of $y$ together with the exponential part to see if that can help.
$$
D_y \Bigl(e^{-\frac{(y-1)^2}{2y}}y^\alpha\Bigr)=\frac{1+2\alpha y-y^2}{2y^{2-\alpha}}e^{-\frac{(y-1)^2}{2y}}.
$$
We find that with $\alpha=-1/2$ we get something in the denominator that looks like what we have,
$$
D_y \Bigl(e^{-\frac{(y-1)^2}{2y}}y^{-1/2}\Bigr)=\frac{1-y-y^2}{2y\sqrt{y^3}}e^{-\frac{(y-1)^2}{2y}} = \frac{1}{2y\sqrt{y^3}}e^{-\frac{(y-1)^2}{2y}}-\frac{1+y}{2\sqrt{y^3}}e^{-\frac{(y-1)^2}{2y}}.
$$
As a kind of magic, the last part now fits well with the aforementioned substitution! We thus get that (I hope I got the coefficients right)
$$
\int_0^{+\infty}\frac{1}{y\sqrt{2\pi y^3}}e^{-\frac{(y-1)^2}{2y}} = 
\Bigl[\sqrt{\frac{2}{\pi y}}e^{-\frac{(y-1)^2}{2y}}\Bigr]_0^{+\infty}
+\frac{2}{\sqrt{\pi}}\int_{-\infty}^{+\infty}e^{-u^2}\,du=2.
$$
Thus $c=2$ and $\tilde{c}=0$, and we conclude that
$$
F(\mu,\phi)=\frac{1}{\mu}+\frac{1}{\phi}.
$$
I think it is a bit fascinating that this integral is symmetric in $\mu$ and $\phi$, but I'm not into probability theory, so that maybe has a simple explanation. Also, one could probably do the last step with the change of variables directly, but I felt I would have drowned in the parameters that way...
